From 3a07de3aca8590aded8f432a58fdc151ae258b7c Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Tue, 23 Jul 2024 18:00:05 +0100 Subject: [PATCH 001/122] dynamic rows for TextField based on ux config --- dist/voxgig-model-react.es.js | 201 ++++++++------------------------- dist/voxgig-model-react.umd.js | 201 ++++++++------------------------- src/lib/BasicEntityField.tsx | 2 +- 3 files changed, 93 insertions(+), 311 deletions(-) diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index 92e9a18..21e11ca 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -2854,6 +2854,7 @@ function requireObjectWithoutPropertiesLoose() { })(objectWithoutPropertiesLoose$1); return objectWithoutPropertiesLoose$1.exports; } +var isDevelopment = false; function sheetForTag(tag) { if (tag.sheet) { return tag.sheet; @@ -2863,6 +2864,7 @@ function sheetForTag(tag) { return document.styleSheets[i]; } } + return void 0; } function createStyleElement(options) { var tag = document.createElement("style"); @@ -2893,7 +2895,7 @@ var StyleSheet = /* @__PURE__ */ function() { _this.container.insertBefore(tag, before); _this.tags.push(tag); }; - this.isSpeedy = options.speedy === void 0 ? process.env.NODE_ENV === "production" : options.speedy; + this.isSpeedy = options.speedy === void 0 ? !isDevelopment : options.speedy; this.tags = []; this.ctr = 0; this.nonce = options.nonce; @@ -2912,21 +2914,11 @@ var StyleSheet = /* @__PURE__ */ function() { this._insertTag(createStyleElement(this)); } var tag = this.tags[this.tags.length - 1]; - if (process.env.NODE_ENV !== "production") { - var isImportRule3 = rule.charCodeAt(0) === 64 && rule.charCodeAt(1) === 105; - if (isImportRule3 && this._alreadyInsertedOrderInsensitiveRule) { - console.error("You're attempting to insert the following rule:\n" + rule + "\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules."); - } - this._alreadyInsertedOrderInsensitiveRule = this._alreadyInsertedOrderInsensitiveRule || !isImportRule3; - } if (this.isSpeedy) { var sheet = sheetForTag(tag); try { sheet.insertRule(rule, sheet.cssRules.length); } catch (e) { - if (process.env.NODE_ENV !== "production" && !/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(rule)) { - console.error('There was a problem inserting the following rule: "' + rule + '"', e); - } } } else { tag.appendChild(document.createTextNode(rule)); @@ -2935,13 +2927,11 @@ var StyleSheet = /* @__PURE__ */ function() { }; _proto.flush = function flush() { this.tags.forEach(function(tag) { - return tag.parentNode && tag.parentNode.removeChild(tag); + var _tag$parentNode; + return (_tag$parentNode = tag.parentNode) == null ? void 0 : _tag$parentNode.removeChild(tag); }); this.tags = []; this.ctr = 0; - if (process.env.NODE_ENV !== "production") { - this._alreadyInsertedOrderInsensitiveRule = false; - } }; return StyleSheet2; }(); @@ -3626,68 +3616,6 @@ var removeLabel = function removeLabel2(element) { } } }; -var ignoreFlag = "emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason"; -var isIgnoringComment = function isIgnoringComment2(element) { - return element.type === "comm" && element.children.indexOf(ignoreFlag) > -1; -}; -var createUnsafeSelectorsAlarm = function createUnsafeSelectorsAlarm2(cache2) { - return function(element, index2, children2) { - if (element.type !== "rule" || cache2.compat) return; - var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g); - if (unsafePseudoClasses) { - var isNested = !!element.parent; - var commentContainer = isNested ? element.parent.children : ( - // global rule at the root level - children2 - ); - for (var i = commentContainer.length - 1; i >= 0; i--) { - var node2 = commentContainer[i]; - if (node2.line < element.line) { - break; - } - if (node2.column < element.column) { - if (isIgnoringComment(node2)) { - return; - } - break; - } - } - unsafePseudoClasses.forEach(function(unsafePseudoClass) { - console.error('The pseudo class "' + unsafePseudoClass + '" is potentially unsafe when doing server-side rendering. Try changing it to "' + unsafePseudoClass.split("-child")[0] + '-of-type".'); - }); - } - }; -}; -var isImportRule = function isImportRule2(element) { - return element.type.charCodeAt(1) === 105 && element.type.charCodeAt(0) === 64; -}; -var isPrependedWithRegularRules = function isPrependedWithRegularRules2(index2, children2) { - for (var i = index2 - 1; i >= 0; i--) { - if (!isImportRule(children2[i])) { - return true; - } - } - return false; -}; -var nullifyElement = function nullifyElement2(element) { - element.type = ""; - element.value = ""; - element["return"] = ""; - element.children = ""; - element.props = ""; -}; -var incorrectImportAlarm = function incorrectImportAlarm2(element, index2, children2) { - if (!isImportRule(element)) { - return; - } - if (element.parent) { - console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."); - nullifyElement(element); - } else if (isPrependedWithRegularRules(index2, children2)) { - console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."); - nullifyElement(element); - } -}; function prefix(value, length2) { switch (hash$2(value, length2)) { case 5103: @@ -3834,9 +3762,6 @@ var prefixer = function prefixer2(element, index2, children2, callback) { var defaultStylisPlugins = [prefixer]; var createCache = function createCache2(options) { var key = options.key; - if (process.env.NODE_ENV !== "production" && !key) { - throw new Error("You have to configure `key` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.\nIf multiple caches share the same key they might \"fight\" for each other's style elements."); - } if (key === "css") { var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])"); Array.prototype.forEach.call(ssrStyles, function(node2) { @@ -3849,11 +3774,6 @@ var createCache = function createCache2(options) { }); } var stylisPlugins = options.stylisPlugins || defaultStylisPlugins; - if (process.env.NODE_ENV !== "production") { - if (/[^a-z-]/.test(key)) { - throw new Error('Emotion key must only contain lower case alphabetical characters and - but "' + key + '" was passed'); - } - } var inserted = {}; var container; var nodesToHydrate = []; @@ -3874,24 +3794,9 @@ var createCache = function createCache2(options) { } var _insert; var omnipresentPlugins = [compat, removeLabel]; - if (process.env.NODE_ENV !== "production") { - omnipresentPlugins.push(createUnsafeSelectorsAlarm({ - get compat() { - return cache2.compat; - } - }), incorrectImportAlarm); - } { var currentSheet; - var finalizingPlugins = [stringify, process.env.NODE_ENV !== "production" ? function(element) { - if (!element.root) { - if (element["return"]) { - currentSheet.insert(element["return"]); - } else if (element.value && element.type !== COMMENT) { - currentSheet.insert(element.value + "{}"); - } - } - } : rulesheet(function(rule) { + var finalizingPlugins = [stringify, rulesheet(function(rule) { currentSheet.insert(rule); })]; var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins)); @@ -3900,13 +3805,6 @@ var createCache = function createCache2(options) { }; _insert = function insert2(selector, serialized, sheet, shouldCache) { currentSheet = sheet; - if (process.env.NODE_ENV !== "production" && serialized.map !== void 0) { - currentSheet = { - insert: function insert3(rule) { - sheet.insert(rule + serialized.map); - } - }; - } stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles); if (shouldCache) { cache2.inserted[serialized.name] = true; @@ -39125,7 +39023,7 @@ const PickersLayoutContentWrapper = styled$1("div", { display: "flex", flexDirection: "column" }); -const PickersLayout = function PickersLayout2(inProps) { +const PickersLayout = /* @__PURE__ */ React$1.forwardRef(function PickersLayout2(inProps, ref) { const props = useThemeProps({ props: inProps, name: "MuiPickersLayout" @@ -39141,7 +39039,6 @@ const PickersLayout = function PickersLayout2(inProps) { sx, className, isLandscape, - ref, wrapperVariant } = props; const classes = useUtilityClasses$J(props); @@ -39159,7 +39056,7 @@ const PickersLayout = function PickersLayout2(inProps) { }) }), actionBar] }); -}; +}); process.env.NODE_ENV !== "production" ? PickersLayout.propTypes = { // ----------------------------- Warning -------------------------------- // | These PropTypes are generated from the TypeScript type definitions | @@ -45063,7 +44960,7 @@ const pickersCalendarHeaderClasses = generateUtilityClasses("MuiPickersCalendarH function getPickersArrowSwitcherUtilityClass(slot) { return generateUtilityClass("MuiPickersArrowSwitcher", slot); } -const pickersArrowSwitcherClasses = generateUtilityClasses("MuiPickersArrowSwitcher", ["root", "spacer", "button"]); +const pickersArrowSwitcherClasses = generateUtilityClasses("MuiPickersArrowSwitcher", ["root", "spacer", "button", "previousIconButton", "nextIconButton", "leftArrowIcon", "rightArrowIcon"]); const _excluded$E = ["children", "className", "slots", "slotProps", "isNextDisabled", "isNextHidden", "onGoToNext", "nextLabel", "isPreviousDisabled", "isPreviousHidden", "onGoToPrevious", "previousLabel", "labelId"], _excluded2$3 = ["ownerState"], _excluded3$1 = ["ownerState"]; const PickersArrowSwitcherRoot = styled$1("div", { name: "MuiPickersArrowSwitcher", @@ -45102,7 +44999,11 @@ const useUtilityClasses$u = (ownerState) => { const slots = { root: ["root"], spacer: ["spacer"], - button: ["button"] + button: ["button"], + previousIconButton: ["previousIconButton"], + nextIconButton: ["nextIconButton"], + leftArrowIcon: ["leftArrowIcon"], + rightArrowIcon: ["rightArrowIcon"] }; return composeClasses(slots, getPickersArrowSwitcherUtilityClass, classes); }; @@ -45157,7 +45058,7 @@ const PickersArrowSwitcher = /* @__PURE__ */ React$1.forwardRef(function Pickers ownerState: _extends$1({}, ownerState, { hidden: previousProps.isHidden }), - className: classes.button + className: clsx(classes.button, classes.previousIconButton) }); const NextIconButton = (_b = slots == null ? void 0 : slots.nextIconButton) != null ? _b : PickersArrowSwitcherButton; const nextIconButtonProps = useSlotProps({ @@ -45174,7 +45075,7 @@ const PickersArrowSwitcher = /* @__PURE__ */ React$1.forwardRef(function Pickers ownerState: _extends$1({}, ownerState, { hidden: nextProps.isHidden }), - className: classes.button + className: clsx(classes.button, classes.nextIconButton) }); const LeftArrowIcon = (_c = slots == null ? void 0 : slots.leftArrowIcon) != null ? _c : ArrowLeftIcon; const _useSlotProps = useSlotProps({ @@ -45183,7 +45084,8 @@ const PickersArrowSwitcher = /* @__PURE__ */ React$1.forwardRef(function Pickers additionalProps: { fontSize: "inherit" }, - ownerState: void 0 + ownerState, + className: classes.leftArrowIcon }), leftArrowIconProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2$3); const RightArrowIcon = (_d = slots == null ? void 0 : slots.rightArrowIcon) != null ? _d : ArrowRightIcon; const _useSlotProps2 = useSlotProps({ @@ -45192,7 +45094,8 @@ const PickersArrowSwitcher = /* @__PURE__ */ React$1.forwardRef(function Pickers additionalProps: { fontSize: "inherit" }, - ownerState: void 0 + ownerState, + className: classes.rightArrowIcon }), rightArrowIconProps = _objectWithoutPropertiesLoose(_useSlotProps2, _excluded3$1); return /* @__PURE__ */ jsxRuntimeExports.jsxs(PickersArrowSwitcherRoot, _extends$1({ ref, @@ -45373,7 +45276,7 @@ const PickersCalendarHeader = /* @__PURE__ */ React$1.forwardRef(function Picker const _useSlotProps = useSlotProps({ elementType: SwitchViewIcon, externalSlotProps: slotProps == null ? void 0 : slotProps.switchViewIcon, - ownerState: void 0, + ownerState, className: classes.switchViewIcon }), switchViewIconProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2$2); const selectNextMonth = () => onMonthChange(utils2.addMonths(month, 1), "left"); @@ -50303,10 +50206,11 @@ function ClockPointer(inProps) { function getClockUtilityClass(slot) { return generateUtilityClass("MuiClock", slot); } -const clockClasses = generateUtilityClasses("MuiClock", ["root", "clock", "wrapper", "squareMask", "pin", "amButton", "pmButton", "meridiemText"]); +const clockClasses = generateUtilityClasses("MuiClock", ["root", "clock", "wrapper", "squareMask", "pin", "amButton", "pmButton", "meridiemText", "selected"]); const useUtilityClasses$h = (ownerState) => { const { - classes + classes, + meridiemMode } = ownerState; const slots = { root: ["root"], @@ -50314,8 +50218,8 @@ const useUtilityClasses$h = (ownerState) => { wrapper: ["wrapper"], squareMask: ["squareMask"], pin: ["pin"], - amButton: ["amButton"], - pmButton: ["pmButton"], + amButton: ["amButton", meridiemMode === "am" && "selected"], + pmButton: ["pmButton", meridiemMode === "pm" && "selected"], meridiemText: ["meridiemText"] }; return composeClasses(slots, getClockUtilityClass, classes); @@ -50398,23 +50302,15 @@ const ClockPin = styled$1("div", { left: "50%", transform: "translate(-50%, -50%)" })); -const ClockAmButton = styled$1(IconButton, { - name: "MuiClock", - slot: "AmButton", - overridesResolver: (_2, styles2) => styles2.amButton -})(({ - theme -}) => ({ +const meridiemButtonCommonStyles = (theme, meridiemMode) => ({ zIndex: 1, - position: "absolute", bottom: 8, - left: 8, paddingLeft: 4, paddingRight: 4, width: CLOCK_HOUR_WIDTH, variants: [{ props: { - meridiemMode: "am" + meridiemMode }, style: { backgroundColor: (theme.vars || theme).palette.primary.main, @@ -50424,6 +50320,17 @@ const ClockAmButton = styled$1(IconButton, { } } }] +}); +const ClockAmButton = styled$1(IconButton, { + name: "MuiClock", + slot: "AmButton", + overridesResolver: (_2, styles2) => styles2.amButton +})(({ + theme +}) => _extends$1({}, meridiemButtonCommonStyles(theme, "am"), { + // keeping it here to make TS happy + position: "absolute", + left: 8 })); const ClockPmButton = styled$1(IconButton, { name: "MuiClock", @@ -50431,26 +50338,10 @@ const ClockPmButton = styled$1(IconButton, { overridesResolver: (_2, styles2) => styles2.pmButton })(({ theme -}) => ({ - zIndex: 1, +}) => _extends$1({}, meridiemButtonCommonStyles(theme, "pm"), { + // keeping it here to make TS happy position: "absolute", - bottom: 8, - right: 8, - paddingLeft: 4, - paddingRight: 4, - width: CLOCK_HOUR_WIDTH, - variants: [{ - props: { - meridiemMode: "pm" - }, - style: { - backgroundColor: (theme.vars || theme).palette.primary.main, - color: (theme.vars || theme).palette.primary.contrastText, - "&:hover": { - backgroundColor: (theme.vars || theme).palette.primary.light - } - } - }] + right: 8 })); const ClockMeridiemText = styled$1(Typography, { name: "MuiClock", @@ -52517,7 +52408,7 @@ const renderMultiSectionDigitalClockTimeView = ({ skipDisabled, timezone }); -function DesktopDateTimePickerLayout(props) { +const DesktopDateTimePickerLayout = /* @__PURE__ */ React$1.forwardRef(function DesktopDateTimePickerLayout2(props, ref) { var _a, _b; const isRtl = useRtl(); const { @@ -52531,7 +52422,6 @@ function DesktopDateTimePickerLayout(props) { sx, className, isLandscape, - ref, classes } = props; const isActionBarVisible = actionBar && ((_b = (_a = actionBar.props.actions) == null ? void 0 : _a.length) != null ? _b : 0) > 0; @@ -52564,7 +52454,7 @@ function DesktopDateTimePickerLayout(props) { })] }), actionBar] }); -} +}); process.env.NODE_ENV !== "production" ? DesktopDateTimePickerLayout.propTypes = { // ----------------------------- Warning -------------------------------- // | These PropTypes are generated from the TypeScript type definitions | @@ -64824,6 +64714,7 @@ function BasicEntityTextField(props) { ] }, field.id); } function BasicEntityTextBoxField(props) { + var _a; const { spec } = props; const { field, register, getValues } = spec; const val = getValues(field.name); @@ -64836,7 +64727,7 @@ function BasicEntityTextBoxField(props) { variant: "outlined", fullWidth: true, multiline: true, - rows: 3, + rows: (_a = field.ux.rows) != null ? _a : 3, InputLabelProps: { shrink: (val == null ? void 0 : val.length) > 0 } }, register(field.name)) ) }, field.name); diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index bce3f35..4cb9563 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -2866,6 +2866,7 @@ var __async = (__this, __arguments, generator) => { })(objectWithoutPropertiesLoose$1); return objectWithoutPropertiesLoose$1.exports; } + var isDevelopment = false; function sheetForTag(tag) { if (tag.sheet) { return tag.sheet; @@ -2875,6 +2876,7 @@ var __async = (__this, __arguments, generator) => { return document.styleSheets[i]; } } + return void 0; } function createStyleElement(options) { var tag = document.createElement("style"); @@ -2905,7 +2907,7 @@ var __async = (__this, __arguments, generator) => { _this.container.insertBefore(tag, before); _this.tags.push(tag); }; - this.isSpeedy = options.speedy === void 0 ? process.env.NODE_ENV === "production" : options.speedy; + this.isSpeedy = options.speedy === void 0 ? !isDevelopment : options.speedy; this.tags = []; this.ctr = 0; this.nonce = options.nonce; @@ -2924,21 +2926,11 @@ var __async = (__this, __arguments, generator) => { this._insertTag(createStyleElement(this)); } var tag = this.tags[this.tags.length - 1]; - if (process.env.NODE_ENV !== "production") { - var isImportRule2 = rule.charCodeAt(0) === 64 && rule.charCodeAt(1) === 105; - if (isImportRule2 && this._alreadyInsertedOrderInsensitiveRule) { - console.error("You're attempting to insert the following rule:\n" + rule + "\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules."); - } - this._alreadyInsertedOrderInsensitiveRule = this._alreadyInsertedOrderInsensitiveRule || !isImportRule2; - } if (this.isSpeedy) { var sheet = sheetForTag(tag); try { sheet.insertRule(rule, sheet.cssRules.length); } catch (e) { - if (process.env.NODE_ENV !== "production" && !/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(rule)) { - console.error('There was a problem inserting the following rule: "' + rule + '"', e); - } } } else { tag.appendChild(document.createTextNode(rule)); @@ -2947,13 +2939,11 @@ var __async = (__this, __arguments, generator) => { }; _proto.flush = function flush() { this.tags.forEach(function(tag) { - return tag.parentNode && tag.parentNode.removeChild(tag); + var _tag$parentNode; + return (_tag$parentNode = tag.parentNode) == null ? void 0 : _tag$parentNode.removeChild(tag); }); this.tags = []; this.ctr = 0; - if (process.env.NODE_ENV !== "production") { - this._alreadyInsertedOrderInsensitiveRule = false; - } }; return StyleSheet2; }(); @@ -3638,68 +3628,6 @@ var __async = (__this, __arguments, generator) => { } } }; - var ignoreFlag = "emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason"; - var isIgnoringComment = function isIgnoringComment2(element) { - return element.type === "comm" && element.children.indexOf(ignoreFlag) > -1; - }; - var createUnsafeSelectorsAlarm = function createUnsafeSelectorsAlarm2(cache2) { - return function(element, index2, children) { - if (element.type !== "rule" || cache2.compat) return; - var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g); - if (unsafePseudoClasses) { - var isNested = !!element.parent; - var commentContainer = isNested ? element.parent.children : ( - // global rule at the root level - children - ); - for (var i = commentContainer.length - 1; i >= 0; i--) { - var node2 = commentContainer[i]; - if (node2.line < element.line) { - break; - } - if (node2.column < element.column) { - if (isIgnoringComment(node2)) { - return; - } - break; - } - } - unsafePseudoClasses.forEach(function(unsafePseudoClass) { - console.error('The pseudo class "' + unsafePseudoClass + '" is potentially unsafe when doing server-side rendering. Try changing it to "' + unsafePseudoClass.split("-child")[0] + '-of-type".'); - }); - } - }; - }; - var isImportRule = function isImportRule2(element) { - return element.type.charCodeAt(1) === 105 && element.type.charCodeAt(0) === 64; - }; - var isPrependedWithRegularRules = function isPrependedWithRegularRules2(index2, children) { - for (var i = index2 - 1; i >= 0; i--) { - if (!isImportRule(children[i])) { - return true; - } - } - return false; - }; - var nullifyElement = function nullifyElement2(element) { - element.type = ""; - element.value = ""; - element["return"] = ""; - element.children = ""; - element.props = ""; - }; - var incorrectImportAlarm = function incorrectImportAlarm2(element, index2, children) { - if (!isImportRule(element)) { - return; - } - if (element.parent) { - console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."); - nullifyElement(element); - } else if (isPrependedWithRegularRules(index2, children)) { - console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."); - nullifyElement(element); - } - }; function prefix(value, length2) { switch (hash$2(value, length2)) { case 5103: @@ -3846,9 +3774,6 @@ var __async = (__this, __arguments, generator) => { var defaultStylisPlugins = [prefixer]; var createCache = function createCache2(options) { var key = options.key; - if (process.env.NODE_ENV !== "production" && !key) { - throw new Error("You have to configure `key` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.\nIf multiple caches share the same key they might \"fight\" for each other's style elements."); - } if (key === "css") { var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])"); Array.prototype.forEach.call(ssrStyles, function(node2) { @@ -3861,11 +3786,6 @@ var __async = (__this, __arguments, generator) => { }); } var stylisPlugins = options.stylisPlugins || defaultStylisPlugins; - if (process.env.NODE_ENV !== "production") { - if (/[^a-z-]/.test(key)) { - throw new Error('Emotion key must only contain lower case alphabetical characters and - but "' + key + '" was passed'); - } - } var inserted = {}; var container; var nodesToHydrate = []; @@ -3886,24 +3806,9 @@ var __async = (__this, __arguments, generator) => { } var _insert; var omnipresentPlugins = [compat, removeLabel]; - if (process.env.NODE_ENV !== "production") { - omnipresentPlugins.push(createUnsafeSelectorsAlarm({ - get compat() { - return cache2.compat; - } - }), incorrectImportAlarm); - } { var currentSheet; - var finalizingPlugins = [stringify, process.env.NODE_ENV !== "production" ? function(element) { - if (!element.root) { - if (element["return"]) { - currentSheet.insert(element["return"]); - } else if (element.value && element.type !== COMMENT) { - currentSheet.insert(element.value + "{}"); - } - } - } : rulesheet(function(rule) { + var finalizingPlugins = [stringify, rulesheet(function(rule) { currentSheet.insert(rule); })]; var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins)); @@ -3912,13 +3817,6 @@ var __async = (__this, __arguments, generator) => { }; _insert = function insert2(selector, serialized, sheet, shouldCache) { currentSheet = sheet; - if (process.env.NODE_ENV !== "production" && serialized.map !== void 0) { - currentSheet = { - insert: function insert3(rule) { - sheet.insert(rule + serialized.map); - } - }; - } stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles); if (shouldCache) { cache2.inserted[serialized.name] = true; @@ -39137,7 +39035,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha display: "flex", flexDirection: "column" }); - const PickersLayout = function PickersLayout2(inProps) { + const PickersLayout = /* @__PURE__ */ React__namespace.forwardRef(function PickersLayout2(inProps, ref) { const props = useThemeProps({ props: inProps, name: "MuiPickersLayout" @@ -39153,7 +39051,6 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha sx, className, isLandscape, - ref, wrapperVariant } = props; const classes = useUtilityClasses$J(props); @@ -39171,7 +39068,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }) }), actionBar] }); - }; + }); process.env.NODE_ENV !== "production" ? PickersLayout.propTypes = { // ----------------------------- Warning -------------------------------- // | These PropTypes are generated from the TypeScript type definitions | @@ -45075,7 +44972,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha function getPickersArrowSwitcherUtilityClass(slot) { return generateUtilityClass("MuiPickersArrowSwitcher", slot); } - const pickersArrowSwitcherClasses = generateUtilityClasses("MuiPickersArrowSwitcher", ["root", "spacer", "button"]); + const pickersArrowSwitcherClasses = generateUtilityClasses("MuiPickersArrowSwitcher", ["root", "spacer", "button", "previousIconButton", "nextIconButton", "leftArrowIcon", "rightArrowIcon"]); const _excluded$E = ["children", "className", "slots", "slotProps", "isNextDisabled", "isNextHidden", "onGoToNext", "nextLabel", "isPreviousDisabled", "isPreviousHidden", "onGoToPrevious", "previousLabel", "labelId"], _excluded2$3 = ["ownerState"], _excluded3$1 = ["ownerState"]; const PickersArrowSwitcherRoot = styled$1("div", { name: "MuiPickersArrowSwitcher", @@ -45114,7 +45011,11 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const slots = { root: ["root"], spacer: ["spacer"], - button: ["button"] + button: ["button"], + previousIconButton: ["previousIconButton"], + nextIconButton: ["nextIconButton"], + leftArrowIcon: ["leftArrowIcon"], + rightArrowIcon: ["rightArrowIcon"] }; return composeClasses(slots, getPickersArrowSwitcherUtilityClass, classes); }; @@ -45169,7 +45070,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ownerState: _extends$1({}, ownerState, { hidden: previousProps.isHidden }), - className: classes.button + className: clsx(classes.button, classes.previousIconButton) }); const NextIconButton = (_b = slots == null ? void 0 : slots.nextIconButton) != null ? _b : PickersArrowSwitcherButton; const nextIconButtonProps = useSlotProps({ @@ -45186,7 +45087,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ownerState: _extends$1({}, ownerState, { hidden: nextProps.isHidden }), - className: classes.button + className: clsx(classes.button, classes.nextIconButton) }); const LeftArrowIcon = (_c = slots == null ? void 0 : slots.leftArrowIcon) != null ? _c : ArrowLeftIcon; const _useSlotProps = useSlotProps({ @@ -45195,7 +45096,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha additionalProps: { fontSize: "inherit" }, - ownerState: void 0 + ownerState, + className: classes.leftArrowIcon }), leftArrowIconProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2$3); const RightArrowIcon = (_d = slots == null ? void 0 : slots.rightArrowIcon) != null ? _d : ArrowRightIcon; const _useSlotProps2 = useSlotProps({ @@ -45204,7 +45106,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha additionalProps: { fontSize: "inherit" }, - ownerState: void 0 + ownerState, + className: classes.rightArrowIcon }), rightArrowIconProps = _objectWithoutPropertiesLoose(_useSlotProps2, _excluded3$1); return /* @__PURE__ */ jsxRuntimeExports.jsxs(PickersArrowSwitcherRoot, _extends$1({ ref, @@ -45385,7 +45288,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const _useSlotProps = useSlotProps({ elementType: SwitchViewIcon, externalSlotProps: slotProps == null ? void 0 : slotProps.switchViewIcon, - ownerState: void 0, + ownerState, className: classes.switchViewIcon }), switchViewIconProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2$2); const selectNextMonth = () => onMonthChange(utils2.addMonths(month, 1), "left"); @@ -50315,10 +50218,11 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha function getClockUtilityClass(slot) { return generateUtilityClass("MuiClock", slot); } - const clockClasses = generateUtilityClasses("MuiClock", ["root", "clock", "wrapper", "squareMask", "pin", "amButton", "pmButton", "meridiemText"]); + const clockClasses = generateUtilityClasses("MuiClock", ["root", "clock", "wrapper", "squareMask", "pin", "amButton", "pmButton", "meridiemText", "selected"]); const useUtilityClasses$h = (ownerState) => { const { - classes + classes, + meridiemMode } = ownerState; const slots = { root: ["root"], @@ -50326,8 +50230,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha wrapper: ["wrapper"], squareMask: ["squareMask"], pin: ["pin"], - amButton: ["amButton"], - pmButton: ["pmButton"], + amButton: ["amButton", meridiemMode === "am" && "selected"], + pmButton: ["pmButton", meridiemMode === "pm" && "selected"], meridiemText: ["meridiemText"] }; return composeClasses(slots, getClockUtilityClass, classes); @@ -50410,23 +50314,15 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha left: "50%", transform: "translate(-50%, -50%)" })); - const ClockAmButton = styled$1(IconButton, { - name: "MuiClock", - slot: "AmButton", - overridesResolver: (_2, styles2) => styles2.amButton - })(({ - theme - }) => ({ + const meridiemButtonCommonStyles = (theme, meridiemMode) => ({ zIndex: 1, - position: "absolute", bottom: 8, - left: 8, paddingLeft: 4, paddingRight: 4, width: CLOCK_HOUR_WIDTH, variants: [{ props: { - meridiemMode: "am" + meridiemMode }, style: { backgroundColor: (theme.vars || theme).palette.primary.main, @@ -50436,6 +50332,17 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } } }] + }); + const ClockAmButton = styled$1(IconButton, { + name: "MuiClock", + slot: "AmButton", + overridesResolver: (_2, styles2) => styles2.amButton + })(({ + theme + }) => _extends$1({}, meridiemButtonCommonStyles(theme, "am"), { + // keeping it here to make TS happy + position: "absolute", + left: 8 })); const ClockPmButton = styled$1(IconButton, { name: "MuiClock", @@ -50443,26 +50350,10 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha overridesResolver: (_2, styles2) => styles2.pmButton })(({ theme - }) => ({ - zIndex: 1, + }) => _extends$1({}, meridiemButtonCommonStyles(theme, "pm"), { + // keeping it here to make TS happy position: "absolute", - bottom: 8, - right: 8, - paddingLeft: 4, - paddingRight: 4, - width: CLOCK_HOUR_WIDTH, - variants: [{ - props: { - meridiemMode: "pm" - }, - style: { - backgroundColor: (theme.vars || theme).palette.primary.main, - color: (theme.vars || theme).palette.primary.contrastText, - "&:hover": { - backgroundColor: (theme.vars || theme).palette.primary.light - } - } - }] + right: 8 })); const ClockMeridiemText = styled$1(Typography, { name: "MuiClock", @@ -52529,7 +52420,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha skipDisabled, timezone }); - function DesktopDateTimePickerLayout(props) { + const DesktopDateTimePickerLayout = /* @__PURE__ */ React__namespace.forwardRef(function DesktopDateTimePickerLayout2(props, ref) { var _a, _b; const isRtl = useRtl(); const { @@ -52543,7 +52434,6 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha sx, className, isLandscape, - ref, classes } = props; const isActionBarVisible = actionBar && ((_b = (_a = actionBar.props.actions) == null ? void 0 : _a.length) != null ? _b : 0) > 0; @@ -52576,7 +52466,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha })] }), actionBar] }); - } + }); process.env.NODE_ENV !== "production" ? DesktopDateTimePickerLayout.propTypes = { // ----------------------------- Warning -------------------------------- // | These PropTypes are generated from the TypeScript type definitions | @@ -64836,6 +64726,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ] }, field.id); } function BasicEntityTextBoxField(props) { + var _a; const { spec } = props; const { field, register, getValues } = spec; const val = getValues(field.name); @@ -64848,7 +64739,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha variant: "outlined", fullWidth: true, multiline: true, - rows: 3, + rows: (_a = field.ux.rows) != null ? _a : 3, InputLabelProps: { shrink: (val == null ? void 0 : val.length) > 0 } }, register(field.name)) ) }, field.name); diff --git a/src/lib/BasicEntityField.tsx b/src/lib/BasicEntityField.tsx index f332b15..53bcec8 100644 --- a/src/lib/BasicEntityField.tsx +++ b/src/lib/BasicEntityField.tsx @@ -93,7 +93,7 @@ function BasicEntityTextBoxField (props: any) { variant="outlined" fullWidth multiline - rows={3} + rows={field.ux.rows ?? 3} InputLabelProps={{ shrink: val?.length > 0 }} {...register(field.name)} /> From 7acc4fa947595cd9bb9b88ff1bce31d5058b679c Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Tue, 23 Jul 2024 19:20:15 +0100 Subject: [PATCH 002/122] add BasicEntityCheckBoxField component --- dist/BasicEntityCheckBoxField.d.ts | 2 + dist/voxgig-model-react.es.js | 244 ++++++++++----------------- dist/voxgig-model-react.umd.js | 242 ++++++++++---------------- src/lib/BasicEntityCheckBoxField.tsx | 48 ++++++ src/lib/BasicEntityEdit.tsx | 2 + src/lib/BasicEntityField.tsx | 2 + 6 files changed, 229 insertions(+), 311 deletions(-) create mode 100644 dist/BasicEntityCheckBoxField.d.ts create mode 100644 src/lib/BasicEntityCheckBoxField.tsx diff --git a/dist/BasicEntityCheckBoxField.d.ts b/dist/BasicEntityCheckBoxField.d.ts new file mode 100644 index 0000000..3a9d2ea --- /dev/null +++ b/dist/BasicEntityCheckBoxField.d.ts @@ -0,0 +1,2 @@ +declare function BasicEntityCheckBoxField(props: any): import("react/jsx-runtime").JSX.Element; +export { BasicEntityCheckBoxField }; diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index 92e9a18..335fa9f 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -54,7 +54,7 @@ var __async = (__this, __arguments, generator) => { }; import * as React$1 from "react"; import React__default, { isValidElement, Children, cloneElement, useMemo, useState, useReducer, useRef, useEffect, useCallback, memo as memo$2, Fragment, useLayoutEffect } from "react"; -import { Button as Button$1, Avatar, Menu as Menu$1, MenuItem as MenuItem$1, IconButton as IconButton$1, useTheme as useTheme$5, Box as Box$2, TextField as TextField$1, Grid as Grid$1, Toolbar as Toolbar$1, Container as Container$2, Drawer as Drawer$1, List as List$1, ListItem as ListItem$1, ListItemButton as ListItemButton$1, ListItemIcon as ListItemIcon$1, ListItemText as ListItemText$1, Divider as Divider$1, Typography as Typography$1 } from "@mui/material"; +import { Button as Button$1, Avatar, Menu as Menu$1, MenuItem as MenuItem$1, IconButton as IconButton$1, useTheme as useTheme$5, Box as Box$2, FormControlLabel as FormControlLabel$1, Checkbox as Checkbox$1, TextField as TextField$1, Grid as Grid$1, Toolbar as Toolbar$1, Container as Container$2, Drawer as Drawer$1, List as List$1, ListItem as ListItem$1, ListItemButton as ListItemButton$1, ListItemIcon as ListItemIcon$1, ListItemText as ListItemText$1, Divider as Divider$1, Typography as Typography$1 } from "@mui/material"; import emStyled from "@emotion/styled"; import { CacheProvider, Global, ThemeContext as ThemeContext$1, css, keyframes } from "@emotion/react"; import { useSelector } from "react-redux"; @@ -2854,6 +2854,7 @@ function requireObjectWithoutPropertiesLoose() { })(objectWithoutPropertiesLoose$1); return objectWithoutPropertiesLoose$1.exports; } +var isDevelopment = false; function sheetForTag(tag) { if (tag.sheet) { return tag.sheet; @@ -2863,6 +2864,7 @@ function sheetForTag(tag) { return document.styleSheets[i]; } } + return void 0; } function createStyleElement(options) { var tag = document.createElement("style"); @@ -2893,7 +2895,7 @@ var StyleSheet = /* @__PURE__ */ function() { _this.container.insertBefore(tag, before); _this.tags.push(tag); }; - this.isSpeedy = options.speedy === void 0 ? process.env.NODE_ENV === "production" : options.speedy; + this.isSpeedy = options.speedy === void 0 ? !isDevelopment : options.speedy; this.tags = []; this.ctr = 0; this.nonce = options.nonce; @@ -2912,21 +2914,11 @@ var StyleSheet = /* @__PURE__ */ function() { this._insertTag(createStyleElement(this)); } var tag = this.tags[this.tags.length - 1]; - if (process.env.NODE_ENV !== "production") { - var isImportRule3 = rule.charCodeAt(0) === 64 && rule.charCodeAt(1) === 105; - if (isImportRule3 && this._alreadyInsertedOrderInsensitiveRule) { - console.error("You're attempting to insert the following rule:\n" + rule + "\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules."); - } - this._alreadyInsertedOrderInsensitiveRule = this._alreadyInsertedOrderInsensitiveRule || !isImportRule3; - } if (this.isSpeedy) { var sheet = sheetForTag(tag); try { sheet.insertRule(rule, sheet.cssRules.length); } catch (e) { - if (process.env.NODE_ENV !== "production" && !/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(rule)) { - console.error('There was a problem inserting the following rule: "' + rule + '"', e); - } } } else { tag.appendChild(document.createTextNode(rule)); @@ -2935,13 +2927,11 @@ var StyleSheet = /* @__PURE__ */ function() { }; _proto.flush = function flush() { this.tags.forEach(function(tag) { - return tag.parentNode && tag.parentNode.removeChild(tag); + var _tag$parentNode; + return (_tag$parentNode = tag.parentNode) == null ? void 0 : _tag$parentNode.removeChild(tag); }); this.tags = []; this.ctr = 0; - if (process.env.NODE_ENV !== "production") { - this._alreadyInsertedOrderInsensitiveRule = false; - } }; return StyleSheet2; }(); @@ -3626,68 +3616,6 @@ var removeLabel = function removeLabel2(element) { } } }; -var ignoreFlag = "emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason"; -var isIgnoringComment = function isIgnoringComment2(element) { - return element.type === "comm" && element.children.indexOf(ignoreFlag) > -1; -}; -var createUnsafeSelectorsAlarm = function createUnsafeSelectorsAlarm2(cache2) { - return function(element, index2, children2) { - if (element.type !== "rule" || cache2.compat) return; - var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g); - if (unsafePseudoClasses) { - var isNested = !!element.parent; - var commentContainer = isNested ? element.parent.children : ( - // global rule at the root level - children2 - ); - for (var i = commentContainer.length - 1; i >= 0; i--) { - var node2 = commentContainer[i]; - if (node2.line < element.line) { - break; - } - if (node2.column < element.column) { - if (isIgnoringComment(node2)) { - return; - } - break; - } - } - unsafePseudoClasses.forEach(function(unsafePseudoClass) { - console.error('The pseudo class "' + unsafePseudoClass + '" is potentially unsafe when doing server-side rendering. Try changing it to "' + unsafePseudoClass.split("-child")[0] + '-of-type".'); - }); - } - }; -}; -var isImportRule = function isImportRule2(element) { - return element.type.charCodeAt(1) === 105 && element.type.charCodeAt(0) === 64; -}; -var isPrependedWithRegularRules = function isPrependedWithRegularRules2(index2, children2) { - for (var i = index2 - 1; i >= 0; i--) { - if (!isImportRule(children2[i])) { - return true; - } - } - return false; -}; -var nullifyElement = function nullifyElement2(element) { - element.type = ""; - element.value = ""; - element["return"] = ""; - element.children = ""; - element.props = ""; -}; -var incorrectImportAlarm = function incorrectImportAlarm2(element, index2, children2) { - if (!isImportRule(element)) { - return; - } - if (element.parent) { - console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."); - nullifyElement(element); - } else if (isPrependedWithRegularRules(index2, children2)) { - console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."); - nullifyElement(element); - } -}; function prefix(value, length2) { switch (hash$2(value, length2)) { case 5103: @@ -3834,9 +3762,6 @@ var prefixer = function prefixer2(element, index2, children2, callback) { var defaultStylisPlugins = [prefixer]; var createCache = function createCache2(options) { var key = options.key; - if (process.env.NODE_ENV !== "production" && !key) { - throw new Error("You have to configure `key` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.\nIf multiple caches share the same key they might \"fight\" for each other's style elements."); - } if (key === "css") { var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])"); Array.prototype.forEach.call(ssrStyles, function(node2) { @@ -3849,11 +3774,6 @@ var createCache = function createCache2(options) { }); } var stylisPlugins = options.stylisPlugins || defaultStylisPlugins; - if (process.env.NODE_ENV !== "production") { - if (/[^a-z-]/.test(key)) { - throw new Error('Emotion key must only contain lower case alphabetical characters and - but "' + key + '" was passed'); - } - } var inserted = {}; var container; var nodesToHydrate = []; @@ -3874,24 +3794,9 @@ var createCache = function createCache2(options) { } var _insert; var omnipresentPlugins = [compat, removeLabel]; - if (process.env.NODE_ENV !== "production") { - omnipresentPlugins.push(createUnsafeSelectorsAlarm({ - get compat() { - return cache2.compat; - } - }), incorrectImportAlarm); - } { var currentSheet; - var finalizingPlugins = [stringify, process.env.NODE_ENV !== "production" ? function(element) { - if (!element.root) { - if (element["return"]) { - currentSheet.insert(element["return"]); - } else if (element.value && element.type !== COMMENT) { - currentSheet.insert(element.value + "{}"); - } - } - } : rulesheet(function(rule) { + var finalizingPlugins = [stringify, rulesheet(function(rule) { currentSheet.insert(rule); })]; var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins)); @@ -3900,13 +3805,6 @@ var createCache = function createCache2(options) { }; _insert = function insert2(selector, serialized, sheet, shouldCache) { currentSheet = sheet; - if (process.env.NODE_ENV !== "production" && serialized.map !== void 0) { - currentSheet = { - insert: function insert3(rule) { - sheet.insert(rule + serialized.map); - } - }; - } stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles); if (shouldCache) { cache2.inserted[serialized.name] = true; @@ -39125,7 +39023,7 @@ const PickersLayoutContentWrapper = styled$1("div", { display: "flex", flexDirection: "column" }); -const PickersLayout = function PickersLayout2(inProps) { +const PickersLayout = /* @__PURE__ */ React$1.forwardRef(function PickersLayout2(inProps, ref) { const props = useThemeProps({ props: inProps, name: "MuiPickersLayout" @@ -39141,7 +39039,6 @@ const PickersLayout = function PickersLayout2(inProps) { sx, className, isLandscape, - ref, wrapperVariant } = props; const classes = useUtilityClasses$J(props); @@ -39159,7 +39056,7 @@ const PickersLayout = function PickersLayout2(inProps) { }) }), actionBar] }); -}; +}); process.env.NODE_ENV !== "production" ? PickersLayout.propTypes = { // ----------------------------- Warning -------------------------------- // | These PropTypes are generated from the TypeScript type definitions | @@ -45063,7 +44960,7 @@ const pickersCalendarHeaderClasses = generateUtilityClasses("MuiPickersCalendarH function getPickersArrowSwitcherUtilityClass(slot) { return generateUtilityClass("MuiPickersArrowSwitcher", slot); } -const pickersArrowSwitcherClasses = generateUtilityClasses("MuiPickersArrowSwitcher", ["root", "spacer", "button"]); +const pickersArrowSwitcherClasses = generateUtilityClasses("MuiPickersArrowSwitcher", ["root", "spacer", "button", "previousIconButton", "nextIconButton", "leftArrowIcon", "rightArrowIcon"]); const _excluded$E = ["children", "className", "slots", "slotProps", "isNextDisabled", "isNextHidden", "onGoToNext", "nextLabel", "isPreviousDisabled", "isPreviousHidden", "onGoToPrevious", "previousLabel", "labelId"], _excluded2$3 = ["ownerState"], _excluded3$1 = ["ownerState"]; const PickersArrowSwitcherRoot = styled$1("div", { name: "MuiPickersArrowSwitcher", @@ -45102,7 +44999,11 @@ const useUtilityClasses$u = (ownerState) => { const slots = { root: ["root"], spacer: ["spacer"], - button: ["button"] + button: ["button"], + previousIconButton: ["previousIconButton"], + nextIconButton: ["nextIconButton"], + leftArrowIcon: ["leftArrowIcon"], + rightArrowIcon: ["rightArrowIcon"] }; return composeClasses(slots, getPickersArrowSwitcherUtilityClass, classes); }; @@ -45157,7 +45058,7 @@ const PickersArrowSwitcher = /* @__PURE__ */ React$1.forwardRef(function Pickers ownerState: _extends$1({}, ownerState, { hidden: previousProps.isHidden }), - className: classes.button + className: clsx(classes.button, classes.previousIconButton) }); const NextIconButton = (_b = slots == null ? void 0 : slots.nextIconButton) != null ? _b : PickersArrowSwitcherButton; const nextIconButtonProps = useSlotProps({ @@ -45174,7 +45075,7 @@ const PickersArrowSwitcher = /* @__PURE__ */ React$1.forwardRef(function Pickers ownerState: _extends$1({}, ownerState, { hidden: nextProps.isHidden }), - className: classes.button + className: clsx(classes.button, classes.nextIconButton) }); const LeftArrowIcon = (_c = slots == null ? void 0 : slots.leftArrowIcon) != null ? _c : ArrowLeftIcon; const _useSlotProps = useSlotProps({ @@ -45183,7 +45084,8 @@ const PickersArrowSwitcher = /* @__PURE__ */ React$1.forwardRef(function Pickers additionalProps: { fontSize: "inherit" }, - ownerState: void 0 + ownerState, + className: classes.leftArrowIcon }), leftArrowIconProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2$3); const RightArrowIcon = (_d = slots == null ? void 0 : slots.rightArrowIcon) != null ? _d : ArrowRightIcon; const _useSlotProps2 = useSlotProps({ @@ -45192,7 +45094,8 @@ const PickersArrowSwitcher = /* @__PURE__ */ React$1.forwardRef(function Pickers additionalProps: { fontSize: "inherit" }, - ownerState: void 0 + ownerState, + className: classes.rightArrowIcon }), rightArrowIconProps = _objectWithoutPropertiesLoose(_useSlotProps2, _excluded3$1); return /* @__PURE__ */ jsxRuntimeExports.jsxs(PickersArrowSwitcherRoot, _extends$1({ ref, @@ -45373,7 +45276,7 @@ const PickersCalendarHeader = /* @__PURE__ */ React$1.forwardRef(function Picker const _useSlotProps = useSlotProps({ elementType: SwitchViewIcon, externalSlotProps: slotProps == null ? void 0 : slotProps.switchViewIcon, - ownerState: void 0, + ownerState, className: classes.switchViewIcon }), switchViewIconProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2$2); const selectNextMonth = () => onMonthChange(utils2.addMonths(month, 1), "left"); @@ -50303,10 +50206,11 @@ function ClockPointer(inProps) { function getClockUtilityClass(slot) { return generateUtilityClass("MuiClock", slot); } -const clockClasses = generateUtilityClasses("MuiClock", ["root", "clock", "wrapper", "squareMask", "pin", "amButton", "pmButton", "meridiemText"]); +const clockClasses = generateUtilityClasses("MuiClock", ["root", "clock", "wrapper", "squareMask", "pin", "amButton", "pmButton", "meridiemText", "selected"]); const useUtilityClasses$h = (ownerState) => { const { - classes + classes, + meridiemMode } = ownerState; const slots = { root: ["root"], @@ -50314,8 +50218,8 @@ const useUtilityClasses$h = (ownerState) => { wrapper: ["wrapper"], squareMask: ["squareMask"], pin: ["pin"], - amButton: ["amButton"], - pmButton: ["pmButton"], + amButton: ["amButton", meridiemMode === "am" && "selected"], + pmButton: ["pmButton", meridiemMode === "pm" && "selected"], meridiemText: ["meridiemText"] }; return composeClasses(slots, getClockUtilityClass, classes); @@ -50398,23 +50302,15 @@ const ClockPin = styled$1("div", { left: "50%", transform: "translate(-50%, -50%)" })); -const ClockAmButton = styled$1(IconButton, { - name: "MuiClock", - slot: "AmButton", - overridesResolver: (_2, styles2) => styles2.amButton -})(({ - theme -}) => ({ +const meridiemButtonCommonStyles = (theme, meridiemMode) => ({ zIndex: 1, - position: "absolute", bottom: 8, - left: 8, paddingLeft: 4, paddingRight: 4, width: CLOCK_HOUR_WIDTH, variants: [{ props: { - meridiemMode: "am" + meridiemMode }, style: { backgroundColor: (theme.vars || theme).palette.primary.main, @@ -50424,6 +50320,17 @@ const ClockAmButton = styled$1(IconButton, { } } }] +}); +const ClockAmButton = styled$1(IconButton, { + name: "MuiClock", + slot: "AmButton", + overridesResolver: (_2, styles2) => styles2.amButton +})(({ + theme +}) => _extends$1({}, meridiemButtonCommonStyles(theme, "am"), { + // keeping it here to make TS happy + position: "absolute", + left: 8 })); const ClockPmButton = styled$1(IconButton, { name: "MuiClock", @@ -50431,26 +50338,10 @@ const ClockPmButton = styled$1(IconButton, { overridesResolver: (_2, styles2) => styles2.pmButton })(({ theme -}) => ({ - zIndex: 1, +}) => _extends$1({}, meridiemButtonCommonStyles(theme, "pm"), { + // keeping it here to make TS happy position: "absolute", - bottom: 8, - right: 8, - paddingLeft: 4, - paddingRight: 4, - width: CLOCK_HOUR_WIDTH, - variants: [{ - props: { - meridiemMode: "pm" - }, - style: { - backgroundColor: (theme.vars || theme).palette.primary.main, - color: (theme.vars || theme).palette.primary.contrastText, - "&:hover": { - backgroundColor: (theme.vars || theme).palette.primary.light - } - } - }] + right: 8 })); const ClockMeridiemText = styled$1(Typography, { name: "MuiClock", @@ -52517,7 +52408,7 @@ const renderMultiSectionDigitalClockTimeView = ({ skipDisabled, timezone }); -function DesktopDateTimePickerLayout(props) { +const DesktopDateTimePickerLayout = /* @__PURE__ */ React$1.forwardRef(function DesktopDateTimePickerLayout2(props, ref) { var _a, _b; const isRtl = useRtl(); const { @@ -52531,7 +52422,6 @@ function DesktopDateTimePickerLayout(props) { sx, className, isLandscape, - ref, classes } = props; const isActionBarVisible = actionBar && ((_b = (_a = actionBar.props.actions) == null ? void 0 : _a.length) != null ? _b : 0) > 0; @@ -52564,7 +52454,7 @@ function DesktopDateTimePickerLayout(props) { })] }), actionBar] }); -} +}); process.env.NODE_ENV !== "production" ? DesktopDateTimePickerLayout.propTypes = { // ----------------------------- Warning -------------------------------- // | These PropTypes are generated from the TypeScript type definitions | @@ -64782,6 +64672,45 @@ function useForm(props = {}) { _formControl.current.formState = getProxyFormState(formState, control); return _formControl.current; } +function BasicEntityCheckBoxField(props) { + const { spec } = props; + const { field, getValues, control } = spec; + const val = getValues(field.name); + return /* @__PURE__ */ jsxRuntimeExports.jsx( + Box$2, + { + display: "flex", + justifyContent: field.ux.justifyContent || "center", + alignItems: field.ux.alignItems || "center", + height: field.ux.height || "auto", + children: /* @__PURE__ */ jsxRuntimeExports.jsx( + FormControlLabel$1, + { + control: /* @__PURE__ */ jsxRuntimeExports.jsx( + Controller, + { + name: field.name, + control, + defaultValue: !!val, + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( + Checkbox$1, + { + id: field.id, + checked: value, + onChange, + disabled: !field.ux.edit, + required: field.ux.required || false + } + ) + } + ), + label: field.label + } + ) + }, + field.id + ); +} const CMPNAME$8 = "BasicEntityField"; const { Open: Open$6 } = gubu_minExports.Gubu; const BasicEntityFieldSpecShape = gubu_minExports.Gubu(Open$6({}), { name: CMPNAME$8 }); @@ -64790,7 +64719,8 @@ const fieldMap = { TextBox: BasicEntityTextBoxField, Date: BasicEntityDateField, DateTime: BasicEntityDateTimeField, - Time: BasicEntityTimeField + Time: BasicEntityTimeField, + CheckBox: BasicEntityCheckBoxField }; function BasicEntityField(props) { const { ctx, spec } = props; @@ -65001,6 +64931,7 @@ function BasicEntityEdit(props) { handleSubmit, getValues, reset, + control, formState: { errors } } = useForm({ mode: "onChange", @@ -65029,6 +64960,7 @@ function BasicEntityEdit(props) { field, register, getValues, + control, errors } } diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index bce3f35..553085a 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -2866,6 +2866,7 @@ var __async = (__this, __arguments, generator) => { })(objectWithoutPropertiesLoose$1); return objectWithoutPropertiesLoose$1.exports; } + var isDevelopment = false; function sheetForTag(tag) { if (tag.sheet) { return tag.sheet; @@ -2875,6 +2876,7 @@ var __async = (__this, __arguments, generator) => { return document.styleSheets[i]; } } + return void 0; } function createStyleElement(options) { var tag = document.createElement("style"); @@ -2905,7 +2907,7 @@ var __async = (__this, __arguments, generator) => { _this.container.insertBefore(tag, before); _this.tags.push(tag); }; - this.isSpeedy = options.speedy === void 0 ? process.env.NODE_ENV === "production" : options.speedy; + this.isSpeedy = options.speedy === void 0 ? !isDevelopment : options.speedy; this.tags = []; this.ctr = 0; this.nonce = options.nonce; @@ -2924,21 +2926,11 @@ var __async = (__this, __arguments, generator) => { this._insertTag(createStyleElement(this)); } var tag = this.tags[this.tags.length - 1]; - if (process.env.NODE_ENV !== "production") { - var isImportRule2 = rule.charCodeAt(0) === 64 && rule.charCodeAt(1) === 105; - if (isImportRule2 && this._alreadyInsertedOrderInsensitiveRule) { - console.error("You're attempting to insert the following rule:\n" + rule + "\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules."); - } - this._alreadyInsertedOrderInsensitiveRule = this._alreadyInsertedOrderInsensitiveRule || !isImportRule2; - } if (this.isSpeedy) { var sheet = sheetForTag(tag); try { sheet.insertRule(rule, sheet.cssRules.length); } catch (e) { - if (process.env.NODE_ENV !== "production" && !/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(rule)) { - console.error('There was a problem inserting the following rule: "' + rule + '"', e); - } } } else { tag.appendChild(document.createTextNode(rule)); @@ -2947,13 +2939,11 @@ var __async = (__this, __arguments, generator) => { }; _proto.flush = function flush() { this.tags.forEach(function(tag) { - return tag.parentNode && tag.parentNode.removeChild(tag); + var _tag$parentNode; + return (_tag$parentNode = tag.parentNode) == null ? void 0 : _tag$parentNode.removeChild(tag); }); this.tags = []; this.ctr = 0; - if (process.env.NODE_ENV !== "production") { - this._alreadyInsertedOrderInsensitiveRule = false; - } }; return StyleSheet2; }(); @@ -3638,68 +3628,6 @@ var __async = (__this, __arguments, generator) => { } } }; - var ignoreFlag = "emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason"; - var isIgnoringComment = function isIgnoringComment2(element) { - return element.type === "comm" && element.children.indexOf(ignoreFlag) > -1; - }; - var createUnsafeSelectorsAlarm = function createUnsafeSelectorsAlarm2(cache2) { - return function(element, index2, children) { - if (element.type !== "rule" || cache2.compat) return; - var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g); - if (unsafePseudoClasses) { - var isNested = !!element.parent; - var commentContainer = isNested ? element.parent.children : ( - // global rule at the root level - children - ); - for (var i = commentContainer.length - 1; i >= 0; i--) { - var node2 = commentContainer[i]; - if (node2.line < element.line) { - break; - } - if (node2.column < element.column) { - if (isIgnoringComment(node2)) { - return; - } - break; - } - } - unsafePseudoClasses.forEach(function(unsafePseudoClass) { - console.error('The pseudo class "' + unsafePseudoClass + '" is potentially unsafe when doing server-side rendering. Try changing it to "' + unsafePseudoClass.split("-child")[0] + '-of-type".'); - }); - } - }; - }; - var isImportRule = function isImportRule2(element) { - return element.type.charCodeAt(1) === 105 && element.type.charCodeAt(0) === 64; - }; - var isPrependedWithRegularRules = function isPrependedWithRegularRules2(index2, children) { - for (var i = index2 - 1; i >= 0; i--) { - if (!isImportRule(children[i])) { - return true; - } - } - return false; - }; - var nullifyElement = function nullifyElement2(element) { - element.type = ""; - element.value = ""; - element["return"] = ""; - element.children = ""; - element.props = ""; - }; - var incorrectImportAlarm = function incorrectImportAlarm2(element, index2, children) { - if (!isImportRule(element)) { - return; - } - if (element.parent) { - console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."); - nullifyElement(element); - } else if (isPrependedWithRegularRules(index2, children)) { - console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."); - nullifyElement(element); - } - }; function prefix(value, length2) { switch (hash$2(value, length2)) { case 5103: @@ -3846,9 +3774,6 @@ var __async = (__this, __arguments, generator) => { var defaultStylisPlugins = [prefixer]; var createCache = function createCache2(options) { var key = options.key; - if (process.env.NODE_ENV !== "production" && !key) { - throw new Error("You have to configure `key` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.\nIf multiple caches share the same key they might \"fight\" for each other's style elements."); - } if (key === "css") { var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])"); Array.prototype.forEach.call(ssrStyles, function(node2) { @@ -3861,11 +3786,6 @@ var __async = (__this, __arguments, generator) => { }); } var stylisPlugins = options.stylisPlugins || defaultStylisPlugins; - if (process.env.NODE_ENV !== "production") { - if (/[^a-z-]/.test(key)) { - throw new Error('Emotion key must only contain lower case alphabetical characters and - but "' + key + '" was passed'); - } - } var inserted = {}; var container; var nodesToHydrate = []; @@ -3886,24 +3806,9 @@ var __async = (__this, __arguments, generator) => { } var _insert; var omnipresentPlugins = [compat, removeLabel]; - if (process.env.NODE_ENV !== "production") { - omnipresentPlugins.push(createUnsafeSelectorsAlarm({ - get compat() { - return cache2.compat; - } - }), incorrectImportAlarm); - } { var currentSheet; - var finalizingPlugins = [stringify, process.env.NODE_ENV !== "production" ? function(element) { - if (!element.root) { - if (element["return"]) { - currentSheet.insert(element["return"]); - } else if (element.value && element.type !== COMMENT) { - currentSheet.insert(element.value + "{}"); - } - } - } : rulesheet(function(rule) { + var finalizingPlugins = [stringify, rulesheet(function(rule) { currentSheet.insert(rule); })]; var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins)); @@ -3912,13 +3817,6 @@ var __async = (__this, __arguments, generator) => { }; _insert = function insert2(selector, serialized, sheet, shouldCache) { currentSheet = sheet; - if (process.env.NODE_ENV !== "production" && serialized.map !== void 0) { - currentSheet = { - insert: function insert3(rule) { - sheet.insert(rule + serialized.map); - } - }; - } stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles); if (shouldCache) { cache2.inserted[serialized.name] = true; @@ -39137,7 +39035,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha display: "flex", flexDirection: "column" }); - const PickersLayout = function PickersLayout2(inProps) { + const PickersLayout = /* @__PURE__ */ React__namespace.forwardRef(function PickersLayout2(inProps, ref) { const props = useThemeProps({ props: inProps, name: "MuiPickersLayout" @@ -39153,7 +39051,6 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha sx, className, isLandscape, - ref, wrapperVariant } = props; const classes = useUtilityClasses$J(props); @@ -39171,7 +39068,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }) }), actionBar] }); - }; + }); process.env.NODE_ENV !== "production" ? PickersLayout.propTypes = { // ----------------------------- Warning -------------------------------- // | These PropTypes are generated from the TypeScript type definitions | @@ -45075,7 +44972,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha function getPickersArrowSwitcherUtilityClass(slot) { return generateUtilityClass("MuiPickersArrowSwitcher", slot); } - const pickersArrowSwitcherClasses = generateUtilityClasses("MuiPickersArrowSwitcher", ["root", "spacer", "button"]); + const pickersArrowSwitcherClasses = generateUtilityClasses("MuiPickersArrowSwitcher", ["root", "spacer", "button", "previousIconButton", "nextIconButton", "leftArrowIcon", "rightArrowIcon"]); const _excluded$E = ["children", "className", "slots", "slotProps", "isNextDisabled", "isNextHidden", "onGoToNext", "nextLabel", "isPreviousDisabled", "isPreviousHidden", "onGoToPrevious", "previousLabel", "labelId"], _excluded2$3 = ["ownerState"], _excluded3$1 = ["ownerState"]; const PickersArrowSwitcherRoot = styled$1("div", { name: "MuiPickersArrowSwitcher", @@ -45114,7 +45011,11 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const slots = { root: ["root"], spacer: ["spacer"], - button: ["button"] + button: ["button"], + previousIconButton: ["previousIconButton"], + nextIconButton: ["nextIconButton"], + leftArrowIcon: ["leftArrowIcon"], + rightArrowIcon: ["rightArrowIcon"] }; return composeClasses(slots, getPickersArrowSwitcherUtilityClass, classes); }; @@ -45169,7 +45070,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ownerState: _extends$1({}, ownerState, { hidden: previousProps.isHidden }), - className: classes.button + className: clsx(classes.button, classes.previousIconButton) }); const NextIconButton = (_b = slots == null ? void 0 : slots.nextIconButton) != null ? _b : PickersArrowSwitcherButton; const nextIconButtonProps = useSlotProps({ @@ -45186,7 +45087,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ownerState: _extends$1({}, ownerState, { hidden: nextProps.isHidden }), - className: classes.button + className: clsx(classes.button, classes.nextIconButton) }); const LeftArrowIcon = (_c = slots == null ? void 0 : slots.leftArrowIcon) != null ? _c : ArrowLeftIcon; const _useSlotProps = useSlotProps({ @@ -45195,7 +45096,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha additionalProps: { fontSize: "inherit" }, - ownerState: void 0 + ownerState, + className: classes.leftArrowIcon }), leftArrowIconProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2$3); const RightArrowIcon = (_d = slots == null ? void 0 : slots.rightArrowIcon) != null ? _d : ArrowRightIcon; const _useSlotProps2 = useSlotProps({ @@ -45204,7 +45106,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha additionalProps: { fontSize: "inherit" }, - ownerState: void 0 + ownerState, + className: classes.rightArrowIcon }), rightArrowIconProps = _objectWithoutPropertiesLoose(_useSlotProps2, _excluded3$1); return /* @__PURE__ */ jsxRuntimeExports.jsxs(PickersArrowSwitcherRoot, _extends$1({ ref, @@ -45385,7 +45288,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const _useSlotProps = useSlotProps({ elementType: SwitchViewIcon, externalSlotProps: slotProps == null ? void 0 : slotProps.switchViewIcon, - ownerState: void 0, + ownerState, className: classes.switchViewIcon }), switchViewIconProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2$2); const selectNextMonth = () => onMonthChange(utils2.addMonths(month, 1), "left"); @@ -50315,10 +50218,11 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha function getClockUtilityClass(slot) { return generateUtilityClass("MuiClock", slot); } - const clockClasses = generateUtilityClasses("MuiClock", ["root", "clock", "wrapper", "squareMask", "pin", "amButton", "pmButton", "meridiemText"]); + const clockClasses = generateUtilityClasses("MuiClock", ["root", "clock", "wrapper", "squareMask", "pin", "amButton", "pmButton", "meridiemText", "selected"]); const useUtilityClasses$h = (ownerState) => { const { - classes + classes, + meridiemMode } = ownerState; const slots = { root: ["root"], @@ -50326,8 +50230,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha wrapper: ["wrapper"], squareMask: ["squareMask"], pin: ["pin"], - amButton: ["amButton"], - pmButton: ["pmButton"], + amButton: ["amButton", meridiemMode === "am" && "selected"], + pmButton: ["pmButton", meridiemMode === "pm" && "selected"], meridiemText: ["meridiemText"] }; return composeClasses(slots, getClockUtilityClass, classes); @@ -50410,23 +50314,15 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha left: "50%", transform: "translate(-50%, -50%)" })); - const ClockAmButton = styled$1(IconButton, { - name: "MuiClock", - slot: "AmButton", - overridesResolver: (_2, styles2) => styles2.amButton - })(({ - theme - }) => ({ + const meridiemButtonCommonStyles = (theme, meridiemMode) => ({ zIndex: 1, - position: "absolute", bottom: 8, - left: 8, paddingLeft: 4, paddingRight: 4, width: CLOCK_HOUR_WIDTH, variants: [{ props: { - meridiemMode: "am" + meridiemMode }, style: { backgroundColor: (theme.vars || theme).palette.primary.main, @@ -50436,6 +50332,17 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } } }] + }); + const ClockAmButton = styled$1(IconButton, { + name: "MuiClock", + slot: "AmButton", + overridesResolver: (_2, styles2) => styles2.amButton + })(({ + theme + }) => _extends$1({}, meridiemButtonCommonStyles(theme, "am"), { + // keeping it here to make TS happy + position: "absolute", + left: 8 })); const ClockPmButton = styled$1(IconButton, { name: "MuiClock", @@ -50443,26 +50350,10 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha overridesResolver: (_2, styles2) => styles2.pmButton })(({ theme - }) => ({ - zIndex: 1, + }) => _extends$1({}, meridiemButtonCommonStyles(theme, "pm"), { + // keeping it here to make TS happy position: "absolute", - bottom: 8, - right: 8, - paddingLeft: 4, - paddingRight: 4, - width: CLOCK_HOUR_WIDTH, - variants: [{ - props: { - meridiemMode: "pm" - }, - style: { - backgroundColor: (theme.vars || theme).palette.primary.main, - color: (theme.vars || theme).palette.primary.contrastText, - "&:hover": { - backgroundColor: (theme.vars || theme).palette.primary.light - } - } - }] + right: 8 })); const ClockMeridiemText = styled$1(Typography, { name: "MuiClock", @@ -52529,7 +52420,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha skipDisabled, timezone }); - function DesktopDateTimePickerLayout(props) { + const DesktopDateTimePickerLayout = /* @__PURE__ */ React__namespace.forwardRef(function DesktopDateTimePickerLayout2(props, ref) { var _a, _b; const isRtl = useRtl(); const { @@ -52543,7 +52434,6 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha sx, className, isLandscape, - ref, classes } = props; const isActionBarVisible = actionBar && ((_b = (_a = actionBar.props.actions) == null ? void 0 : _a.length) != null ? _b : 0) > 0; @@ -52576,7 +52466,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha })] }), actionBar] }); - } + }); process.env.NODE_ENV !== "production" ? DesktopDateTimePickerLayout.propTypes = { // ----------------------------- Warning -------------------------------- // | These PropTypes are generated from the TypeScript type definitions | @@ -64794,6 +64684,45 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha _formControl.current.formState = getProxyFormState(formState, control); return _formControl.current; } + function BasicEntityCheckBoxField(props) { + const { spec } = props; + const { field, getValues, control } = spec; + const val = getValues(field.name); + return /* @__PURE__ */ jsxRuntimeExports.jsx( + material.Box, + { + display: "flex", + justifyContent: field.ux.justifyContent || "center", + alignItems: field.ux.alignItems || "center", + height: field.ux.height || "auto", + children: /* @__PURE__ */ jsxRuntimeExports.jsx( + material.FormControlLabel, + { + control: /* @__PURE__ */ jsxRuntimeExports.jsx( + Controller, + { + name: field.name, + control, + defaultValue: !!val, + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( + material.Checkbox, + { + id: field.id, + checked: value, + onChange, + disabled: !field.ux.edit, + required: field.ux.required || false + } + ) + } + ), + label: field.label + } + ) + }, + field.id + ); + } const CMPNAME$8 = "BasicEntityField"; const { Open: Open$6 } = gubu_minExports.Gubu; const BasicEntityFieldSpecShape = gubu_minExports.Gubu(Open$6({}), { name: CMPNAME$8 }); @@ -64802,7 +64731,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha TextBox: BasicEntityTextBoxField, Date: BasicEntityDateField, DateTime: BasicEntityDateTimeField, - Time: BasicEntityTimeField + Time: BasicEntityTimeField, + CheckBox: BasicEntityCheckBoxField }; function BasicEntityField(props) { const { ctx, spec } = props; @@ -65013,6 +64943,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha handleSubmit, getValues, reset, + control, formState: { errors } } = useForm({ mode: "onChange", @@ -65041,6 +64972,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha field, register, getValues, + control, errors } } diff --git a/src/lib/BasicEntityCheckBoxField.tsx b/src/lib/BasicEntityCheckBoxField.tsx new file mode 100644 index 0000000..3df893d --- /dev/null +++ b/src/lib/BasicEntityCheckBoxField.tsx @@ -0,0 +1,48 @@ +import React, { useEffect, forwardRef } from "react"; + +import { + FormControlLabel, + Checkbox, + Box +} from "@mui/material"; +import { Controller } from "react-hook-form"; + + +function BasicEntityCheckBoxField(props: any) { + const { spec } = props; + + const { field, getValues, control } = spec; + const val = getValues(field.name); + + return ( + + ( + + )} + /> + } + label={field.label} + /> + + ); +} + +export { BasicEntityCheckBoxField }; \ No newline at end of file diff --git a/src/lib/BasicEntityEdit.tsx b/src/lib/BasicEntityEdit.tsx index 3966ab2..391dd3c 100644 --- a/src/lib/BasicEntityEdit.tsx +++ b/src/lib/BasicEntityEdit.tsx @@ -124,6 +124,7 @@ function BasicEntityEdit (props: any) { handleSubmit, getValues, reset, + control, formState: { errors }, } = useForm({ mode: 'onChange', @@ -155,6 +156,7 @@ function BasicEntityEdit (props: any) { field, register, getValues, + control, errors, }} /> diff --git a/src/lib/BasicEntityField.tsx b/src/lib/BasicEntityField.tsx index f332b15..e824bae 100644 --- a/src/lib/BasicEntityField.tsx +++ b/src/lib/BasicEntityField.tsx @@ -10,6 +10,7 @@ import { import type { Spec } from './basic-types' import { Gubu } from 'gubu' +import { BasicEntityCheckBoxField } from './BasicEntityCheckBoxField' const CMPNAME = 'BasicEntityField' @@ -26,6 +27,7 @@ const fieldMap: any = { Date: BasicEntityDateField, DateTime: BasicEntityDateTimeField, Time: BasicEntityTimeField, + CheckBox: BasicEntityCheckBoxField } From 13f088b6075f45dcd8fce7e4b8a0d1dfe2a513ae Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Tue, 23 Jul 2024 23:32:08 +0100 Subject: [PATCH 003/122] Add BasicEntityRadioGroupField component --- dist/BasicEntityCheckBoxField.d.ts | 2 + dist/BasicEntityRadioGroupField.d.ts | 2 + dist/voxgig-model-react.es.js | 233 ++++++++----------------- dist/voxgig-model-react.umd.js | 231 ++++++++---------------- src/lib/BasicEntityEdit.tsx | 2 + src/lib/BasicEntityField.tsx | 2 + src/lib/BasicEntityRadioGroupField.tsx | 36 ++++ 7 files changed, 197 insertions(+), 311 deletions(-) create mode 100644 dist/BasicEntityCheckBoxField.d.ts create mode 100644 dist/BasicEntityRadioGroupField.d.ts create mode 100644 src/lib/BasicEntityRadioGroupField.tsx diff --git a/dist/BasicEntityCheckBoxField.d.ts b/dist/BasicEntityCheckBoxField.d.ts new file mode 100644 index 0000000..3a9d2ea --- /dev/null +++ b/dist/BasicEntityCheckBoxField.d.ts @@ -0,0 +1,2 @@ +declare function BasicEntityCheckBoxField(props: any): import("react/jsx-runtime").JSX.Element; +export { BasicEntityCheckBoxField }; diff --git a/dist/BasicEntityRadioGroupField.d.ts b/dist/BasicEntityRadioGroupField.d.ts new file mode 100644 index 0000000..3219868 --- /dev/null +++ b/dist/BasicEntityRadioGroupField.d.ts @@ -0,0 +1,2 @@ +declare function BasicEntityRadioGroupField(props: any): import("react/jsx-runtime").JSX.Element; +export { BasicEntityRadioGroupField }; diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index 92e9a18..681fe84 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -54,7 +54,7 @@ var __async = (__this, __arguments, generator) => { }; import * as React$1 from "react"; import React__default, { isValidElement, Children, cloneElement, useMemo, useState, useReducer, useRef, useEffect, useCallback, memo as memo$2, Fragment, useLayoutEffect } from "react"; -import { Button as Button$1, Avatar, Menu as Menu$1, MenuItem as MenuItem$1, IconButton as IconButton$1, useTheme as useTheme$5, Box as Box$2, TextField as TextField$1, Grid as Grid$1, Toolbar as Toolbar$1, Container as Container$2, Drawer as Drawer$1, List as List$1, ListItem as ListItem$1, ListItemButton as ListItemButton$1, ListItemIcon as ListItemIcon$1, ListItemText as ListItemText$1, Divider as Divider$1, Typography as Typography$1 } from "@mui/material"; +import { Button as Button$1, Avatar, Menu as Menu$1, MenuItem as MenuItem$1, IconButton as IconButton$1, useTheme as useTheme$5, Box as Box$2, FormLabel as FormLabel$1, RadioGroup, FormControlLabel as FormControlLabel$1, Radio as Radio$1, TextField as TextField$1, Grid as Grid$1, Toolbar as Toolbar$1, Container as Container$2, Drawer as Drawer$1, List as List$1, ListItem as ListItem$1, ListItemButton as ListItemButton$1, ListItemIcon as ListItemIcon$1, ListItemText as ListItemText$1, Divider as Divider$1, Typography as Typography$1 } from "@mui/material"; import emStyled from "@emotion/styled"; import { CacheProvider, Global, ThemeContext as ThemeContext$1, css, keyframes } from "@emotion/react"; import { useSelector } from "react-redux"; @@ -2854,6 +2854,7 @@ function requireObjectWithoutPropertiesLoose() { })(objectWithoutPropertiesLoose$1); return objectWithoutPropertiesLoose$1.exports; } +var isDevelopment = false; function sheetForTag(tag) { if (tag.sheet) { return tag.sheet; @@ -2863,6 +2864,7 @@ function sheetForTag(tag) { return document.styleSheets[i]; } } + return void 0; } function createStyleElement(options) { var tag = document.createElement("style"); @@ -2893,7 +2895,7 @@ var StyleSheet = /* @__PURE__ */ function() { _this.container.insertBefore(tag, before); _this.tags.push(tag); }; - this.isSpeedy = options.speedy === void 0 ? process.env.NODE_ENV === "production" : options.speedy; + this.isSpeedy = options.speedy === void 0 ? !isDevelopment : options.speedy; this.tags = []; this.ctr = 0; this.nonce = options.nonce; @@ -2912,21 +2914,11 @@ var StyleSheet = /* @__PURE__ */ function() { this._insertTag(createStyleElement(this)); } var tag = this.tags[this.tags.length - 1]; - if (process.env.NODE_ENV !== "production") { - var isImportRule3 = rule.charCodeAt(0) === 64 && rule.charCodeAt(1) === 105; - if (isImportRule3 && this._alreadyInsertedOrderInsensitiveRule) { - console.error("You're attempting to insert the following rule:\n" + rule + "\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules."); - } - this._alreadyInsertedOrderInsensitiveRule = this._alreadyInsertedOrderInsensitiveRule || !isImportRule3; - } if (this.isSpeedy) { var sheet = sheetForTag(tag); try { sheet.insertRule(rule, sheet.cssRules.length); } catch (e) { - if (process.env.NODE_ENV !== "production" && !/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(rule)) { - console.error('There was a problem inserting the following rule: "' + rule + '"', e); - } } } else { tag.appendChild(document.createTextNode(rule)); @@ -2935,13 +2927,11 @@ var StyleSheet = /* @__PURE__ */ function() { }; _proto.flush = function flush() { this.tags.forEach(function(tag) { - return tag.parentNode && tag.parentNode.removeChild(tag); + var _tag$parentNode; + return (_tag$parentNode = tag.parentNode) == null ? void 0 : _tag$parentNode.removeChild(tag); }); this.tags = []; this.ctr = 0; - if (process.env.NODE_ENV !== "production") { - this._alreadyInsertedOrderInsensitiveRule = false; - } }; return StyleSheet2; }(); @@ -3626,68 +3616,6 @@ var removeLabel = function removeLabel2(element) { } } }; -var ignoreFlag = "emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason"; -var isIgnoringComment = function isIgnoringComment2(element) { - return element.type === "comm" && element.children.indexOf(ignoreFlag) > -1; -}; -var createUnsafeSelectorsAlarm = function createUnsafeSelectorsAlarm2(cache2) { - return function(element, index2, children2) { - if (element.type !== "rule" || cache2.compat) return; - var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g); - if (unsafePseudoClasses) { - var isNested = !!element.parent; - var commentContainer = isNested ? element.parent.children : ( - // global rule at the root level - children2 - ); - for (var i = commentContainer.length - 1; i >= 0; i--) { - var node2 = commentContainer[i]; - if (node2.line < element.line) { - break; - } - if (node2.column < element.column) { - if (isIgnoringComment(node2)) { - return; - } - break; - } - } - unsafePseudoClasses.forEach(function(unsafePseudoClass) { - console.error('The pseudo class "' + unsafePseudoClass + '" is potentially unsafe when doing server-side rendering. Try changing it to "' + unsafePseudoClass.split("-child")[0] + '-of-type".'); - }); - } - }; -}; -var isImportRule = function isImportRule2(element) { - return element.type.charCodeAt(1) === 105 && element.type.charCodeAt(0) === 64; -}; -var isPrependedWithRegularRules = function isPrependedWithRegularRules2(index2, children2) { - for (var i = index2 - 1; i >= 0; i--) { - if (!isImportRule(children2[i])) { - return true; - } - } - return false; -}; -var nullifyElement = function nullifyElement2(element) { - element.type = ""; - element.value = ""; - element["return"] = ""; - element.children = ""; - element.props = ""; -}; -var incorrectImportAlarm = function incorrectImportAlarm2(element, index2, children2) { - if (!isImportRule(element)) { - return; - } - if (element.parent) { - console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."); - nullifyElement(element); - } else if (isPrependedWithRegularRules(index2, children2)) { - console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."); - nullifyElement(element); - } -}; function prefix(value, length2) { switch (hash$2(value, length2)) { case 5103: @@ -3834,9 +3762,6 @@ var prefixer = function prefixer2(element, index2, children2, callback) { var defaultStylisPlugins = [prefixer]; var createCache = function createCache2(options) { var key = options.key; - if (process.env.NODE_ENV !== "production" && !key) { - throw new Error("You have to configure `key` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.\nIf multiple caches share the same key they might \"fight\" for each other's style elements."); - } if (key === "css") { var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])"); Array.prototype.forEach.call(ssrStyles, function(node2) { @@ -3849,11 +3774,6 @@ var createCache = function createCache2(options) { }); } var stylisPlugins = options.stylisPlugins || defaultStylisPlugins; - if (process.env.NODE_ENV !== "production") { - if (/[^a-z-]/.test(key)) { - throw new Error('Emotion key must only contain lower case alphabetical characters and - but "' + key + '" was passed'); - } - } var inserted = {}; var container; var nodesToHydrate = []; @@ -3874,24 +3794,9 @@ var createCache = function createCache2(options) { } var _insert; var omnipresentPlugins = [compat, removeLabel]; - if (process.env.NODE_ENV !== "production") { - omnipresentPlugins.push(createUnsafeSelectorsAlarm({ - get compat() { - return cache2.compat; - } - }), incorrectImportAlarm); - } { var currentSheet; - var finalizingPlugins = [stringify, process.env.NODE_ENV !== "production" ? function(element) { - if (!element.root) { - if (element["return"]) { - currentSheet.insert(element["return"]); - } else if (element.value && element.type !== COMMENT) { - currentSheet.insert(element.value + "{}"); - } - } - } : rulesheet(function(rule) { + var finalizingPlugins = [stringify, rulesheet(function(rule) { currentSheet.insert(rule); })]; var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins)); @@ -3900,13 +3805,6 @@ var createCache = function createCache2(options) { }; _insert = function insert2(selector, serialized, sheet, shouldCache) { currentSheet = sheet; - if (process.env.NODE_ENV !== "production" && serialized.map !== void 0) { - currentSheet = { - insert: function insert3(rule) { - sheet.insert(rule + serialized.map); - } - }; - } stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles); if (shouldCache) { cache2.inserted[serialized.name] = true; @@ -39125,7 +39023,7 @@ const PickersLayoutContentWrapper = styled$1("div", { display: "flex", flexDirection: "column" }); -const PickersLayout = function PickersLayout2(inProps) { +const PickersLayout = /* @__PURE__ */ React$1.forwardRef(function PickersLayout2(inProps, ref) { const props = useThemeProps({ props: inProps, name: "MuiPickersLayout" @@ -39141,7 +39039,6 @@ const PickersLayout = function PickersLayout2(inProps) { sx, className, isLandscape, - ref, wrapperVariant } = props; const classes = useUtilityClasses$J(props); @@ -39159,7 +39056,7 @@ const PickersLayout = function PickersLayout2(inProps) { }) }), actionBar] }); -}; +}); process.env.NODE_ENV !== "production" ? PickersLayout.propTypes = { // ----------------------------- Warning -------------------------------- // | These PropTypes are generated from the TypeScript type definitions | @@ -45063,7 +44960,7 @@ const pickersCalendarHeaderClasses = generateUtilityClasses("MuiPickersCalendarH function getPickersArrowSwitcherUtilityClass(slot) { return generateUtilityClass("MuiPickersArrowSwitcher", slot); } -const pickersArrowSwitcherClasses = generateUtilityClasses("MuiPickersArrowSwitcher", ["root", "spacer", "button"]); +const pickersArrowSwitcherClasses = generateUtilityClasses("MuiPickersArrowSwitcher", ["root", "spacer", "button", "previousIconButton", "nextIconButton", "leftArrowIcon", "rightArrowIcon"]); const _excluded$E = ["children", "className", "slots", "slotProps", "isNextDisabled", "isNextHidden", "onGoToNext", "nextLabel", "isPreviousDisabled", "isPreviousHidden", "onGoToPrevious", "previousLabel", "labelId"], _excluded2$3 = ["ownerState"], _excluded3$1 = ["ownerState"]; const PickersArrowSwitcherRoot = styled$1("div", { name: "MuiPickersArrowSwitcher", @@ -45102,7 +44999,11 @@ const useUtilityClasses$u = (ownerState) => { const slots = { root: ["root"], spacer: ["spacer"], - button: ["button"] + button: ["button"], + previousIconButton: ["previousIconButton"], + nextIconButton: ["nextIconButton"], + leftArrowIcon: ["leftArrowIcon"], + rightArrowIcon: ["rightArrowIcon"] }; return composeClasses(slots, getPickersArrowSwitcherUtilityClass, classes); }; @@ -45157,7 +45058,7 @@ const PickersArrowSwitcher = /* @__PURE__ */ React$1.forwardRef(function Pickers ownerState: _extends$1({}, ownerState, { hidden: previousProps.isHidden }), - className: classes.button + className: clsx(classes.button, classes.previousIconButton) }); const NextIconButton = (_b = slots == null ? void 0 : slots.nextIconButton) != null ? _b : PickersArrowSwitcherButton; const nextIconButtonProps = useSlotProps({ @@ -45174,7 +45075,7 @@ const PickersArrowSwitcher = /* @__PURE__ */ React$1.forwardRef(function Pickers ownerState: _extends$1({}, ownerState, { hidden: nextProps.isHidden }), - className: classes.button + className: clsx(classes.button, classes.nextIconButton) }); const LeftArrowIcon = (_c = slots == null ? void 0 : slots.leftArrowIcon) != null ? _c : ArrowLeftIcon; const _useSlotProps = useSlotProps({ @@ -45183,7 +45084,8 @@ const PickersArrowSwitcher = /* @__PURE__ */ React$1.forwardRef(function Pickers additionalProps: { fontSize: "inherit" }, - ownerState: void 0 + ownerState, + className: classes.leftArrowIcon }), leftArrowIconProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2$3); const RightArrowIcon = (_d = slots == null ? void 0 : slots.rightArrowIcon) != null ? _d : ArrowRightIcon; const _useSlotProps2 = useSlotProps({ @@ -45192,7 +45094,8 @@ const PickersArrowSwitcher = /* @__PURE__ */ React$1.forwardRef(function Pickers additionalProps: { fontSize: "inherit" }, - ownerState: void 0 + ownerState, + className: classes.rightArrowIcon }), rightArrowIconProps = _objectWithoutPropertiesLoose(_useSlotProps2, _excluded3$1); return /* @__PURE__ */ jsxRuntimeExports.jsxs(PickersArrowSwitcherRoot, _extends$1({ ref, @@ -45373,7 +45276,7 @@ const PickersCalendarHeader = /* @__PURE__ */ React$1.forwardRef(function Picker const _useSlotProps = useSlotProps({ elementType: SwitchViewIcon, externalSlotProps: slotProps == null ? void 0 : slotProps.switchViewIcon, - ownerState: void 0, + ownerState, className: classes.switchViewIcon }), switchViewIconProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2$2); const selectNextMonth = () => onMonthChange(utils2.addMonths(month, 1), "left"); @@ -50303,10 +50206,11 @@ function ClockPointer(inProps) { function getClockUtilityClass(slot) { return generateUtilityClass("MuiClock", slot); } -const clockClasses = generateUtilityClasses("MuiClock", ["root", "clock", "wrapper", "squareMask", "pin", "amButton", "pmButton", "meridiemText"]); +const clockClasses = generateUtilityClasses("MuiClock", ["root", "clock", "wrapper", "squareMask", "pin", "amButton", "pmButton", "meridiemText", "selected"]); const useUtilityClasses$h = (ownerState) => { const { - classes + classes, + meridiemMode } = ownerState; const slots = { root: ["root"], @@ -50314,8 +50218,8 @@ const useUtilityClasses$h = (ownerState) => { wrapper: ["wrapper"], squareMask: ["squareMask"], pin: ["pin"], - amButton: ["amButton"], - pmButton: ["pmButton"], + amButton: ["amButton", meridiemMode === "am" && "selected"], + pmButton: ["pmButton", meridiemMode === "pm" && "selected"], meridiemText: ["meridiemText"] }; return composeClasses(slots, getClockUtilityClass, classes); @@ -50398,23 +50302,15 @@ const ClockPin = styled$1("div", { left: "50%", transform: "translate(-50%, -50%)" })); -const ClockAmButton = styled$1(IconButton, { - name: "MuiClock", - slot: "AmButton", - overridesResolver: (_2, styles2) => styles2.amButton -})(({ - theme -}) => ({ +const meridiemButtonCommonStyles = (theme, meridiemMode) => ({ zIndex: 1, - position: "absolute", bottom: 8, - left: 8, paddingLeft: 4, paddingRight: 4, width: CLOCK_HOUR_WIDTH, variants: [{ props: { - meridiemMode: "am" + meridiemMode }, style: { backgroundColor: (theme.vars || theme).palette.primary.main, @@ -50424,6 +50320,17 @@ const ClockAmButton = styled$1(IconButton, { } } }] +}); +const ClockAmButton = styled$1(IconButton, { + name: "MuiClock", + slot: "AmButton", + overridesResolver: (_2, styles2) => styles2.amButton +})(({ + theme +}) => _extends$1({}, meridiemButtonCommonStyles(theme, "am"), { + // keeping it here to make TS happy + position: "absolute", + left: 8 })); const ClockPmButton = styled$1(IconButton, { name: "MuiClock", @@ -50431,26 +50338,10 @@ const ClockPmButton = styled$1(IconButton, { overridesResolver: (_2, styles2) => styles2.pmButton })(({ theme -}) => ({ - zIndex: 1, +}) => _extends$1({}, meridiemButtonCommonStyles(theme, "pm"), { + // keeping it here to make TS happy position: "absolute", - bottom: 8, - right: 8, - paddingLeft: 4, - paddingRight: 4, - width: CLOCK_HOUR_WIDTH, - variants: [{ - props: { - meridiemMode: "pm" - }, - style: { - backgroundColor: (theme.vars || theme).palette.primary.main, - color: (theme.vars || theme).palette.primary.contrastText, - "&:hover": { - backgroundColor: (theme.vars || theme).palette.primary.light - } - } - }] + right: 8 })); const ClockMeridiemText = styled$1(Typography, { name: "MuiClock", @@ -52517,7 +52408,7 @@ const renderMultiSectionDigitalClockTimeView = ({ skipDisabled, timezone }); -function DesktopDateTimePickerLayout(props) { +const DesktopDateTimePickerLayout = /* @__PURE__ */ React$1.forwardRef(function DesktopDateTimePickerLayout2(props, ref) { var _a, _b; const isRtl = useRtl(); const { @@ -52531,7 +52422,6 @@ function DesktopDateTimePickerLayout(props) { sx, className, isLandscape, - ref, classes } = props; const isActionBarVisible = actionBar && ((_b = (_a = actionBar.props.actions) == null ? void 0 : _a.length) != null ? _b : 0) > 0; @@ -52564,7 +52454,7 @@ function DesktopDateTimePickerLayout(props) { })] }), actionBar] }); -} +}); process.env.NODE_ENV !== "production" ? DesktopDateTimePickerLayout.propTypes = { // ----------------------------- Warning -------------------------------- // | These PropTypes are generated from the TypeScript type definitions | @@ -64782,6 +64672,34 @@ function useForm(props = {}) { _formControl.current.formState = getProxyFormState(formState, control); return _formControl.current; } +function BasicEntityRadioGroupField(props) { + const { spec } = props; + const { field, getValues, control } = spec; + const val = getValues(field.name); + return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx(FormLabel$1, { id: field.id, children: field.label }), + /* @__PURE__ */ jsxRuntimeExports.jsx( + Controller, + { + name: field.name, + control, + defaultValue: field.default, + render: ({ field: { onChange, value } }) => { + var _a; + return /* @__PURE__ */ jsxRuntimeExports.jsx(RadioGroup, { id: field.id, value, onChange, row: "row" === ((_a = field.ux) == null ? void 0 : _a.direction), children: field.options.map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx( + FormControlLabel$1, + { + value: option.value, + control: /* @__PURE__ */ jsxRuntimeExports.jsx(Radio$1, { disabled: !field.ux.edit }), + label: option.label + }, + option.value + )) }); + } + } + ) + ] }); +} const CMPNAME$8 = "BasicEntityField"; const { Open: Open$6 } = gubu_minExports.Gubu; const BasicEntityFieldSpecShape = gubu_minExports.Gubu(Open$6({}), { name: CMPNAME$8 }); @@ -64790,7 +64708,8 @@ const fieldMap = { TextBox: BasicEntityTextBoxField, Date: BasicEntityDateField, DateTime: BasicEntityDateTimeField, - Time: BasicEntityTimeField + Time: BasicEntityTimeField, + RadioGroup: BasicEntityRadioGroupField }; function BasicEntityField(props) { const { ctx, spec } = props; @@ -65001,6 +64920,7 @@ function BasicEntityEdit(props) { handleSubmit, getValues, reset, + control, formState: { errors } } = useForm({ mode: "onChange", @@ -65029,6 +64949,7 @@ function BasicEntityEdit(props) { field, register, getValues, + control, errors } } diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index bce3f35..b889d4d 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -2866,6 +2866,7 @@ var __async = (__this, __arguments, generator) => { })(objectWithoutPropertiesLoose$1); return objectWithoutPropertiesLoose$1.exports; } + var isDevelopment = false; function sheetForTag(tag) { if (tag.sheet) { return tag.sheet; @@ -2875,6 +2876,7 @@ var __async = (__this, __arguments, generator) => { return document.styleSheets[i]; } } + return void 0; } function createStyleElement(options) { var tag = document.createElement("style"); @@ -2905,7 +2907,7 @@ var __async = (__this, __arguments, generator) => { _this.container.insertBefore(tag, before); _this.tags.push(tag); }; - this.isSpeedy = options.speedy === void 0 ? process.env.NODE_ENV === "production" : options.speedy; + this.isSpeedy = options.speedy === void 0 ? !isDevelopment : options.speedy; this.tags = []; this.ctr = 0; this.nonce = options.nonce; @@ -2924,21 +2926,11 @@ var __async = (__this, __arguments, generator) => { this._insertTag(createStyleElement(this)); } var tag = this.tags[this.tags.length - 1]; - if (process.env.NODE_ENV !== "production") { - var isImportRule2 = rule.charCodeAt(0) === 64 && rule.charCodeAt(1) === 105; - if (isImportRule2 && this._alreadyInsertedOrderInsensitiveRule) { - console.error("You're attempting to insert the following rule:\n" + rule + "\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules."); - } - this._alreadyInsertedOrderInsensitiveRule = this._alreadyInsertedOrderInsensitiveRule || !isImportRule2; - } if (this.isSpeedy) { var sheet = sheetForTag(tag); try { sheet.insertRule(rule, sheet.cssRules.length); } catch (e) { - if (process.env.NODE_ENV !== "production" && !/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(rule)) { - console.error('There was a problem inserting the following rule: "' + rule + '"', e); - } } } else { tag.appendChild(document.createTextNode(rule)); @@ -2947,13 +2939,11 @@ var __async = (__this, __arguments, generator) => { }; _proto.flush = function flush() { this.tags.forEach(function(tag) { - return tag.parentNode && tag.parentNode.removeChild(tag); + var _tag$parentNode; + return (_tag$parentNode = tag.parentNode) == null ? void 0 : _tag$parentNode.removeChild(tag); }); this.tags = []; this.ctr = 0; - if (process.env.NODE_ENV !== "production") { - this._alreadyInsertedOrderInsensitiveRule = false; - } }; return StyleSheet2; }(); @@ -3638,68 +3628,6 @@ var __async = (__this, __arguments, generator) => { } } }; - var ignoreFlag = "emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason"; - var isIgnoringComment = function isIgnoringComment2(element) { - return element.type === "comm" && element.children.indexOf(ignoreFlag) > -1; - }; - var createUnsafeSelectorsAlarm = function createUnsafeSelectorsAlarm2(cache2) { - return function(element, index2, children) { - if (element.type !== "rule" || cache2.compat) return; - var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g); - if (unsafePseudoClasses) { - var isNested = !!element.parent; - var commentContainer = isNested ? element.parent.children : ( - // global rule at the root level - children - ); - for (var i = commentContainer.length - 1; i >= 0; i--) { - var node2 = commentContainer[i]; - if (node2.line < element.line) { - break; - } - if (node2.column < element.column) { - if (isIgnoringComment(node2)) { - return; - } - break; - } - } - unsafePseudoClasses.forEach(function(unsafePseudoClass) { - console.error('The pseudo class "' + unsafePseudoClass + '" is potentially unsafe when doing server-side rendering. Try changing it to "' + unsafePseudoClass.split("-child")[0] + '-of-type".'); - }); - } - }; - }; - var isImportRule = function isImportRule2(element) { - return element.type.charCodeAt(1) === 105 && element.type.charCodeAt(0) === 64; - }; - var isPrependedWithRegularRules = function isPrependedWithRegularRules2(index2, children) { - for (var i = index2 - 1; i >= 0; i--) { - if (!isImportRule(children[i])) { - return true; - } - } - return false; - }; - var nullifyElement = function nullifyElement2(element) { - element.type = ""; - element.value = ""; - element["return"] = ""; - element.children = ""; - element.props = ""; - }; - var incorrectImportAlarm = function incorrectImportAlarm2(element, index2, children) { - if (!isImportRule(element)) { - return; - } - if (element.parent) { - console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."); - nullifyElement(element); - } else if (isPrependedWithRegularRules(index2, children)) { - console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."); - nullifyElement(element); - } - }; function prefix(value, length2) { switch (hash$2(value, length2)) { case 5103: @@ -3846,9 +3774,6 @@ var __async = (__this, __arguments, generator) => { var defaultStylisPlugins = [prefixer]; var createCache = function createCache2(options) { var key = options.key; - if (process.env.NODE_ENV !== "production" && !key) { - throw new Error("You have to configure `key` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.\nIf multiple caches share the same key they might \"fight\" for each other's style elements."); - } if (key === "css") { var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])"); Array.prototype.forEach.call(ssrStyles, function(node2) { @@ -3861,11 +3786,6 @@ var __async = (__this, __arguments, generator) => { }); } var stylisPlugins = options.stylisPlugins || defaultStylisPlugins; - if (process.env.NODE_ENV !== "production") { - if (/[^a-z-]/.test(key)) { - throw new Error('Emotion key must only contain lower case alphabetical characters and - but "' + key + '" was passed'); - } - } var inserted = {}; var container; var nodesToHydrate = []; @@ -3886,24 +3806,9 @@ var __async = (__this, __arguments, generator) => { } var _insert; var omnipresentPlugins = [compat, removeLabel]; - if (process.env.NODE_ENV !== "production") { - omnipresentPlugins.push(createUnsafeSelectorsAlarm({ - get compat() { - return cache2.compat; - } - }), incorrectImportAlarm); - } { var currentSheet; - var finalizingPlugins = [stringify, process.env.NODE_ENV !== "production" ? function(element) { - if (!element.root) { - if (element["return"]) { - currentSheet.insert(element["return"]); - } else if (element.value && element.type !== COMMENT) { - currentSheet.insert(element.value + "{}"); - } - } - } : rulesheet(function(rule) { + var finalizingPlugins = [stringify, rulesheet(function(rule) { currentSheet.insert(rule); })]; var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins)); @@ -3912,13 +3817,6 @@ var __async = (__this, __arguments, generator) => { }; _insert = function insert2(selector, serialized, sheet, shouldCache) { currentSheet = sheet; - if (process.env.NODE_ENV !== "production" && serialized.map !== void 0) { - currentSheet = { - insert: function insert3(rule) { - sheet.insert(rule + serialized.map); - } - }; - } stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles); if (shouldCache) { cache2.inserted[serialized.name] = true; @@ -39137,7 +39035,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha display: "flex", flexDirection: "column" }); - const PickersLayout = function PickersLayout2(inProps) { + const PickersLayout = /* @__PURE__ */ React__namespace.forwardRef(function PickersLayout2(inProps, ref) { const props = useThemeProps({ props: inProps, name: "MuiPickersLayout" @@ -39153,7 +39051,6 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha sx, className, isLandscape, - ref, wrapperVariant } = props; const classes = useUtilityClasses$J(props); @@ -39171,7 +39068,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }) }), actionBar] }); - }; + }); process.env.NODE_ENV !== "production" ? PickersLayout.propTypes = { // ----------------------------- Warning -------------------------------- // | These PropTypes are generated from the TypeScript type definitions | @@ -45075,7 +44972,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha function getPickersArrowSwitcherUtilityClass(slot) { return generateUtilityClass("MuiPickersArrowSwitcher", slot); } - const pickersArrowSwitcherClasses = generateUtilityClasses("MuiPickersArrowSwitcher", ["root", "spacer", "button"]); + const pickersArrowSwitcherClasses = generateUtilityClasses("MuiPickersArrowSwitcher", ["root", "spacer", "button", "previousIconButton", "nextIconButton", "leftArrowIcon", "rightArrowIcon"]); const _excluded$E = ["children", "className", "slots", "slotProps", "isNextDisabled", "isNextHidden", "onGoToNext", "nextLabel", "isPreviousDisabled", "isPreviousHidden", "onGoToPrevious", "previousLabel", "labelId"], _excluded2$3 = ["ownerState"], _excluded3$1 = ["ownerState"]; const PickersArrowSwitcherRoot = styled$1("div", { name: "MuiPickersArrowSwitcher", @@ -45114,7 +45011,11 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const slots = { root: ["root"], spacer: ["spacer"], - button: ["button"] + button: ["button"], + previousIconButton: ["previousIconButton"], + nextIconButton: ["nextIconButton"], + leftArrowIcon: ["leftArrowIcon"], + rightArrowIcon: ["rightArrowIcon"] }; return composeClasses(slots, getPickersArrowSwitcherUtilityClass, classes); }; @@ -45169,7 +45070,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ownerState: _extends$1({}, ownerState, { hidden: previousProps.isHidden }), - className: classes.button + className: clsx(classes.button, classes.previousIconButton) }); const NextIconButton = (_b = slots == null ? void 0 : slots.nextIconButton) != null ? _b : PickersArrowSwitcherButton; const nextIconButtonProps = useSlotProps({ @@ -45186,7 +45087,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ownerState: _extends$1({}, ownerState, { hidden: nextProps.isHidden }), - className: classes.button + className: clsx(classes.button, classes.nextIconButton) }); const LeftArrowIcon = (_c = slots == null ? void 0 : slots.leftArrowIcon) != null ? _c : ArrowLeftIcon; const _useSlotProps = useSlotProps({ @@ -45195,7 +45096,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha additionalProps: { fontSize: "inherit" }, - ownerState: void 0 + ownerState, + className: classes.leftArrowIcon }), leftArrowIconProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2$3); const RightArrowIcon = (_d = slots == null ? void 0 : slots.rightArrowIcon) != null ? _d : ArrowRightIcon; const _useSlotProps2 = useSlotProps({ @@ -45204,7 +45106,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha additionalProps: { fontSize: "inherit" }, - ownerState: void 0 + ownerState, + className: classes.rightArrowIcon }), rightArrowIconProps = _objectWithoutPropertiesLoose(_useSlotProps2, _excluded3$1); return /* @__PURE__ */ jsxRuntimeExports.jsxs(PickersArrowSwitcherRoot, _extends$1({ ref, @@ -45385,7 +45288,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const _useSlotProps = useSlotProps({ elementType: SwitchViewIcon, externalSlotProps: slotProps == null ? void 0 : slotProps.switchViewIcon, - ownerState: void 0, + ownerState, className: classes.switchViewIcon }), switchViewIconProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2$2); const selectNextMonth = () => onMonthChange(utils2.addMonths(month, 1), "left"); @@ -50315,10 +50218,11 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha function getClockUtilityClass(slot) { return generateUtilityClass("MuiClock", slot); } - const clockClasses = generateUtilityClasses("MuiClock", ["root", "clock", "wrapper", "squareMask", "pin", "amButton", "pmButton", "meridiemText"]); + const clockClasses = generateUtilityClasses("MuiClock", ["root", "clock", "wrapper", "squareMask", "pin", "amButton", "pmButton", "meridiemText", "selected"]); const useUtilityClasses$h = (ownerState) => { const { - classes + classes, + meridiemMode } = ownerState; const slots = { root: ["root"], @@ -50326,8 +50230,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha wrapper: ["wrapper"], squareMask: ["squareMask"], pin: ["pin"], - amButton: ["amButton"], - pmButton: ["pmButton"], + amButton: ["amButton", meridiemMode === "am" && "selected"], + pmButton: ["pmButton", meridiemMode === "pm" && "selected"], meridiemText: ["meridiemText"] }; return composeClasses(slots, getClockUtilityClass, classes); @@ -50410,23 +50314,15 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha left: "50%", transform: "translate(-50%, -50%)" })); - const ClockAmButton = styled$1(IconButton, { - name: "MuiClock", - slot: "AmButton", - overridesResolver: (_2, styles2) => styles2.amButton - })(({ - theme - }) => ({ + const meridiemButtonCommonStyles = (theme, meridiemMode) => ({ zIndex: 1, - position: "absolute", bottom: 8, - left: 8, paddingLeft: 4, paddingRight: 4, width: CLOCK_HOUR_WIDTH, variants: [{ props: { - meridiemMode: "am" + meridiemMode }, style: { backgroundColor: (theme.vars || theme).palette.primary.main, @@ -50436,6 +50332,17 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } } }] + }); + const ClockAmButton = styled$1(IconButton, { + name: "MuiClock", + slot: "AmButton", + overridesResolver: (_2, styles2) => styles2.amButton + })(({ + theme + }) => _extends$1({}, meridiemButtonCommonStyles(theme, "am"), { + // keeping it here to make TS happy + position: "absolute", + left: 8 })); const ClockPmButton = styled$1(IconButton, { name: "MuiClock", @@ -50443,26 +50350,10 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha overridesResolver: (_2, styles2) => styles2.pmButton })(({ theme - }) => ({ - zIndex: 1, + }) => _extends$1({}, meridiemButtonCommonStyles(theme, "pm"), { + // keeping it here to make TS happy position: "absolute", - bottom: 8, - right: 8, - paddingLeft: 4, - paddingRight: 4, - width: CLOCK_HOUR_WIDTH, - variants: [{ - props: { - meridiemMode: "pm" - }, - style: { - backgroundColor: (theme.vars || theme).palette.primary.main, - color: (theme.vars || theme).palette.primary.contrastText, - "&:hover": { - backgroundColor: (theme.vars || theme).palette.primary.light - } - } - }] + right: 8 })); const ClockMeridiemText = styled$1(Typography, { name: "MuiClock", @@ -52529,7 +52420,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha skipDisabled, timezone }); - function DesktopDateTimePickerLayout(props) { + const DesktopDateTimePickerLayout = /* @__PURE__ */ React__namespace.forwardRef(function DesktopDateTimePickerLayout2(props, ref) { var _a, _b; const isRtl = useRtl(); const { @@ -52543,7 +52434,6 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha sx, className, isLandscape, - ref, classes } = props; const isActionBarVisible = actionBar && ((_b = (_a = actionBar.props.actions) == null ? void 0 : _a.length) != null ? _b : 0) > 0; @@ -52576,7 +52466,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha })] }), actionBar] }); - } + }); process.env.NODE_ENV !== "production" ? DesktopDateTimePickerLayout.propTypes = { // ----------------------------- Warning -------------------------------- // | These PropTypes are generated from the TypeScript type definitions | @@ -64794,6 +64684,34 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha _formControl.current.formState = getProxyFormState(formState, control); return _formControl.current; } + function BasicEntityRadioGroupField(props) { + const { spec } = props; + const { field, getValues, control } = spec; + const val = getValues(field.name); + return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx(material.FormLabel, { id: field.id, children: field.label }), + /* @__PURE__ */ jsxRuntimeExports.jsx( + Controller, + { + name: field.name, + control, + defaultValue: field.default, + render: ({ field: { onChange, value } }) => { + var _a; + return /* @__PURE__ */ jsxRuntimeExports.jsx(material.RadioGroup, { id: field.id, value, onChange, row: "row" === ((_a = field.ux) == null ? void 0 : _a.direction), children: field.options.map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx( + material.FormControlLabel, + { + value: option.value, + control: /* @__PURE__ */ jsxRuntimeExports.jsx(material.Radio, { disabled: !field.ux.edit }), + label: option.label + }, + option.value + )) }); + } + } + ) + ] }); + } const CMPNAME$8 = "BasicEntityField"; const { Open: Open$6 } = gubu_minExports.Gubu; const BasicEntityFieldSpecShape = gubu_minExports.Gubu(Open$6({}), { name: CMPNAME$8 }); @@ -64802,7 +64720,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha TextBox: BasicEntityTextBoxField, Date: BasicEntityDateField, DateTime: BasicEntityDateTimeField, - Time: BasicEntityTimeField + Time: BasicEntityTimeField, + RadioGroup: BasicEntityRadioGroupField }; function BasicEntityField(props) { const { ctx, spec } = props; @@ -65013,6 +64932,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha handleSubmit, getValues, reset, + control, formState: { errors } } = useForm({ mode: "onChange", @@ -65041,6 +64961,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha field, register, getValues, + control, errors } } diff --git a/src/lib/BasicEntityEdit.tsx b/src/lib/BasicEntityEdit.tsx index 3966ab2..391dd3c 100644 --- a/src/lib/BasicEntityEdit.tsx +++ b/src/lib/BasicEntityEdit.tsx @@ -124,6 +124,7 @@ function BasicEntityEdit (props: any) { handleSubmit, getValues, reset, + control, formState: { errors }, } = useForm({ mode: 'onChange', @@ -155,6 +156,7 @@ function BasicEntityEdit (props: any) { field, register, getValues, + control, errors, }} /> diff --git a/src/lib/BasicEntityField.tsx b/src/lib/BasicEntityField.tsx index f332b15..1f50a5c 100644 --- a/src/lib/BasicEntityField.tsx +++ b/src/lib/BasicEntityField.tsx @@ -10,6 +10,7 @@ import { import type { Spec } from './basic-types' import { Gubu } from 'gubu' +import { BasicEntityRadioGroupField } from './BasicEntityRadioGroupField' const CMPNAME = 'BasicEntityField' @@ -26,6 +27,7 @@ const fieldMap: any = { Date: BasicEntityDateField, DateTime: BasicEntityDateTimeField, Time: BasicEntityTimeField, + RadioGroup: BasicEntityRadioGroupField } diff --git a/src/lib/BasicEntityRadioGroupField.tsx b/src/lib/BasicEntityRadioGroupField.tsx new file mode 100644 index 0000000..f750d67 --- /dev/null +++ b/src/lib/BasicEntityRadioGroupField.tsx @@ -0,0 +1,36 @@ +import React, { useEffect, forwardRef } from "react"; + +import { FormControlLabel, Checkbox, Box, RadioGroup, Radio, FormLabel } from "@mui/material"; +import { Controller } from "react-hook-form"; + +function BasicEntityRadioGroupField(props: any) { + const { spec } = props; + + const { field, getValues, control } = spec; + const val = getValues(field.name); + + return ( + <> + {field.label} + ( + + {field.options.map((option: any) => ( + } + label={option.label} + /> + ))} + + )} + /> + + ) +} + +export { BasicEntityRadioGroupField }; From 838769a8b9347e34e83abf898551497fbefca396 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 25 Jul 2024 01:29:18 +0100 Subject: [PATCH 004/122] Add BasicEntityAutocompleteField component --- dist/BasicEntityAutocompleteField.d.ts | 2 + dist/BasicEntityCheckBoxField.d.ts | 2 + dist/BasicEntityRadioGroupField.d.ts | 2 + dist/voxgig-model-react.es.js | 239 ++++++++--------------- dist/voxgig-model-react.umd.js | 237 ++++++++-------------- src/lib/BasicEntityAutocompleteField.tsx | 44 +++++ src/lib/BasicEntityEdit.tsx | 2 + src/lib/BasicEntityField.tsx | 2 + 8 files changed, 219 insertions(+), 311 deletions(-) create mode 100644 dist/BasicEntityAutocompleteField.d.ts create mode 100644 dist/BasicEntityCheckBoxField.d.ts create mode 100644 dist/BasicEntityRadioGroupField.d.ts create mode 100644 src/lib/BasicEntityAutocompleteField.tsx diff --git a/dist/BasicEntityAutocompleteField.d.ts b/dist/BasicEntityAutocompleteField.d.ts new file mode 100644 index 0000000..cf25015 --- /dev/null +++ b/dist/BasicEntityAutocompleteField.d.ts @@ -0,0 +1,2 @@ +declare function BasicEntityAutocompleteField(props: any): import("react/jsx-runtime").JSX.Element; +export { BasicEntityAutocompleteField }; diff --git a/dist/BasicEntityCheckBoxField.d.ts b/dist/BasicEntityCheckBoxField.d.ts new file mode 100644 index 0000000..3a9d2ea --- /dev/null +++ b/dist/BasicEntityCheckBoxField.d.ts @@ -0,0 +1,2 @@ +declare function BasicEntityCheckBoxField(props: any): import("react/jsx-runtime").JSX.Element; +export { BasicEntityCheckBoxField }; diff --git a/dist/BasicEntityRadioGroupField.d.ts b/dist/BasicEntityRadioGroupField.d.ts new file mode 100644 index 0000000..3219868 --- /dev/null +++ b/dist/BasicEntityRadioGroupField.d.ts @@ -0,0 +1,2 @@ +declare function BasicEntityRadioGroupField(props: any): import("react/jsx-runtime").JSX.Element; +export { BasicEntityRadioGroupField }; diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index 92e9a18..8170af1 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -54,7 +54,7 @@ var __async = (__this, __arguments, generator) => { }; import * as React$1 from "react"; import React__default, { isValidElement, Children, cloneElement, useMemo, useState, useReducer, useRef, useEffect, useCallback, memo as memo$2, Fragment, useLayoutEffect } from "react"; -import { Button as Button$1, Avatar, Menu as Menu$1, MenuItem as MenuItem$1, IconButton as IconButton$1, useTheme as useTheme$5, Box as Box$2, TextField as TextField$1, Grid as Grid$1, Toolbar as Toolbar$1, Container as Container$2, Drawer as Drawer$1, List as List$1, ListItem as ListItem$1, ListItemButton as ListItemButton$1, ListItemIcon as ListItemIcon$1, ListItemText as ListItemText$1, Divider as Divider$1, Typography as Typography$1 } from "@mui/material"; +import { Button as Button$1, Avatar, Menu as Menu$1, MenuItem as MenuItem$1, IconButton as IconButton$1, useTheme as useTheme$5, Box as Box$2, Autocomplete as Autocomplete$1, TextField as TextField$1, Grid as Grid$1, Toolbar as Toolbar$1, Container as Container$2, Drawer as Drawer$1, List as List$1, ListItem as ListItem$1, ListItemButton as ListItemButton$1, ListItemIcon as ListItemIcon$1, ListItemText as ListItemText$1, Divider as Divider$1, Typography as Typography$1 } from "@mui/material"; import emStyled from "@emotion/styled"; import { CacheProvider, Global, ThemeContext as ThemeContext$1, css, keyframes } from "@emotion/react"; import { useSelector } from "react-redux"; @@ -2854,6 +2854,7 @@ function requireObjectWithoutPropertiesLoose() { })(objectWithoutPropertiesLoose$1); return objectWithoutPropertiesLoose$1.exports; } +var isDevelopment = false; function sheetForTag(tag) { if (tag.sheet) { return tag.sheet; @@ -2863,6 +2864,7 @@ function sheetForTag(tag) { return document.styleSheets[i]; } } + return void 0; } function createStyleElement(options) { var tag = document.createElement("style"); @@ -2893,7 +2895,7 @@ var StyleSheet = /* @__PURE__ */ function() { _this.container.insertBefore(tag, before); _this.tags.push(tag); }; - this.isSpeedy = options.speedy === void 0 ? process.env.NODE_ENV === "production" : options.speedy; + this.isSpeedy = options.speedy === void 0 ? !isDevelopment : options.speedy; this.tags = []; this.ctr = 0; this.nonce = options.nonce; @@ -2912,21 +2914,11 @@ var StyleSheet = /* @__PURE__ */ function() { this._insertTag(createStyleElement(this)); } var tag = this.tags[this.tags.length - 1]; - if (process.env.NODE_ENV !== "production") { - var isImportRule3 = rule.charCodeAt(0) === 64 && rule.charCodeAt(1) === 105; - if (isImportRule3 && this._alreadyInsertedOrderInsensitiveRule) { - console.error("You're attempting to insert the following rule:\n" + rule + "\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules."); - } - this._alreadyInsertedOrderInsensitiveRule = this._alreadyInsertedOrderInsensitiveRule || !isImportRule3; - } if (this.isSpeedy) { var sheet = sheetForTag(tag); try { sheet.insertRule(rule, sheet.cssRules.length); } catch (e) { - if (process.env.NODE_ENV !== "production" && !/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(rule)) { - console.error('There was a problem inserting the following rule: "' + rule + '"', e); - } } } else { tag.appendChild(document.createTextNode(rule)); @@ -2935,13 +2927,11 @@ var StyleSheet = /* @__PURE__ */ function() { }; _proto.flush = function flush() { this.tags.forEach(function(tag) { - return tag.parentNode && tag.parentNode.removeChild(tag); + var _tag$parentNode; + return (_tag$parentNode = tag.parentNode) == null ? void 0 : _tag$parentNode.removeChild(tag); }); this.tags = []; this.ctr = 0; - if (process.env.NODE_ENV !== "production") { - this._alreadyInsertedOrderInsensitiveRule = false; - } }; return StyleSheet2; }(); @@ -3626,68 +3616,6 @@ var removeLabel = function removeLabel2(element) { } } }; -var ignoreFlag = "emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason"; -var isIgnoringComment = function isIgnoringComment2(element) { - return element.type === "comm" && element.children.indexOf(ignoreFlag) > -1; -}; -var createUnsafeSelectorsAlarm = function createUnsafeSelectorsAlarm2(cache2) { - return function(element, index2, children2) { - if (element.type !== "rule" || cache2.compat) return; - var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g); - if (unsafePseudoClasses) { - var isNested = !!element.parent; - var commentContainer = isNested ? element.parent.children : ( - // global rule at the root level - children2 - ); - for (var i = commentContainer.length - 1; i >= 0; i--) { - var node2 = commentContainer[i]; - if (node2.line < element.line) { - break; - } - if (node2.column < element.column) { - if (isIgnoringComment(node2)) { - return; - } - break; - } - } - unsafePseudoClasses.forEach(function(unsafePseudoClass) { - console.error('The pseudo class "' + unsafePseudoClass + '" is potentially unsafe when doing server-side rendering. Try changing it to "' + unsafePseudoClass.split("-child")[0] + '-of-type".'); - }); - } - }; -}; -var isImportRule = function isImportRule2(element) { - return element.type.charCodeAt(1) === 105 && element.type.charCodeAt(0) === 64; -}; -var isPrependedWithRegularRules = function isPrependedWithRegularRules2(index2, children2) { - for (var i = index2 - 1; i >= 0; i--) { - if (!isImportRule(children2[i])) { - return true; - } - } - return false; -}; -var nullifyElement = function nullifyElement2(element) { - element.type = ""; - element.value = ""; - element["return"] = ""; - element.children = ""; - element.props = ""; -}; -var incorrectImportAlarm = function incorrectImportAlarm2(element, index2, children2) { - if (!isImportRule(element)) { - return; - } - if (element.parent) { - console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."); - nullifyElement(element); - } else if (isPrependedWithRegularRules(index2, children2)) { - console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."); - nullifyElement(element); - } -}; function prefix(value, length2) { switch (hash$2(value, length2)) { case 5103: @@ -3834,9 +3762,6 @@ var prefixer = function prefixer2(element, index2, children2, callback) { var defaultStylisPlugins = [prefixer]; var createCache = function createCache2(options) { var key = options.key; - if (process.env.NODE_ENV !== "production" && !key) { - throw new Error("You have to configure `key` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.\nIf multiple caches share the same key they might \"fight\" for each other's style elements."); - } if (key === "css") { var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])"); Array.prototype.forEach.call(ssrStyles, function(node2) { @@ -3849,11 +3774,6 @@ var createCache = function createCache2(options) { }); } var stylisPlugins = options.stylisPlugins || defaultStylisPlugins; - if (process.env.NODE_ENV !== "production") { - if (/[^a-z-]/.test(key)) { - throw new Error('Emotion key must only contain lower case alphabetical characters and - but "' + key + '" was passed'); - } - } var inserted = {}; var container; var nodesToHydrate = []; @@ -3874,24 +3794,9 @@ var createCache = function createCache2(options) { } var _insert; var omnipresentPlugins = [compat, removeLabel]; - if (process.env.NODE_ENV !== "production") { - omnipresentPlugins.push(createUnsafeSelectorsAlarm({ - get compat() { - return cache2.compat; - } - }), incorrectImportAlarm); - } { var currentSheet; - var finalizingPlugins = [stringify, process.env.NODE_ENV !== "production" ? function(element) { - if (!element.root) { - if (element["return"]) { - currentSheet.insert(element["return"]); - } else if (element.value && element.type !== COMMENT) { - currentSheet.insert(element.value + "{}"); - } - } - } : rulesheet(function(rule) { + var finalizingPlugins = [stringify, rulesheet(function(rule) { currentSheet.insert(rule); })]; var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins)); @@ -3900,13 +3805,6 @@ var createCache = function createCache2(options) { }; _insert = function insert2(selector, serialized, sheet, shouldCache) { currentSheet = sheet; - if (process.env.NODE_ENV !== "production" && serialized.map !== void 0) { - currentSheet = { - insert: function insert3(rule) { - sheet.insert(rule + serialized.map); - } - }; - } stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles); if (shouldCache) { cache2.inserted[serialized.name] = true; @@ -39125,7 +39023,7 @@ const PickersLayoutContentWrapper = styled$1("div", { display: "flex", flexDirection: "column" }); -const PickersLayout = function PickersLayout2(inProps) { +const PickersLayout = /* @__PURE__ */ React$1.forwardRef(function PickersLayout2(inProps, ref) { const props = useThemeProps({ props: inProps, name: "MuiPickersLayout" @@ -39141,7 +39039,6 @@ const PickersLayout = function PickersLayout2(inProps) { sx, className, isLandscape, - ref, wrapperVariant } = props; const classes = useUtilityClasses$J(props); @@ -39159,7 +39056,7 @@ const PickersLayout = function PickersLayout2(inProps) { }) }), actionBar] }); -}; +}); process.env.NODE_ENV !== "production" ? PickersLayout.propTypes = { // ----------------------------- Warning -------------------------------- // | These PropTypes are generated from the TypeScript type definitions | @@ -45063,7 +44960,7 @@ const pickersCalendarHeaderClasses = generateUtilityClasses("MuiPickersCalendarH function getPickersArrowSwitcherUtilityClass(slot) { return generateUtilityClass("MuiPickersArrowSwitcher", slot); } -const pickersArrowSwitcherClasses = generateUtilityClasses("MuiPickersArrowSwitcher", ["root", "spacer", "button"]); +const pickersArrowSwitcherClasses = generateUtilityClasses("MuiPickersArrowSwitcher", ["root", "spacer", "button", "previousIconButton", "nextIconButton", "leftArrowIcon", "rightArrowIcon"]); const _excluded$E = ["children", "className", "slots", "slotProps", "isNextDisabled", "isNextHidden", "onGoToNext", "nextLabel", "isPreviousDisabled", "isPreviousHidden", "onGoToPrevious", "previousLabel", "labelId"], _excluded2$3 = ["ownerState"], _excluded3$1 = ["ownerState"]; const PickersArrowSwitcherRoot = styled$1("div", { name: "MuiPickersArrowSwitcher", @@ -45102,7 +44999,11 @@ const useUtilityClasses$u = (ownerState) => { const slots = { root: ["root"], spacer: ["spacer"], - button: ["button"] + button: ["button"], + previousIconButton: ["previousIconButton"], + nextIconButton: ["nextIconButton"], + leftArrowIcon: ["leftArrowIcon"], + rightArrowIcon: ["rightArrowIcon"] }; return composeClasses(slots, getPickersArrowSwitcherUtilityClass, classes); }; @@ -45157,7 +45058,7 @@ const PickersArrowSwitcher = /* @__PURE__ */ React$1.forwardRef(function Pickers ownerState: _extends$1({}, ownerState, { hidden: previousProps.isHidden }), - className: classes.button + className: clsx(classes.button, classes.previousIconButton) }); const NextIconButton = (_b = slots == null ? void 0 : slots.nextIconButton) != null ? _b : PickersArrowSwitcherButton; const nextIconButtonProps = useSlotProps({ @@ -45174,7 +45075,7 @@ const PickersArrowSwitcher = /* @__PURE__ */ React$1.forwardRef(function Pickers ownerState: _extends$1({}, ownerState, { hidden: nextProps.isHidden }), - className: classes.button + className: clsx(classes.button, classes.nextIconButton) }); const LeftArrowIcon = (_c = slots == null ? void 0 : slots.leftArrowIcon) != null ? _c : ArrowLeftIcon; const _useSlotProps = useSlotProps({ @@ -45183,7 +45084,8 @@ const PickersArrowSwitcher = /* @__PURE__ */ React$1.forwardRef(function Pickers additionalProps: { fontSize: "inherit" }, - ownerState: void 0 + ownerState, + className: classes.leftArrowIcon }), leftArrowIconProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2$3); const RightArrowIcon = (_d = slots == null ? void 0 : slots.rightArrowIcon) != null ? _d : ArrowRightIcon; const _useSlotProps2 = useSlotProps({ @@ -45192,7 +45094,8 @@ const PickersArrowSwitcher = /* @__PURE__ */ React$1.forwardRef(function Pickers additionalProps: { fontSize: "inherit" }, - ownerState: void 0 + ownerState, + className: classes.rightArrowIcon }), rightArrowIconProps = _objectWithoutPropertiesLoose(_useSlotProps2, _excluded3$1); return /* @__PURE__ */ jsxRuntimeExports.jsxs(PickersArrowSwitcherRoot, _extends$1({ ref, @@ -45373,7 +45276,7 @@ const PickersCalendarHeader = /* @__PURE__ */ React$1.forwardRef(function Picker const _useSlotProps = useSlotProps({ elementType: SwitchViewIcon, externalSlotProps: slotProps == null ? void 0 : slotProps.switchViewIcon, - ownerState: void 0, + ownerState, className: classes.switchViewIcon }), switchViewIconProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2$2); const selectNextMonth = () => onMonthChange(utils2.addMonths(month, 1), "left"); @@ -50303,10 +50206,11 @@ function ClockPointer(inProps) { function getClockUtilityClass(slot) { return generateUtilityClass("MuiClock", slot); } -const clockClasses = generateUtilityClasses("MuiClock", ["root", "clock", "wrapper", "squareMask", "pin", "amButton", "pmButton", "meridiemText"]); +const clockClasses = generateUtilityClasses("MuiClock", ["root", "clock", "wrapper", "squareMask", "pin", "amButton", "pmButton", "meridiemText", "selected"]); const useUtilityClasses$h = (ownerState) => { const { - classes + classes, + meridiemMode } = ownerState; const slots = { root: ["root"], @@ -50314,8 +50218,8 @@ const useUtilityClasses$h = (ownerState) => { wrapper: ["wrapper"], squareMask: ["squareMask"], pin: ["pin"], - amButton: ["amButton"], - pmButton: ["pmButton"], + amButton: ["amButton", meridiemMode === "am" && "selected"], + pmButton: ["pmButton", meridiemMode === "pm" && "selected"], meridiemText: ["meridiemText"] }; return composeClasses(slots, getClockUtilityClass, classes); @@ -50398,23 +50302,15 @@ const ClockPin = styled$1("div", { left: "50%", transform: "translate(-50%, -50%)" })); -const ClockAmButton = styled$1(IconButton, { - name: "MuiClock", - slot: "AmButton", - overridesResolver: (_2, styles2) => styles2.amButton -})(({ - theme -}) => ({ +const meridiemButtonCommonStyles = (theme, meridiemMode) => ({ zIndex: 1, - position: "absolute", bottom: 8, - left: 8, paddingLeft: 4, paddingRight: 4, width: CLOCK_HOUR_WIDTH, variants: [{ props: { - meridiemMode: "am" + meridiemMode }, style: { backgroundColor: (theme.vars || theme).palette.primary.main, @@ -50424,6 +50320,17 @@ const ClockAmButton = styled$1(IconButton, { } } }] +}); +const ClockAmButton = styled$1(IconButton, { + name: "MuiClock", + slot: "AmButton", + overridesResolver: (_2, styles2) => styles2.amButton +})(({ + theme +}) => _extends$1({}, meridiemButtonCommonStyles(theme, "am"), { + // keeping it here to make TS happy + position: "absolute", + left: 8 })); const ClockPmButton = styled$1(IconButton, { name: "MuiClock", @@ -50431,26 +50338,10 @@ const ClockPmButton = styled$1(IconButton, { overridesResolver: (_2, styles2) => styles2.pmButton })(({ theme -}) => ({ - zIndex: 1, +}) => _extends$1({}, meridiemButtonCommonStyles(theme, "pm"), { + // keeping it here to make TS happy position: "absolute", - bottom: 8, - right: 8, - paddingLeft: 4, - paddingRight: 4, - width: CLOCK_HOUR_WIDTH, - variants: [{ - props: { - meridiemMode: "pm" - }, - style: { - backgroundColor: (theme.vars || theme).palette.primary.main, - color: (theme.vars || theme).palette.primary.contrastText, - "&:hover": { - backgroundColor: (theme.vars || theme).palette.primary.light - } - } - }] + right: 8 })); const ClockMeridiemText = styled$1(Typography, { name: "MuiClock", @@ -52517,7 +52408,7 @@ const renderMultiSectionDigitalClockTimeView = ({ skipDisabled, timezone }); -function DesktopDateTimePickerLayout(props) { +const DesktopDateTimePickerLayout = /* @__PURE__ */ React$1.forwardRef(function DesktopDateTimePickerLayout2(props, ref) { var _a, _b; const isRtl = useRtl(); const { @@ -52531,7 +52422,6 @@ function DesktopDateTimePickerLayout(props) { sx, className, isLandscape, - ref, classes } = props; const isActionBarVisible = actionBar && ((_b = (_a = actionBar.props.actions) == null ? void 0 : _a.length) != null ? _b : 0) > 0; @@ -52564,7 +52454,7 @@ function DesktopDateTimePickerLayout(props) { })] }), actionBar] }); -} +}); process.env.NODE_ENV !== "production" ? DesktopDateTimePickerLayout.propTypes = { // ----------------------------- Warning -------------------------------- // | These PropTypes are generated from the TypeScript type definitions | @@ -64782,6 +64672,40 @@ function useForm(props = {}) { _formControl.current.formState = getProxyFormState(formState, control); return _formControl.current; } +function BasicEntityAutocompleteField(props) { + const { spec } = props; + const { field, getValues, control } = spec; + const val = getValues(field.name); + return /* @__PURE__ */ jsxRuntimeExports.jsx( + Controller, + { + name: field.name, + control, + defaultValue: resolveOptions(field.options.default), + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( + Autocomplete$1, + { + freeSolo: true, + forcePopupIcon: true, + multiple: field.ux.multiple, + options: resolveOptions(field.options.ents), + isOptionEqualToValue: (option, value2) => option.value === value2.value, + getOptionLabel: (option) => option.label, + value, + onChange: (e, val2) => onChange(val2), + renderInput: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx(TextField$1, __spreadProps(__spreadValues({}, params), { label: field.label })) + }, + field.id + ) + } + ); +} +function resolveOptions(options) { + return Object.keys(options).map((key) => ({ + label: options[key].label, + value: key + })); +} const CMPNAME$8 = "BasicEntityField"; const { Open: Open$6 } = gubu_minExports.Gubu; const BasicEntityFieldSpecShape = gubu_minExports.Gubu(Open$6({}), { name: CMPNAME$8 }); @@ -64790,7 +64714,8 @@ const fieldMap = { TextBox: BasicEntityTextBoxField, Date: BasicEntityDateField, DateTime: BasicEntityDateTimeField, - Time: BasicEntityTimeField + Time: BasicEntityTimeField, + Autocomplete: BasicEntityAutocompleteField }; function BasicEntityField(props) { const { ctx, spec } = props; @@ -65001,6 +64926,7 @@ function BasicEntityEdit(props) { handleSubmit, getValues, reset, + control, formState: { errors } } = useForm({ mode: "onChange", @@ -65029,6 +64955,7 @@ function BasicEntityEdit(props) { field, register, getValues, + control, errors } } diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index bce3f35..4b5d9b2 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -2866,6 +2866,7 @@ var __async = (__this, __arguments, generator) => { })(objectWithoutPropertiesLoose$1); return objectWithoutPropertiesLoose$1.exports; } + var isDevelopment = false; function sheetForTag(tag) { if (tag.sheet) { return tag.sheet; @@ -2875,6 +2876,7 @@ var __async = (__this, __arguments, generator) => { return document.styleSheets[i]; } } + return void 0; } function createStyleElement(options) { var tag = document.createElement("style"); @@ -2905,7 +2907,7 @@ var __async = (__this, __arguments, generator) => { _this.container.insertBefore(tag, before); _this.tags.push(tag); }; - this.isSpeedy = options.speedy === void 0 ? process.env.NODE_ENV === "production" : options.speedy; + this.isSpeedy = options.speedy === void 0 ? !isDevelopment : options.speedy; this.tags = []; this.ctr = 0; this.nonce = options.nonce; @@ -2924,21 +2926,11 @@ var __async = (__this, __arguments, generator) => { this._insertTag(createStyleElement(this)); } var tag = this.tags[this.tags.length - 1]; - if (process.env.NODE_ENV !== "production") { - var isImportRule2 = rule.charCodeAt(0) === 64 && rule.charCodeAt(1) === 105; - if (isImportRule2 && this._alreadyInsertedOrderInsensitiveRule) { - console.error("You're attempting to insert the following rule:\n" + rule + "\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules."); - } - this._alreadyInsertedOrderInsensitiveRule = this._alreadyInsertedOrderInsensitiveRule || !isImportRule2; - } if (this.isSpeedy) { var sheet = sheetForTag(tag); try { sheet.insertRule(rule, sheet.cssRules.length); } catch (e) { - if (process.env.NODE_ENV !== "production" && !/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(rule)) { - console.error('There was a problem inserting the following rule: "' + rule + '"', e); - } } } else { tag.appendChild(document.createTextNode(rule)); @@ -2947,13 +2939,11 @@ var __async = (__this, __arguments, generator) => { }; _proto.flush = function flush() { this.tags.forEach(function(tag) { - return tag.parentNode && tag.parentNode.removeChild(tag); + var _tag$parentNode; + return (_tag$parentNode = tag.parentNode) == null ? void 0 : _tag$parentNode.removeChild(tag); }); this.tags = []; this.ctr = 0; - if (process.env.NODE_ENV !== "production") { - this._alreadyInsertedOrderInsensitiveRule = false; - } }; return StyleSheet2; }(); @@ -3638,68 +3628,6 @@ var __async = (__this, __arguments, generator) => { } } }; - var ignoreFlag = "emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason"; - var isIgnoringComment = function isIgnoringComment2(element) { - return element.type === "comm" && element.children.indexOf(ignoreFlag) > -1; - }; - var createUnsafeSelectorsAlarm = function createUnsafeSelectorsAlarm2(cache2) { - return function(element, index2, children) { - if (element.type !== "rule" || cache2.compat) return; - var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g); - if (unsafePseudoClasses) { - var isNested = !!element.parent; - var commentContainer = isNested ? element.parent.children : ( - // global rule at the root level - children - ); - for (var i = commentContainer.length - 1; i >= 0; i--) { - var node2 = commentContainer[i]; - if (node2.line < element.line) { - break; - } - if (node2.column < element.column) { - if (isIgnoringComment(node2)) { - return; - } - break; - } - } - unsafePseudoClasses.forEach(function(unsafePseudoClass) { - console.error('The pseudo class "' + unsafePseudoClass + '" is potentially unsafe when doing server-side rendering. Try changing it to "' + unsafePseudoClass.split("-child")[0] + '-of-type".'); - }); - } - }; - }; - var isImportRule = function isImportRule2(element) { - return element.type.charCodeAt(1) === 105 && element.type.charCodeAt(0) === 64; - }; - var isPrependedWithRegularRules = function isPrependedWithRegularRules2(index2, children) { - for (var i = index2 - 1; i >= 0; i--) { - if (!isImportRule(children[i])) { - return true; - } - } - return false; - }; - var nullifyElement = function nullifyElement2(element) { - element.type = ""; - element.value = ""; - element["return"] = ""; - element.children = ""; - element.props = ""; - }; - var incorrectImportAlarm = function incorrectImportAlarm2(element, index2, children) { - if (!isImportRule(element)) { - return; - } - if (element.parent) { - console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."); - nullifyElement(element); - } else if (isPrependedWithRegularRules(index2, children)) { - console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."); - nullifyElement(element); - } - }; function prefix(value, length2) { switch (hash$2(value, length2)) { case 5103: @@ -3846,9 +3774,6 @@ var __async = (__this, __arguments, generator) => { var defaultStylisPlugins = [prefixer]; var createCache = function createCache2(options) { var key = options.key; - if (process.env.NODE_ENV !== "production" && !key) { - throw new Error("You have to configure `key` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.\nIf multiple caches share the same key they might \"fight\" for each other's style elements."); - } if (key === "css") { var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])"); Array.prototype.forEach.call(ssrStyles, function(node2) { @@ -3861,11 +3786,6 @@ var __async = (__this, __arguments, generator) => { }); } var stylisPlugins = options.stylisPlugins || defaultStylisPlugins; - if (process.env.NODE_ENV !== "production") { - if (/[^a-z-]/.test(key)) { - throw new Error('Emotion key must only contain lower case alphabetical characters and - but "' + key + '" was passed'); - } - } var inserted = {}; var container; var nodesToHydrate = []; @@ -3886,24 +3806,9 @@ var __async = (__this, __arguments, generator) => { } var _insert; var omnipresentPlugins = [compat, removeLabel]; - if (process.env.NODE_ENV !== "production") { - omnipresentPlugins.push(createUnsafeSelectorsAlarm({ - get compat() { - return cache2.compat; - } - }), incorrectImportAlarm); - } { var currentSheet; - var finalizingPlugins = [stringify, process.env.NODE_ENV !== "production" ? function(element) { - if (!element.root) { - if (element["return"]) { - currentSheet.insert(element["return"]); - } else if (element.value && element.type !== COMMENT) { - currentSheet.insert(element.value + "{}"); - } - } - } : rulesheet(function(rule) { + var finalizingPlugins = [stringify, rulesheet(function(rule) { currentSheet.insert(rule); })]; var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins)); @@ -3912,13 +3817,6 @@ var __async = (__this, __arguments, generator) => { }; _insert = function insert2(selector, serialized, sheet, shouldCache) { currentSheet = sheet; - if (process.env.NODE_ENV !== "production" && serialized.map !== void 0) { - currentSheet = { - insert: function insert3(rule) { - sheet.insert(rule + serialized.map); - } - }; - } stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles); if (shouldCache) { cache2.inserted[serialized.name] = true; @@ -39137,7 +39035,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha display: "flex", flexDirection: "column" }); - const PickersLayout = function PickersLayout2(inProps) { + const PickersLayout = /* @__PURE__ */ React__namespace.forwardRef(function PickersLayout2(inProps, ref) { const props = useThemeProps({ props: inProps, name: "MuiPickersLayout" @@ -39153,7 +39051,6 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha sx, className, isLandscape, - ref, wrapperVariant } = props; const classes = useUtilityClasses$J(props); @@ -39171,7 +39068,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }) }), actionBar] }); - }; + }); process.env.NODE_ENV !== "production" ? PickersLayout.propTypes = { // ----------------------------- Warning -------------------------------- // | These PropTypes are generated from the TypeScript type definitions | @@ -45075,7 +44972,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha function getPickersArrowSwitcherUtilityClass(slot) { return generateUtilityClass("MuiPickersArrowSwitcher", slot); } - const pickersArrowSwitcherClasses = generateUtilityClasses("MuiPickersArrowSwitcher", ["root", "spacer", "button"]); + const pickersArrowSwitcherClasses = generateUtilityClasses("MuiPickersArrowSwitcher", ["root", "spacer", "button", "previousIconButton", "nextIconButton", "leftArrowIcon", "rightArrowIcon"]); const _excluded$E = ["children", "className", "slots", "slotProps", "isNextDisabled", "isNextHidden", "onGoToNext", "nextLabel", "isPreviousDisabled", "isPreviousHidden", "onGoToPrevious", "previousLabel", "labelId"], _excluded2$3 = ["ownerState"], _excluded3$1 = ["ownerState"]; const PickersArrowSwitcherRoot = styled$1("div", { name: "MuiPickersArrowSwitcher", @@ -45114,7 +45011,11 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const slots = { root: ["root"], spacer: ["spacer"], - button: ["button"] + button: ["button"], + previousIconButton: ["previousIconButton"], + nextIconButton: ["nextIconButton"], + leftArrowIcon: ["leftArrowIcon"], + rightArrowIcon: ["rightArrowIcon"] }; return composeClasses(slots, getPickersArrowSwitcherUtilityClass, classes); }; @@ -45169,7 +45070,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ownerState: _extends$1({}, ownerState, { hidden: previousProps.isHidden }), - className: classes.button + className: clsx(classes.button, classes.previousIconButton) }); const NextIconButton = (_b = slots == null ? void 0 : slots.nextIconButton) != null ? _b : PickersArrowSwitcherButton; const nextIconButtonProps = useSlotProps({ @@ -45186,7 +45087,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ownerState: _extends$1({}, ownerState, { hidden: nextProps.isHidden }), - className: classes.button + className: clsx(classes.button, classes.nextIconButton) }); const LeftArrowIcon = (_c = slots == null ? void 0 : slots.leftArrowIcon) != null ? _c : ArrowLeftIcon; const _useSlotProps = useSlotProps({ @@ -45195,7 +45096,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha additionalProps: { fontSize: "inherit" }, - ownerState: void 0 + ownerState, + className: classes.leftArrowIcon }), leftArrowIconProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2$3); const RightArrowIcon = (_d = slots == null ? void 0 : slots.rightArrowIcon) != null ? _d : ArrowRightIcon; const _useSlotProps2 = useSlotProps({ @@ -45204,7 +45106,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha additionalProps: { fontSize: "inherit" }, - ownerState: void 0 + ownerState, + className: classes.rightArrowIcon }), rightArrowIconProps = _objectWithoutPropertiesLoose(_useSlotProps2, _excluded3$1); return /* @__PURE__ */ jsxRuntimeExports.jsxs(PickersArrowSwitcherRoot, _extends$1({ ref, @@ -45385,7 +45288,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const _useSlotProps = useSlotProps({ elementType: SwitchViewIcon, externalSlotProps: slotProps == null ? void 0 : slotProps.switchViewIcon, - ownerState: void 0, + ownerState, className: classes.switchViewIcon }), switchViewIconProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2$2); const selectNextMonth = () => onMonthChange(utils2.addMonths(month, 1), "left"); @@ -50315,10 +50218,11 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha function getClockUtilityClass(slot) { return generateUtilityClass("MuiClock", slot); } - const clockClasses = generateUtilityClasses("MuiClock", ["root", "clock", "wrapper", "squareMask", "pin", "amButton", "pmButton", "meridiemText"]); + const clockClasses = generateUtilityClasses("MuiClock", ["root", "clock", "wrapper", "squareMask", "pin", "amButton", "pmButton", "meridiemText", "selected"]); const useUtilityClasses$h = (ownerState) => { const { - classes + classes, + meridiemMode } = ownerState; const slots = { root: ["root"], @@ -50326,8 +50230,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha wrapper: ["wrapper"], squareMask: ["squareMask"], pin: ["pin"], - amButton: ["amButton"], - pmButton: ["pmButton"], + amButton: ["amButton", meridiemMode === "am" && "selected"], + pmButton: ["pmButton", meridiemMode === "pm" && "selected"], meridiemText: ["meridiemText"] }; return composeClasses(slots, getClockUtilityClass, classes); @@ -50410,23 +50314,15 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha left: "50%", transform: "translate(-50%, -50%)" })); - const ClockAmButton = styled$1(IconButton, { - name: "MuiClock", - slot: "AmButton", - overridesResolver: (_2, styles2) => styles2.amButton - })(({ - theme - }) => ({ + const meridiemButtonCommonStyles = (theme, meridiemMode) => ({ zIndex: 1, - position: "absolute", bottom: 8, - left: 8, paddingLeft: 4, paddingRight: 4, width: CLOCK_HOUR_WIDTH, variants: [{ props: { - meridiemMode: "am" + meridiemMode }, style: { backgroundColor: (theme.vars || theme).palette.primary.main, @@ -50436,6 +50332,17 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } } }] + }); + const ClockAmButton = styled$1(IconButton, { + name: "MuiClock", + slot: "AmButton", + overridesResolver: (_2, styles2) => styles2.amButton + })(({ + theme + }) => _extends$1({}, meridiemButtonCommonStyles(theme, "am"), { + // keeping it here to make TS happy + position: "absolute", + left: 8 })); const ClockPmButton = styled$1(IconButton, { name: "MuiClock", @@ -50443,26 +50350,10 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha overridesResolver: (_2, styles2) => styles2.pmButton })(({ theme - }) => ({ - zIndex: 1, + }) => _extends$1({}, meridiemButtonCommonStyles(theme, "pm"), { + // keeping it here to make TS happy position: "absolute", - bottom: 8, - right: 8, - paddingLeft: 4, - paddingRight: 4, - width: CLOCK_HOUR_WIDTH, - variants: [{ - props: { - meridiemMode: "pm" - }, - style: { - backgroundColor: (theme.vars || theme).palette.primary.main, - color: (theme.vars || theme).palette.primary.contrastText, - "&:hover": { - backgroundColor: (theme.vars || theme).palette.primary.light - } - } - }] + right: 8 })); const ClockMeridiemText = styled$1(Typography, { name: "MuiClock", @@ -52529,7 +52420,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha skipDisabled, timezone }); - function DesktopDateTimePickerLayout(props) { + const DesktopDateTimePickerLayout = /* @__PURE__ */ React__namespace.forwardRef(function DesktopDateTimePickerLayout2(props, ref) { var _a, _b; const isRtl = useRtl(); const { @@ -52543,7 +52434,6 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha sx, className, isLandscape, - ref, classes } = props; const isActionBarVisible = actionBar && ((_b = (_a = actionBar.props.actions) == null ? void 0 : _a.length) != null ? _b : 0) > 0; @@ -52576,7 +52466,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha })] }), actionBar] }); - } + }); process.env.NODE_ENV !== "production" ? DesktopDateTimePickerLayout.propTypes = { // ----------------------------- Warning -------------------------------- // | These PropTypes are generated from the TypeScript type definitions | @@ -64794,6 +64684,40 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha _formControl.current.formState = getProxyFormState(formState, control); return _formControl.current; } + function BasicEntityAutocompleteField(props) { + const { spec } = props; + const { field, getValues, control } = spec; + const val = getValues(field.name); + return /* @__PURE__ */ jsxRuntimeExports.jsx( + Controller, + { + name: field.name, + control, + defaultValue: resolveOptions(field.options.default), + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( + material.Autocomplete, + { + freeSolo: true, + forcePopupIcon: true, + multiple: field.ux.multiple, + options: resolveOptions(field.options.ents), + isOptionEqualToValue: (option, value2) => option.value === value2.value, + getOptionLabel: (option) => option.label, + value, + onChange: (e, val2) => onChange(val2), + renderInput: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.TextField, __spreadProps(__spreadValues({}, params), { label: field.label })) + }, + field.id + ) + } + ); + } + function resolveOptions(options) { + return Object.keys(options).map((key) => ({ + label: options[key].label, + value: key + })); + } const CMPNAME$8 = "BasicEntityField"; const { Open: Open$6 } = gubu_minExports.Gubu; const BasicEntityFieldSpecShape = gubu_minExports.Gubu(Open$6({}), { name: CMPNAME$8 }); @@ -64802,7 +64726,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha TextBox: BasicEntityTextBoxField, Date: BasicEntityDateField, DateTime: BasicEntityDateTimeField, - Time: BasicEntityTimeField + Time: BasicEntityTimeField, + Autocomplete: BasicEntityAutocompleteField }; function BasicEntityField(props) { const { ctx, spec } = props; @@ -65013,6 +64938,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha handleSubmit, getValues, reset, + control, formState: { errors } } = useForm({ mode: "onChange", @@ -65041,6 +64967,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha field, register, getValues, + control, errors } } diff --git a/src/lib/BasicEntityAutocompleteField.tsx b/src/lib/BasicEntityAutocompleteField.tsx new file mode 100644 index 0000000..b2443a2 --- /dev/null +++ b/src/lib/BasicEntityAutocompleteField.tsx @@ -0,0 +1,44 @@ +import React, { useEffect, forwardRef } from "react"; + +import { FormControlLabel, Checkbox, Box, RadioGroup, Radio, FormLabel, TextField, Autocomplete } from "@mui/material"; +import { Controller } from "react-hook-form"; + + + +function BasicEntityAutocompleteField(props: any) { + const { spec } = props + + const { field, getValues, control } = spec + const val = getValues(field.name) + + return ( + ( + option.value === value.value} + getOptionLabel={(option: any) => option.label} + value={value} + onChange={(e: any, val: any) => onChange(val)} + renderInput={(params: any) => } + /> + )} + /> + ) +} + +function resolveOptions(options: any) { + return Object.keys(options).map(key => ({ + label: options[key].label, + value: key + })); +} + +export { BasicEntityAutocompleteField }; \ No newline at end of file diff --git a/src/lib/BasicEntityEdit.tsx b/src/lib/BasicEntityEdit.tsx index 3966ab2..391dd3c 100644 --- a/src/lib/BasicEntityEdit.tsx +++ b/src/lib/BasicEntityEdit.tsx @@ -124,6 +124,7 @@ function BasicEntityEdit (props: any) { handleSubmit, getValues, reset, + control, formState: { errors }, } = useForm({ mode: 'onChange', @@ -155,6 +156,7 @@ function BasicEntityEdit (props: any) { field, register, getValues, + control, errors, }} /> diff --git a/src/lib/BasicEntityField.tsx b/src/lib/BasicEntityField.tsx index f332b15..d4b70b8 100644 --- a/src/lib/BasicEntityField.tsx +++ b/src/lib/BasicEntityField.tsx @@ -10,6 +10,7 @@ import { import type { Spec } from './basic-types' import { Gubu } from 'gubu' +import { BasicEntityAutocompleteField } from './BasicEntityAutocompleteField' const CMPNAME = 'BasicEntityField' @@ -26,6 +27,7 @@ const fieldMap: any = { Date: BasicEntityDateField, DateTime: BasicEntityDateTimeField, Time: BasicEntityTimeField, + Autocomplete: BasicEntityAutocompleteField } From aea72fb573d13006b73f38bc328bc5202b00ee89 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 25 Jul 2024 02:18:20 +0100 Subject: [PATCH 005/122] Refactor BasicEntityAutocompleteField component --- dist/voxgig-model-react.es.js | 80 ++++++++++++++------- dist/voxgig-model-react.umd.js | 80 ++++++++++++++------- src/lib/BasicEntityAutocompleteField.tsx | 90 +++++++++++++++++++++--- 3 files changed, 190 insertions(+), 60 deletions(-) diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index 8170af1..51e6d77 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -10588,8 +10588,8 @@ process.env.NODE_ENV !== "production" ? Toolbar.propTypes = { */ variant: PropTypes.oneOfType([PropTypes.oneOf(["dense", "regular"]), PropTypes.string]) } : void 0; -const CMPNAME$c = "BasicAccountTool"; -console.log(CMPNAME$c, "1"); +const CMPNAME$d = "BasicAccountTool"; +console.log(CMPNAME$d, "1"); const { Exact: Exact$2 } = gubu_minExports.Gubu; const BasicAccountToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10599,7 +10599,7 @@ const BasicAccountToolSpecShape = gubu_minExports.Gubu({ attr: {}, sx: {}, style: {} -}, { name: CMPNAME$c }); +}, { name: CMPNAME$d }); function BasicAccountTool(props) { var _a; const { ctx, spec } = props; @@ -10673,8 +10673,8 @@ function stringAvatar(s) { children: `${parts.join("")}` }; } -const CMPNAME$b = "BasicHeadTool"; -console.log(CMPNAME$b, "1"); +const CMPNAME$c = "BasicHeadTool"; +console.log(CMPNAME$c, "1"); const { Exact: Exact$1 } = gubu_minExports.Gubu; const BasicHeadToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10684,7 +10684,7 @@ const BasicHeadToolSpecShape = gubu_minExports.Gubu({ attr: {}, sx: {}, style: {} -}, { name: CMPNAME$b }); +}, { name: CMPNAME$c }); function BasicHeadTool(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -10693,7 +10693,7 @@ function BasicHeadTool(props) { const { name, kind, attr, sx, style: style2 } = basicHeadToolSpec; let tool = /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}); if ("" === kind) { - console.warn(CMPNAME$b, "empty-tool-kind", basicHeadToolSpec); + console.warn(CMPNAME$c, "empty-tool-kind", basicHeadToolSpec); } else if ("logo" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsxs( "div", @@ -10710,7 +10710,7 @@ function BasicHeadTool(props) { { href: "/", style: style2, - className: `vxg-${CMPNAME$b}-logo`, + className: `vxg-${CMPNAME$c}-logo`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: attr.img }) } ), @@ -10742,17 +10742,17 @@ function BasicHeadTool(props) { } else if ("account" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsx(BasicAccountTool, { ctx, spec }); } else { - console.warn(CMPNAME$b, "unknown-tool-kind", kind, basicHeadToolSpec); + console.warn(CMPNAME$c, "unknown-tool-kind", kind, basicHeadToolSpec); } return tool; } -const CMPNAME$a = "BasicHead"; -const { Child: Child$5, Exact, Open: Open$8, Required: Required$1 } = gubu_minExports.Gubu; +const CMPNAME$b = "BasicHead"; +const { Child: Child$5, Exact, Open: Open$9, Required: Required$1 } = gubu_minExports.Gubu; const BasicHeadSpecShape = gubu_minExports.Gubu({ head: { name: String, active: Boolean, - tool: Child$5(Open$8({ + tool: Child$5(Open$9({ align: Exact("left", "right") })) }, @@ -10762,7 +10762,7 @@ const BasicHeadSpecShape = gubu_minExports.Gubu({ AppBar: {}, ToolBar: {} } -}, { name: CMPNAME$a }); +}, { name: CMPNAME$b }); function BasicHead(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -62706,8 +62706,8 @@ const MaterialReactTable = (props) => { } return jsxRuntimeExports.jsx(MRT_TablePaper, { table }); }; -const { Open: Open$7, Child: Child$4 } = gubu_minExports.Gubu; -const Shape$2 = gubu_minExports.Gubu(Open$7({ +const { Open: Open$8, Child: Child$4 } = gubu_minExports.Gubu; +const Shape$2 = gubu_minExports.Gubu(Open$8({ name: String, prefix: String, ent: String, @@ -62752,7 +62752,7 @@ Object.assign(VxgBasicEntityListPlugin, { } }); Object.defineProperty(VxgBasicEntityListPlugin, "name", { value: "VxgBasicEntityListPlugin" }); -const CMPNAME$9 = "BasicEntityList"; +const CMPNAME$a = "BasicEntityList"; function BasicEntityList(props) { const { ctx } = props; const { seneca } = ctx(); @@ -64672,27 +64672,49 @@ function useForm(props = {}) { _formControl.current.formState = getProxyFormState(formState, control); return _formControl.current; } +const CMPNAME$9 = "BasicEntityAutocompleteField"; +const { Open: Open$7 } = gubu_minExports.Gubu; +const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu(Open$7({ + field: Open$7({ + id: String, + name: gubu_minExports.Default("", String), + label: gubu_minExports.Default("", String), + multiple: gubu_minExports.Default(false, Boolean), + options: Open$7({ + default: Open$7({}), + label: { field: gubu_minExports.Default("label", String) }, + multiple: gubu_minExports.Default(false, Boolean), + ents: Open$7({}) + }), + ux: Open$7({ + kind: gubu_minExports.Default("Text", String), + edit: gubu_minExports.Default(true, Boolean) + }) + }), + errors: Open$7({}) +}), { name: CMPNAME$9 }); function BasicEntityAutocompleteField(props) { const { spec } = props; - const { field, getValues, control } = spec; - const val = getValues(field.name); + const basicEntityAutocompleteField = BasicEntityAutocompleteFieldSpecShape(spec); + const { control, field } = basicEntityAutocompleteField; + const { resolvedOptions, resolvedDefault } = resolveOptions(field.options); return /* @__PURE__ */ jsxRuntimeExports.jsx( Controller, { name: field.name, control, - defaultValue: resolveOptions(field.options.default), + defaultValue: resolvedDefault, render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( Autocomplete$1, { freeSolo: true, forcePopupIcon: true, - multiple: field.ux.multiple, - options: resolveOptions(field.options.ents), - isOptionEqualToValue: (option, value2) => option.value === value2.value, + multiple: field.options.multiple, + options: resolvedOptions, + isOptionEqualToValue: (opt, val) => opt === val || (opt == null ? void 0 : opt.id) != null && (val == null ? void 0 : val.id) != null && opt.id === val.id || (opt == null ? void 0 : opt.value) != null && (val == null ? void 0 : val.value) != null && opt.value === val.value, getOptionLabel: (option) => option.label, value, - onChange: (e, val2) => onChange(val2), + onChange: (e, val) => onChange(val), renderInput: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx(TextField$1, __spreadProps(__spreadValues({}, params), { label: field.label })) }, field.id @@ -64701,10 +64723,18 @@ function BasicEntityAutocompleteField(props) { ); } function resolveOptions(options) { - return Object.keys(options).map((key) => ({ - label: options[key].label, + const resolvedOptions = Object.keys(options.ents).map((key) => ({ + label: options.ents[key].label, value: key })); + const resolvedDefault = options.multiple === false ? Object.keys(options.default).length > 0 ? { value: Object.keys(options.default)[0], label: options.default[Object.keys(options.default)[0]].label } : null : Object.keys(options.default).map((key) => ({ + label: options.default[key].label, + value: key + })); + return { + resolvedOptions, + resolvedDefault + }; } const CMPNAME$8 = "BasicEntityField"; const { Open: Open$6 } = gubu_minExports.Gubu; diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index 4b5d9b2..9668a02 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -10600,8 +10600,8 @@ try { */ variant: PropTypes.oneOfType([PropTypes.oneOf(["dense", "regular"]), PropTypes.string]) } : void 0; - const CMPNAME$c = "BasicAccountTool"; - console.log(CMPNAME$c, "1"); + const CMPNAME$d = "BasicAccountTool"; + console.log(CMPNAME$d, "1"); const { Exact: Exact$2 } = gubu_minExports.Gubu; const BasicAccountToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10611,7 +10611,7 @@ try { attr: {}, sx: {}, style: {} - }, { name: CMPNAME$c }); + }, { name: CMPNAME$d }); function BasicAccountTool(props) { var _a; const { ctx, spec } = props; @@ -10685,8 +10685,8 @@ try { children: `${parts.join("")}` }; } - const CMPNAME$b = "BasicHeadTool"; - console.log(CMPNAME$b, "1"); + const CMPNAME$c = "BasicHeadTool"; + console.log(CMPNAME$c, "1"); const { Exact: Exact$1 } = gubu_minExports.Gubu; const BasicHeadToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10696,7 +10696,7 @@ try { attr: {}, sx: {}, style: {} - }, { name: CMPNAME$b }); + }, { name: CMPNAME$c }); function BasicHeadTool(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -10705,7 +10705,7 @@ try { const { name, kind, attr, sx, style: style2 } = basicHeadToolSpec; let tool = /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}); if ("" === kind) { - console.warn(CMPNAME$b, "empty-tool-kind", basicHeadToolSpec); + console.warn(CMPNAME$c, "empty-tool-kind", basicHeadToolSpec); } else if ("logo" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsxs( "div", @@ -10722,7 +10722,7 @@ try { { href: "/", style: style2, - className: `vxg-${CMPNAME$b}-logo`, + className: `vxg-${CMPNAME$c}-logo`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: attr.img }) } ), @@ -10754,17 +10754,17 @@ try { } else if ("account" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsx(BasicAccountTool, { ctx, spec }); } else { - console.warn(CMPNAME$b, "unknown-tool-kind", kind, basicHeadToolSpec); + console.warn(CMPNAME$c, "unknown-tool-kind", kind, basicHeadToolSpec); } return tool; } - const CMPNAME$a = "BasicHead"; - const { Child: Child$5, Exact, Open: Open$8, Required: Required$1 } = gubu_minExports.Gubu; + const CMPNAME$b = "BasicHead"; + const { Child: Child$5, Exact, Open: Open$9, Required: Required$1 } = gubu_minExports.Gubu; const BasicHeadSpecShape = gubu_minExports.Gubu({ head: { name: String, active: Boolean, - tool: Child$5(Open$8({ + tool: Child$5(Open$9({ align: Exact("left", "right") })) }, @@ -10774,7 +10774,7 @@ try { AppBar: {}, ToolBar: {} } - }, { name: CMPNAME$a }); + }, { name: CMPNAME$b }); function BasicHead(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -62718,8 +62718,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } return jsxRuntimeExports.jsx(MRT_TablePaper, { table }); }; - const { Open: Open$7, Child: Child$4 } = gubu_minExports.Gubu; - const Shape$2 = gubu_minExports.Gubu(Open$7({ + const { Open: Open$8, Child: Child$4 } = gubu_minExports.Gubu; + const Shape$2 = gubu_minExports.Gubu(Open$8({ name: String, prefix: String, ent: String, @@ -62764,7 +62764,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } }); Object.defineProperty(VxgBasicEntityListPlugin, "name", { value: "VxgBasicEntityListPlugin" }); - const CMPNAME$9 = "BasicEntityList"; + const CMPNAME$a = "BasicEntityList"; function BasicEntityList(props) { const { ctx } = props; const { seneca } = ctx(); @@ -64684,27 +64684,49 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha _formControl.current.formState = getProxyFormState(formState, control); return _formControl.current; } + const CMPNAME$9 = "BasicEntityAutocompleteField"; + const { Open: Open$7 } = gubu_minExports.Gubu; + const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu(Open$7({ + field: Open$7({ + id: String, + name: gubu_minExports.Default("", String), + label: gubu_minExports.Default("", String), + multiple: gubu_minExports.Default(false, Boolean), + options: Open$7({ + default: Open$7({}), + label: { field: gubu_minExports.Default("label", String) }, + multiple: gubu_minExports.Default(false, Boolean), + ents: Open$7({}) + }), + ux: Open$7({ + kind: gubu_minExports.Default("Text", String), + edit: gubu_minExports.Default(true, Boolean) + }) + }), + errors: Open$7({}) + }), { name: CMPNAME$9 }); function BasicEntityAutocompleteField(props) { const { spec } = props; - const { field, getValues, control } = spec; - const val = getValues(field.name); + const basicEntityAutocompleteField = BasicEntityAutocompleteFieldSpecShape(spec); + const { control, field } = basicEntityAutocompleteField; + const { resolvedOptions, resolvedDefault } = resolveOptions(field.options); return /* @__PURE__ */ jsxRuntimeExports.jsx( Controller, { name: field.name, control, - defaultValue: resolveOptions(field.options.default), + defaultValue: resolvedDefault, render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( material.Autocomplete, { freeSolo: true, forcePopupIcon: true, - multiple: field.ux.multiple, - options: resolveOptions(field.options.ents), - isOptionEqualToValue: (option, value2) => option.value === value2.value, + multiple: field.options.multiple, + options: resolvedOptions, + isOptionEqualToValue: (opt, val) => opt === val || (opt == null ? void 0 : opt.id) != null && (val == null ? void 0 : val.id) != null && opt.id === val.id || (opt == null ? void 0 : opt.value) != null && (val == null ? void 0 : val.value) != null && opt.value === val.value, getOptionLabel: (option) => option.label, value, - onChange: (e, val2) => onChange(val2), + onChange: (e, val) => onChange(val), renderInput: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.TextField, __spreadProps(__spreadValues({}, params), { label: field.label })) }, field.id @@ -64713,10 +64735,18 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ); } function resolveOptions(options) { - return Object.keys(options).map((key) => ({ - label: options[key].label, + const resolvedOptions = Object.keys(options.ents).map((key) => ({ + label: options.ents[key].label, value: key })); + const resolvedDefault = options.multiple === false ? Object.keys(options.default).length > 0 ? { value: Object.keys(options.default)[0], label: options.default[Object.keys(options.default)[0]].label } : null : Object.keys(options.default).map((key) => ({ + label: options.default[key].label, + value: key + })); + return { + resolvedOptions, + resolvedDefault + }; } const CMPNAME$8 = "BasicEntityField"; const { Open: Open$6 } = gubu_minExports.Gubu; diff --git a/src/lib/BasicEntityAutocompleteField.tsx b/src/lib/BasicEntityAutocompleteField.tsx index b2443a2..ed8ad9e 100644 --- a/src/lib/BasicEntityAutocompleteField.tsx +++ b/src/lib/BasicEntityAutocompleteField.tsx @@ -1,29 +1,60 @@ import React, { useEffect, forwardRef } from "react"; -import { FormControlLabel, Checkbox, Box, RadioGroup, Radio, FormLabel, TextField, Autocomplete } from "@mui/material"; +import { TextField, Autocomplete } from "@mui/material"; import { Controller } from "react-hook-form"; +import type { Spec } from './basic-types' +import { Default, Gubu } from 'gubu' +const CMPNAME = 'BasicEntityAutocompleteField' + +const { Open } = Gubu +const BasicEntityAutocompleteFieldSpecShape = Gubu(Open({ + field: Open({ + id: String, + name: Default('', String), + label: Default('', String), + multiple: Default(false, Boolean), + options: Open({ + default: Open({}), + label: { field: Default('label', String) }, + multiple: Default(false, Boolean), + ents: Open({}) + }), + ux: Open({ + kind: Default('Text', String), + edit: Default(true, Boolean), + }) + }), + errors: Open({}), +}), {name: CMPNAME}) function BasicEntityAutocompleteField(props: any) { const { spec } = props - const { field, getValues, control } = spec - const val = getValues(field.name) + // console.log('BasicEntityAutocompleteField', spec) + + const basicEntityAutocompleteField: Spec = BasicEntityAutocompleteFieldSpecShape(spec) + const { control, field } = basicEntityAutocompleteField + const { resolvedOptions, resolvedDefault } = resolveOptions(field.options); return ( ( option.value === value.value} + multiple={field.options.multiple} + options={resolvedOptions} + isOptionEqualToValue={(opt: any, val: any) => + opt === val || + (opt?.id != null && val?.id != null && opt.id === val.id) || + (opt?.value != null && val?.value != null && opt.value === val.value) + } getOptionLabel={(option: any) => option.label} value={value} onChange={(e: any, val: any) => onChange(val)} @@ -35,10 +66,49 @@ function BasicEntityAutocompleteField(props: any) { } function resolveOptions(options: any) { - return Object.keys(options).map(key => ({ - label: options[key].label, + const resolvedOptions = Object.keys(options.ents).map(key => ({ + label: options.ents[key].label, value: key - })); + })) + + const resolvedDefault = options.multiple === false ? ( + Object.keys(options.default).length > 0 + ? { value: Object.keys(options.default)[0], label: options.default[Object.keys(options.default)[0]].label } + : null + ) : ( + Object.keys(options.default).map(key => ({ + label: options.default[key].label, + value: key + })) + ) + + return { + resolvedOptions, + resolvedDefault + } } +// function resolveDefaultValue(options: any) { +// if(options.multiple === false) { +// const keys = Object.keys(options.default); +// if (keys.length > 0) { +// return { key: keys[0], value: options.default[keys[0]] } +// } else { +// return null +// } +// } else { +// return Object.keys(options.default).map(key => ({ +// label: options.default[key].label, +// value: key +// })) +// } +// } + +// function resolveOptions(options: any) { +// return Object.keys(options.ents).map(key => ({ +// label: options.ents[key].label, +// value: key +// })) +// } + export { BasicEntityAutocompleteField }; \ No newline at end of file From 82165883939e259458806ba83e8befbc5d00b508 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 25 Jul 2024 02:20:45 +0100 Subject: [PATCH 006/122] Remove unnecessary code from BasicEntityAutocompleteField --- src/lib/BasicEntityAutocompleteField.tsx | 25 +----------------------- 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/src/lib/BasicEntityAutocompleteField.tsx b/src/lib/BasicEntityAutocompleteField.tsx index ed8ad9e..3ea442b 100644 --- a/src/lib/BasicEntityAutocompleteField.tsx +++ b/src/lib/BasicEntityAutocompleteField.tsx @@ -88,27 +88,4 @@ function resolveOptions(options: any) { } } -// function resolveDefaultValue(options: any) { -// if(options.multiple === false) { -// const keys = Object.keys(options.default); -// if (keys.length > 0) { -// return { key: keys[0], value: options.default[keys[0]] } -// } else { -// return null -// } -// } else { -// return Object.keys(options.default).map(key => ({ -// label: options.default[key].label, -// value: key -// })) -// } -// } - -// function resolveOptions(options: any) { -// return Object.keys(options.ents).map(key => ({ -// label: options.ents[key].label, -// value: key -// })) -// } - -export { BasicEntityAutocompleteField }; \ No newline at end of file +export { BasicEntityAutocompleteField } \ No newline at end of file From 2375bb59335d78ddb3d3fe9657165e25baa00a7d Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 25 Jul 2024 02:25:21 +0100 Subject: [PATCH 007/122] adjust gubu shape for BasicEntityAutocompleteField --- dist/voxgig-model-react.es.js | 4 ++-- dist/voxgig-model-react.umd.js | 4 ++-- src/lib/BasicEntityAutocompleteField.tsx | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index 51e6d77..1d07ae6 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -64677,9 +64677,9 @@ const { Open: Open$7 } = gubu_minExports.Gubu; const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu(Open$7({ field: Open$7({ id: String, - name: gubu_minExports.Default("", String), + name: String, + kind: String, label: gubu_minExports.Default("", String), - multiple: gubu_minExports.Default(false, Boolean), options: Open$7({ default: Open$7({}), label: { field: gubu_minExports.Default("label", String) }, diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index 9668a02..e2d491d 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -64689,9 +64689,9 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu(Open$7({ field: Open$7({ id: String, - name: gubu_minExports.Default("", String), + name: String, + kind: String, label: gubu_minExports.Default("", String), - multiple: gubu_minExports.Default(false, Boolean), options: Open$7({ default: Open$7({}), label: { field: gubu_minExports.Default("label", String) }, diff --git a/src/lib/BasicEntityAutocompleteField.tsx b/src/lib/BasicEntityAutocompleteField.tsx index 3ea442b..4d6704d 100644 --- a/src/lib/BasicEntityAutocompleteField.tsx +++ b/src/lib/BasicEntityAutocompleteField.tsx @@ -12,9 +12,9 @@ const { Open } = Gubu const BasicEntityAutocompleteFieldSpecShape = Gubu(Open({ field: Open({ id: String, - name: Default('', String), + name: String, + kind: String, label: Default('', String), - multiple: Default(false, Boolean), options: Open({ default: Open({}), label: { field: Default('label', String) }, From 3d7db0825a13ece413de6d5c831cb5af986f06db Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 25 Jul 2024 03:04:27 +0100 Subject: [PATCH 008/122] add BasicEntitySliderField component --- dist/BasicEntityAutocompleteField.d.ts | 2 + dist/BasicEntityCheckBoxField.d.ts | 2 + dist/BasicEntityRadioGroupField.d.ts | 2 + dist/BasicEntitySliderField.d.ts | 2 + dist/voxgig-model-react.es.js | 287 ++++++++++--------------- dist/voxgig-model-react.umd.js | 285 ++++++++++-------------- src/lib/BasicEntityEdit.tsx | 2 + src/lib/BasicEntityField.tsx | 2 + src/lib/BasicEntitySliderField.tsx | 68 ++++++ 9 files changed, 309 insertions(+), 343 deletions(-) create mode 100644 dist/BasicEntityAutocompleteField.d.ts create mode 100644 dist/BasicEntityCheckBoxField.d.ts create mode 100644 dist/BasicEntityRadioGroupField.d.ts create mode 100644 dist/BasicEntitySliderField.d.ts create mode 100644 src/lib/BasicEntitySliderField.tsx diff --git a/dist/BasicEntityAutocompleteField.d.ts b/dist/BasicEntityAutocompleteField.d.ts new file mode 100644 index 0000000..cf25015 --- /dev/null +++ b/dist/BasicEntityAutocompleteField.d.ts @@ -0,0 +1,2 @@ +declare function BasicEntityAutocompleteField(props: any): import("react/jsx-runtime").JSX.Element; +export { BasicEntityAutocompleteField }; diff --git a/dist/BasicEntityCheckBoxField.d.ts b/dist/BasicEntityCheckBoxField.d.ts new file mode 100644 index 0000000..3a9d2ea --- /dev/null +++ b/dist/BasicEntityCheckBoxField.d.ts @@ -0,0 +1,2 @@ +declare function BasicEntityCheckBoxField(props: any): import("react/jsx-runtime").JSX.Element; +export { BasicEntityCheckBoxField }; diff --git a/dist/BasicEntityRadioGroupField.d.ts b/dist/BasicEntityRadioGroupField.d.ts new file mode 100644 index 0000000..3219868 --- /dev/null +++ b/dist/BasicEntityRadioGroupField.d.ts @@ -0,0 +1,2 @@ +declare function BasicEntityRadioGroupField(props: any): import("react/jsx-runtime").JSX.Element; +export { BasicEntityRadioGroupField }; diff --git a/dist/BasicEntitySliderField.d.ts b/dist/BasicEntitySliderField.d.ts new file mode 100644 index 0000000..2e8f094 --- /dev/null +++ b/dist/BasicEntitySliderField.d.ts @@ -0,0 +1,2 @@ +declare function BasicEntitySliderField(props: any): import("react/jsx-runtime").JSX.Element; +export { BasicEntitySliderField }; diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index 92e9a18..6662940 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -54,7 +54,7 @@ var __async = (__this, __arguments, generator) => { }; import * as React$1 from "react"; import React__default, { isValidElement, Children, cloneElement, useMemo, useState, useReducer, useRef, useEffect, useCallback, memo as memo$2, Fragment, useLayoutEffect } from "react"; -import { Button as Button$1, Avatar, Menu as Menu$1, MenuItem as MenuItem$1, IconButton as IconButton$1, useTheme as useTheme$5, Box as Box$2, TextField as TextField$1, Grid as Grid$1, Toolbar as Toolbar$1, Container as Container$2, Drawer as Drawer$1, List as List$1, ListItem as ListItem$1, ListItemButton as ListItemButton$1, ListItemIcon as ListItemIcon$1, ListItemText as ListItemText$1, Divider as Divider$1, Typography as Typography$1 } from "@mui/material"; +import { Button as Button$1, Avatar, Menu as Menu$1, MenuItem as MenuItem$1, IconButton as IconButton$1, useTheme as useTheme$5, Box as Box$2, FormLabel as FormLabel$1, Slider as Slider$1, TextField as TextField$1, Grid as Grid$1, Toolbar as Toolbar$1, Container as Container$2, Drawer as Drawer$1, List as List$1, ListItem as ListItem$1, ListItemButton as ListItemButton$1, ListItemIcon as ListItemIcon$1, ListItemText as ListItemText$1, Divider as Divider$1, Typography as Typography$1 } from "@mui/material"; import emStyled from "@emotion/styled"; import { CacheProvider, Global, ThemeContext as ThemeContext$1, css, keyframes } from "@emotion/react"; import { useSelector } from "react-redux"; @@ -2854,6 +2854,7 @@ function requireObjectWithoutPropertiesLoose() { })(objectWithoutPropertiesLoose$1); return objectWithoutPropertiesLoose$1.exports; } +var isDevelopment = false; function sheetForTag(tag) { if (tag.sheet) { return tag.sheet; @@ -2863,6 +2864,7 @@ function sheetForTag(tag) { return document.styleSheets[i]; } } + return void 0; } function createStyleElement(options) { var tag = document.createElement("style"); @@ -2893,7 +2895,7 @@ var StyleSheet = /* @__PURE__ */ function() { _this.container.insertBefore(tag, before); _this.tags.push(tag); }; - this.isSpeedy = options.speedy === void 0 ? process.env.NODE_ENV === "production" : options.speedy; + this.isSpeedy = options.speedy === void 0 ? !isDevelopment : options.speedy; this.tags = []; this.ctr = 0; this.nonce = options.nonce; @@ -2912,21 +2914,11 @@ var StyleSheet = /* @__PURE__ */ function() { this._insertTag(createStyleElement(this)); } var tag = this.tags[this.tags.length - 1]; - if (process.env.NODE_ENV !== "production") { - var isImportRule3 = rule.charCodeAt(0) === 64 && rule.charCodeAt(1) === 105; - if (isImportRule3 && this._alreadyInsertedOrderInsensitiveRule) { - console.error("You're attempting to insert the following rule:\n" + rule + "\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules."); - } - this._alreadyInsertedOrderInsensitiveRule = this._alreadyInsertedOrderInsensitiveRule || !isImportRule3; - } if (this.isSpeedy) { var sheet = sheetForTag(tag); try { sheet.insertRule(rule, sheet.cssRules.length); } catch (e) { - if (process.env.NODE_ENV !== "production" && !/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(rule)) { - console.error('There was a problem inserting the following rule: "' + rule + '"', e); - } } } else { tag.appendChild(document.createTextNode(rule)); @@ -2935,13 +2927,11 @@ var StyleSheet = /* @__PURE__ */ function() { }; _proto.flush = function flush() { this.tags.forEach(function(tag) { - return tag.parentNode && tag.parentNode.removeChild(tag); + var _tag$parentNode; + return (_tag$parentNode = tag.parentNode) == null ? void 0 : _tag$parentNode.removeChild(tag); }); this.tags = []; this.ctr = 0; - if (process.env.NODE_ENV !== "production") { - this._alreadyInsertedOrderInsensitiveRule = false; - } }; return StyleSheet2; }(); @@ -3626,68 +3616,6 @@ var removeLabel = function removeLabel2(element) { } } }; -var ignoreFlag = "emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason"; -var isIgnoringComment = function isIgnoringComment2(element) { - return element.type === "comm" && element.children.indexOf(ignoreFlag) > -1; -}; -var createUnsafeSelectorsAlarm = function createUnsafeSelectorsAlarm2(cache2) { - return function(element, index2, children2) { - if (element.type !== "rule" || cache2.compat) return; - var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g); - if (unsafePseudoClasses) { - var isNested = !!element.parent; - var commentContainer = isNested ? element.parent.children : ( - // global rule at the root level - children2 - ); - for (var i = commentContainer.length - 1; i >= 0; i--) { - var node2 = commentContainer[i]; - if (node2.line < element.line) { - break; - } - if (node2.column < element.column) { - if (isIgnoringComment(node2)) { - return; - } - break; - } - } - unsafePseudoClasses.forEach(function(unsafePseudoClass) { - console.error('The pseudo class "' + unsafePseudoClass + '" is potentially unsafe when doing server-side rendering. Try changing it to "' + unsafePseudoClass.split("-child")[0] + '-of-type".'); - }); - } - }; -}; -var isImportRule = function isImportRule2(element) { - return element.type.charCodeAt(1) === 105 && element.type.charCodeAt(0) === 64; -}; -var isPrependedWithRegularRules = function isPrependedWithRegularRules2(index2, children2) { - for (var i = index2 - 1; i >= 0; i--) { - if (!isImportRule(children2[i])) { - return true; - } - } - return false; -}; -var nullifyElement = function nullifyElement2(element) { - element.type = ""; - element.value = ""; - element["return"] = ""; - element.children = ""; - element.props = ""; -}; -var incorrectImportAlarm = function incorrectImportAlarm2(element, index2, children2) { - if (!isImportRule(element)) { - return; - } - if (element.parent) { - console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."); - nullifyElement(element); - } else if (isPrependedWithRegularRules(index2, children2)) { - console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."); - nullifyElement(element); - } -}; function prefix(value, length2) { switch (hash$2(value, length2)) { case 5103: @@ -3834,9 +3762,6 @@ var prefixer = function prefixer2(element, index2, children2, callback) { var defaultStylisPlugins = [prefixer]; var createCache = function createCache2(options) { var key = options.key; - if (process.env.NODE_ENV !== "production" && !key) { - throw new Error("You have to configure `key` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.\nIf multiple caches share the same key they might \"fight\" for each other's style elements."); - } if (key === "css") { var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])"); Array.prototype.forEach.call(ssrStyles, function(node2) { @@ -3849,11 +3774,6 @@ var createCache = function createCache2(options) { }); } var stylisPlugins = options.stylisPlugins || defaultStylisPlugins; - if (process.env.NODE_ENV !== "production") { - if (/[^a-z-]/.test(key)) { - throw new Error('Emotion key must only contain lower case alphabetical characters and - but "' + key + '" was passed'); - } - } var inserted = {}; var container; var nodesToHydrate = []; @@ -3874,24 +3794,9 @@ var createCache = function createCache2(options) { } var _insert; var omnipresentPlugins = [compat, removeLabel]; - if (process.env.NODE_ENV !== "production") { - omnipresentPlugins.push(createUnsafeSelectorsAlarm({ - get compat() { - return cache2.compat; - } - }), incorrectImportAlarm); - } { var currentSheet; - var finalizingPlugins = [stringify, process.env.NODE_ENV !== "production" ? function(element) { - if (!element.root) { - if (element["return"]) { - currentSheet.insert(element["return"]); - } else if (element.value && element.type !== COMMENT) { - currentSheet.insert(element.value + "{}"); - } - } - } : rulesheet(function(rule) { + var finalizingPlugins = [stringify, rulesheet(function(rule) { currentSheet.insert(rule); })]; var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins)); @@ -3900,13 +3805,6 @@ var createCache = function createCache2(options) { }; _insert = function insert2(selector, serialized, sheet, shouldCache) { currentSheet = sheet; - if (process.env.NODE_ENV !== "production" && serialized.map !== void 0) { - currentSheet = { - insert: function insert3(rule) { - sheet.insert(rule + serialized.map); - } - }; - } stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles); if (shouldCache) { cache2.inserted[serialized.name] = true; @@ -10690,8 +10588,8 @@ process.env.NODE_ENV !== "production" ? Toolbar.propTypes = { */ variant: PropTypes.oneOfType([PropTypes.oneOf(["dense", "regular"]), PropTypes.string]) } : void 0; -const CMPNAME$c = "BasicAccountTool"; -console.log(CMPNAME$c, "1"); +const CMPNAME$d = "BasicAccountTool"; +console.log(CMPNAME$d, "1"); const { Exact: Exact$2 } = gubu_minExports.Gubu; const BasicAccountToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10701,7 +10599,7 @@ const BasicAccountToolSpecShape = gubu_minExports.Gubu({ attr: {}, sx: {}, style: {} -}, { name: CMPNAME$c }); +}, { name: CMPNAME$d }); function BasicAccountTool(props) { var _a; const { ctx, spec } = props; @@ -10775,8 +10673,8 @@ function stringAvatar(s) { children: `${parts.join("")}` }; } -const CMPNAME$b = "BasicHeadTool"; -console.log(CMPNAME$b, "1"); +const CMPNAME$c = "BasicHeadTool"; +console.log(CMPNAME$c, "1"); const { Exact: Exact$1 } = gubu_minExports.Gubu; const BasicHeadToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10786,7 +10684,7 @@ const BasicHeadToolSpecShape = gubu_minExports.Gubu({ attr: {}, sx: {}, style: {} -}, { name: CMPNAME$b }); +}, { name: CMPNAME$c }); function BasicHeadTool(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -10795,7 +10693,7 @@ function BasicHeadTool(props) { const { name, kind, attr, sx, style: style2 } = basicHeadToolSpec; let tool = /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}); if ("" === kind) { - console.warn(CMPNAME$b, "empty-tool-kind", basicHeadToolSpec); + console.warn(CMPNAME$c, "empty-tool-kind", basicHeadToolSpec); } else if ("logo" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsxs( "div", @@ -10812,7 +10710,7 @@ function BasicHeadTool(props) { { href: "/", style: style2, - className: `vxg-${CMPNAME$b}-logo`, + className: `vxg-${CMPNAME$c}-logo`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: attr.img }) } ), @@ -10844,17 +10742,17 @@ function BasicHeadTool(props) { } else if ("account" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsx(BasicAccountTool, { ctx, spec }); } else { - console.warn(CMPNAME$b, "unknown-tool-kind", kind, basicHeadToolSpec); + console.warn(CMPNAME$c, "unknown-tool-kind", kind, basicHeadToolSpec); } return tool; } -const CMPNAME$a = "BasicHead"; -const { Child: Child$5, Exact, Open: Open$8, Required: Required$1 } = gubu_minExports.Gubu; +const CMPNAME$b = "BasicHead"; +const { Child: Child$5, Exact, Open: Open$9, Required: Required$1 } = gubu_minExports.Gubu; const BasicHeadSpecShape = gubu_minExports.Gubu({ head: { name: String, active: Boolean, - tool: Child$5(Open$8({ + tool: Child$5(Open$9({ align: Exact("left", "right") })) }, @@ -10864,7 +10762,7 @@ const BasicHeadSpecShape = gubu_minExports.Gubu({ AppBar: {}, ToolBar: {} } -}, { name: CMPNAME$a }); +}, { name: CMPNAME$b }); function BasicHead(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -39125,7 +39023,7 @@ const PickersLayoutContentWrapper = styled$1("div", { display: "flex", flexDirection: "column" }); -const PickersLayout = function PickersLayout2(inProps) { +const PickersLayout = /* @__PURE__ */ React$1.forwardRef(function PickersLayout2(inProps, ref) { const props = useThemeProps({ props: inProps, name: "MuiPickersLayout" @@ -39141,7 +39039,6 @@ const PickersLayout = function PickersLayout2(inProps) { sx, className, isLandscape, - ref, wrapperVariant } = props; const classes = useUtilityClasses$J(props); @@ -39159,7 +39056,7 @@ const PickersLayout = function PickersLayout2(inProps) { }) }), actionBar] }); -}; +}); process.env.NODE_ENV !== "production" ? PickersLayout.propTypes = { // ----------------------------- Warning -------------------------------- // | These PropTypes are generated from the TypeScript type definitions | @@ -45063,7 +44960,7 @@ const pickersCalendarHeaderClasses = generateUtilityClasses("MuiPickersCalendarH function getPickersArrowSwitcherUtilityClass(slot) { return generateUtilityClass("MuiPickersArrowSwitcher", slot); } -const pickersArrowSwitcherClasses = generateUtilityClasses("MuiPickersArrowSwitcher", ["root", "spacer", "button"]); +const pickersArrowSwitcherClasses = generateUtilityClasses("MuiPickersArrowSwitcher", ["root", "spacer", "button", "previousIconButton", "nextIconButton", "leftArrowIcon", "rightArrowIcon"]); const _excluded$E = ["children", "className", "slots", "slotProps", "isNextDisabled", "isNextHidden", "onGoToNext", "nextLabel", "isPreviousDisabled", "isPreviousHidden", "onGoToPrevious", "previousLabel", "labelId"], _excluded2$3 = ["ownerState"], _excluded3$1 = ["ownerState"]; const PickersArrowSwitcherRoot = styled$1("div", { name: "MuiPickersArrowSwitcher", @@ -45102,7 +44999,11 @@ const useUtilityClasses$u = (ownerState) => { const slots = { root: ["root"], spacer: ["spacer"], - button: ["button"] + button: ["button"], + previousIconButton: ["previousIconButton"], + nextIconButton: ["nextIconButton"], + leftArrowIcon: ["leftArrowIcon"], + rightArrowIcon: ["rightArrowIcon"] }; return composeClasses(slots, getPickersArrowSwitcherUtilityClass, classes); }; @@ -45157,7 +45058,7 @@ const PickersArrowSwitcher = /* @__PURE__ */ React$1.forwardRef(function Pickers ownerState: _extends$1({}, ownerState, { hidden: previousProps.isHidden }), - className: classes.button + className: clsx(classes.button, classes.previousIconButton) }); const NextIconButton = (_b = slots == null ? void 0 : slots.nextIconButton) != null ? _b : PickersArrowSwitcherButton; const nextIconButtonProps = useSlotProps({ @@ -45174,7 +45075,7 @@ const PickersArrowSwitcher = /* @__PURE__ */ React$1.forwardRef(function Pickers ownerState: _extends$1({}, ownerState, { hidden: nextProps.isHidden }), - className: classes.button + className: clsx(classes.button, classes.nextIconButton) }); const LeftArrowIcon = (_c = slots == null ? void 0 : slots.leftArrowIcon) != null ? _c : ArrowLeftIcon; const _useSlotProps = useSlotProps({ @@ -45183,7 +45084,8 @@ const PickersArrowSwitcher = /* @__PURE__ */ React$1.forwardRef(function Pickers additionalProps: { fontSize: "inherit" }, - ownerState: void 0 + ownerState, + className: classes.leftArrowIcon }), leftArrowIconProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2$3); const RightArrowIcon = (_d = slots == null ? void 0 : slots.rightArrowIcon) != null ? _d : ArrowRightIcon; const _useSlotProps2 = useSlotProps({ @@ -45192,7 +45094,8 @@ const PickersArrowSwitcher = /* @__PURE__ */ React$1.forwardRef(function Pickers additionalProps: { fontSize: "inherit" }, - ownerState: void 0 + ownerState, + className: classes.rightArrowIcon }), rightArrowIconProps = _objectWithoutPropertiesLoose(_useSlotProps2, _excluded3$1); return /* @__PURE__ */ jsxRuntimeExports.jsxs(PickersArrowSwitcherRoot, _extends$1({ ref, @@ -45373,7 +45276,7 @@ const PickersCalendarHeader = /* @__PURE__ */ React$1.forwardRef(function Picker const _useSlotProps = useSlotProps({ elementType: SwitchViewIcon, externalSlotProps: slotProps == null ? void 0 : slotProps.switchViewIcon, - ownerState: void 0, + ownerState, className: classes.switchViewIcon }), switchViewIconProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2$2); const selectNextMonth = () => onMonthChange(utils2.addMonths(month, 1), "left"); @@ -50303,10 +50206,11 @@ function ClockPointer(inProps) { function getClockUtilityClass(slot) { return generateUtilityClass("MuiClock", slot); } -const clockClasses = generateUtilityClasses("MuiClock", ["root", "clock", "wrapper", "squareMask", "pin", "amButton", "pmButton", "meridiemText"]); +const clockClasses = generateUtilityClasses("MuiClock", ["root", "clock", "wrapper", "squareMask", "pin", "amButton", "pmButton", "meridiemText", "selected"]); const useUtilityClasses$h = (ownerState) => { const { - classes + classes, + meridiemMode } = ownerState; const slots = { root: ["root"], @@ -50314,8 +50218,8 @@ const useUtilityClasses$h = (ownerState) => { wrapper: ["wrapper"], squareMask: ["squareMask"], pin: ["pin"], - amButton: ["amButton"], - pmButton: ["pmButton"], + amButton: ["amButton", meridiemMode === "am" && "selected"], + pmButton: ["pmButton", meridiemMode === "pm" && "selected"], meridiemText: ["meridiemText"] }; return composeClasses(slots, getClockUtilityClass, classes); @@ -50398,23 +50302,15 @@ const ClockPin = styled$1("div", { left: "50%", transform: "translate(-50%, -50%)" })); -const ClockAmButton = styled$1(IconButton, { - name: "MuiClock", - slot: "AmButton", - overridesResolver: (_2, styles2) => styles2.amButton -})(({ - theme -}) => ({ +const meridiemButtonCommonStyles = (theme, meridiemMode) => ({ zIndex: 1, - position: "absolute", bottom: 8, - left: 8, paddingLeft: 4, paddingRight: 4, width: CLOCK_HOUR_WIDTH, variants: [{ props: { - meridiemMode: "am" + meridiemMode }, style: { backgroundColor: (theme.vars || theme).palette.primary.main, @@ -50424,6 +50320,17 @@ const ClockAmButton = styled$1(IconButton, { } } }] +}); +const ClockAmButton = styled$1(IconButton, { + name: "MuiClock", + slot: "AmButton", + overridesResolver: (_2, styles2) => styles2.amButton +})(({ + theme +}) => _extends$1({}, meridiemButtonCommonStyles(theme, "am"), { + // keeping it here to make TS happy + position: "absolute", + left: 8 })); const ClockPmButton = styled$1(IconButton, { name: "MuiClock", @@ -50431,26 +50338,10 @@ const ClockPmButton = styled$1(IconButton, { overridesResolver: (_2, styles2) => styles2.pmButton })(({ theme -}) => ({ - zIndex: 1, +}) => _extends$1({}, meridiemButtonCommonStyles(theme, "pm"), { + // keeping it here to make TS happy position: "absolute", - bottom: 8, - right: 8, - paddingLeft: 4, - paddingRight: 4, - width: CLOCK_HOUR_WIDTH, - variants: [{ - props: { - meridiemMode: "pm" - }, - style: { - backgroundColor: (theme.vars || theme).palette.primary.main, - color: (theme.vars || theme).palette.primary.contrastText, - "&:hover": { - backgroundColor: (theme.vars || theme).palette.primary.light - } - } - }] + right: 8 })); const ClockMeridiemText = styled$1(Typography, { name: "MuiClock", @@ -52517,7 +52408,7 @@ const renderMultiSectionDigitalClockTimeView = ({ skipDisabled, timezone }); -function DesktopDateTimePickerLayout(props) { +const DesktopDateTimePickerLayout = /* @__PURE__ */ React$1.forwardRef(function DesktopDateTimePickerLayout2(props, ref) { var _a, _b; const isRtl = useRtl(); const { @@ -52531,7 +52422,6 @@ function DesktopDateTimePickerLayout(props) { sx, className, isLandscape, - ref, classes } = props; const isActionBarVisible = actionBar && ((_b = (_a = actionBar.props.actions) == null ? void 0 : _a.length) != null ? _b : 0) > 0; @@ -52564,7 +52454,7 @@ function DesktopDateTimePickerLayout(props) { })] }), actionBar] }); -} +}); process.env.NODE_ENV !== "production" ? DesktopDateTimePickerLayout.propTypes = { // ----------------------------- Warning -------------------------------- // | These PropTypes are generated from the TypeScript type definitions | @@ -62816,8 +62706,8 @@ const MaterialReactTable = (props) => { } return jsxRuntimeExports.jsx(MRT_TablePaper, { table }); }; -const { Open: Open$7, Child: Child$4 } = gubu_minExports.Gubu; -const Shape$2 = gubu_minExports.Gubu(Open$7({ +const { Open: Open$8, Child: Child$4 } = gubu_minExports.Gubu; +const Shape$2 = gubu_minExports.Gubu(Open$8({ name: String, prefix: String, ent: String, @@ -62862,7 +62752,7 @@ Object.assign(VxgBasicEntityListPlugin, { } }); Object.defineProperty(VxgBasicEntityListPlugin, "name", { value: "VxgBasicEntityListPlugin" }); -const CMPNAME$9 = "BasicEntityList"; +const CMPNAME$a = "BasicEntityList"; function BasicEntityList(props) { const { ctx } = props; const { seneca } = ctx(); @@ -64782,6 +64672,56 @@ function useForm(props = {}) { _formControl.current.formState = getProxyFormState(formState, control); return _formControl.current; } +const CMPNAME$9 = "BasicEntitySliderField"; +const { Open: Open$7 } = gubu_minExports.Gubu; +const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu(Open$7({ + field: Open$7({ + id: String, + name: String, + kind: String, + label: gubu_minExports.Default("", String), + ux: Open$7({ + kind: gubu_minExports.Default("Text", String), + edit: gubu_minExports.Default(true, Boolean), + step: gubu_minExports.Default(1, Number), + min: gubu_minExports.Default(0, Number), + max: gubu_minExports.Default(100, Number) + }) + }), + errors: Open$7({}) +}), { name: CMPNAME$9 }); +function BasicEntitySliderField(props) { + const { spec } = props; + const basicEntityAutocompleteField = BasicEntitySliderFieldSpecShape(spec); + const { control, field, getValues } = basicEntityAutocompleteField; + const val = getValues(field.name); + return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx(FormLabel$1, { id: field.id, children: field.label }), + /* @__PURE__ */ jsxRuntimeExports.jsx( + Controller, + { + name: field.name, + control, + defaultValue: val || field.ux.min, + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( + Slider$1, + { + value, + onChange: (_2, newValue) => onChange(newValue), + valueLabelDisplay: "auto", + step: field.ux.step, + marks: resolveMarks(field.ux.marks), + min: field.ux.min, + max: field.ux.max + } + ) + } + ) + ] }); +} +function resolveMarks(marks) { + return marks && typeof marks === "object" ? Object.keys(marks).map((key) => ({ label: marks[key], value: +key })) : marks; +} const CMPNAME$8 = "BasicEntityField"; const { Open: Open$6 } = gubu_minExports.Gubu; const BasicEntityFieldSpecShape = gubu_minExports.Gubu(Open$6({}), { name: CMPNAME$8 }); @@ -64790,7 +64730,8 @@ const fieldMap = { TextBox: BasicEntityTextBoxField, Date: BasicEntityDateField, DateTime: BasicEntityDateTimeField, - Time: BasicEntityTimeField + Time: BasicEntityTimeField, + Slider: BasicEntitySliderField }; function BasicEntityField(props) { const { ctx, spec } = props; @@ -65001,6 +64942,7 @@ function BasicEntityEdit(props) { handleSubmit, getValues, reset, + control, formState: { errors } } = useForm({ mode: "onChange", @@ -65029,6 +64971,7 @@ function BasicEntityEdit(props) { field, register, getValues, + control, errors } } diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index bce3f35..93c95fb 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -2866,6 +2866,7 @@ var __async = (__this, __arguments, generator) => { })(objectWithoutPropertiesLoose$1); return objectWithoutPropertiesLoose$1.exports; } + var isDevelopment = false; function sheetForTag(tag) { if (tag.sheet) { return tag.sheet; @@ -2875,6 +2876,7 @@ var __async = (__this, __arguments, generator) => { return document.styleSheets[i]; } } + return void 0; } function createStyleElement(options) { var tag = document.createElement("style"); @@ -2905,7 +2907,7 @@ var __async = (__this, __arguments, generator) => { _this.container.insertBefore(tag, before); _this.tags.push(tag); }; - this.isSpeedy = options.speedy === void 0 ? process.env.NODE_ENV === "production" : options.speedy; + this.isSpeedy = options.speedy === void 0 ? !isDevelopment : options.speedy; this.tags = []; this.ctr = 0; this.nonce = options.nonce; @@ -2924,21 +2926,11 @@ var __async = (__this, __arguments, generator) => { this._insertTag(createStyleElement(this)); } var tag = this.tags[this.tags.length - 1]; - if (process.env.NODE_ENV !== "production") { - var isImportRule2 = rule.charCodeAt(0) === 64 && rule.charCodeAt(1) === 105; - if (isImportRule2 && this._alreadyInsertedOrderInsensitiveRule) { - console.error("You're attempting to insert the following rule:\n" + rule + "\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules."); - } - this._alreadyInsertedOrderInsensitiveRule = this._alreadyInsertedOrderInsensitiveRule || !isImportRule2; - } if (this.isSpeedy) { var sheet = sheetForTag(tag); try { sheet.insertRule(rule, sheet.cssRules.length); } catch (e) { - if (process.env.NODE_ENV !== "production" && !/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(rule)) { - console.error('There was a problem inserting the following rule: "' + rule + '"', e); - } } } else { tag.appendChild(document.createTextNode(rule)); @@ -2947,13 +2939,11 @@ var __async = (__this, __arguments, generator) => { }; _proto.flush = function flush() { this.tags.forEach(function(tag) { - return tag.parentNode && tag.parentNode.removeChild(tag); + var _tag$parentNode; + return (_tag$parentNode = tag.parentNode) == null ? void 0 : _tag$parentNode.removeChild(tag); }); this.tags = []; this.ctr = 0; - if (process.env.NODE_ENV !== "production") { - this._alreadyInsertedOrderInsensitiveRule = false; - } }; return StyleSheet2; }(); @@ -3638,68 +3628,6 @@ var __async = (__this, __arguments, generator) => { } } }; - var ignoreFlag = "emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason"; - var isIgnoringComment = function isIgnoringComment2(element) { - return element.type === "comm" && element.children.indexOf(ignoreFlag) > -1; - }; - var createUnsafeSelectorsAlarm = function createUnsafeSelectorsAlarm2(cache2) { - return function(element, index2, children) { - if (element.type !== "rule" || cache2.compat) return; - var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g); - if (unsafePseudoClasses) { - var isNested = !!element.parent; - var commentContainer = isNested ? element.parent.children : ( - // global rule at the root level - children - ); - for (var i = commentContainer.length - 1; i >= 0; i--) { - var node2 = commentContainer[i]; - if (node2.line < element.line) { - break; - } - if (node2.column < element.column) { - if (isIgnoringComment(node2)) { - return; - } - break; - } - } - unsafePseudoClasses.forEach(function(unsafePseudoClass) { - console.error('The pseudo class "' + unsafePseudoClass + '" is potentially unsafe when doing server-side rendering. Try changing it to "' + unsafePseudoClass.split("-child")[0] + '-of-type".'); - }); - } - }; - }; - var isImportRule = function isImportRule2(element) { - return element.type.charCodeAt(1) === 105 && element.type.charCodeAt(0) === 64; - }; - var isPrependedWithRegularRules = function isPrependedWithRegularRules2(index2, children) { - for (var i = index2 - 1; i >= 0; i--) { - if (!isImportRule(children[i])) { - return true; - } - } - return false; - }; - var nullifyElement = function nullifyElement2(element) { - element.type = ""; - element.value = ""; - element["return"] = ""; - element.children = ""; - element.props = ""; - }; - var incorrectImportAlarm = function incorrectImportAlarm2(element, index2, children) { - if (!isImportRule(element)) { - return; - } - if (element.parent) { - console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."); - nullifyElement(element); - } else if (isPrependedWithRegularRules(index2, children)) { - console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."); - nullifyElement(element); - } - }; function prefix(value, length2) { switch (hash$2(value, length2)) { case 5103: @@ -3846,9 +3774,6 @@ var __async = (__this, __arguments, generator) => { var defaultStylisPlugins = [prefixer]; var createCache = function createCache2(options) { var key = options.key; - if (process.env.NODE_ENV !== "production" && !key) { - throw new Error("You have to configure `key` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.\nIf multiple caches share the same key they might \"fight\" for each other's style elements."); - } if (key === "css") { var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])"); Array.prototype.forEach.call(ssrStyles, function(node2) { @@ -3861,11 +3786,6 @@ var __async = (__this, __arguments, generator) => { }); } var stylisPlugins = options.stylisPlugins || defaultStylisPlugins; - if (process.env.NODE_ENV !== "production") { - if (/[^a-z-]/.test(key)) { - throw new Error('Emotion key must only contain lower case alphabetical characters and - but "' + key + '" was passed'); - } - } var inserted = {}; var container; var nodesToHydrate = []; @@ -3886,24 +3806,9 @@ var __async = (__this, __arguments, generator) => { } var _insert; var omnipresentPlugins = [compat, removeLabel]; - if (process.env.NODE_ENV !== "production") { - omnipresentPlugins.push(createUnsafeSelectorsAlarm({ - get compat() { - return cache2.compat; - } - }), incorrectImportAlarm); - } { var currentSheet; - var finalizingPlugins = [stringify, process.env.NODE_ENV !== "production" ? function(element) { - if (!element.root) { - if (element["return"]) { - currentSheet.insert(element["return"]); - } else if (element.value && element.type !== COMMENT) { - currentSheet.insert(element.value + "{}"); - } - } - } : rulesheet(function(rule) { + var finalizingPlugins = [stringify, rulesheet(function(rule) { currentSheet.insert(rule); })]; var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins)); @@ -3912,13 +3817,6 @@ var __async = (__this, __arguments, generator) => { }; _insert = function insert2(selector, serialized, sheet, shouldCache) { currentSheet = sheet; - if (process.env.NODE_ENV !== "production" && serialized.map !== void 0) { - currentSheet = { - insert: function insert3(rule) { - sheet.insert(rule + serialized.map); - } - }; - } stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles); if (shouldCache) { cache2.inserted[serialized.name] = true; @@ -10702,8 +10600,8 @@ try { */ variant: PropTypes.oneOfType([PropTypes.oneOf(["dense", "regular"]), PropTypes.string]) } : void 0; - const CMPNAME$c = "BasicAccountTool"; - console.log(CMPNAME$c, "1"); + const CMPNAME$d = "BasicAccountTool"; + console.log(CMPNAME$d, "1"); const { Exact: Exact$2 } = gubu_minExports.Gubu; const BasicAccountToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10713,7 +10611,7 @@ try { attr: {}, sx: {}, style: {} - }, { name: CMPNAME$c }); + }, { name: CMPNAME$d }); function BasicAccountTool(props) { var _a; const { ctx, spec } = props; @@ -10787,8 +10685,8 @@ try { children: `${parts.join("")}` }; } - const CMPNAME$b = "BasicHeadTool"; - console.log(CMPNAME$b, "1"); + const CMPNAME$c = "BasicHeadTool"; + console.log(CMPNAME$c, "1"); const { Exact: Exact$1 } = gubu_minExports.Gubu; const BasicHeadToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10798,7 +10696,7 @@ try { attr: {}, sx: {}, style: {} - }, { name: CMPNAME$b }); + }, { name: CMPNAME$c }); function BasicHeadTool(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -10807,7 +10705,7 @@ try { const { name, kind, attr, sx, style: style2 } = basicHeadToolSpec; let tool = /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}); if ("" === kind) { - console.warn(CMPNAME$b, "empty-tool-kind", basicHeadToolSpec); + console.warn(CMPNAME$c, "empty-tool-kind", basicHeadToolSpec); } else if ("logo" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsxs( "div", @@ -10824,7 +10722,7 @@ try { { href: "/", style: style2, - className: `vxg-${CMPNAME$b}-logo`, + className: `vxg-${CMPNAME$c}-logo`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: attr.img }) } ), @@ -10856,17 +10754,17 @@ try { } else if ("account" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsx(BasicAccountTool, { ctx, spec }); } else { - console.warn(CMPNAME$b, "unknown-tool-kind", kind, basicHeadToolSpec); + console.warn(CMPNAME$c, "unknown-tool-kind", kind, basicHeadToolSpec); } return tool; } - const CMPNAME$a = "BasicHead"; - const { Child: Child$5, Exact, Open: Open$8, Required: Required$1 } = gubu_minExports.Gubu; + const CMPNAME$b = "BasicHead"; + const { Child: Child$5, Exact, Open: Open$9, Required: Required$1 } = gubu_minExports.Gubu; const BasicHeadSpecShape = gubu_minExports.Gubu({ head: { name: String, active: Boolean, - tool: Child$5(Open$8({ + tool: Child$5(Open$9({ align: Exact("left", "right") })) }, @@ -10876,7 +10774,7 @@ try { AppBar: {}, ToolBar: {} } - }, { name: CMPNAME$a }); + }, { name: CMPNAME$b }); function BasicHead(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -39137,7 +39035,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha display: "flex", flexDirection: "column" }); - const PickersLayout = function PickersLayout2(inProps) { + const PickersLayout = /* @__PURE__ */ React__namespace.forwardRef(function PickersLayout2(inProps, ref) { const props = useThemeProps({ props: inProps, name: "MuiPickersLayout" @@ -39153,7 +39051,6 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha sx, className, isLandscape, - ref, wrapperVariant } = props; const classes = useUtilityClasses$J(props); @@ -39171,7 +39068,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }) }), actionBar] }); - }; + }); process.env.NODE_ENV !== "production" ? PickersLayout.propTypes = { // ----------------------------- Warning -------------------------------- // | These PropTypes are generated from the TypeScript type definitions | @@ -45075,7 +44972,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha function getPickersArrowSwitcherUtilityClass(slot) { return generateUtilityClass("MuiPickersArrowSwitcher", slot); } - const pickersArrowSwitcherClasses = generateUtilityClasses("MuiPickersArrowSwitcher", ["root", "spacer", "button"]); + const pickersArrowSwitcherClasses = generateUtilityClasses("MuiPickersArrowSwitcher", ["root", "spacer", "button", "previousIconButton", "nextIconButton", "leftArrowIcon", "rightArrowIcon"]); const _excluded$E = ["children", "className", "slots", "slotProps", "isNextDisabled", "isNextHidden", "onGoToNext", "nextLabel", "isPreviousDisabled", "isPreviousHidden", "onGoToPrevious", "previousLabel", "labelId"], _excluded2$3 = ["ownerState"], _excluded3$1 = ["ownerState"]; const PickersArrowSwitcherRoot = styled$1("div", { name: "MuiPickersArrowSwitcher", @@ -45114,7 +45011,11 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const slots = { root: ["root"], spacer: ["spacer"], - button: ["button"] + button: ["button"], + previousIconButton: ["previousIconButton"], + nextIconButton: ["nextIconButton"], + leftArrowIcon: ["leftArrowIcon"], + rightArrowIcon: ["rightArrowIcon"] }; return composeClasses(slots, getPickersArrowSwitcherUtilityClass, classes); }; @@ -45169,7 +45070,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ownerState: _extends$1({}, ownerState, { hidden: previousProps.isHidden }), - className: classes.button + className: clsx(classes.button, classes.previousIconButton) }); const NextIconButton = (_b = slots == null ? void 0 : slots.nextIconButton) != null ? _b : PickersArrowSwitcherButton; const nextIconButtonProps = useSlotProps({ @@ -45186,7 +45087,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ownerState: _extends$1({}, ownerState, { hidden: nextProps.isHidden }), - className: classes.button + className: clsx(classes.button, classes.nextIconButton) }); const LeftArrowIcon = (_c = slots == null ? void 0 : slots.leftArrowIcon) != null ? _c : ArrowLeftIcon; const _useSlotProps = useSlotProps({ @@ -45195,7 +45096,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha additionalProps: { fontSize: "inherit" }, - ownerState: void 0 + ownerState, + className: classes.leftArrowIcon }), leftArrowIconProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2$3); const RightArrowIcon = (_d = slots == null ? void 0 : slots.rightArrowIcon) != null ? _d : ArrowRightIcon; const _useSlotProps2 = useSlotProps({ @@ -45204,7 +45106,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha additionalProps: { fontSize: "inherit" }, - ownerState: void 0 + ownerState, + className: classes.rightArrowIcon }), rightArrowIconProps = _objectWithoutPropertiesLoose(_useSlotProps2, _excluded3$1); return /* @__PURE__ */ jsxRuntimeExports.jsxs(PickersArrowSwitcherRoot, _extends$1({ ref, @@ -45385,7 +45288,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const _useSlotProps = useSlotProps({ elementType: SwitchViewIcon, externalSlotProps: slotProps == null ? void 0 : slotProps.switchViewIcon, - ownerState: void 0, + ownerState, className: classes.switchViewIcon }), switchViewIconProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2$2); const selectNextMonth = () => onMonthChange(utils2.addMonths(month, 1), "left"); @@ -50315,10 +50218,11 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha function getClockUtilityClass(slot) { return generateUtilityClass("MuiClock", slot); } - const clockClasses = generateUtilityClasses("MuiClock", ["root", "clock", "wrapper", "squareMask", "pin", "amButton", "pmButton", "meridiemText"]); + const clockClasses = generateUtilityClasses("MuiClock", ["root", "clock", "wrapper", "squareMask", "pin", "amButton", "pmButton", "meridiemText", "selected"]); const useUtilityClasses$h = (ownerState) => { const { - classes + classes, + meridiemMode } = ownerState; const slots = { root: ["root"], @@ -50326,8 +50230,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha wrapper: ["wrapper"], squareMask: ["squareMask"], pin: ["pin"], - amButton: ["amButton"], - pmButton: ["pmButton"], + amButton: ["amButton", meridiemMode === "am" && "selected"], + pmButton: ["pmButton", meridiemMode === "pm" && "selected"], meridiemText: ["meridiemText"] }; return composeClasses(slots, getClockUtilityClass, classes); @@ -50410,23 +50314,15 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha left: "50%", transform: "translate(-50%, -50%)" })); - const ClockAmButton = styled$1(IconButton, { - name: "MuiClock", - slot: "AmButton", - overridesResolver: (_2, styles2) => styles2.amButton - })(({ - theme - }) => ({ + const meridiemButtonCommonStyles = (theme, meridiemMode) => ({ zIndex: 1, - position: "absolute", bottom: 8, - left: 8, paddingLeft: 4, paddingRight: 4, width: CLOCK_HOUR_WIDTH, variants: [{ props: { - meridiemMode: "am" + meridiemMode }, style: { backgroundColor: (theme.vars || theme).palette.primary.main, @@ -50436,6 +50332,17 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } } }] + }); + const ClockAmButton = styled$1(IconButton, { + name: "MuiClock", + slot: "AmButton", + overridesResolver: (_2, styles2) => styles2.amButton + })(({ + theme + }) => _extends$1({}, meridiemButtonCommonStyles(theme, "am"), { + // keeping it here to make TS happy + position: "absolute", + left: 8 })); const ClockPmButton = styled$1(IconButton, { name: "MuiClock", @@ -50443,26 +50350,10 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha overridesResolver: (_2, styles2) => styles2.pmButton })(({ theme - }) => ({ - zIndex: 1, + }) => _extends$1({}, meridiemButtonCommonStyles(theme, "pm"), { + // keeping it here to make TS happy position: "absolute", - bottom: 8, - right: 8, - paddingLeft: 4, - paddingRight: 4, - width: CLOCK_HOUR_WIDTH, - variants: [{ - props: { - meridiemMode: "pm" - }, - style: { - backgroundColor: (theme.vars || theme).palette.primary.main, - color: (theme.vars || theme).palette.primary.contrastText, - "&:hover": { - backgroundColor: (theme.vars || theme).palette.primary.light - } - } - }] + right: 8 })); const ClockMeridiemText = styled$1(Typography, { name: "MuiClock", @@ -52529,7 +52420,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha skipDisabled, timezone }); - function DesktopDateTimePickerLayout(props) { + const DesktopDateTimePickerLayout = /* @__PURE__ */ React__namespace.forwardRef(function DesktopDateTimePickerLayout2(props, ref) { var _a, _b; const isRtl = useRtl(); const { @@ -52543,7 +52434,6 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha sx, className, isLandscape, - ref, classes } = props; const isActionBarVisible = actionBar && ((_b = (_a = actionBar.props.actions) == null ? void 0 : _a.length) != null ? _b : 0) > 0; @@ -52576,7 +52466,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha })] }), actionBar] }); - } + }); process.env.NODE_ENV !== "production" ? DesktopDateTimePickerLayout.propTypes = { // ----------------------------- Warning -------------------------------- // | These PropTypes are generated from the TypeScript type definitions | @@ -62828,8 +62718,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } return jsxRuntimeExports.jsx(MRT_TablePaper, { table }); }; - const { Open: Open$7, Child: Child$4 } = gubu_minExports.Gubu; - const Shape$2 = gubu_minExports.Gubu(Open$7({ + const { Open: Open$8, Child: Child$4 } = gubu_minExports.Gubu; + const Shape$2 = gubu_minExports.Gubu(Open$8({ name: String, prefix: String, ent: String, @@ -62874,7 +62764,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } }); Object.defineProperty(VxgBasicEntityListPlugin, "name", { value: "VxgBasicEntityListPlugin" }); - const CMPNAME$9 = "BasicEntityList"; + const CMPNAME$a = "BasicEntityList"; function BasicEntityList(props) { const { ctx } = props; const { seneca } = ctx(); @@ -64794,6 +64684,56 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha _formControl.current.formState = getProxyFormState(formState, control); return _formControl.current; } + const CMPNAME$9 = "BasicEntitySliderField"; + const { Open: Open$7 } = gubu_minExports.Gubu; + const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu(Open$7({ + field: Open$7({ + id: String, + name: String, + kind: String, + label: gubu_minExports.Default("", String), + ux: Open$7({ + kind: gubu_minExports.Default("Text", String), + edit: gubu_minExports.Default(true, Boolean), + step: gubu_minExports.Default(1, Number), + min: gubu_minExports.Default(0, Number), + max: gubu_minExports.Default(100, Number) + }) + }), + errors: Open$7({}) + }), { name: CMPNAME$9 }); + function BasicEntitySliderField(props) { + const { spec } = props; + const basicEntityAutocompleteField = BasicEntitySliderFieldSpecShape(spec); + const { control, field, getValues } = basicEntityAutocompleteField; + const val = getValues(field.name); + return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx(material.FormLabel, { id: field.id, children: field.label }), + /* @__PURE__ */ jsxRuntimeExports.jsx( + Controller, + { + name: field.name, + control, + defaultValue: val || field.ux.min, + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( + material.Slider, + { + value, + onChange: (_2, newValue) => onChange(newValue), + valueLabelDisplay: "auto", + step: field.ux.step, + marks: resolveMarks(field.ux.marks), + min: field.ux.min, + max: field.ux.max + } + ) + } + ) + ] }); + } + function resolveMarks(marks) { + return marks && typeof marks === "object" ? Object.keys(marks).map((key) => ({ label: marks[key], value: +key })) : marks; + } const CMPNAME$8 = "BasicEntityField"; const { Open: Open$6 } = gubu_minExports.Gubu; const BasicEntityFieldSpecShape = gubu_minExports.Gubu(Open$6({}), { name: CMPNAME$8 }); @@ -64802,7 +64742,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha TextBox: BasicEntityTextBoxField, Date: BasicEntityDateField, DateTime: BasicEntityDateTimeField, - Time: BasicEntityTimeField + Time: BasicEntityTimeField, + Slider: BasicEntitySliderField }; function BasicEntityField(props) { const { ctx, spec } = props; @@ -65013,6 +64954,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha handleSubmit, getValues, reset, + control, formState: { errors } } = useForm({ mode: "onChange", @@ -65041,6 +64983,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha field, register, getValues, + control, errors } } diff --git a/src/lib/BasicEntityEdit.tsx b/src/lib/BasicEntityEdit.tsx index 3966ab2..391dd3c 100644 --- a/src/lib/BasicEntityEdit.tsx +++ b/src/lib/BasicEntityEdit.tsx @@ -124,6 +124,7 @@ function BasicEntityEdit (props: any) { handleSubmit, getValues, reset, + control, formState: { errors }, } = useForm({ mode: 'onChange', @@ -155,6 +156,7 @@ function BasicEntityEdit (props: any) { field, register, getValues, + control, errors, }} /> diff --git a/src/lib/BasicEntityField.tsx b/src/lib/BasicEntityField.tsx index f332b15..9009bcb 100644 --- a/src/lib/BasicEntityField.tsx +++ b/src/lib/BasicEntityField.tsx @@ -10,6 +10,7 @@ import { import type { Spec } from './basic-types' import { Gubu } from 'gubu' +import { BasicEntitySliderField } from './BasicEntitySliderField' const CMPNAME = 'BasicEntityField' @@ -26,6 +27,7 @@ const fieldMap: any = { Date: BasicEntityDateField, DateTime: BasicEntityDateTimeField, Time: BasicEntityTimeField, + Slider: BasicEntitySliderField } diff --git a/src/lib/BasicEntitySliderField.tsx b/src/lib/BasicEntitySliderField.tsx new file mode 100644 index 0000000..1793570 --- /dev/null +++ b/src/lib/BasicEntitySliderField.tsx @@ -0,0 +1,68 @@ +import React, { useEffect, forwardRef } from "react"; + +import { FormLabel, Slider } from "@mui/material"; +import { Controller } from "react-hook-form"; + +import type { Spec } from './basic-types' + +import { Default, Gubu } from 'gubu' +const CMPNAME = 'BasicEntitySliderField' + +const { Open } = Gubu +const BasicEntitySliderFieldSpecShape = Gubu(Open({ + field: Open({ + id: String, + name: String, + kind: String, + label: Default('', String), + ux: Open({ + kind: Default('Text', String), + edit: Default(true, Boolean), + step: Default(1, Number), + min: Default(0, Number), + max: Default(100, Number) + }) + }), + errors: Open({}), +}), {name: CMPNAME}) + +function BasicEntitySliderField(props: any) { + const { spec } = props + + const basicEntityAutocompleteField: Spec = BasicEntitySliderFieldSpecShape(spec) + const { control, field, getValues } = basicEntityAutocompleteField + const val = getValues(field.name) + +// console.log('BESF', field, val) + + return ( + <> + {field.label} + ( + onChange(newValue)} + valueLabelDisplay="auto" + step={field.ux.step} + marks={resolveMarks(field.ux.marks)} + min={field.ux.min} + max={field.ux.max} + /> + )} + /> + + ) +} + +function resolveMarks(marks: any) { + return marks && typeof marks === 'object' + ? Object.keys(marks).map(key => ({ label: marks[key], value: +key })) + : marks +} + + +export { BasicEntitySliderField } \ No newline at end of file From cf3e7aca1928b3daa6e2b090350f6df0bb076fda Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 25 Jul 2024 03:17:07 +0100 Subject: [PATCH 009/122] Add more customization options to BasicEntitySliderField --- dist/voxgig-model-react.es.js | 16 +++++++++++----- dist/voxgig-model-react.umd.js | 16 +++++++++++----- src/lib/BasicEntitySliderField.tsx | 16 +++++++++++----- 3 files changed, 33 insertions(+), 15 deletions(-) diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index 6662940..181c822 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -64683,7 +64683,10 @@ const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu(Open$7({ ux: Open$7({ kind: gubu_minExports.Default("Text", String), edit: gubu_minExports.Default(true, Boolean), - step: gubu_minExports.Default(1, Number), + valueLabelDisplay: gubu_minExports.Exact("on", "auto", "off").Default("auto"), + orientation: gubu_minExports.Exact("horizontal", "vertical").Default("horizontal"), + track: gubu_minExports.Exact("normal", "inverted", false).Default("normal"), + step: gubu_minExports.One(null, Number), min: gubu_minExports.Default(0, Number), max: gubu_minExports.Default(100, Number) }) @@ -64706,13 +64709,16 @@ function BasicEntitySliderField(props) { render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( Slider$1, { - value, - onChange: (_2, newValue) => onChange(newValue), - valueLabelDisplay: "auto", + disabled: !field.ux.edit, + orientation: field.ux.orientation, + track: field.ux.track, + valueLabelDisplay: field.ux.valueLabelDisplay, step: field.ux.step, marks: resolveMarks(field.ux.marks), min: field.ux.min, - max: field.ux.max + max: field.ux.max, + value, + onChange: (_2, newValue) => onChange(newValue) } ) } diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index 93c95fb..944ae6d 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -64695,7 +64695,10 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ux: Open$7({ kind: gubu_minExports.Default("Text", String), edit: gubu_minExports.Default(true, Boolean), - step: gubu_minExports.Default(1, Number), + valueLabelDisplay: gubu_minExports.Exact("on", "auto", "off").Default("auto"), + orientation: gubu_minExports.Exact("horizontal", "vertical").Default("horizontal"), + track: gubu_minExports.Exact("normal", "inverted", false).Default("normal"), + step: gubu_minExports.One(null, Number), min: gubu_minExports.Default(0, Number), max: gubu_minExports.Default(100, Number) }) @@ -64718,13 +64721,16 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( material.Slider, { - value, - onChange: (_2, newValue) => onChange(newValue), - valueLabelDisplay: "auto", + disabled: !field.ux.edit, + orientation: field.ux.orientation, + track: field.ux.track, + valueLabelDisplay: field.ux.valueLabelDisplay, step: field.ux.step, marks: resolveMarks(field.ux.marks), min: field.ux.min, - max: field.ux.max + max: field.ux.max, + value, + onChange: (_2, newValue) => onChange(newValue) } ) } diff --git a/src/lib/BasicEntitySliderField.tsx b/src/lib/BasicEntitySliderField.tsx index 1793570..3525a16 100644 --- a/src/lib/BasicEntitySliderField.tsx +++ b/src/lib/BasicEntitySliderField.tsx @@ -5,7 +5,7 @@ import { Controller } from "react-hook-form"; import type { Spec } from './basic-types' -import { Default, Gubu } from 'gubu' +import { Default, Exact, Gubu, One } from 'gubu' const CMPNAME = 'BasicEntitySliderField' const { Open } = Gubu @@ -18,7 +18,10 @@ const BasicEntitySliderFieldSpecShape = Gubu(Open({ ux: Open({ kind: Default('Text', String), edit: Default(true, Boolean), - step: Default(1, Number), + valueLabelDisplay: Exact('on', 'auto', 'off').Default('auto'), + orientation: Exact('horizontal', 'vertical').Default('horizontal'), + track: Exact('normal', 'inverted', false).Default('normal'), + step: One(null, Number), min: Default(0, Number), max: Default(100, Number) }) @@ -44,13 +47,16 @@ function BasicEntitySliderField(props: any) { defaultValue={val || field.ux.min} render={({ field: { onChange, value } }) => ( onChange(newValue)} - valueLabelDisplay="auto" + disabled={!field.ux.edit} + orientation={field.ux.orientation} + track={field.ux.track} + valueLabelDisplay={field.ux.valueLabelDisplay} step={field.ux.step} marks={resolveMarks(field.ux.marks)} min={field.ux.min} max={field.ux.max} + value={value} + onChange={(_, newValue) => onChange(newValue)} /> )} /> From 96a45f161b49ebc10e0e5186c102b5fb1967617c Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 25 Jul 2024 03:19:24 +0100 Subject: [PATCH 010/122] minor change to onChange params --- src/lib/BasicEntitySliderField.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/BasicEntitySliderField.tsx b/src/lib/BasicEntitySliderField.tsx index 3525a16..7be0380 100644 --- a/src/lib/BasicEntitySliderField.tsx +++ b/src/lib/BasicEntitySliderField.tsx @@ -56,7 +56,7 @@ function BasicEntitySliderField(props: any) { min={field.ux.min} max={field.ux.max} value={value} - onChange={(_, newValue) => onChange(newValue)} + onChange={(_, newValue: any) => onChange(newValue)} /> )} /> From 9ade7be773d47a02bafc827c19ee24d5fa5b103d Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 25 Jul 2024 03:20:44 +0100 Subject: [PATCH 011/122] change variable name to avoid confusion with other BasicEntityField components --- dist/BasicEntitySliderField.d.ts | 2 ++ dist/voxgig-model-react.es.js | 2 +- dist/voxgig-model-react.umd.js | 2 +- src/lib/BasicEntityAutocompleteField.tsx | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 dist/BasicEntitySliderField.d.ts diff --git a/dist/BasicEntitySliderField.d.ts b/dist/BasicEntitySliderField.d.ts new file mode 100644 index 0000000..2e8f094 --- /dev/null +++ b/dist/BasicEntitySliderField.d.ts @@ -0,0 +1,2 @@ +declare function BasicEntitySliderField(props: any): import("react/jsx-runtime").JSX.Element; +export { BasicEntitySliderField }; diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index 1d07ae6..0ad131e 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -64714,7 +64714,7 @@ function BasicEntityAutocompleteField(props) { isOptionEqualToValue: (opt, val) => opt === val || (opt == null ? void 0 : opt.id) != null && (val == null ? void 0 : val.id) != null && opt.id === val.id || (opt == null ? void 0 : opt.value) != null && (val == null ? void 0 : val.value) != null && opt.value === val.value, getOptionLabel: (option) => option.label, value, - onChange: (e, val) => onChange(val), + onChange: (_2, nweValue) => onChange(nweValue), renderInput: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx(TextField$1, __spreadProps(__spreadValues({}, params), { label: field.label })) }, field.id diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index e2d491d..d3fa045 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -64726,7 +64726,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha isOptionEqualToValue: (opt, val) => opt === val || (opt == null ? void 0 : opt.id) != null && (val == null ? void 0 : val.id) != null && opt.id === val.id || (opt == null ? void 0 : opt.value) != null && (val == null ? void 0 : val.value) != null && opt.value === val.value, getOptionLabel: (option) => option.label, value, - onChange: (e, val) => onChange(val), + onChange: (_2, nweValue) => onChange(nweValue), renderInput: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.TextField, __spreadProps(__spreadValues({}, params), { label: field.label })) }, field.id diff --git a/src/lib/BasicEntityAutocompleteField.tsx b/src/lib/BasicEntityAutocompleteField.tsx index 4d6704d..99fdce3 100644 --- a/src/lib/BasicEntityAutocompleteField.tsx +++ b/src/lib/BasicEntityAutocompleteField.tsx @@ -57,7 +57,7 @@ function BasicEntityAutocompleteField(props: any) { } getOptionLabel={(option: any) => option.label} value={value} - onChange={(e: any, val: any) => onChange(val)} + onChange={(_, nweValue: any) => onChange(nweValue)} renderInput={(params: any) => } /> )} From d80ae75b6e2ecd0ea5fd0257895a695c32d6e045 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 25 Jul 2024 03:22:11 +0100 Subject: [PATCH 012/122] add comment to resolveOptions in BasicEntityAutocompleteField --- src/lib/BasicEntityAutocompleteField.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/BasicEntityAutocompleteField.tsx b/src/lib/BasicEntityAutocompleteField.tsx index 99fdce3..dfbc948 100644 --- a/src/lib/BasicEntityAutocompleteField.tsx +++ b/src/lib/BasicEntityAutocompleteField.tsx @@ -65,12 +65,15 @@ function BasicEntityAutocompleteField(props: any) { ) } +// Returns array of options and default value(s) based on the options object function resolveOptions(options: any) { + // Array of options const resolvedOptions = Object.keys(options.ents).map(key => ({ label: options.ents[key].label, value: key })) + // Array of default values (or single value if multiple is false) const resolvedDefault = options.multiple === false ? ( Object.keys(options.default).length > 0 ? { value: Object.keys(options.default)[0], label: options.default[Object.keys(options.default)[0]].label } From 6bd7ed84d21159084082b4e69379740921710760 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 25 Jul 2024 18:53:02 +0100 Subject: [PATCH 013/122] update gubu shape for BasicEntitySliderField --- dist/voxgig-model-react.es.js | 4 ++-- dist/voxgig-model-react.umd.js | 4 ++-- src/lib/BasicEntitySliderField.tsx | 22 ++++++++++++---------- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index 181c822..3b19f71 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -64681,10 +64681,10 @@ const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu(Open$7({ kind: String, label: gubu_minExports.Default("", String), ux: Open$7({ - kind: gubu_minExports.Default("Text", String), + kind: gubu_minExports.Exact("Slider"), edit: gubu_minExports.Default(true, Boolean), valueLabelDisplay: gubu_minExports.Exact("on", "auto", "off").Default("auto"), - orientation: gubu_minExports.Exact("horizontal", "vertical").Default("horizontal"), + orient: gubu_minExports.Exact("horizontal", "vertical").Default("horizontal"), track: gubu_minExports.Exact("normal", "inverted", false).Default("normal"), step: gubu_minExports.One(null, Number), min: gubu_minExports.Default(0, Number), diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index 944ae6d..5819e9a 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -64693,10 +64693,10 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha kind: String, label: gubu_minExports.Default("", String), ux: Open$7({ - kind: gubu_minExports.Default("Text", String), + kind: gubu_minExports.Exact("Slider"), edit: gubu_minExports.Default(true, Boolean), valueLabelDisplay: gubu_minExports.Exact("on", "auto", "off").Default("auto"), - orientation: gubu_minExports.Exact("horizontal", "vertical").Default("horizontal"), + orient: gubu_minExports.Exact("horizontal", "vertical").Default("horizontal"), track: gubu_minExports.Exact("normal", "inverted", false).Default("normal"), step: gubu_minExports.One(null, Number), min: gubu_minExports.Default(0, Number), diff --git a/src/lib/BasicEntitySliderField.tsx b/src/lib/BasicEntitySliderField.tsx index 7be0380..4491fdc 100644 --- a/src/lib/BasicEntitySliderField.tsx +++ b/src/lib/BasicEntitySliderField.tsx @@ -5,7 +5,7 @@ import { Controller } from "react-hook-form"; import type { Spec } from './basic-types' -import { Default, Exact, Gubu, One } from 'gubu' +import { Default, Exact, Gubu } from 'gubu' const CMPNAME = 'BasicEntitySliderField' const { Open } = Gubu @@ -16,14 +16,16 @@ const BasicEntitySliderFieldSpecShape = Gubu(Open({ kind: String, label: Default('', String), ux: Open({ - kind: Default('Text', String), - edit: Default(true, Boolean), - valueLabelDisplay: Exact('on', 'auto', 'off').Default('auto'), - orientation: Exact('horizontal', 'vertical').Default('horizontal'), - track: Exact('normal', 'inverted', false).Default('normal'), - step: One(null, Number), - min: Default(0, Number), - max: Default(100, Number) + kind: Exact('Slider'), + edit: Default(true), + step: Default(1), + min: Default(0), + max: Default(100), + props: { + valueLabelDisplay: Exact('on', 'auto', 'off').Default('auto'), + orient: Exact('horizontal', 'vertical').Default('horizontal'), + track: Exact('normal', 'inverted', 'disabled').Default('normal'), + }, }) }), errors: Open({}), @@ -56,7 +58,7 @@ function BasicEntitySliderField(props: any) { min={field.ux.min} max={field.ux.max} value={value} - onChange={(_, newValue: any) => onChange(newValue)} + onChange={(_, newVal: any) => onChange(newVal)} /> )} /> From 94e0f03f5fd15af06c7a25fd8b3626ca7d98f9de Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 25 Jul 2024 18:56:58 +0100 Subject: [PATCH 014/122] update gubu shape on BasicEntityAutocompleteField --- src/lib/BasicEntityAutocompleteField.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lib/BasicEntityAutocompleteField.tsx b/src/lib/BasicEntityAutocompleteField.tsx index dfbc948..d257600 100644 --- a/src/lib/BasicEntityAutocompleteField.tsx +++ b/src/lib/BasicEntityAutocompleteField.tsx @@ -5,7 +5,7 @@ import { Controller } from "react-hook-form"; import type { Spec } from './basic-types' -import { Default, Gubu } from 'gubu' +import { Default, Exact, Gubu } from 'gubu' const CMPNAME = 'BasicEntityAutocompleteField' const { Open } = Gubu @@ -14,16 +14,16 @@ const BasicEntityAutocompleteFieldSpecShape = Gubu(Open({ id: String, name: String, kind: String, - label: Default('', String), + label: Default(''), options: Open({ default: Open({}), - label: { field: Default('label', String) }, - multiple: Default(false, Boolean), + label: { field: Default('label') }, + multiple: Default(false), ents: Open({}) }), ux: Open({ - kind: Default('Text', String), - edit: Default(true, Boolean), + kind: Exact('Autocomplete'), + edit: Default(true), }) }), errors: Open({}), From fd7ef677050de40f9dfb8e9c7d1542c08130d98c Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 25 Jul 2024 18:57:22 +0100 Subject: [PATCH 015/122] Tie getOptionLabel to model --- dist/voxgig-model-react.es.js | 104 +++++++++++------------ dist/voxgig-model-react.umd.js | 104 +++++++++++------------ src/lib/BasicEntityAutocompleteField.tsx | 4 +- 3 files changed, 100 insertions(+), 112 deletions(-) diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index 0ad131e..4c7817d 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -1030,21 +1030,15 @@ function requireReactJsxRuntime_development() { } return reactJsxRuntime_development; } -var jsxRuntime$1 = jsxRuntime$2.exports; -var hasRequiredJsxRuntime; -function requireJsxRuntime() { - if (hasRequiredJsxRuntime) return jsxRuntime$2.exports; - hasRequiredJsxRuntime = 1; - "use strict"; - if (process.env.NODE_ENV === "production") { - jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); - } else { - jsxRuntime$2.exports = requireReactJsxRuntime_development(); - } - return jsxRuntime$2.exports; +var jsxRuntime = jsxRuntime$2.exports; +"use strict"; +if (process.env.NODE_ENV === "production") { + jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); +} else { + jsxRuntime$2.exports = requireReactJsxRuntime_development(); } -var jsxRuntimeExports = requireJsxRuntime(); -const jsxRuntime = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); +var jsxRuntimeExports = jsxRuntime$2.exports; +const jsxRuntime$1 = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); var gubu_min$2 = { exports: {} }; var gubu_min = gubu_min$2.exports; (function(module, exports) { @@ -25311,7 +25305,7 @@ Object.defineProperty(ArrowDownward, "__esModule", { }); var default_1$x = ArrowDownward.default = void 0; var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); -var _jsxRuntime$x = requireJsxRuntime(); +var _jsxRuntime$x = jsxRuntimeExports; var _default$x = default_1$x = ArrowDownward.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); @@ -25324,7 +25318,7 @@ Object.defineProperty(ArrowRight, "__esModule", { }); var default_1$w = ArrowRight.default = void 0; var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); -var _jsxRuntime$w = requireJsxRuntime(); +var _jsxRuntime$w = jsxRuntimeExports; var _default$w = default_1$w = ArrowRight.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); @@ -25337,7 +25331,7 @@ Object.defineProperty(Cancel, "__esModule", { }); var default_1$v = Cancel.default = void 0; var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); -var _jsxRuntime$v = requireJsxRuntime(); +var _jsxRuntime$v = jsxRuntimeExports; var _default$v = default_1$v = Cancel.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); @@ -25350,7 +25344,7 @@ Object.defineProperty(ChevronLeft, "__esModule", { }); var default_1$u = ChevronLeft.default = void 0; var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); -var _jsxRuntime$u = requireJsxRuntime(); +var _jsxRuntime$u = jsxRuntimeExports; var _default$u = default_1$u = ChevronLeft.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); @@ -25363,7 +25357,7 @@ Object.defineProperty(ChevronRight, "__esModule", { }); var default_1$t = ChevronRight.default = void 0; var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); -var _jsxRuntime$t = requireJsxRuntime(); +var _jsxRuntime$t = jsxRuntimeExports; var _default$t = default_1$t = ChevronRight.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); @@ -25376,7 +25370,7 @@ Object.defineProperty(ClearAll, "__esModule", { }); var default_1$s = ClearAll.default = void 0; var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); -var _jsxRuntime$s = requireJsxRuntime(); +var _jsxRuntime$s = jsxRuntimeExports; var _default$s = default_1$s = ClearAll.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); @@ -25389,7 +25383,7 @@ Object.defineProperty(Close, "__esModule", { }); var default_1$r = Close.default = void 0; var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); -var _jsxRuntime$r = requireJsxRuntime(); +var _jsxRuntime$r = jsxRuntimeExports; var _default$r = default_1$r = Close.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); @@ -25402,7 +25396,7 @@ Object.defineProperty(ContentCopy, "__esModule", { }); var default_1$q = ContentCopy.default = void 0; var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); -var _jsxRuntime$q = requireJsxRuntime(); +var _jsxRuntime$q = jsxRuntimeExports; var _default$q = default_1$q = ContentCopy.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); @@ -25415,7 +25409,7 @@ Object.defineProperty(DensityLarge, "__esModule", { }); var default_1$p = DensityLarge.default = void 0; var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); -var _jsxRuntime$p = requireJsxRuntime(); +var _jsxRuntime$p = jsxRuntimeExports; var _default$p = default_1$p = DensityLarge.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); @@ -25428,7 +25422,7 @@ Object.defineProperty(DensityMedium, "__esModule", { }); var default_1$o = DensityMedium.default = void 0; var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); -var _jsxRuntime$o = requireJsxRuntime(); +var _jsxRuntime$o = jsxRuntimeExports; var _default$o = default_1$o = DensityMedium.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); @@ -25441,7 +25435,7 @@ Object.defineProperty(DensitySmall, "__esModule", { }); var default_1$n = DensitySmall.default = void 0; var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); -var _jsxRuntime$n = requireJsxRuntime(); +var _jsxRuntime$n = jsxRuntimeExports; var _default$n = default_1$n = DensitySmall.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); @@ -25454,7 +25448,7 @@ Object.defineProperty(DragHandle, "__esModule", { }); var default_1$m = DragHandle.default = void 0; var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); -var _jsxRuntime$m = requireJsxRuntime(); +var _jsxRuntime$m = jsxRuntimeExports; var _default$m = default_1$m = DragHandle.default = (0, _createSvgIcon$m.default)(/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); @@ -25467,7 +25461,7 @@ Object.defineProperty(DynamicFeed, "__esModule", { }); var default_1$l = DynamicFeed.default = void 0; var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); -var _jsxRuntime$l = requireJsxRuntime(); +var _jsxRuntime$l = jsxRuntimeExports; var _default$l = default_1$l = DynamicFeed.default = (0, _createSvgIcon$l.default)([/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { @@ -25482,7 +25476,7 @@ Object.defineProperty(Edit, "__esModule", { }); var default_1$k = Edit.default = void 0; var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); -var _jsxRuntime$k = requireJsxRuntime(); +var _jsxRuntime$k = jsxRuntimeExports; var _default$k = default_1$k = Edit.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); @@ -25495,7 +25489,7 @@ Object.defineProperty(ExpandMore, "__esModule", { }); var default_1$j = ExpandMore.default = void 0; var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); -var _jsxRuntime$j = requireJsxRuntime(); +var _jsxRuntime$j = jsxRuntimeExports; var _default$j = default_1$j = ExpandMore.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); @@ -25508,7 +25502,7 @@ Object.defineProperty(FilterAlt, "__esModule", { }); var default_1$i = FilterAlt.default = void 0; var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); -var _jsxRuntime$i = requireJsxRuntime(); +var _jsxRuntime$i = jsxRuntimeExports; var _default$i = default_1$i = FilterAlt.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); @@ -25521,7 +25515,7 @@ Object.defineProperty(FilterList, "__esModule", { }); var default_1$h = FilterList.default = void 0; var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); -var _jsxRuntime$h = requireJsxRuntime(); +var _jsxRuntime$h = jsxRuntimeExports; var _default$h = default_1$h = FilterList.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); @@ -25534,7 +25528,7 @@ Object.defineProperty(FilterListOff, "__esModule", { }); var default_1$g = FilterListOff.default = void 0; var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); -var _jsxRuntime$g = requireJsxRuntime(); +var _jsxRuntime$g = jsxRuntimeExports; var _default$g = default_1$g = FilterListOff.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); @@ -25547,7 +25541,7 @@ Object.defineProperty(FirstPage, "__esModule", { }); var default_1$f = FirstPage.default = void 0; var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); -var _jsxRuntime$f = requireJsxRuntime(); +var _jsxRuntime$f = jsxRuntimeExports; var _default$f = default_1$f = FirstPage.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); @@ -25560,7 +25554,7 @@ Object.defineProperty(Fullscreen, "__esModule", { }); var default_1$e = Fullscreen.default = void 0; var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); -var _jsxRuntime$e = requireJsxRuntime(); +var _jsxRuntime$e = jsxRuntimeExports; var _default$e = default_1$e = Fullscreen.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); @@ -25573,7 +25567,7 @@ Object.defineProperty(FullscreenExit, "__esModule", { }); var default_1$d = FullscreenExit.default = void 0; var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); -var _jsxRuntime$d = requireJsxRuntime(); +var _jsxRuntime$d = jsxRuntimeExports; var _default$d = default_1$d = FullscreenExit.default = (0, _createSvgIcon$d.default)(/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); @@ -25586,7 +25580,7 @@ Object.defineProperty(KeyboardDoubleArrowDown, "__esModule", { }); var default_1$c = KeyboardDoubleArrowDown.default = void 0; var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); -var _jsxRuntime$c = requireJsxRuntime(); +var _jsxRuntime$c = jsxRuntimeExports; var _default$c = default_1$c = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$c.default)([/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { @@ -25601,7 +25595,7 @@ Object.defineProperty(LastPage, "__esModule", { }); var default_1$b = LastPage.default = void 0; var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); -var _jsxRuntime$b = requireJsxRuntime(); +var _jsxRuntime$b = jsxRuntimeExports; var _default$b = default_1$b = LastPage.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); @@ -25614,7 +25608,7 @@ Object.defineProperty(MoreHoriz, "__esModule", { }); var default_1$a = MoreHoriz.default = void 0; var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); -var _jsxRuntime$a = requireJsxRuntime(); +var _jsxRuntime$a = jsxRuntimeExports; var _default$a = default_1$a = MoreHoriz.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); @@ -25627,7 +25621,7 @@ Object.defineProperty(MoreVert, "__esModule", { }); var default_1$9 = MoreVert.default = void 0; var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); -var _jsxRuntime$9 = requireJsxRuntime(); +var _jsxRuntime$9 = jsxRuntimeExports; var _default$9 = default_1$9 = MoreVert.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); @@ -25640,7 +25634,7 @@ Object.defineProperty(PushPin, "__esModule", { }); var default_1$8 = PushPin.default = void 0; var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); -var _jsxRuntime$8 = requireJsxRuntime(); +var _jsxRuntime$8 = jsxRuntimeExports; var _default$8 = default_1$8 = PushPin.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" @@ -25654,7 +25648,7 @@ Object.defineProperty(RestartAlt, "__esModule", { }); var default_1$7 = RestartAlt.default = void 0; var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); -var _jsxRuntime$7 = requireJsxRuntime(); +var _jsxRuntime$7 = jsxRuntimeExports; var _default$7 = default_1$7 = RestartAlt.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); @@ -25667,7 +25661,7 @@ Object.defineProperty(Save, "__esModule", { }); var default_1$6 = Save.default = void 0; var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); -var _jsxRuntime$6 = requireJsxRuntime(); +var _jsxRuntime$6 = jsxRuntimeExports; var _default$6 = default_1$6 = Save.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); @@ -25680,7 +25674,7 @@ Object.defineProperty(Search, "__esModule", { }); var default_1$5 = Search.default = void 0; var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); -var _jsxRuntime$5 = requireJsxRuntime(); +var _jsxRuntime$5 = jsxRuntimeExports; var _default$5 = default_1$5 = Search.default = (0, _createSvgIcon$5.default)(/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); @@ -25693,7 +25687,7 @@ Object.defineProperty(SearchOff, "__esModule", { }); var default_1$4 = SearchOff.default = void 0; var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); -var _jsxRuntime$4 = requireJsxRuntime(); +var _jsxRuntime$4 = jsxRuntimeExports; var _default$4 = default_1$4 = SearchOff.default = (0, _createSvgIcon$4.default)([/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { @@ -25708,7 +25702,7 @@ Object.defineProperty(Sort, "__esModule", { }); var default_1$3 = Sort.default = void 0; var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); -var _jsxRuntime$3 = requireJsxRuntime(); +var _jsxRuntime$3 = jsxRuntimeExports; var _default$3 = default_1$3 = Sort.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); @@ -25721,7 +25715,7 @@ Object.defineProperty(SyncAlt, "__esModule", { }); var default_1$2 = SyncAlt.default = void 0; var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); -var _jsxRuntime$2 = requireJsxRuntime(); +var _jsxRuntime$2 = jsxRuntimeExports; var _default$2 = default_1$2 = SyncAlt.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); @@ -25734,7 +25728,7 @@ Object.defineProperty(ViewColumn, "__esModule", { }); var default_1$1 = ViewColumn.default = void 0; var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); -var _jsxRuntime$1 = requireJsxRuntime(); +var _jsxRuntime$1 = jsxRuntimeExports; var _default$1 = default_1$1 = ViewColumn.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); @@ -25747,7 +25741,7 @@ Object.defineProperty(VisibilityOff, "__esModule", { }); var default_1 = VisibilityOff.default = void 0; var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); -var _jsxRuntime = requireJsxRuntime(); +var _jsxRuntime = jsxRuntimeExports; var _default = default_1 = VisibilityOff.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); @@ -64679,16 +64673,16 @@ const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu(Open$7({ id: String, name: String, kind: String, - label: gubu_minExports.Default("", String), + label: gubu_minExports.Default(""), options: Open$7({ default: Open$7({}), - label: { field: gubu_minExports.Default("label", String) }, - multiple: gubu_minExports.Default(false, Boolean), + label: { field: gubu_minExports.Default("label") }, + multiple: gubu_minExports.Default(false), ents: Open$7({}) }), ux: Open$7({ - kind: gubu_minExports.Default("Text", String), - edit: gubu_minExports.Default(true, Boolean) + kind: gubu_minExports.Exact("Autocomplete"), + edit: gubu_minExports.Default(true) }) }), errors: Open$7({}) @@ -64712,9 +64706,9 @@ function BasicEntityAutocompleteField(props) { multiple: field.options.multiple, options: resolvedOptions, isOptionEqualToValue: (opt, val) => opt === val || (opt == null ? void 0 : opt.id) != null && (val == null ? void 0 : val.id) != null && opt.id === val.id || (opt == null ? void 0 : opt.value) != null && (val == null ? void 0 : val.value) != null && opt.value === val.value, - getOptionLabel: (option) => option.label, + getOptionLabel: (option) => option[field.options.label.field], value, - onChange: (_2, nweValue) => onChange(nweValue), + onChange: (_2, newVal) => onChange(newVal), renderInput: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx(TextField$1, __spreadProps(__spreadValues({}, params), { label: field.label })) }, field.id diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index d3fa045..e267067 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -1042,21 +1042,15 @@ var __async = (__this, __arguments, generator) => { } return reactJsxRuntime_development; } - var jsxRuntime$1 = jsxRuntime$2.exports; - var hasRequiredJsxRuntime; - function requireJsxRuntime() { - if (hasRequiredJsxRuntime) return jsxRuntime$2.exports; - hasRequiredJsxRuntime = 1; - "use strict"; - if (process.env.NODE_ENV === "production") { - jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); - } else { - jsxRuntime$2.exports = requireReactJsxRuntime_development(); - } - return jsxRuntime$2.exports; + var jsxRuntime = jsxRuntime$2.exports; + "use strict"; + if (process.env.NODE_ENV === "production") { + jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); + } else { + jsxRuntime$2.exports = requireReactJsxRuntime_development(); } - var jsxRuntimeExports = requireJsxRuntime(); - const jsxRuntime = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); + var jsxRuntimeExports = jsxRuntime$2.exports; + const jsxRuntime$1 = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); var gubu_min$2 = { exports: {} }; var gubu_min = gubu_min$2.exports; (function(module2, exports3) { @@ -25323,7 +25317,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$x = ArrowDownward.default = void 0; var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); - var _jsxRuntime$x = requireJsxRuntime(); + var _jsxRuntime$x = jsxRuntimeExports; var _default$x = default_1$x = ArrowDownward.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); @@ -25336,7 +25330,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$w = ArrowRight.default = void 0; var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); - var _jsxRuntime$w = requireJsxRuntime(); + var _jsxRuntime$w = jsxRuntimeExports; var _default$w = default_1$w = ArrowRight.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); @@ -25349,7 +25343,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$v = Cancel.default = void 0; var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); - var _jsxRuntime$v = requireJsxRuntime(); + var _jsxRuntime$v = jsxRuntimeExports; var _default$v = default_1$v = Cancel.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); @@ -25362,7 +25356,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$u = ChevronLeft.default = void 0; var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); - var _jsxRuntime$u = requireJsxRuntime(); + var _jsxRuntime$u = jsxRuntimeExports; var _default$u = default_1$u = ChevronLeft.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); @@ -25375,7 +25369,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$t = ChevronRight.default = void 0; var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); - var _jsxRuntime$t = requireJsxRuntime(); + var _jsxRuntime$t = jsxRuntimeExports; var _default$t = default_1$t = ChevronRight.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); @@ -25388,7 +25382,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$s = ClearAll.default = void 0; var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); - var _jsxRuntime$s = requireJsxRuntime(); + var _jsxRuntime$s = jsxRuntimeExports; var _default$s = default_1$s = ClearAll.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); @@ -25401,7 +25395,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$r = Close.default = void 0; var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); - var _jsxRuntime$r = requireJsxRuntime(); + var _jsxRuntime$r = jsxRuntimeExports; var _default$r = default_1$r = Close.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); @@ -25414,7 +25408,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$q = ContentCopy.default = void 0; var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); - var _jsxRuntime$q = requireJsxRuntime(); + var _jsxRuntime$q = jsxRuntimeExports; var _default$q = default_1$q = ContentCopy.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); @@ -25427,7 +25421,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$p = DensityLarge.default = void 0; var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); - var _jsxRuntime$p = requireJsxRuntime(); + var _jsxRuntime$p = jsxRuntimeExports; var _default$p = default_1$p = DensityLarge.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); @@ -25440,7 +25434,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$o = DensityMedium.default = void 0; var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); - var _jsxRuntime$o = requireJsxRuntime(); + var _jsxRuntime$o = jsxRuntimeExports; var _default$o = default_1$o = DensityMedium.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); @@ -25453,7 +25447,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$n = DensitySmall.default = void 0; var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); - var _jsxRuntime$n = requireJsxRuntime(); + var _jsxRuntime$n = jsxRuntimeExports; var _default$n = default_1$n = DensitySmall.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); @@ -25466,7 +25460,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$m = DragHandle.default = void 0; var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); - var _jsxRuntime$m = requireJsxRuntime(); + var _jsxRuntime$m = jsxRuntimeExports; var _default$m = default_1$m = DragHandle.default = (0, _createSvgIcon$m.default)(/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); @@ -25479,7 +25473,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$l = DynamicFeed.default = void 0; var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); - var _jsxRuntime$l = requireJsxRuntime(); + var _jsxRuntime$l = jsxRuntimeExports; var _default$l = default_1$l = DynamicFeed.default = (0, _createSvgIcon$l.default)([/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { @@ -25494,7 +25488,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$k = Edit.default = void 0; var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); - var _jsxRuntime$k = requireJsxRuntime(); + var _jsxRuntime$k = jsxRuntimeExports; var _default$k = default_1$k = Edit.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); @@ -25507,7 +25501,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$j = ExpandMore.default = void 0; var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); - var _jsxRuntime$j = requireJsxRuntime(); + var _jsxRuntime$j = jsxRuntimeExports; var _default$j = default_1$j = ExpandMore.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); @@ -25520,7 +25514,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$i = FilterAlt.default = void 0; var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); - var _jsxRuntime$i = requireJsxRuntime(); + var _jsxRuntime$i = jsxRuntimeExports; var _default$i = default_1$i = FilterAlt.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); @@ -25533,7 +25527,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$h = FilterList.default = void 0; var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); - var _jsxRuntime$h = requireJsxRuntime(); + var _jsxRuntime$h = jsxRuntimeExports; var _default$h = default_1$h = FilterList.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); @@ -25546,7 +25540,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$g = FilterListOff.default = void 0; var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); - var _jsxRuntime$g = requireJsxRuntime(); + var _jsxRuntime$g = jsxRuntimeExports; var _default$g = default_1$g = FilterListOff.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); @@ -25559,7 +25553,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$f = FirstPage.default = void 0; var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); - var _jsxRuntime$f = requireJsxRuntime(); + var _jsxRuntime$f = jsxRuntimeExports; var _default$f = default_1$f = FirstPage.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); @@ -25572,7 +25566,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$e = Fullscreen.default = void 0; var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); - var _jsxRuntime$e = requireJsxRuntime(); + var _jsxRuntime$e = jsxRuntimeExports; var _default$e = default_1$e = Fullscreen.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); @@ -25585,7 +25579,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$d = FullscreenExit.default = void 0; var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); - var _jsxRuntime$d = requireJsxRuntime(); + var _jsxRuntime$d = jsxRuntimeExports; var _default$d = default_1$d = FullscreenExit.default = (0, _createSvgIcon$d.default)(/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); @@ -25598,7 +25592,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$c = KeyboardDoubleArrowDown.default = void 0; var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); - var _jsxRuntime$c = requireJsxRuntime(); + var _jsxRuntime$c = jsxRuntimeExports; var _default$c = default_1$c = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$c.default)([/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { @@ -25613,7 +25607,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$b = LastPage.default = void 0; var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); - var _jsxRuntime$b = requireJsxRuntime(); + var _jsxRuntime$b = jsxRuntimeExports; var _default$b = default_1$b = LastPage.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); @@ -25626,7 +25620,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$a = MoreHoriz.default = void 0; var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); - var _jsxRuntime$a = requireJsxRuntime(); + var _jsxRuntime$a = jsxRuntimeExports; var _default$a = default_1$a = MoreHoriz.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); @@ -25639,7 +25633,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$9 = MoreVert.default = void 0; var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); - var _jsxRuntime$9 = requireJsxRuntime(); + var _jsxRuntime$9 = jsxRuntimeExports; var _default$9 = default_1$9 = MoreVert.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); @@ -25652,7 +25646,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$8 = PushPin.default = void 0; var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); - var _jsxRuntime$8 = requireJsxRuntime(); + var _jsxRuntime$8 = jsxRuntimeExports; var _default$8 = default_1$8 = PushPin.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" @@ -25666,7 +25660,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$7 = RestartAlt.default = void 0; var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); - var _jsxRuntime$7 = requireJsxRuntime(); + var _jsxRuntime$7 = jsxRuntimeExports; var _default$7 = default_1$7 = RestartAlt.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); @@ -25679,7 +25673,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$6 = Save.default = void 0; var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); - var _jsxRuntime$6 = requireJsxRuntime(); + var _jsxRuntime$6 = jsxRuntimeExports; var _default$6 = default_1$6 = Save.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); @@ -25692,7 +25686,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$5 = Search.default = void 0; var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); - var _jsxRuntime$5 = requireJsxRuntime(); + var _jsxRuntime$5 = jsxRuntimeExports; var _default$5 = default_1$5 = Search.default = (0, _createSvgIcon$5.default)(/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); @@ -25705,7 +25699,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$4 = SearchOff.default = void 0; var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); - var _jsxRuntime$4 = requireJsxRuntime(); + var _jsxRuntime$4 = jsxRuntimeExports; var _default$4 = default_1$4 = SearchOff.default = (0, _createSvgIcon$4.default)([/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { @@ -25720,7 +25714,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$3 = Sort.default = void 0; var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); - var _jsxRuntime$3 = requireJsxRuntime(); + var _jsxRuntime$3 = jsxRuntimeExports; var _default$3 = default_1$3 = Sort.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); @@ -25733,7 +25727,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$2 = SyncAlt.default = void 0; var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); - var _jsxRuntime$2 = requireJsxRuntime(); + var _jsxRuntime$2 = jsxRuntimeExports; var _default$2 = default_1$2 = SyncAlt.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); @@ -25746,7 +25740,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$1 = ViewColumn.default = void 0; var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); - var _jsxRuntime$1 = requireJsxRuntime(); + var _jsxRuntime$1 = jsxRuntimeExports; var _default$1 = default_1$1 = ViewColumn.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); @@ -25759,7 +25753,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1 = VisibilityOff.default = void 0; var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); - var _jsxRuntime = requireJsxRuntime(); + var _jsxRuntime = jsxRuntimeExports; var _default = default_1 = VisibilityOff.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); @@ -64691,16 +64685,16 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha id: String, name: String, kind: String, - label: gubu_minExports.Default("", String), + label: gubu_minExports.Default(""), options: Open$7({ default: Open$7({}), - label: { field: gubu_minExports.Default("label", String) }, - multiple: gubu_minExports.Default(false, Boolean), + label: { field: gubu_minExports.Default("label") }, + multiple: gubu_minExports.Default(false), ents: Open$7({}) }), ux: Open$7({ - kind: gubu_minExports.Default("Text", String), - edit: gubu_minExports.Default(true, Boolean) + kind: gubu_minExports.Exact("Autocomplete"), + edit: gubu_minExports.Default(true) }) }), errors: Open$7({}) @@ -64724,9 +64718,9 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha multiple: field.options.multiple, options: resolvedOptions, isOptionEqualToValue: (opt, val) => opt === val || (opt == null ? void 0 : opt.id) != null && (val == null ? void 0 : val.id) != null && opt.id === val.id || (opt == null ? void 0 : opt.value) != null && (val == null ? void 0 : val.value) != null && opt.value === val.value, - getOptionLabel: (option) => option.label, + getOptionLabel: (option) => option[field.options.label.field], value, - onChange: (_2, nweValue) => onChange(nweValue), + onChange: (_2, newVal) => onChange(newVal), renderInput: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.TextField, __spreadProps(__spreadValues({}, params), { label: field.label })) }, field.id diff --git a/src/lib/BasicEntityAutocompleteField.tsx b/src/lib/BasicEntityAutocompleteField.tsx index d257600..558d072 100644 --- a/src/lib/BasicEntityAutocompleteField.tsx +++ b/src/lib/BasicEntityAutocompleteField.tsx @@ -55,9 +55,9 @@ function BasicEntityAutocompleteField(props: any) { (opt?.id != null && val?.id != null && opt.id === val.id) || (opt?.value != null && val?.value != null && opt.value === val.value) } - getOptionLabel={(option: any) => option.label} + getOptionLabel={(option: any) => option[field.options.label.field]} value={value} - onChange={(_, nweValue: any) => onChange(nweValue)} + onChange={(_, newVal: any) => onChange(newVal)} renderInput={(params: any) => } /> )} From d9781525bcd1494db085d081443b2b480a359495 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 25 Jul 2024 19:05:14 +0100 Subject: [PATCH 016/122] Remove unused Checkbox and Box imports in BasicEntityRadioGroupField --- src/lib/BasicEntityRadioGroupField.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/BasicEntityRadioGroupField.tsx b/src/lib/BasicEntityRadioGroupField.tsx index f750d67..680bc68 100644 --- a/src/lib/BasicEntityRadioGroupField.tsx +++ b/src/lib/BasicEntityRadioGroupField.tsx @@ -1,6 +1,6 @@ import React, { useEffect, forwardRef } from "react"; -import { FormControlLabel, Checkbox, Box, RadioGroup, Radio, FormLabel } from "@mui/material"; +import { FormControlLabel, RadioGroup, Radio, FormLabel } from "@mui/material"; import { Controller } from "react-hook-form"; function BasicEntityRadioGroupField(props: any) { From 0c2bd07ea5d4f6fde42309c811cd78a8192d6fe5 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 25 Jul 2024 19:07:03 +0100 Subject: [PATCH 017/122] Add Gubu validation to RadioGroup cmp --- src/lib/BasicEntityRadioGroupField.tsx | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/src/lib/BasicEntityRadioGroupField.tsx b/src/lib/BasicEntityRadioGroupField.tsx index 680bc68..cd19fd6 100644 --- a/src/lib/BasicEntityRadioGroupField.tsx +++ b/src/lib/BasicEntityRadioGroupField.tsx @@ -3,11 +3,32 @@ import React, { useEffect, forwardRef } from "react"; import { FormControlLabel, RadioGroup, Radio, FormLabel } from "@mui/material"; import { Controller } from "react-hook-form"; +import type { Spec } from './basic-types' + +import { Default, Exact, Gubu } from 'gubu' +const CMPNAME = 'BasicEntitySliderField' + +const { Open } = Gubu +const BasicEntityRadioGroupFieldSpecShape = Gubu(Open({ + field: Open({ + id: String, + name: String, + kind: String, + label: Default('', String), + ux: Open({ + kind: Exact('RadioGroup'), + edit: Default(true), + direction: Exact('row', 'column').Default('row'), + }) + }), + errors: Open({}), +}), {name: CMPNAME}) + function BasicEntityRadioGroupField(props: any) { const { spec } = props; - const { field, getValues, control } = spec; - const val = getValues(field.name); + const basicEntityRadioGroupField: Spec = BasicEntityRadioGroupFieldSpecShape(spec) + const { control, field } = basicEntityRadioGroupField return ( <> From 96712590e5368c38134610d2ad1ef58cfcd1281a Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 25 Jul 2024 19:07:25 +0100 Subject: [PATCH 018/122] Update BasicEntityRadioGroupField to use unique keys for FormLabel and Controller --- src/lib/BasicEntityRadioGroupField.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/BasicEntityRadioGroupField.tsx b/src/lib/BasicEntityRadioGroupField.tsx index cd19fd6..8135682 100644 --- a/src/lib/BasicEntityRadioGroupField.tsx +++ b/src/lib/BasicEntityRadioGroupField.tsx @@ -32,13 +32,14 @@ function BasicEntityRadioGroupField(props: any) { return ( <> - {field.label} + {field.label} ( - + {field.options.map((option: any) => ( Date: Thu, 25 Jul 2024 19:08:24 +0100 Subject: [PATCH 019/122] Add key prop to Controller cmp --- src/lib/BasicEntityAutocompleteField.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/BasicEntityAutocompleteField.tsx b/src/lib/BasicEntityAutocompleteField.tsx index 558d072..66a4876 100644 --- a/src/lib/BasicEntityAutocompleteField.tsx +++ b/src/lib/BasicEntityAutocompleteField.tsx @@ -40,6 +40,7 @@ function BasicEntityAutocompleteField(props: any) { return ( Date: Thu, 25 Jul 2024 19:11:03 +0100 Subject: [PATCH 020/122] Update BasicEntitySliderField component with key attributes --- src/lib/BasicEntitySliderField.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/BasicEntitySliderField.tsx b/src/lib/BasicEntitySliderField.tsx index 4491fdc..5756901 100644 --- a/src/lib/BasicEntitySliderField.tsx +++ b/src/lib/BasicEntitySliderField.tsx @@ -42,8 +42,9 @@ function BasicEntitySliderField(props: any) { return ( <> - {field.label} + {field.label} Date: Thu, 25 Jul 2024 19:12:25 +0100 Subject: [PATCH 021/122] Refactor BasicEntityAutocompleteField component --- src/lib/BasicEntityAutocompleteField.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib/BasicEntityAutocompleteField.tsx b/src/lib/BasicEntityAutocompleteField.tsx index 66a4876..61a8ed1 100644 --- a/src/lib/BasicEntityAutocompleteField.tsx +++ b/src/lib/BasicEntityAutocompleteField.tsx @@ -40,13 +40,12 @@ function BasicEntityAutocompleteField(props: any) { return ( ( Date: Thu, 25 Jul 2024 19:14:12 +0100 Subject: [PATCH 022/122] Refactor BasicEntityRadioGroupField component to use unique keys for FormLabel and Controller --- src/lib/BasicEntityRadioGroupField.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/BasicEntityRadioGroupField.tsx b/src/lib/BasicEntityRadioGroupField.tsx index 8135682..7221225 100644 --- a/src/lib/BasicEntityRadioGroupField.tsx +++ b/src/lib/BasicEntityRadioGroupField.tsx @@ -32,9 +32,9 @@ function BasicEntityRadioGroupField(props: any) { return ( <> - {field.label} + {field.label} {field.options.map((option: any) => ( } label={option.label} From e6c963b967d49bf9e448584923b01a7802edc8f7 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 25 Jul 2024 19:29:43 +0100 Subject: [PATCH 023/122] Add Gubu validation to CheckBox component --- dist/voxgig-model-react.es.js | 152 ++++++++++++++------------- dist/voxgig-model-react.umd.js | 152 ++++++++++++++------------- src/lib/BasicEntityCheckBoxField.tsx | 27 ++++- 3 files changed, 187 insertions(+), 144 deletions(-) diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index 335fa9f..805233a 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -1030,21 +1030,15 @@ function requireReactJsxRuntime_development() { } return reactJsxRuntime_development; } -var jsxRuntime$1 = jsxRuntime$2.exports; -var hasRequiredJsxRuntime; -function requireJsxRuntime() { - if (hasRequiredJsxRuntime) return jsxRuntime$2.exports; - hasRequiredJsxRuntime = 1; - "use strict"; - if (process.env.NODE_ENV === "production") { - jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); - } else { - jsxRuntime$2.exports = requireReactJsxRuntime_development(); - } - return jsxRuntime$2.exports; +var jsxRuntime = jsxRuntime$2.exports; +"use strict"; +if (process.env.NODE_ENV === "production") { + jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); +} else { + jsxRuntime$2.exports = requireReactJsxRuntime_development(); } -var jsxRuntimeExports = requireJsxRuntime(); -const jsxRuntime = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); +var jsxRuntimeExports = jsxRuntime$2.exports; +const jsxRuntime$1 = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); var gubu_min$2 = { exports: {} }; var gubu_min = gubu_min$2.exports; (function(module, exports) { @@ -10588,8 +10582,8 @@ process.env.NODE_ENV !== "production" ? Toolbar.propTypes = { */ variant: PropTypes.oneOfType([PropTypes.oneOf(["dense", "regular"]), PropTypes.string]) } : void 0; -const CMPNAME$c = "BasicAccountTool"; -console.log(CMPNAME$c, "1"); +const CMPNAME$d = "BasicAccountTool"; +console.log(CMPNAME$d, "1"); const { Exact: Exact$2 } = gubu_minExports.Gubu; const BasicAccountToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10599,7 +10593,7 @@ const BasicAccountToolSpecShape = gubu_minExports.Gubu({ attr: {}, sx: {}, style: {} -}, { name: CMPNAME$c }); +}, { name: CMPNAME$d }); function BasicAccountTool(props) { var _a; const { ctx, spec } = props; @@ -10673,8 +10667,8 @@ function stringAvatar(s) { children: `${parts.join("")}` }; } -const CMPNAME$b = "BasicHeadTool"; -console.log(CMPNAME$b, "1"); +const CMPNAME$c = "BasicHeadTool"; +console.log(CMPNAME$c, "1"); const { Exact: Exact$1 } = gubu_minExports.Gubu; const BasicHeadToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10684,7 +10678,7 @@ const BasicHeadToolSpecShape = gubu_minExports.Gubu({ attr: {}, sx: {}, style: {} -}, { name: CMPNAME$b }); +}, { name: CMPNAME$c }); function BasicHeadTool(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -10693,7 +10687,7 @@ function BasicHeadTool(props) { const { name, kind, attr, sx, style: style2 } = basicHeadToolSpec; let tool = /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}); if ("" === kind) { - console.warn(CMPNAME$b, "empty-tool-kind", basicHeadToolSpec); + console.warn(CMPNAME$c, "empty-tool-kind", basicHeadToolSpec); } else if ("logo" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsxs( "div", @@ -10710,7 +10704,7 @@ function BasicHeadTool(props) { { href: "/", style: style2, - className: `vxg-${CMPNAME$b}-logo`, + className: `vxg-${CMPNAME$c}-logo`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: attr.img }) } ), @@ -10742,17 +10736,17 @@ function BasicHeadTool(props) { } else if ("account" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsx(BasicAccountTool, { ctx, spec }); } else { - console.warn(CMPNAME$b, "unknown-tool-kind", kind, basicHeadToolSpec); + console.warn(CMPNAME$c, "unknown-tool-kind", kind, basicHeadToolSpec); } return tool; } -const CMPNAME$a = "BasicHead"; -const { Child: Child$5, Exact, Open: Open$8, Required: Required$1 } = gubu_minExports.Gubu; +const CMPNAME$b = "BasicHead"; +const { Child: Child$5, Exact, Open: Open$9, Required: Required$1 } = gubu_minExports.Gubu; const BasicHeadSpecShape = gubu_minExports.Gubu({ head: { name: String, active: Boolean, - tool: Child$5(Open$8({ + tool: Child$5(Open$9({ align: Exact("left", "right") })) }, @@ -10762,7 +10756,7 @@ const BasicHeadSpecShape = gubu_minExports.Gubu({ AppBar: {}, ToolBar: {} } -}, { name: CMPNAME$a }); +}, { name: CMPNAME$b }); function BasicHead(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -25311,7 +25305,7 @@ Object.defineProperty(ArrowDownward, "__esModule", { }); var default_1$x = ArrowDownward.default = void 0; var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); -var _jsxRuntime$x = requireJsxRuntime(); +var _jsxRuntime$x = jsxRuntimeExports; var _default$x = default_1$x = ArrowDownward.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); @@ -25324,7 +25318,7 @@ Object.defineProperty(ArrowRight, "__esModule", { }); var default_1$w = ArrowRight.default = void 0; var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); -var _jsxRuntime$w = requireJsxRuntime(); +var _jsxRuntime$w = jsxRuntimeExports; var _default$w = default_1$w = ArrowRight.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); @@ -25337,7 +25331,7 @@ Object.defineProperty(Cancel, "__esModule", { }); var default_1$v = Cancel.default = void 0; var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); -var _jsxRuntime$v = requireJsxRuntime(); +var _jsxRuntime$v = jsxRuntimeExports; var _default$v = default_1$v = Cancel.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); @@ -25350,7 +25344,7 @@ Object.defineProperty(ChevronLeft, "__esModule", { }); var default_1$u = ChevronLeft.default = void 0; var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); -var _jsxRuntime$u = requireJsxRuntime(); +var _jsxRuntime$u = jsxRuntimeExports; var _default$u = default_1$u = ChevronLeft.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); @@ -25363,7 +25357,7 @@ Object.defineProperty(ChevronRight, "__esModule", { }); var default_1$t = ChevronRight.default = void 0; var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); -var _jsxRuntime$t = requireJsxRuntime(); +var _jsxRuntime$t = jsxRuntimeExports; var _default$t = default_1$t = ChevronRight.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); @@ -25376,7 +25370,7 @@ Object.defineProperty(ClearAll, "__esModule", { }); var default_1$s = ClearAll.default = void 0; var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); -var _jsxRuntime$s = requireJsxRuntime(); +var _jsxRuntime$s = jsxRuntimeExports; var _default$s = default_1$s = ClearAll.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); @@ -25389,7 +25383,7 @@ Object.defineProperty(Close, "__esModule", { }); var default_1$r = Close.default = void 0; var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); -var _jsxRuntime$r = requireJsxRuntime(); +var _jsxRuntime$r = jsxRuntimeExports; var _default$r = default_1$r = Close.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); @@ -25402,7 +25396,7 @@ Object.defineProperty(ContentCopy, "__esModule", { }); var default_1$q = ContentCopy.default = void 0; var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); -var _jsxRuntime$q = requireJsxRuntime(); +var _jsxRuntime$q = jsxRuntimeExports; var _default$q = default_1$q = ContentCopy.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); @@ -25415,7 +25409,7 @@ Object.defineProperty(DensityLarge, "__esModule", { }); var default_1$p = DensityLarge.default = void 0; var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); -var _jsxRuntime$p = requireJsxRuntime(); +var _jsxRuntime$p = jsxRuntimeExports; var _default$p = default_1$p = DensityLarge.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); @@ -25428,7 +25422,7 @@ Object.defineProperty(DensityMedium, "__esModule", { }); var default_1$o = DensityMedium.default = void 0; var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); -var _jsxRuntime$o = requireJsxRuntime(); +var _jsxRuntime$o = jsxRuntimeExports; var _default$o = default_1$o = DensityMedium.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); @@ -25441,7 +25435,7 @@ Object.defineProperty(DensitySmall, "__esModule", { }); var default_1$n = DensitySmall.default = void 0; var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); -var _jsxRuntime$n = requireJsxRuntime(); +var _jsxRuntime$n = jsxRuntimeExports; var _default$n = default_1$n = DensitySmall.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); @@ -25454,7 +25448,7 @@ Object.defineProperty(DragHandle, "__esModule", { }); var default_1$m = DragHandle.default = void 0; var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); -var _jsxRuntime$m = requireJsxRuntime(); +var _jsxRuntime$m = jsxRuntimeExports; var _default$m = default_1$m = DragHandle.default = (0, _createSvgIcon$m.default)(/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); @@ -25467,7 +25461,7 @@ Object.defineProperty(DynamicFeed, "__esModule", { }); var default_1$l = DynamicFeed.default = void 0; var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); -var _jsxRuntime$l = requireJsxRuntime(); +var _jsxRuntime$l = jsxRuntimeExports; var _default$l = default_1$l = DynamicFeed.default = (0, _createSvgIcon$l.default)([/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { @@ -25482,7 +25476,7 @@ Object.defineProperty(Edit, "__esModule", { }); var default_1$k = Edit.default = void 0; var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); -var _jsxRuntime$k = requireJsxRuntime(); +var _jsxRuntime$k = jsxRuntimeExports; var _default$k = default_1$k = Edit.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); @@ -25495,7 +25489,7 @@ Object.defineProperty(ExpandMore, "__esModule", { }); var default_1$j = ExpandMore.default = void 0; var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); -var _jsxRuntime$j = requireJsxRuntime(); +var _jsxRuntime$j = jsxRuntimeExports; var _default$j = default_1$j = ExpandMore.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); @@ -25508,7 +25502,7 @@ Object.defineProperty(FilterAlt, "__esModule", { }); var default_1$i = FilterAlt.default = void 0; var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); -var _jsxRuntime$i = requireJsxRuntime(); +var _jsxRuntime$i = jsxRuntimeExports; var _default$i = default_1$i = FilterAlt.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); @@ -25521,7 +25515,7 @@ Object.defineProperty(FilterList, "__esModule", { }); var default_1$h = FilterList.default = void 0; var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); -var _jsxRuntime$h = requireJsxRuntime(); +var _jsxRuntime$h = jsxRuntimeExports; var _default$h = default_1$h = FilterList.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); @@ -25534,7 +25528,7 @@ Object.defineProperty(FilterListOff, "__esModule", { }); var default_1$g = FilterListOff.default = void 0; var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); -var _jsxRuntime$g = requireJsxRuntime(); +var _jsxRuntime$g = jsxRuntimeExports; var _default$g = default_1$g = FilterListOff.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); @@ -25547,7 +25541,7 @@ Object.defineProperty(FirstPage, "__esModule", { }); var default_1$f = FirstPage.default = void 0; var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); -var _jsxRuntime$f = requireJsxRuntime(); +var _jsxRuntime$f = jsxRuntimeExports; var _default$f = default_1$f = FirstPage.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); @@ -25560,7 +25554,7 @@ Object.defineProperty(Fullscreen, "__esModule", { }); var default_1$e = Fullscreen.default = void 0; var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); -var _jsxRuntime$e = requireJsxRuntime(); +var _jsxRuntime$e = jsxRuntimeExports; var _default$e = default_1$e = Fullscreen.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); @@ -25573,7 +25567,7 @@ Object.defineProperty(FullscreenExit, "__esModule", { }); var default_1$d = FullscreenExit.default = void 0; var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); -var _jsxRuntime$d = requireJsxRuntime(); +var _jsxRuntime$d = jsxRuntimeExports; var _default$d = default_1$d = FullscreenExit.default = (0, _createSvgIcon$d.default)(/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); @@ -25586,7 +25580,7 @@ Object.defineProperty(KeyboardDoubleArrowDown, "__esModule", { }); var default_1$c = KeyboardDoubleArrowDown.default = void 0; var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); -var _jsxRuntime$c = requireJsxRuntime(); +var _jsxRuntime$c = jsxRuntimeExports; var _default$c = default_1$c = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$c.default)([/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { @@ -25601,7 +25595,7 @@ Object.defineProperty(LastPage, "__esModule", { }); var default_1$b = LastPage.default = void 0; var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); -var _jsxRuntime$b = requireJsxRuntime(); +var _jsxRuntime$b = jsxRuntimeExports; var _default$b = default_1$b = LastPage.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); @@ -25614,7 +25608,7 @@ Object.defineProperty(MoreHoriz, "__esModule", { }); var default_1$a = MoreHoriz.default = void 0; var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); -var _jsxRuntime$a = requireJsxRuntime(); +var _jsxRuntime$a = jsxRuntimeExports; var _default$a = default_1$a = MoreHoriz.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); @@ -25627,7 +25621,7 @@ Object.defineProperty(MoreVert, "__esModule", { }); var default_1$9 = MoreVert.default = void 0; var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); -var _jsxRuntime$9 = requireJsxRuntime(); +var _jsxRuntime$9 = jsxRuntimeExports; var _default$9 = default_1$9 = MoreVert.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); @@ -25640,7 +25634,7 @@ Object.defineProperty(PushPin, "__esModule", { }); var default_1$8 = PushPin.default = void 0; var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); -var _jsxRuntime$8 = requireJsxRuntime(); +var _jsxRuntime$8 = jsxRuntimeExports; var _default$8 = default_1$8 = PushPin.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" @@ -25654,7 +25648,7 @@ Object.defineProperty(RestartAlt, "__esModule", { }); var default_1$7 = RestartAlt.default = void 0; var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); -var _jsxRuntime$7 = requireJsxRuntime(); +var _jsxRuntime$7 = jsxRuntimeExports; var _default$7 = default_1$7 = RestartAlt.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); @@ -25667,7 +25661,7 @@ Object.defineProperty(Save, "__esModule", { }); var default_1$6 = Save.default = void 0; var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); -var _jsxRuntime$6 = requireJsxRuntime(); +var _jsxRuntime$6 = jsxRuntimeExports; var _default$6 = default_1$6 = Save.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); @@ -25680,7 +25674,7 @@ Object.defineProperty(Search, "__esModule", { }); var default_1$5 = Search.default = void 0; var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); -var _jsxRuntime$5 = requireJsxRuntime(); +var _jsxRuntime$5 = jsxRuntimeExports; var _default$5 = default_1$5 = Search.default = (0, _createSvgIcon$5.default)(/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); @@ -25693,7 +25687,7 @@ Object.defineProperty(SearchOff, "__esModule", { }); var default_1$4 = SearchOff.default = void 0; var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); -var _jsxRuntime$4 = requireJsxRuntime(); +var _jsxRuntime$4 = jsxRuntimeExports; var _default$4 = default_1$4 = SearchOff.default = (0, _createSvgIcon$4.default)([/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { @@ -25708,7 +25702,7 @@ Object.defineProperty(Sort, "__esModule", { }); var default_1$3 = Sort.default = void 0; var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); -var _jsxRuntime$3 = requireJsxRuntime(); +var _jsxRuntime$3 = jsxRuntimeExports; var _default$3 = default_1$3 = Sort.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); @@ -25721,7 +25715,7 @@ Object.defineProperty(SyncAlt, "__esModule", { }); var default_1$2 = SyncAlt.default = void 0; var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); -var _jsxRuntime$2 = requireJsxRuntime(); +var _jsxRuntime$2 = jsxRuntimeExports; var _default$2 = default_1$2 = SyncAlt.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); @@ -25734,7 +25728,7 @@ Object.defineProperty(ViewColumn, "__esModule", { }); var default_1$1 = ViewColumn.default = void 0; var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); -var _jsxRuntime$1 = requireJsxRuntime(); +var _jsxRuntime$1 = jsxRuntimeExports; var _default$1 = default_1$1 = ViewColumn.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); @@ -25747,7 +25741,7 @@ Object.defineProperty(VisibilityOff, "__esModule", { }); var default_1 = VisibilityOff.default = void 0; var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); -var _jsxRuntime = requireJsxRuntime(); +var _jsxRuntime = jsxRuntimeExports; var _default = default_1 = VisibilityOff.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); @@ -62706,8 +62700,8 @@ const MaterialReactTable = (props) => { } return jsxRuntimeExports.jsx(MRT_TablePaper, { table }); }; -const { Open: Open$7, Child: Child$4 } = gubu_minExports.Gubu; -const Shape$2 = gubu_minExports.Gubu(Open$7({ +const { Open: Open$8, Child: Child$4 } = gubu_minExports.Gubu; +const Shape$2 = gubu_minExports.Gubu(Open$8({ name: String, prefix: String, ent: String, @@ -62752,7 +62746,7 @@ Object.assign(VxgBasicEntityListPlugin, { } }); Object.defineProperty(VxgBasicEntityListPlugin, "name", { value: "VxgBasicEntityListPlugin" }); -const CMPNAME$9 = "BasicEntityList"; +const CMPNAME$a = "BasicEntityList"; function BasicEntityList(props) { const { ctx } = props; const { seneca } = ctx(); @@ -64672,17 +64666,32 @@ function useForm(props = {}) { _formControl.current.formState = getProxyFormState(formState, control); return _formControl.current; } +const CMPNAME$9 = "BasicEntitySliderField"; +const { Open: Open$7 } = gubu_minExports.Gubu; +const BasicEntityCheckBoxFieldSpecShape = gubu_minExports.Gubu(Open$7({ + field: Open$7({ + id: String, + name: String, + kind: String, + label: gubu_minExports.Default("", String), + ux: Open$7({ + kind: gubu_minExports.Exact("CheckBox"), + edit: gubu_minExports.Default(true), + props: Open$7({}) + }) + }), + errors: Open$7({}) +}), { name: CMPNAME$9 }); function BasicEntityCheckBoxField(props) { const { spec } = props; - const { field, getValues, control } = spec; + const basicEntityCheckBoxField = BasicEntityCheckBoxFieldSpecShape(spec); + const { control, field, getValues } = basicEntityCheckBoxField; const val = getValues(field.name); + console.log("BasicEntityCheckBoxField", field.ux.props); return /* @__PURE__ */ jsxRuntimeExports.jsx( Box$2, { - display: "flex", - justifyContent: field.ux.justifyContent || "center", - alignItems: field.ux.alignItems || "center", - height: field.ux.height || "auto", + sx: __spreadValues({}, field.ux.props), children: /* @__PURE__ */ jsxRuntimeExports.jsx( FormControlLabel$1, { @@ -64702,13 +64711,14 @@ function BasicEntityCheckBoxField(props) { required: field.ux.required || false } ) - } + }, + `${field.id}-controller` ), label: field.label } ) }, - field.id + `${field.id}-box` ); } const CMPNAME$8 = "BasicEntityField"; diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index 553085a..9d87718 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -1042,21 +1042,15 @@ var __async = (__this, __arguments, generator) => { } return reactJsxRuntime_development; } - var jsxRuntime$1 = jsxRuntime$2.exports; - var hasRequiredJsxRuntime; - function requireJsxRuntime() { - if (hasRequiredJsxRuntime) return jsxRuntime$2.exports; - hasRequiredJsxRuntime = 1; - "use strict"; - if (process.env.NODE_ENV === "production") { - jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); - } else { - jsxRuntime$2.exports = requireReactJsxRuntime_development(); - } - return jsxRuntime$2.exports; + var jsxRuntime = jsxRuntime$2.exports; + "use strict"; + if (process.env.NODE_ENV === "production") { + jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); + } else { + jsxRuntime$2.exports = requireReactJsxRuntime_development(); } - var jsxRuntimeExports = requireJsxRuntime(); - const jsxRuntime = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); + var jsxRuntimeExports = jsxRuntime$2.exports; + const jsxRuntime$1 = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); var gubu_min$2 = { exports: {} }; var gubu_min = gubu_min$2.exports; (function(module2, exports3) { @@ -10600,8 +10594,8 @@ try { */ variant: PropTypes.oneOfType([PropTypes.oneOf(["dense", "regular"]), PropTypes.string]) } : void 0; - const CMPNAME$c = "BasicAccountTool"; - console.log(CMPNAME$c, "1"); + const CMPNAME$d = "BasicAccountTool"; + console.log(CMPNAME$d, "1"); const { Exact: Exact$2 } = gubu_minExports.Gubu; const BasicAccountToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10611,7 +10605,7 @@ try { attr: {}, sx: {}, style: {} - }, { name: CMPNAME$c }); + }, { name: CMPNAME$d }); function BasicAccountTool(props) { var _a; const { ctx, spec } = props; @@ -10685,8 +10679,8 @@ try { children: `${parts.join("")}` }; } - const CMPNAME$b = "BasicHeadTool"; - console.log(CMPNAME$b, "1"); + const CMPNAME$c = "BasicHeadTool"; + console.log(CMPNAME$c, "1"); const { Exact: Exact$1 } = gubu_minExports.Gubu; const BasicHeadToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10696,7 +10690,7 @@ try { attr: {}, sx: {}, style: {} - }, { name: CMPNAME$b }); + }, { name: CMPNAME$c }); function BasicHeadTool(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -10705,7 +10699,7 @@ try { const { name, kind, attr, sx, style: style2 } = basicHeadToolSpec; let tool = /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}); if ("" === kind) { - console.warn(CMPNAME$b, "empty-tool-kind", basicHeadToolSpec); + console.warn(CMPNAME$c, "empty-tool-kind", basicHeadToolSpec); } else if ("logo" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsxs( "div", @@ -10722,7 +10716,7 @@ try { { href: "/", style: style2, - className: `vxg-${CMPNAME$b}-logo`, + className: `vxg-${CMPNAME$c}-logo`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: attr.img }) } ), @@ -10754,17 +10748,17 @@ try { } else if ("account" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsx(BasicAccountTool, { ctx, spec }); } else { - console.warn(CMPNAME$b, "unknown-tool-kind", kind, basicHeadToolSpec); + console.warn(CMPNAME$c, "unknown-tool-kind", kind, basicHeadToolSpec); } return tool; } - const CMPNAME$a = "BasicHead"; - const { Child: Child$5, Exact, Open: Open$8, Required: Required$1 } = gubu_minExports.Gubu; + const CMPNAME$b = "BasicHead"; + const { Child: Child$5, Exact, Open: Open$9, Required: Required$1 } = gubu_minExports.Gubu; const BasicHeadSpecShape = gubu_minExports.Gubu({ head: { name: String, active: Boolean, - tool: Child$5(Open$8({ + tool: Child$5(Open$9({ align: Exact("left", "right") })) }, @@ -10774,7 +10768,7 @@ try { AppBar: {}, ToolBar: {} } - }, { name: CMPNAME$a }); + }, { name: CMPNAME$b }); function BasicHead(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -25323,7 +25317,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$x = ArrowDownward.default = void 0; var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); - var _jsxRuntime$x = requireJsxRuntime(); + var _jsxRuntime$x = jsxRuntimeExports; var _default$x = default_1$x = ArrowDownward.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); @@ -25336,7 +25330,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$w = ArrowRight.default = void 0; var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); - var _jsxRuntime$w = requireJsxRuntime(); + var _jsxRuntime$w = jsxRuntimeExports; var _default$w = default_1$w = ArrowRight.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); @@ -25349,7 +25343,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$v = Cancel.default = void 0; var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); - var _jsxRuntime$v = requireJsxRuntime(); + var _jsxRuntime$v = jsxRuntimeExports; var _default$v = default_1$v = Cancel.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); @@ -25362,7 +25356,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$u = ChevronLeft.default = void 0; var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); - var _jsxRuntime$u = requireJsxRuntime(); + var _jsxRuntime$u = jsxRuntimeExports; var _default$u = default_1$u = ChevronLeft.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); @@ -25375,7 +25369,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$t = ChevronRight.default = void 0; var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); - var _jsxRuntime$t = requireJsxRuntime(); + var _jsxRuntime$t = jsxRuntimeExports; var _default$t = default_1$t = ChevronRight.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); @@ -25388,7 +25382,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$s = ClearAll.default = void 0; var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); - var _jsxRuntime$s = requireJsxRuntime(); + var _jsxRuntime$s = jsxRuntimeExports; var _default$s = default_1$s = ClearAll.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); @@ -25401,7 +25395,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$r = Close.default = void 0; var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); - var _jsxRuntime$r = requireJsxRuntime(); + var _jsxRuntime$r = jsxRuntimeExports; var _default$r = default_1$r = Close.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); @@ -25414,7 +25408,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$q = ContentCopy.default = void 0; var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); - var _jsxRuntime$q = requireJsxRuntime(); + var _jsxRuntime$q = jsxRuntimeExports; var _default$q = default_1$q = ContentCopy.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); @@ -25427,7 +25421,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$p = DensityLarge.default = void 0; var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); - var _jsxRuntime$p = requireJsxRuntime(); + var _jsxRuntime$p = jsxRuntimeExports; var _default$p = default_1$p = DensityLarge.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); @@ -25440,7 +25434,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$o = DensityMedium.default = void 0; var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); - var _jsxRuntime$o = requireJsxRuntime(); + var _jsxRuntime$o = jsxRuntimeExports; var _default$o = default_1$o = DensityMedium.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); @@ -25453,7 +25447,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$n = DensitySmall.default = void 0; var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); - var _jsxRuntime$n = requireJsxRuntime(); + var _jsxRuntime$n = jsxRuntimeExports; var _default$n = default_1$n = DensitySmall.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); @@ -25466,7 +25460,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$m = DragHandle.default = void 0; var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); - var _jsxRuntime$m = requireJsxRuntime(); + var _jsxRuntime$m = jsxRuntimeExports; var _default$m = default_1$m = DragHandle.default = (0, _createSvgIcon$m.default)(/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); @@ -25479,7 +25473,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$l = DynamicFeed.default = void 0; var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); - var _jsxRuntime$l = requireJsxRuntime(); + var _jsxRuntime$l = jsxRuntimeExports; var _default$l = default_1$l = DynamicFeed.default = (0, _createSvgIcon$l.default)([/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { @@ -25494,7 +25488,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$k = Edit.default = void 0; var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); - var _jsxRuntime$k = requireJsxRuntime(); + var _jsxRuntime$k = jsxRuntimeExports; var _default$k = default_1$k = Edit.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); @@ -25507,7 +25501,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$j = ExpandMore.default = void 0; var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); - var _jsxRuntime$j = requireJsxRuntime(); + var _jsxRuntime$j = jsxRuntimeExports; var _default$j = default_1$j = ExpandMore.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); @@ -25520,7 +25514,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$i = FilterAlt.default = void 0; var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); - var _jsxRuntime$i = requireJsxRuntime(); + var _jsxRuntime$i = jsxRuntimeExports; var _default$i = default_1$i = FilterAlt.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); @@ -25533,7 +25527,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$h = FilterList.default = void 0; var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); - var _jsxRuntime$h = requireJsxRuntime(); + var _jsxRuntime$h = jsxRuntimeExports; var _default$h = default_1$h = FilterList.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); @@ -25546,7 +25540,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$g = FilterListOff.default = void 0; var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); - var _jsxRuntime$g = requireJsxRuntime(); + var _jsxRuntime$g = jsxRuntimeExports; var _default$g = default_1$g = FilterListOff.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); @@ -25559,7 +25553,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$f = FirstPage.default = void 0; var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); - var _jsxRuntime$f = requireJsxRuntime(); + var _jsxRuntime$f = jsxRuntimeExports; var _default$f = default_1$f = FirstPage.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); @@ -25572,7 +25566,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$e = Fullscreen.default = void 0; var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); - var _jsxRuntime$e = requireJsxRuntime(); + var _jsxRuntime$e = jsxRuntimeExports; var _default$e = default_1$e = Fullscreen.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); @@ -25585,7 +25579,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$d = FullscreenExit.default = void 0; var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); - var _jsxRuntime$d = requireJsxRuntime(); + var _jsxRuntime$d = jsxRuntimeExports; var _default$d = default_1$d = FullscreenExit.default = (0, _createSvgIcon$d.default)(/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); @@ -25598,7 +25592,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$c = KeyboardDoubleArrowDown.default = void 0; var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); - var _jsxRuntime$c = requireJsxRuntime(); + var _jsxRuntime$c = jsxRuntimeExports; var _default$c = default_1$c = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$c.default)([/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { @@ -25613,7 +25607,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$b = LastPage.default = void 0; var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); - var _jsxRuntime$b = requireJsxRuntime(); + var _jsxRuntime$b = jsxRuntimeExports; var _default$b = default_1$b = LastPage.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); @@ -25626,7 +25620,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$a = MoreHoriz.default = void 0; var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); - var _jsxRuntime$a = requireJsxRuntime(); + var _jsxRuntime$a = jsxRuntimeExports; var _default$a = default_1$a = MoreHoriz.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); @@ -25639,7 +25633,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$9 = MoreVert.default = void 0; var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); - var _jsxRuntime$9 = requireJsxRuntime(); + var _jsxRuntime$9 = jsxRuntimeExports; var _default$9 = default_1$9 = MoreVert.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); @@ -25652,7 +25646,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$8 = PushPin.default = void 0; var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); - var _jsxRuntime$8 = requireJsxRuntime(); + var _jsxRuntime$8 = jsxRuntimeExports; var _default$8 = default_1$8 = PushPin.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" @@ -25666,7 +25660,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$7 = RestartAlt.default = void 0; var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); - var _jsxRuntime$7 = requireJsxRuntime(); + var _jsxRuntime$7 = jsxRuntimeExports; var _default$7 = default_1$7 = RestartAlt.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); @@ -25679,7 +25673,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$6 = Save.default = void 0; var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); - var _jsxRuntime$6 = requireJsxRuntime(); + var _jsxRuntime$6 = jsxRuntimeExports; var _default$6 = default_1$6 = Save.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); @@ -25692,7 +25686,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$5 = Search.default = void 0; var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); - var _jsxRuntime$5 = requireJsxRuntime(); + var _jsxRuntime$5 = jsxRuntimeExports; var _default$5 = default_1$5 = Search.default = (0, _createSvgIcon$5.default)(/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); @@ -25705,7 +25699,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$4 = SearchOff.default = void 0; var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); - var _jsxRuntime$4 = requireJsxRuntime(); + var _jsxRuntime$4 = jsxRuntimeExports; var _default$4 = default_1$4 = SearchOff.default = (0, _createSvgIcon$4.default)([/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { @@ -25720,7 +25714,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$3 = Sort.default = void 0; var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); - var _jsxRuntime$3 = requireJsxRuntime(); + var _jsxRuntime$3 = jsxRuntimeExports; var _default$3 = default_1$3 = Sort.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); @@ -25733,7 +25727,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$2 = SyncAlt.default = void 0; var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); - var _jsxRuntime$2 = requireJsxRuntime(); + var _jsxRuntime$2 = jsxRuntimeExports; var _default$2 = default_1$2 = SyncAlt.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); @@ -25746,7 +25740,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$1 = ViewColumn.default = void 0; var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); - var _jsxRuntime$1 = requireJsxRuntime(); + var _jsxRuntime$1 = jsxRuntimeExports; var _default$1 = default_1$1 = ViewColumn.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); @@ -25759,7 +25753,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1 = VisibilityOff.default = void 0; var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); - var _jsxRuntime = requireJsxRuntime(); + var _jsxRuntime = jsxRuntimeExports; var _default = default_1 = VisibilityOff.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); @@ -62718,8 +62712,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } return jsxRuntimeExports.jsx(MRT_TablePaper, { table }); }; - const { Open: Open$7, Child: Child$4 } = gubu_minExports.Gubu; - const Shape$2 = gubu_minExports.Gubu(Open$7({ + const { Open: Open$8, Child: Child$4 } = gubu_minExports.Gubu; + const Shape$2 = gubu_minExports.Gubu(Open$8({ name: String, prefix: String, ent: String, @@ -62764,7 +62758,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } }); Object.defineProperty(VxgBasicEntityListPlugin, "name", { value: "VxgBasicEntityListPlugin" }); - const CMPNAME$9 = "BasicEntityList"; + const CMPNAME$a = "BasicEntityList"; function BasicEntityList(props) { const { ctx } = props; const { seneca } = ctx(); @@ -64684,17 +64678,32 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha _formControl.current.formState = getProxyFormState(formState, control); return _formControl.current; } + const CMPNAME$9 = "BasicEntitySliderField"; + const { Open: Open$7 } = gubu_minExports.Gubu; + const BasicEntityCheckBoxFieldSpecShape = gubu_minExports.Gubu(Open$7({ + field: Open$7({ + id: String, + name: String, + kind: String, + label: gubu_minExports.Default("", String), + ux: Open$7({ + kind: gubu_minExports.Exact("CheckBox"), + edit: gubu_minExports.Default(true), + props: Open$7({}) + }) + }), + errors: Open$7({}) + }), { name: CMPNAME$9 }); function BasicEntityCheckBoxField(props) { const { spec } = props; - const { field, getValues, control } = spec; + const basicEntityCheckBoxField = BasicEntityCheckBoxFieldSpecShape(spec); + const { control, field, getValues } = basicEntityCheckBoxField; const val = getValues(field.name); + console.log("BasicEntityCheckBoxField", field.ux.props); return /* @__PURE__ */ jsxRuntimeExports.jsx( material.Box, { - display: "flex", - justifyContent: field.ux.justifyContent || "center", - alignItems: field.ux.alignItems || "center", - height: field.ux.height || "auto", + sx: __spreadValues({}, field.ux.props), children: /* @__PURE__ */ jsxRuntimeExports.jsx( material.FormControlLabel, { @@ -64714,13 +64723,14 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha required: field.ux.required || false } ) - } + }, + `${field.id}-controller` ), label: field.label } ) }, - field.id + `${field.id}-box` ); } const CMPNAME$8 = "BasicEntityField"; diff --git a/src/lib/BasicEntityCheckBoxField.tsx b/src/lib/BasicEntityCheckBoxField.tsx index 3df893d..4cdcf0e 100644 --- a/src/lib/BasicEntityCheckBoxField.tsx +++ b/src/lib/BasicEntityCheckBoxField.tsx @@ -7,12 +7,35 @@ import { } from "@mui/material"; import { Controller } from "react-hook-form"; +import type { Spec } from './basic-types' + +import { Default, Exact, Gubu, One } from 'gubu' +const CMPNAME = 'BasicEntitySliderField' + +const { Open } = Gubu +const BasicEntityCheckBoxFieldSpecShape = Gubu(Open({ + field: Open({ + id: String, + name: String, + kind: String, + label: Default('', String), + ux: Open({ + kind: Exact('CheckBox'), + edit: Default(true), + props: Open({}), + }) + }), + errors: Open({}), +}), {name: CMPNAME}) function BasicEntityCheckBoxField(props: any) { const { spec } = props; - const { field, getValues, control } = spec; - const val = getValues(field.name); + const basicEntityCheckBoxField: Spec = BasicEntityCheckBoxFieldSpecShape(spec) + const { control, field, getValues } = basicEntityCheckBoxField + const val = getValues(field.name) + + console.log('BasicEntityCheckBoxField', field.ux.props) return ( Date: Thu, 25 Jul 2024 19:30:03 +0100 Subject: [PATCH 024/122] Adjust components keys to be unique --- src/lib/BasicEntityCheckBoxField.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/lib/BasicEntityCheckBoxField.tsx b/src/lib/BasicEntityCheckBoxField.tsx index 4cdcf0e..034fbb9 100644 --- a/src/lib/BasicEntityCheckBoxField.tsx +++ b/src/lib/BasicEntityCheckBoxField.tsx @@ -39,15 +39,13 @@ function BasicEntityCheckBoxField(props: any) { return ( Date: Thu, 25 Jul 2024 19:34:18 +0100 Subject: [PATCH 025/122] Add Gubu validation to BasicEntityTextField --- dist/BasicEntityCheckBoxField.d.ts | 2 ++ dist/voxgig-model-react.es.js | 20 +++++++++++++++++--- dist/voxgig-model-react.umd.js | 20 +++++++++++++++++--- src/lib/BasicEntityField.tsx | 23 +++++++++++++++++------ 4 files changed, 53 insertions(+), 12 deletions(-) create mode 100644 dist/BasicEntityCheckBoxField.d.ts diff --git a/dist/BasicEntityCheckBoxField.d.ts b/dist/BasicEntityCheckBoxField.d.ts new file mode 100644 index 0000000..3a9d2ea --- /dev/null +++ b/dist/BasicEntityCheckBoxField.d.ts @@ -0,0 +1,2 @@ +declare function BasicEntityCheckBoxField(props: any): import("react/jsx-runtime").JSX.Element; +export { BasicEntityCheckBoxField }; diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index 21e11ca..7744ade 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -64674,7 +64674,22 @@ function useForm(props = {}) { } const CMPNAME$8 = "BasicEntityField"; const { Open: Open$6 } = gubu_minExports.Gubu; -const BasicEntityFieldSpecShape = gubu_minExports.Gubu(Open$6({}), { name: CMPNAME$8 }); +const BasicEntityFieldSpecShape = gubu_minExports.Gubu(Open$6({ + field: Open$6({ + field: Open$6({ + id: String, + name: String, + kind: String, + label: gubu_minExports.Default("", String), + ux: Open$6({ + kind: gubu_minExports.Exact("Text", "TextBox", "Date", "DateTime", "Time"), + edit: gubu_minExports.Default(true), + rows: gubu_minExports.Default(3), + props: Open$6({}) + }) + }) + }) +}), { name: CMPNAME$8 }); const fieldMap = { Text: BasicEntityTextField, TextBox: BasicEntityTextBoxField, @@ -64714,7 +64729,6 @@ function BasicEntityTextField(props) { ] }, field.id); } function BasicEntityTextBoxField(props) { - var _a; const { spec } = props; const { field, register, getValues } = spec; const val = getValues(field.name); @@ -64727,7 +64741,7 @@ function BasicEntityTextBoxField(props) { variant: "outlined", fullWidth: true, multiline: true, - rows: (_a = field.ux.rows) != null ? _a : 3, + rows: field.ux.rows, InputLabelProps: { shrink: (val == null ? void 0 : val.length) > 0 } }, register(field.name)) ) }, field.name); diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index 4cb9563..102a5bc 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -64686,7 +64686,22 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } const CMPNAME$8 = "BasicEntityField"; const { Open: Open$6 } = gubu_minExports.Gubu; - const BasicEntityFieldSpecShape = gubu_minExports.Gubu(Open$6({}), { name: CMPNAME$8 }); + const BasicEntityFieldSpecShape = gubu_minExports.Gubu(Open$6({ + field: Open$6({ + field: Open$6({ + id: String, + name: String, + kind: String, + label: gubu_minExports.Default("", String), + ux: Open$6({ + kind: gubu_minExports.Exact("Text", "TextBox", "Date", "DateTime", "Time"), + edit: gubu_minExports.Default(true), + rows: gubu_minExports.Default(3), + props: Open$6({}) + }) + }) + }) + }), { name: CMPNAME$8 }); const fieldMap = { Text: BasicEntityTextField, TextBox: BasicEntityTextBoxField, @@ -64726,7 +64741,6 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ] }, field.id); } function BasicEntityTextBoxField(props) { - var _a; const { spec } = props; const { field, register, getValues } = spec; const val = getValues(field.name); @@ -64739,7 +64753,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha variant: "outlined", fullWidth: true, multiline: true, - rows: (_a = field.ux.rows) != null ? _a : 3, + rows: field.ux.rows, InputLabelProps: { shrink: (val == null ? void 0 : val.length) > 0 } }, register(field.name)) ) }, field.name); diff --git a/src/lib/BasicEntityField.tsx b/src/lib/BasicEntityField.tsx index 53bcec8..dc1e058 100644 --- a/src/lib/BasicEntityField.tsx +++ b/src/lib/BasicEntityField.tsx @@ -9,17 +9,28 @@ import { import type { Spec } from './basic-types' -import { Gubu } from 'gubu' +import { Default, Exact, Gubu } from 'gubu' const CMPNAME = 'BasicEntityField' const { Open } = Gubu const BasicEntityFieldSpecShape = Gubu(Open({ - + field: Open({ + field: Open({ + id: String, + name: String, + kind: String, + label: Default('', String), + ux: Open({ + kind: Exact('Text', 'TextBox', 'Date', 'DateTime', 'Time'), + edit: Default(true), + rows: Default(3), + props: Open({}), + }) + }), + }) }), {name: CMPNAME}) - - const fieldMap: any = { Text: BasicEntityTextField, TextBox: BasicEntityTextBoxField, @@ -93,8 +104,8 @@ function BasicEntityTextBoxField (props: any) { variant="outlined" fullWidth multiline - rows={field.ux.rows ?? 3} - InputLabelProps={{ shrink: val?.length > 0 }} + rows={field.ux.rows} + InputLabelProps={{ shrink: val?.length > 0 }} {...register(field.name)} /> From 9b6190b665047a441d7007f777998324f5e4d6a3 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 25 Jul 2024 19:35:40 +0100 Subject: [PATCH 026/122] Remove unnecessary prop --- dist/voxgig-model-react.es.js | 93 +++++++++++++++------------- dist/voxgig-model-react.umd.js | 93 +++++++++++++++------------- src/lib/BasicEntityCheckBoxField.tsx | 1 - 3 files changed, 98 insertions(+), 89 deletions(-) diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index 805233a..7d42374 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -1030,15 +1030,21 @@ function requireReactJsxRuntime_development() { } return reactJsxRuntime_development; } -var jsxRuntime = jsxRuntime$2.exports; -"use strict"; -if (process.env.NODE_ENV === "production") { - jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); -} else { - jsxRuntime$2.exports = requireReactJsxRuntime_development(); +var jsxRuntime$1 = jsxRuntime$2.exports; +var hasRequiredJsxRuntime; +function requireJsxRuntime() { + if (hasRequiredJsxRuntime) return jsxRuntime$2.exports; + hasRequiredJsxRuntime = 1; + "use strict"; + if (process.env.NODE_ENV === "production") { + jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); + } else { + jsxRuntime$2.exports = requireReactJsxRuntime_development(); + } + return jsxRuntime$2.exports; } -var jsxRuntimeExports = jsxRuntime$2.exports; -const jsxRuntime$1 = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); +var jsxRuntimeExports = requireJsxRuntime(); +const jsxRuntime = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); var gubu_min$2 = { exports: {} }; var gubu_min = gubu_min$2.exports; (function(module, exports) { @@ -25305,7 +25311,7 @@ Object.defineProperty(ArrowDownward, "__esModule", { }); var default_1$x = ArrowDownward.default = void 0; var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); -var _jsxRuntime$x = jsxRuntimeExports; +var _jsxRuntime$x = requireJsxRuntime(); var _default$x = default_1$x = ArrowDownward.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); @@ -25318,7 +25324,7 @@ Object.defineProperty(ArrowRight, "__esModule", { }); var default_1$w = ArrowRight.default = void 0; var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); -var _jsxRuntime$w = jsxRuntimeExports; +var _jsxRuntime$w = requireJsxRuntime(); var _default$w = default_1$w = ArrowRight.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); @@ -25331,7 +25337,7 @@ Object.defineProperty(Cancel, "__esModule", { }); var default_1$v = Cancel.default = void 0; var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); -var _jsxRuntime$v = jsxRuntimeExports; +var _jsxRuntime$v = requireJsxRuntime(); var _default$v = default_1$v = Cancel.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); @@ -25344,7 +25350,7 @@ Object.defineProperty(ChevronLeft, "__esModule", { }); var default_1$u = ChevronLeft.default = void 0; var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); -var _jsxRuntime$u = jsxRuntimeExports; +var _jsxRuntime$u = requireJsxRuntime(); var _default$u = default_1$u = ChevronLeft.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); @@ -25357,7 +25363,7 @@ Object.defineProperty(ChevronRight, "__esModule", { }); var default_1$t = ChevronRight.default = void 0; var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); -var _jsxRuntime$t = jsxRuntimeExports; +var _jsxRuntime$t = requireJsxRuntime(); var _default$t = default_1$t = ChevronRight.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); @@ -25370,7 +25376,7 @@ Object.defineProperty(ClearAll, "__esModule", { }); var default_1$s = ClearAll.default = void 0; var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); -var _jsxRuntime$s = jsxRuntimeExports; +var _jsxRuntime$s = requireJsxRuntime(); var _default$s = default_1$s = ClearAll.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); @@ -25383,7 +25389,7 @@ Object.defineProperty(Close, "__esModule", { }); var default_1$r = Close.default = void 0; var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); -var _jsxRuntime$r = jsxRuntimeExports; +var _jsxRuntime$r = requireJsxRuntime(); var _default$r = default_1$r = Close.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); @@ -25396,7 +25402,7 @@ Object.defineProperty(ContentCopy, "__esModule", { }); var default_1$q = ContentCopy.default = void 0; var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); -var _jsxRuntime$q = jsxRuntimeExports; +var _jsxRuntime$q = requireJsxRuntime(); var _default$q = default_1$q = ContentCopy.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); @@ -25409,7 +25415,7 @@ Object.defineProperty(DensityLarge, "__esModule", { }); var default_1$p = DensityLarge.default = void 0; var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); -var _jsxRuntime$p = jsxRuntimeExports; +var _jsxRuntime$p = requireJsxRuntime(); var _default$p = default_1$p = DensityLarge.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); @@ -25422,7 +25428,7 @@ Object.defineProperty(DensityMedium, "__esModule", { }); var default_1$o = DensityMedium.default = void 0; var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); -var _jsxRuntime$o = jsxRuntimeExports; +var _jsxRuntime$o = requireJsxRuntime(); var _default$o = default_1$o = DensityMedium.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); @@ -25435,7 +25441,7 @@ Object.defineProperty(DensitySmall, "__esModule", { }); var default_1$n = DensitySmall.default = void 0; var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); -var _jsxRuntime$n = jsxRuntimeExports; +var _jsxRuntime$n = requireJsxRuntime(); var _default$n = default_1$n = DensitySmall.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); @@ -25448,7 +25454,7 @@ Object.defineProperty(DragHandle, "__esModule", { }); var default_1$m = DragHandle.default = void 0; var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); -var _jsxRuntime$m = jsxRuntimeExports; +var _jsxRuntime$m = requireJsxRuntime(); var _default$m = default_1$m = DragHandle.default = (0, _createSvgIcon$m.default)(/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); @@ -25461,7 +25467,7 @@ Object.defineProperty(DynamicFeed, "__esModule", { }); var default_1$l = DynamicFeed.default = void 0; var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); -var _jsxRuntime$l = jsxRuntimeExports; +var _jsxRuntime$l = requireJsxRuntime(); var _default$l = default_1$l = DynamicFeed.default = (0, _createSvgIcon$l.default)([/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { @@ -25476,7 +25482,7 @@ Object.defineProperty(Edit, "__esModule", { }); var default_1$k = Edit.default = void 0; var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); -var _jsxRuntime$k = jsxRuntimeExports; +var _jsxRuntime$k = requireJsxRuntime(); var _default$k = default_1$k = Edit.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); @@ -25489,7 +25495,7 @@ Object.defineProperty(ExpandMore, "__esModule", { }); var default_1$j = ExpandMore.default = void 0; var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); -var _jsxRuntime$j = jsxRuntimeExports; +var _jsxRuntime$j = requireJsxRuntime(); var _default$j = default_1$j = ExpandMore.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); @@ -25502,7 +25508,7 @@ Object.defineProperty(FilterAlt, "__esModule", { }); var default_1$i = FilterAlt.default = void 0; var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); -var _jsxRuntime$i = jsxRuntimeExports; +var _jsxRuntime$i = requireJsxRuntime(); var _default$i = default_1$i = FilterAlt.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); @@ -25515,7 +25521,7 @@ Object.defineProperty(FilterList, "__esModule", { }); var default_1$h = FilterList.default = void 0; var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); -var _jsxRuntime$h = jsxRuntimeExports; +var _jsxRuntime$h = requireJsxRuntime(); var _default$h = default_1$h = FilterList.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); @@ -25528,7 +25534,7 @@ Object.defineProperty(FilterListOff, "__esModule", { }); var default_1$g = FilterListOff.default = void 0; var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); -var _jsxRuntime$g = jsxRuntimeExports; +var _jsxRuntime$g = requireJsxRuntime(); var _default$g = default_1$g = FilterListOff.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); @@ -25541,7 +25547,7 @@ Object.defineProperty(FirstPage, "__esModule", { }); var default_1$f = FirstPage.default = void 0; var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); -var _jsxRuntime$f = jsxRuntimeExports; +var _jsxRuntime$f = requireJsxRuntime(); var _default$f = default_1$f = FirstPage.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); @@ -25554,7 +25560,7 @@ Object.defineProperty(Fullscreen, "__esModule", { }); var default_1$e = Fullscreen.default = void 0; var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); -var _jsxRuntime$e = jsxRuntimeExports; +var _jsxRuntime$e = requireJsxRuntime(); var _default$e = default_1$e = Fullscreen.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); @@ -25567,7 +25573,7 @@ Object.defineProperty(FullscreenExit, "__esModule", { }); var default_1$d = FullscreenExit.default = void 0; var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); -var _jsxRuntime$d = jsxRuntimeExports; +var _jsxRuntime$d = requireJsxRuntime(); var _default$d = default_1$d = FullscreenExit.default = (0, _createSvgIcon$d.default)(/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); @@ -25580,7 +25586,7 @@ Object.defineProperty(KeyboardDoubleArrowDown, "__esModule", { }); var default_1$c = KeyboardDoubleArrowDown.default = void 0; var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); -var _jsxRuntime$c = jsxRuntimeExports; +var _jsxRuntime$c = requireJsxRuntime(); var _default$c = default_1$c = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$c.default)([/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { @@ -25595,7 +25601,7 @@ Object.defineProperty(LastPage, "__esModule", { }); var default_1$b = LastPage.default = void 0; var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); -var _jsxRuntime$b = jsxRuntimeExports; +var _jsxRuntime$b = requireJsxRuntime(); var _default$b = default_1$b = LastPage.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); @@ -25608,7 +25614,7 @@ Object.defineProperty(MoreHoriz, "__esModule", { }); var default_1$a = MoreHoriz.default = void 0; var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); -var _jsxRuntime$a = jsxRuntimeExports; +var _jsxRuntime$a = requireJsxRuntime(); var _default$a = default_1$a = MoreHoriz.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); @@ -25621,7 +25627,7 @@ Object.defineProperty(MoreVert, "__esModule", { }); var default_1$9 = MoreVert.default = void 0; var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); -var _jsxRuntime$9 = jsxRuntimeExports; +var _jsxRuntime$9 = requireJsxRuntime(); var _default$9 = default_1$9 = MoreVert.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); @@ -25634,7 +25640,7 @@ Object.defineProperty(PushPin, "__esModule", { }); var default_1$8 = PushPin.default = void 0; var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); -var _jsxRuntime$8 = jsxRuntimeExports; +var _jsxRuntime$8 = requireJsxRuntime(); var _default$8 = default_1$8 = PushPin.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" @@ -25648,7 +25654,7 @@ Object.defineProperty(RestartAlt, "__esModule", { }); var default_1$7 = RestartAlt.default = void 0; var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); -var _jsxRuntime$7 = jsxRuntimeExports; +var _jsxRuntime$7 = requireJsxRuntime(); var _default$7 = default_1$7 = RestartAlt.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); @@ -25661,7 +25667,7 @@ Object.defineProperty(Save, "__esModule", { }); var default_1$6 = Save.default = void 0; var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); -var _jsxRuntime$6 = jsxRuntimeExports; +var _jsxRuntime$6 = requireJsxRuntime(); var _default$6 = default_1$6 = Save.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); @@ -25674,7 +25680,7 @@ Object.defineProperty(Search, "__esModule", { }); var default_1$5 = Search.default = void 0; var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); -var _jsxRuntime$5 = jsxRuntimeExports; +var _jsxRuntime$5 = requireJsxRuntime(); var _default$5 = default_1$5 = Search.default = (0, _createSvgIcon$5.default)(/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); @@ -25687,7 +25693,7 @@ Object.defineProperty(SearchOff, "__esModule", { }); var default_1$4 = SearchOff.default = void 0; var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); -var _jsxRuntime$4 = jsxRuntimeExports; +var _jsxRuntime$4 = requireJsxRuntime(); var _default$4 = default_1$4 = SearchOff.default = (0, _createSvgIcon$4.default)([/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { @@ -25702,7 +25708,7 @@ Object.defineProperty(Sort, "__esModule", { }); var default_1$3 = Sort.default = void 0; var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); -var _jsxRuntime$3 = jsxRuntimeExports; +var _jsxRuntime$3 = requireJsxRuntime(); var _default$3 = default_1$3 = Sort.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); @@ -25715,7 +25721,7 @@ Object.defineProperty(SyncAlt, "__esModule", { }); var default_1$2 = SyncAlt.default = void 0; var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); -var _jsxRuntime$2 = jsxRuntimeExports; +var _jsxRuntime$2 = requireJsxRuntime(); var _default$2 = default_1$2 = SyncAlt.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); @@ -25728,7 +25734,7 @@ Object.defineProperty(ViewColumn, "__esModule", { }); var default_1$1 = ViewColumn.default = void 0; var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); -var _jsxRuntime$1 = jsxRuntimeExports; +var _jsxRuntime$1 = requireJsxRuntime(); var _default$1 = default_1$1 = ViewColumn.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); @@ -25741,7 +25747,7 @@ Object.defineProperty(VisibilityOff, "__esModule", { }); var default_1 = VisibilityOff.default = void 0; var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); -var _jsxRuntime = jsxRuntimeExports; +var _jsxRuntime = requireJsxRuntime(); var _default = default_1 = VisibilityOff.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); @@ -64679,8 +64685,7 @@ const BasicEntityCheckBoxFieldSpecShape = gubu_minExports.Gubu(Open$7({ edit: gubu_minExports.Default(true), props: Open$7({}) }) - }), - errors: Open$7({}) + }) }), { name: CMPNAME$9 }); function BasicEntityCheckBoxField(props) { const { spec } = props; diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index 9d87718..0070198 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -1042,15 +1042,21 @@ var __async = (__this, __arguments, generator) => { } return reactJsxRuntime_development; } - var jsxRuntime = jsxRuntime$2.exports; - "use strict"; - if (process.env.NODE_ENV === "production") { - jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); - } else { - jsxRuntime$2.exports = requireReactJsxRuntime_development(); + var jsxRuntime$1 = jsxRuntime$2.exports; + var hasRequiredJsxRuntime; + function requireJsxRuntime() { + if (hasRequiredJsxRuntime) return jsxRuntime$2.exports; + hasRequiredJsxRuntime = 1; + "use strict"; + if (process.env.NODE_ENV === "production") { + jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); + } else { + jsxRuntime$2.exports = requireReactJsxRuntime_development(); + } + return jsxRuntime$2.exports; } - var jsxRuntimeExports = jsxRuntime$2.exports; - const jsxRuntime$1 = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); + var jsxRuntimeExports = requireJsxRuntime(); + const jsxRuntime = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); var gubu_min$2 = { exports: {} }; var gubu_min = gubu_min$2.exports; (function(module2, exports3) { @@ -25317,7 +25323,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$x = ArrowDownward.default = void 0; var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); - var _jsxRuntime$x = jsxRuntimeExports; + var _jsxRuntime$x = requireJsxRuntime(); var _default$x = default_1$x = ArrowDownward.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); @@ -25330,7 +25336,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$w = ArrowRight.default = void 0; var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); - var _jsxRuntime$w = jsxRuntimeExports; + var _jsxRuntime$w = requireJsxRuntime(); var _default$w = default_1$w = ArrowRight.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); @@ -25343,7 +25349,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$v = Cancel.default = void 0; var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); - var _jsxRuntime$v = jsxRuntimeExports; + var _jsxRuntime$v = requireJsxRuntime(); var _default$v = default_1$v = Cancel.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); @@ -25356,7 +25362,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$u = ChevronLeft.default = void 0; var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); - var _jsxRuntime$u = jsxRuntimeExports; + var _jsxRuntime$u = requireJsxRuntime(); var _default$u = default_1$u = ChevronLeft.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); @@ -25369,7 +25375,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$t = ChevronRight.default = void 0; var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); - var _jsxRuntime$t = jsxRuntimeExports; + var _jsxRuntime$t = requireJsxRuntime(); var _default$t = default_1$t = ChevronRight.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); @@ -25382,7 +25388,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$s = ClearAll.default = void 0; var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); - var _jsxRuntime$s = jsxRuntimeExports; + var _jsxRuntime$s = requireJsxRuntime(); var _default$s = default_1$s = ClearAll.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); @@ -25395,7 +25401,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$r = Close.default = void 0; var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); - var _jsxRuntime$r = jsxRuntimeExports; + var _jsxRuntime$r = requireJsxRuntime(); var _default$r = default_1$r = Close.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); @@ -25408,7 +25414,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$q = ContentCopy.default = void 0; var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); - var _jsxRuntime$q = jsxRuntimeExports; + var _jsxRuntime$q = requireJsxRuntime(); var _default$q = default_1$q = ContentCopy.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); @@ -25421,7 +25427,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$p = DensityLarge.default = void 0; var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); - var _jsxRuntime$p = jsxRuntimeExports; + var _jsxRuntime$p = requireJsxRuntime(); var _default$p = default_1$p = DensityLarge.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); @@ -25434,7 +25440,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$o = DensityMedium.default = void 0; var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); - var _jsxRuntime$o = jsxRuntimeExports; + var _jsxRuntime$o = requireJsxRuntime(); var _default$o = default_1$o = DensityMedium.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); @@ -25447,7 +25453,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$n = DensitySmall.default = void 0; var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); - var _jsxRuntime$n = jsxRuntimeExports; + var _jsxRuntime$n = requireJsxRuntime(); var _default$n = default_1$n = DensitySmall.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); @@ -25460,7 +25466,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$m = DragHandle.default = void 0; var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); - var _jsxRuntime$m = jsxRuntimeExports; + var _jsxRuntime$m = requireJsxRuntime(); var _default$m = default_1$m = DragHandle.default = (0, _createSvgIcon$m.default)(/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); @@ -25473,7 +25479,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$l = DynamicFeed.default = void 0; var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); - var _jsxRuntime$l = jsxRuntimeExports; + var _jsxRuntime$l = requireJsxRuntime(); var _default$l = default_1$l = DynamicFeed.default = (0, _createSvgIcon$l.default)([/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { @@ -25488,7 +25494,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$k = Edit.default = void 0; var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); - var _jsxRuntime$k = jsxRuntimeExports; + var _jsxRuntime$k = requireJsxRuntime(); var _default$k = default_1$k = Edit.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); @@ -25501,7 +25507,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$j = ExpandMore.default = void 0; var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); - var _jsxRuntime$j = jsxRuntimeExports; + var _jsxRuntime$j = requireJsxRuntime(); var _default$j = default_1$j = ExpandMore.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); @@ -25514,7 +25520,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$i = FilterAlt.default = void 0; var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); - var _jsxRuntime$i = jsxRuntimeExports; + var _jsxRuntime$i = requireJsxRuntime(); var _default$i = default_1$i = FilterAlt.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); @@ -25527,7 +25533,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$h = FilterList.default = void 0; var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); - var _jsxRuntime$h = jsxRuntimeExports; + var _jsxRuntime$h = requireJsxRuntime(); var _default$h = default_1$h = FilterList.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); @@ -25540,7 +25546,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$g = FilterListOff.default = void 0; var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); - var _jsxRuntime$g = jsxRuntimeExports; + var _jsxRuntime$g = requireJsxRuntime(); var _default$g = default_1$g = FilterListOff.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); @@ -25553,7 +25559,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$f = FirstPage.default = void 0; var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); - var _jsxRuntime$f = jsxRuntimeExports; + var _jsxRuntime$f = requireJsxRuntime(); var _default$f = default_1$f = FirstPage.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); @@ -25566,7 +25572,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$e = Fullscreen.default = void 0; var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); - var _jsxRuntime$e = jsxRuntimeExports; + var _jsxRuntime$e = requireJsxRuntime(); var _default$e = default_1$e = Fullscreen.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); @@ -25579,7 +25585,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$d = FullscreenExit.default = void 0; var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); - var _jsxRuntime$d = jsxRuntimeExports; + var _jsxRuntime$d = requireJsxRuntime(); var _default$d = default_1$d = FullscreenExit.default = (0, _createSvgIcon$d.default)(/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); @@ -25592,7 +25598,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$c = KeyboardDoubleArrowDown.default = void 0; var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); - var _jsxRuntime$c = jsxRuntimeExports; + var _jsxRuntime$c = requireJsxRuntime(); var _default$c = default_1$c = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$c.default)([/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { @@ -25607,7 +25613,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$b = LastPage.default = void 0; var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); - var _jsxRuntime$b = jsxRuntimeExports; + var _jsxRuntime$b = requireJsxRuntime(); var _default$b = default_1$b = LastPage.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); @@ -25620,7 +25626,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$a = MoreHoriz.default = void 0; var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); - var _jsxRuntime$a = jsxRuntimeExports; + var _jsxRuntime$a = requireJsxRuntime(); var _default$a = default_1$a = MoreHoriz.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); @@ -25633,7 +25639,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$9 = MoreVert.default = void 0; var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); - var _jsxRuntime$9 = jsxRuntimeExports; + var _jsxRuntime$9 = requireJsxRuntime(); var _default$9 = default_1$9 = MoreVert.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); @@ -25646,7 +25652,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$8 = PushPin.default = void 0; var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); - var _jsxRuntime$8 = jsxRuntimeExports; + var _jsxRuntime$8 = requireJsxRuntime(); var _default$8 = default_1$8 = PushPin.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" @@ -25660,7 +25666,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$7 = RestartAlt.default = void 0; var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); - var _jsxRuntime$7 = jsxRuntimeExports; + var _jsxRuntime$7 = requireJsxRuntime(); var _default$7 = default_1$7 = RestartAlt.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); @@ -25673,7 +25679,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$6 = Save.default = void 0; var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); - var _jsxRuntime$6 = jsxRuntimeExports; + var _jsxRuntime$6 = requireJsxRuntime(); var _default$6 = default_1$6 = Save.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); @@ -25686,7 +25692,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$5 = Search.default = void 0; var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); - var _jsxRuntime$5 = jsxRuntimeExports; + var _jsxRuntime$5 = requireJsxRuntime(); var _default$5 = default_1$5 = Search.default = (0, _createSvgIcon$5.default)(/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); @@ -25699,7 +25705,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$4 = SearchOff.default = void 0; var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); - var _jsxRuntime$4 = jsxRuntimeExports; + var _jsxRuntime$4 = requireJsxRuntime(); var _default$4 = default_1$4 = SearchOff.default = (0, _createSvgIcon$4.default)([/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { @@ -25714,7 +25720,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$3 = Sort.default = void 0; var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); - var _jsxRuntime$3 = jsxRuntimeExports; + var _jsxRuntime$3 = requireJsxRuntime(); var _default$3 = default_1$3 = Sort.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); @@ -25727,7 +25733,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$2 = SyncAlt.default = void 0; var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); - var _jsxRuntime$2 = jsxRuntimeExports; + var _jsxRuntime$2 = requireJsxRuntime(); var _default$2 = default_1$2 = SyncAlt.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); @@ -25740,7 +25746,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$1 = ViewColumn.default = void 0; var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); - var _jsxRuntime$1 = jsxRuntimeExports; + var _jsxRuntime$1 = requireJsxRuntime(); var _default$1 = default_1$1 = ViewColumn.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); @@ -25753,7 +25759,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1 = VisibilityOff.default = void 0; var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); - var _jsxRuntime = jsxRuntimeExports; + var _jsxRuntime = requireJsxRuntime(); var _default = default_1 = VisibilityOff.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); @@ -64691,8 +64697,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha edit: gubu_minExports.Default(true), props: Open$7({}) }) - }), - errors: Open$7({}) + }) }), { name: CMPNAME$9 }); function BasicEntityCheckBoxField(props) { const { spec } = props; diff --git a/src/lib/BasicEntityCheckBoxField.tsx b/src/lib/BasicEntityCheckBoxField.tsx index 034fbb9..f46c8b6 100644 --- a/src/lib/BasicEntityCheckBoxField.tsx +++ b/src/lib/BasicEntityCheckBoxField.tsx @@ -25,7 +25,6 @@ const BasicEntityCheckBoxFieldSpecShape = Gubu(Open({ props: Open({}), }) }), - errors: Open({}), }), {name: CMPNAME}) function BasicEntityCheckBoxField(props: any) { From ae7c337a6f6469f12b72490a8cb38d76e9f67b31 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 25 Jul 2024 19:36:25 +0100 Subject: [PATCH 027/122] Remove unnecessary prop in Gubu shape --- src/lib/BasicEntitySliderField.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib/BasicEntitySliderField.tsx b/src/lib/BasicEntitySliderField.tsx index 5756901..2d958e6 100644 --- a/src/lib/BasicEntitySliderField.tsx +++ b/src/lib/BasicEntitySliderField.tsx @@ -27,8 +27,7 @@ const BasicEntitySliderFieldSpecShape = Gubu(Open({ track: Exact('normal', 'inverted', 'disabled').Default('normal'), }, }) - }), - errors: Open({}), + }) }), {name: CMPNAME}) function BasicEntitySliderField(props: any) { From 149e511f551c9d3289e8b8b8f3d468742f7cac27 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 25 Jul 2024 19:37:18 +0100 Subject: [PATCH 028/122] Remove unnecessary prop in Gubu shape --- dist/voxgig-model-react.es.js | 9 ++++----- dist/voxgig-model-react.umd.js | 9 ++++----- src/lib/BasicEntityAutocompleteField.tsx | 3 +-- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index 4c7817d..07dd080 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -64684,8 +64684,7 @@ const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu(Open$7({ kind: gubu_minExports.Exact("Autocomplete"), edit: gubu_minExports.Default(true) }) - }), - errors: Open$7({}) + }) }), { name: CMPNAME$9 }); function BasicEntityAutocompleteField(props) { const { spec } = props; @@ -64710,10 +64709,10 @@ function BasicEntityAutocompleteField(props) { value, onChange: (_2, newVal) => onChange(newVal), renderInput: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx(TextField$1, __spreadProps(__spreadValues({}, params), { label: field.label })) - }, - field.id + } ) - } + }, + `${field.id}-controller` ); } function resolveOptions(options) { diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index e267067..ffb79bd 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -64696,8 +64696,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha kind: gubu_minExports.Exact("Autocomplete"), edit: gubu_minExports.Default(true) }) - }), - errors: Open$7({}) + }) }), { name: CMPNAME$9 }); function BasicEntityAutocompleteField(props) { const { spec } = props; @@ -64722,10 +64721,10 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha value, onChange: (_2, newVal) => onChange(newVal), renderInput: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.TextField, __spreadProps(__spreadValues({}, params), { label: field.label })) - }, - field.id + } ) - } + }, + `${field.id}-controller` ); } function resolveOptions(options) { diff --git a/src/lib/BasicEntityAutocompleteField.tsx b/src/lib/BasicEntityAutocompleteField.tsx index 61a8ed1..bd42836 100644 --- a/src/lib/BasicEntityAutocompleteField.tsx +++ b/src/lib/BasicEntityAutocompleteField.tsx @@ -25,8 +25,7 @@ const BasicEntityAutocompleteFieldSpecShape = Gubu(Open({ kind: Exact('Autocomplete'), edit: Default(true), }) - }), - errors: Open({}), + }) }), {name: CMPNAME}) function BasicEntityAutocompleteField(props: any) { From 680ea74b2b0dc119fbc892a8c096b7db430fb7ca Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 25 Jul 2024 19:38:05 +0100 Subject: [PATCH 029/122] Remove unnecessary prop in Gubu shape --- dist/BasicEntityAutocompleteField.d.ts | 2 + dist/voxgig-model-react.es.js | 167 +++++++++++++------------ dist/voxgig-model-react.umd.js | 167 +++++++++++++------------ src/lib/BasicEntityRadioGroupField.tsx | 3 +- 4 files changed, 177 insertions(+), 162 deletions(-) create mode 100644 dist/BasicEntityAutocompleteField.d.ts diff --git a/dist/BasicEntityAutocompleteField.d.ts b/dist/BasicEntityAutocompleteField.d.ts new file mode 100644 index 0000000..cf25015 --- /dev/null +++ b/dist/BasicEntityAutocompleteField.d.ts @@ -0,0 +1,2 @@ +declare function BasicEntityAutocompleteField(props: any): import("react/jsx-runtime").JSX.Element; +export { BasicEntityAutocompleteField }; diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index 681fe84..1bd28f7 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -1030,21 +1030,15 @@ function requireReactJsxRuntime_development() { } return reactJsxRuntime_development; } -var jsxRuntime$1 = jsxRuntime$2.exports; -var hasRequiredJsxRuntime; -function requireJsxRuntime() { - if (hasRequiredJsxRuntime) return jsxRuntime$2.exports; - hasRequiredJsxRuntime = 1; - "use strict"; - if (process.env.NODE_ENV === "production") { - jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); - } else { - jsxRuntime$2.exports = requireReactJsxRuntime_development(); - } - return jsxRuntime$2.exports; +var jsxRuntime = jsxRuntime$2.exports; +"use strict"; +if (process.env.NODE_ENV === "production") { + jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); +} else { + jsxRuntime$2.exports = requireReactJsxRuntime_development(); } -var jsxRuntimeExports = requireJsxRuntime(); -const jsxRuntime = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); +var jsxRuntimeExports = jsxRuntime$2.exports; +const jsxRuntime$1 = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); var gubu_min$2 = { exports: {} }; var gubu_min = gubu_min$2.exports; (function(module, exports) { @@ -10588,8 +10582,8 @@ process.env.NODE_ENV !== "production" ? Toolbar.propTypes = { */ variant: PropTypes.oneOfType([PropTypes.oneOf(["dense", "regular"]), PropTypes.string]) } : void 0; -const CMPNAME$c = "BasicAccountTool"; -console.log(CMPNAME$c, "1"); +const CMPNAME$d = "BasicAccountTool"; +console.log(CMPNAME$d, "1"); const { Exact: Exact$2 } = gubu_minExports.Gubu; const BasicAccountToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10599,7 +10593,7 @@ const BasicAccountToolSpecShape = gubu_minExports.Gubu({ attr: {}, sx: {}, style: {} -}, { name: CMPNAME$c }); +}, { name: CMPNAME$d }); function BasicAccountTool(props) { var _a; const { ctx, spec } = props; @@ -10673,8 +10667,8 @@ function stringAvatar(s) { children: `${parts.join("")}` }; } -const CMPNAME$b = "BasicHeadTool"; -console.log(CMPNAME$b, "1"); +const CMPNAME$c = "BasicHeadTool"; +console.log(CMPNAME$c, "1"); const { Exact: Exact$1 } = gubu_minExports.Gubu; const BasicHeadToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10684,7 +10678,7 @@ const BasicHeadToolSpecShape = gubu_minExports.Gubu({ attr: {}, sx: {}, style: {} -}, { name: CMPNAME$b }); +}, { name: CMPNAME$c }); function BasicHeadTool(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -10693,7 +10687,7 @@ function BasicHeadTool(props) { const { name, kind, attr, sx, style: style2 } = basicHeadToolSpec; let tool = /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}); if ("" === kind) { - console.warn(CMPNAME$b, "empty-tool-kind", basicHeadToolSpec); + console.warn(CMPNAME$c, "empty-tool-kind", basicHeadToolSpec); } else if ("logo" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsxs( "div", @@ -10710,7 +10704,7 @@ function BasicHeadTool(props) { { href: "/", style: style2, - className: `vxg-${CMPNAME$b}-logo`, + className: `vxg-${CMPNAME$c}-logo`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: attr.img }) } ), @@ -10742,17 +10736,17 @@ function BasicHeadTool(props) { } else if ("account" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsx(BasicAccountTool, { ctx, spec }); } else { - console.warn(CMPNAME$b, "unknown-tool-kind", kind, basicHeadToolSpec); + console.warn(CMPNAME$c, "unknown-tool-kind", kind, basicHeadToolSpec); } return tool; } -const CMPNAME$a = "BasicHead"; -const { Child: Child$5, Exact, Open: Open$8, Required: Required$1 } = gubu_minExports.Gubu; +const CMPNAME$b = "BasicHead"; +const { Child: Child$5, Exact, Open: Open$9, Required: Required$1 } = gubu_minExports.Gubu; const BasicHeadSpecShape = gubu_minExports.Gubu({ head: { name: String, active: Boolean, - tool: Child$5(Open$8({ + tool: Child$5(Open$9({ align: Exact("left", "right") })) }, @@ -10762,7 +10756,7 @@ const BasicHeadSpecShape = gubu_minExports.Gubu({ AppBar: {}, ToolBar: {} } -}, { name: CMPNAME$a }); +}, { name: CMPNAME$b }); function BasicHead(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -25311,7 +25305,7 @@ Object.defineProperty(ArrowDownward, "__esModule", { }); var default_1$x = ArrowDownward.default = void 0; var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); -var _jsxRuntime$x = requireJsxRuntime(); +var _jsxRuntime$x = jsxRuntimeExports; var _default$x = default_1$x = ArrowDownward.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); @@ -25324,7 +25318,7 @@ Object.defineProperty(ArrowRight, "__esModule", { }); var default_1$w = ArrowRight.default = void 0; var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); -var _jsxRuntime$w = requireJsxRuntime(); +var _jsxRuntime$w = jsxRuntimeExports; var _default$w = default_1$w = ArrowRight.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); @@ -25337,7 +25331,7 @@ Object.defineProperty(Cancel, "__esModule", { }); var default_1$v = Cancel.default = void 0; var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); -var _jsxRuntime$v = requireJsxRuntime(); +var _jsxRuntime$v = jsxRuntimeExports; var _default$v = default_1$v = Cancel.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); @@ -25350,7 +25344,7 @@ Object.defineProperty(ChevronLeft, "__esModule", { }); var default_1$u = ChevronLeft.default = void 0; var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); -var _jsxRuntime$u = requireJsxRuntime(); +var _jsxRuntime$u = jsxRuntimeExports; var _default$u = default_1$u = ChevronLeft.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); @@ -25363,7 +25357,7 @@ Object.defineProperty(ChevronRight, "__esModule", { }); var default_1$t = ChevronRight.default = void 0; var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); -var _jsxRuntime$t = requireJsxRuntime(); +var _jsxRuntime$t = jsxRuntimeExports; var _default$t = default_1$t = ChevronRight.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); @@ -25376,7 +25370,7 @@ Object.defineProperty(ClearAll, "__esModule", { }); var default_1$s = ClearAll.default = void 0; var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); -var _jsxRuntime$s = requireJsxRuntime(); +var _jsxRuntime$s = jsxRuntimeExports; var _default$s = default_1$s = ClearAll.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); @@ -25389,7 +25383,7 @@ Object.defineProperty(Close, "__esModule", { }); var default_1$r = Close.default = void 0; var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); -var _jsxRuntime$r = requireJsxRuntime(); +var _jsxRuntime$r = jsxRuntimeExports; var _default$r = default_1$r = Close.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); @@ -25402,7 +25396,7 @@ Object.defineProperty(ContentCopy, "__esModule", { }); var default_1$q = ContentCopy.default = void 0; var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); -var _jsxRuntime$q = requireJsxRuntime(); +var _jsxRuntime$q = jsxRuntimeExports; var _default$q = default_1$q = ContentCopy.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); @@ -25415,7 +25409,7 @@ Object.defineProperty(DensityLarge, "__esModule", { }); var default_1$p = DensityLarge.default = void 0; var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); -var _jsxRuntime$p = requireJsxRuntime(); +var _jsxRuntime$p = jsxRuntimeExports; var _default$p = default_1$p = DensityLarge.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); @@ -25428,7 +25422,7 @@ Object.defineProperty(DensityMedium, "__esModule", { }); var default_1$o = DensityMedium.default = void 0; var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); -var _jsxRuntime$o = requireJsxRuntime(); +var _jsxRuntime$o = jsxRuntimeExports; var _default$o = default_1$o = DensityMedium.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); @@ -25441,7 +25435,7 @@ Object.defineProperty(DensitySmall, "__esModule", { }); var default_1$n = DensitySmall.default = void 0; var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); -var _jsxRuntime$n = requireJsxRuntime(); +var _jsxRuntime$n = jsxRuntimeExports; var _default$n = default_1$n = DensitySmall.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); @@ -25454,7 +25448,7 @@ Object.defineProperty(DragHandle, "__esModule", { }); var default_1$m = DragHandle.default = void 0; var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); -var _jsxRuntime$m = requireJsxRuntime(); +var _jsxRuntime$m = jsxRuntimeExports; var _default$m = default_1$m = DragHandle.default = (0, _createSvgIcon$m.default)(/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); @@ -25467,7 +25461,7 @@ Object.defineProperty(DynamicFeed, "__esModule", { }); var default_1$l = DynamicFeed.default = void 0; var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); -var _jsxRuntime$l = requireJsxRuntime(); +var _jsxRuntime$l = jsxRuntimeExports; var _default$l = default_1$l = DynamicFeed.default = (0, _createSvgIcon$l.default)([/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { @@ -25482,7 +25476,7 @@ Object.defineProperty(Edit, "__esModule", { }); var default_1$k = Edit.default = void 0; var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); -var _jsxRuntime$k = requireJsxRuntime(); +var _jsxRuntime$k = jsxRuntimeExports; var _default$k = default_1$k = Edit.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); @@ -25495,7 +25489,7 @@ Object.defineProperty(ExpandMore, "__esModule", { }); var default_1$j = ExpandMore.default = void 0; var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); -var _jsxRuntime$j = requireJsxRuntime(); +var _jsxRuntime$j = jsxRuntimeExports; var _default$j = default_1$j = ExpandMore.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); @@ -25508,7 +25502,7 @@ Object.defineProperty(FilterAlt, "__esModule", { }); var default_1$i = FilterAlt.default = void 0; var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); -var _jsxRuntime$i = requireJsxRuntime(); +var _jsxRuntime$i = jsxRuntimeExports; var _default$i = default_1$i = FilterAlt.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); @@ -25521,7 +25515,7 @@ Object.defineProperty(FilterList, "__esModule", { }); var default_1$h = FilterList.default = void 0; var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); -var _jsxRuntime$h = requireJsxRuntime(); +var _jsxRuntime$h = jsxRuntimeExports; var _default$h = default_1$h = FilterList.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); @@ -25534,7 +25528,7 @@ Object.defineProperty(FilterListOff, "__esModule", { }); var default_1$g = FilterListOff.default = void 0; var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); -var _jsxRuntime$g = requireJsxRuntime(); +var _jsxRuntime$g = jsxRuntimeExports; var _default$g = default_1$g = FilterListOff.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); @@ -25547,7 +25541,7 @@ Object.defineProperty(FirstPage, "__esModule", { }); var default_1$f = FirstPage.default = void 0; var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); -var _jsxRuntime$f = requireJsxRuntime(); +var _jsxRuntime$f = jsxRuntimeExports; var _default$f = default_1$f = FirstPage.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); @@ -25560,7 +25554,7 @@ Object.defineProperty(Fullscreen, "__esModule", { }); var default_1$e = Fullscreen.default = void 0; var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); -var _jsxRuntime$e = requireJsxRuntime(); +var _jsxRuntime$e = jsxRuntimeExports; var _default$e = default_1$e = Fullscreen.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); @@ -25573,7 +25567,7 @@ Object.defineProperty(FullscreenExit, "__esModule", { }); var default_1$d = FullscreenExit.default = void 0; var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); -var _jsxRuntime$d = requireJsxRuntime(); +var _jsxRuntime$d = jsxRuntimeExports; var _default$d = default_1$d = FullscreenExit.default = (0, _createSvgIcon$d.default)(/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); @@ -25586,7 +25580,7 @@ Object.defineProperty(KeyboardDoubleArrowDown, "__esModule", { }); var default_1$c = KeyboardDoubleArrowDown.default = void 0; var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); -var _jsxRuntime$c = requireJsxRuntime(); +var _jsxRuntime$c = jsxRuntimeExports; var _default$c = default_1$c = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$c.default)([/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { @@ -25601,7 +25595,7 @@ Object.defineProperty(LastPage, "__esModule", { }); var default_1$b = LastPage.default = void 0; var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); -var _jsxRuntime$b = requireJsxRuntime(); +var _jsxRuntime$b = jsxRuntimeExports; var _default$b = default_1$b = LastPage.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); @@ -25614,7 +25608,7 @@ Object.defineProperty(MoreHoriz, "__esModule", { }); var default_1$a = MoreHoriz.default = void 0; var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); -var _jsxRuntime$a = requireJsxRuntime(); +var _jsxRuntime$a = jsxRuntimeExports; var _default$a = default_1$a = MoreHoriz.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); @@ -25627,7 +25621,7 @@ Object.defineProperty(MoreVert, "__esModule", { }); var default_1$9 = MoreVert.default = void 0; var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); -var _jsxRuntime$9 = requireJsxRuntime(); +var _jsxRuntime$9 = jsxRuntimeExports; var _default$9 = default_1$9 = MoreVert.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); @@ -25640,7 +25634,7 @@ Object.defineProperty(PushPin, "__esModule", { }); var default_1$8 = PushPin.default = void 0; var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); -var _jsxRuntime$8 = requireJsxRuntime(); +var _jsxRuntime$8 = jsxRuntimeExports; var _default$8 = default_1$8 = PushPin.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" @@ -25654,7 +25648,7 @@ Object.defineProperty(RestartAlt, "__esModule", { }); var default_1$7 = RestartAlt.default = void 0; var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); -var _jsxRuntime$7 = requireJsxRuntime(); +var _jsxRuntime$7 = jsxRuntimeExports; var _default$7 = default_1$7 = RestartAlt.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); @@ -25667,7 +25661,7 @@ Object.defineProperty(Save, "__esModule", { }); var default_1$6 = Save.default = void 0; var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); -var _jsxRuntime$6 = requireJsxRuntime(); +var _jsxRuntime$6 = jsxRuntimeExports; var _default$6 = default_1$6 = Save.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); @@ -25680,7 +25674,7 @@ Object.defineProperty(Search, "__esModule", { }); var default_1$5 = Search.default = void 0; var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); -var _jsxRuntime$5 = requireJsxRuntime(); +var _jsxRuntime$5 = jsxRuntimeExports; var _default$5 = default_1$5 = Search.default = (0, _createSvgIcon$5.default)(/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); @@ -25693,7 +25687,7 @@ Object.defineProperty(SearchOff, "__esModule", { }); var default_1$4 = SearchOff.default = void 0; var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); -var _jsxRuntime$4 = requireJsxRuntime(); +var _jsxRuntime$4 = jsxRuntimeExports; var _default$4 = default_1$4 = SearchOff.default = (0, _createSvgIcon$4.default)([/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { @@ -25708,7 +25702,7 @@ Object.defineProperty(Sort, "__esModule", { }); var default_1$3 = Sort.default = void 0; var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); -var _jsxRuntime$3 = requireJsxRuntime(); +var _jsxRuntime$3 = jsxRuntimeExports; var _default$3 = default_1$3 = Sort.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); @@ -25721,7 +25715,7 @@ Object.defineProperty(SyncAlt, "__esModule", { }); var default_1$2 = SyncAlt.default = void 0; var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); -var _jsxRuntime$2 = requireJsxRuntime(); +var _jsxRuntime$2 = jsxRuntimeExports; var _default$2 = default_1$2 = SyncAlt.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); @@ -25734,7 +25728,7 @@ Object.defineProperty(ViewColumn, "__esModule", { }); var default_1$1 = ViewColumn.default = void 0; var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); -var _jsxRuntime$1 = requireJsxRuntime(); +var _jsxRuntime$1 = jsxRuntimeExports; var _default$1 = default_1$1 = ViewColumn.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); @@ -25747,7 +25741,7 @@ Object.defineProperty(VisibilityOff, "__esModule", { }); var default_1 = VisibilityOff.default = void 0; var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); -var _jsxRuntime = requireJsxRuntime(); +var _jsxRuntime = jsxRuntimeExports; var _default = default_1 = VisibilityOff.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); @@ -62706,8 +62700,8 @@ const MaterialReactTable = (props) => { } return jsxRuntimeExports.jsx(MRT_TablePaper, { table }); }; -const { Open: Open$7, Child: Child$4 } = gubu_minExports.Gubu; -const Shape$2 = gubu_minExports.Gubu(Open$7({ +const { Open: Open$8, Child: Child$4 } = gubu_minExports.Gubu; +const Shape$2 = gubu_minExports.Gubu(Open$8({ name: String, prefix: String, ent: String, @@ -62752,7 +62746,7 @@ Object.assign(VxgBasicEntityListPlugin, { } }); Object.defineProperty(VxgBasicEntityListPlugin, "name", { value: "VxgBasicEntityListPlugin" }); -const CMPNAME$9 = "BasicEntityList"; +const CMPNAME$a = "BasicEntityList"; function BasicEntityList(props) { const { ctx } = props; const { seneca } = ctx(); @@ -64672,31 +64666,44 @@ function useForm(props = {}) { _formControl.current.formState = getProxyFormState(formState, control); return _formControl.current; } +const CMPNAME$9 = "BasicEntitySliderField"; +const { Open: Open$7 } = gubu_minExports.Gubu; +const BasicEntityRadioGroupFieldSpecShape = gubu_minExports.Gubu(Open$7({ + field: Open$7({ + id: String, + name: String, + kind: String, + label: gubu_minExports.Default("", String), + ux: Open$7({ + kind: gubu_minExports.Exact("RadioGroup"), + edit: gubu_minExports.Default(true), + direction: gubu_minExports.Exact("row", "column").Default("row") + }) + }) +}), { name: CMPNAME$9 }); function BasicEntityRadioGroupField(props) { const { spec } = props; - const { field, getValues, control } = spec; - const val = getValues(field.name); + const basicEntityRadioGroupField = BasicEntityRadioGroupFieldSpecShape(spec); + const { control, field } = basicEntityRadioGroupField; return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [ - /* @__PURE__ */ jsxRuntimeExports.jsx(FormLabel$1, { id: field.id, children: field.label }), + /* @__PURE__ */ jsxRuntimeExports.jsx(FormLabel$1, { children: field.label }, `${field.id}-label`), /* @__PURE__ */ jsxRuntimeExports.jsx( Controller, { name: field.name, control, defaultValue: field.default, - render: ({ field: { onChange, value } }) => { - var _a; - return /* @__PURE__ */ jsxRuntimeExports.jsx(RadioGroup, { id: field.id, value, onChange, row: "row" === ((_a = field.ux) == null ? void 0 : _a.direction), children: field.options.map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx( - FormControlLabel$1, - { - value: option.value, - control: /* @__PURE__ */ jsxRuntimeExports.jsx(Radio$1, { disabled: !field.ux.edit }), - label: option.label - }, - option.value - )) }); - } - } + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx(RadioGroup, { value, onChange, row: "row" === field.ux.direction, children: field.options.map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx( + FormControlLabel$1, + { + value: option.value, + control: /* @__PURE__ */ jsxRuntimeExports.jsx(Radio$1, { disabled: !field.ux.edit }), + label: option.label + }, + `${option.value}-option` + )) }, field.id) + }, + `${field.id}-controller` ) ] }); } diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index b889d4d..97dd413 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -1042,21 +1042,15 @@ var __async = (__this, __arguments, generator) => { } return reactJsxRuntime_development; } - var jsxRuntime$1 = jsxRuntime$2.exports; - var hasRequiredJsxRuntime; - function requireJsxRuntime() { - if (hasRequiredJsxRuntime) return jsxRuntime$2.exports; - hasRequiredJsxRuntime = 1; - "use strict"; - if (process.env.NODE_ENV === "production") { - jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); - } else { - jsxRuntime$2.exports = requireReactJsxRuntime_development(); - } - return jsxRuntime$2.exports; + var jsxRuntime = jsxRuntime$2.exports; + "use strict"; + if (process.env.NODE_ENV === "production") { + jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); + } else { + jsxRuntime$2.exports = requireReactJsxRuntime_development(); } - var jsxRuntimeExports = requireJsxRuntime(); - const jsxRuntime = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); + var jsxRuntimeExports = jsxRuntime$2.exports; + const jsxRuntime$1 = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); var gubu_min$2 = { exports: {} }; var gubu_min = gubu_min$2.exports; (function(module2, exports3) { @@ -10600,8 +10594,8 @@ try { */ variant: PropTypes.oneOfType([PropTypes.oneOf(["dense", "regular"]), PropTypes.string]) } : void 0; - const CMPNAME$c = "BasicAccountTool"; - console.log(CMPNAME$c, "1"); + const CMPNAME$d = "BasicAccountTool"; + console.log(CMPNAME$d, "1"); const { Exact: Exact$2 } = gubu_minExports.Gubu; const BasicAccountToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10611,7 +10605,7 @@ try { attr: {}, sx: {}, style: {} - }, { name: CMPNAME$c }); + }, { name: CMPNAME$d }); function BasicAccountTool(props) { var _a; const { ctx, spec } = props; @@ -10685,8 +10679,8 @@ try { children: `${parts.join("")}` }; } - const CMPNAME$b = "BasicHeadTool"; - console.log(CMPNAME$b, "1"); + const CMPNAME$c = "BasicHeadTool"; + console.log(CMPNAME$c, "1"); const { Exact: Exact$1 } = gubu_minExports.Gubu; const BasicHeadToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10696,7 +10690,7 @@ try { attr: {}, sx: {}, style: {} - }, { name: CMPNAME$b }); + }, { name: CMPNAME$c }); function BasicHeadTool(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -10705,7 +10699,7 @@ try { const { name, kind, attr, sx, style: style2 } = basicHeadToolSpec; let tool = /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}); if ("" === kind) { - console.warn(CMPNAME$b, "empty-tool-kind", basicHeadToolSpec); + console.warn(CMPNAME$c, "empty-tool-kind", basicHeadToolSpec); } else if ("logo" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsxs( "div", @@ -10722,7 +10716,7 @@ try { { href: "/", style: style2, - className: `vxg-${CMPNAME$b}-logo`, + className: `vxg-${CMPNAME$c}-logo`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: attr.img }) } ), @@ -10754,17 +10748,17 @@ try { } else if ("account" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsx(BasicAccountTool, { ctx, spec }); } else { - console.warn(CMPNAME$b, "unknown-tool-kind", kind, basicHeadToolSpec); + console.warn(CMPNAME$c, "unknown-tool-kind", kind, basicHeadToolSpec); } return tool; } - const CMPNAME$a = "BasicHead"; - const { Child: Child$5, Exact, Open: Open$8, Required: Required$1 } = gubu_minExports.Gubu; + const CMPNAME$b = "BasicHead"; + const { Child: Child$5, Exact, Open: Open$9, Required: Required$1 } = gubu_minExports.Gubu; const BasicHeadSpecShape = gubu_minExports.Gubu({ head: { name: String, active: Boolean, - tool: Child$5(Open$8({ + tool: Child$5(Open$9({ align: Exact("left", "right") })) }, @@ -10774,7 +10768,7 @@ try { AppBar: {}, ToolBar: {} } - }, { name: CMPNAME$a }); + }, { name: CMPNAME$b }); function BasicHead(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -25323,7 +25317,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$x = ArrowDownward.default = void 0; var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); - var _jsxRuntime$x = requireJsxRuntime(); + var _jsxRuntime$x = jsxRuntimeExports; var _default$x = default_1$x = ArrowDownward.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); @@ -25336,7 +25330,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$w = ArrowRight.default = void 0; var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); - var _jsxRuntime$w = requireJsxRuntime(); + var _jsxRuntime$w = jsxRuntimeExports; var _default$w = default_1$w = ArrowRight.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); @@ -25349,7 +25343,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$v = Cancel.default = void 0; var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); - var _jsxRuntime$v = requireJsxRuntime(); + var _jsxRuntime$v = jsxRuntimeExports; var _default$v = default_1$v = Cancel.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); @@ -25362,7 +25356,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$u = ChevronLeft.default = void 0; var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); - var _jsxRuntime$u = requireJsxRuntime(); + var _jsxRuntime$u = jsxRuntimeExports; var _default$u = default_1$u = ChevronLeft.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); @@ -25375,7 +25369,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$t = ChevronRight.default = void 0; var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); - var _jsxRuntime$t = requireJsxRuntime(); + var _jsxRuntime$t = jsxRuntimeExports; var _default$t = default_1$t = ChevronRight.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); @@ -25388,7 +25382,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$s = ClearAll.default = void 0; var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); - var _jsxRuntime$s = requireJsxRuntime(); + var _jsxRuntime$s = jsxRuntimeExports; var _default$s = default_1$s = ClearAll.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); @@ -25401,7 +25395,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$r = Close.default = void 0; var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); - var _jsxRuntime$r = requireJsxRuntime(); + var _jsxRuntime$r = jsxRuntimeExports; var _default$r = default_1$r = Close.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); @@ -25414,7 +25408,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$q = ContentCopy.default = void 0; var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); - var _jsxRuntime$q = requireJsxRuntime(); + var _jsxRuntime$q = jsxRuntimeExports; var _default$q = default_1$q = ContentCopy.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); @@ -25427,7 +25421,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$p = DensityLarge.default = void 0; var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); - var _jsxRuntime$p = requireJsxRuntime(); + var _jsxRuntime$p = jsxRuntimeExports; var _default$p = default_1$p = DensityLarge.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); @@ -25440,7 +25434,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$o = DensityMedium.default = void 0; var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); - var _jsxRuntime$o = requireJsxRuntime(); + var _jsxRuntime$o = jsxRuntimeExports; var _default$o = default_1$o = DensityMedium.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); @@ -25453,7 +25447,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$n = DensitySmall.default = void 0; var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); - var _jsxRuntime$n = requireJsxRuntime(); + var _jsxRuntime$n = jsxRuntimeExports; var _default$n = default_1$n = DensitySmall.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); @@ -25466,7 +25460,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$m = DragHandle.default = void 0; var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); - var _jsxRuntime$m = requireJsxRuntime(); + var _jsxRuntime$m = jsxRuntimeExports; var _default$m = default_1$m = DragHandle.default = (0, _createSvgIcon$m.default)(/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); @@ -25479,7 +25473,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$l = DynamicFeed.default = void 0; var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); - var _jsxRuntime$l = requireJsxRuntime(); + var _jsxRuntime$l = jsxRuntimeExports; var _default$l = default_1$l = DynamicFeed.default = (0, _createSvgIcon$l.default)([/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { @@ -25494,7 +25488,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$k = Edit.default = void 0; var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); - var _jsxRuntime$k = requireJsxRuntime(); + var _jsxRuntime$k = jsxRuntimeExports; var _default$k = default_1$k = Edit.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); @@ -25507,7 +25501,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$j = ExpandMore.default = void 0; var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); - var _jsxRuntime$j = requireJsxRuntime(); + var _jsxRuntime$j = jsxRuntimeExports; var _default$j = default_1$j = ExpandMore.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); @@ -25520,7 +25514,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$i = FilterAlt.default = void 0; var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); - var _jsxRuntime$i = requireJsxRuntime(); + var _jsxRuntime$i = jsxRuntimeExports; var _default$i = default_1$i = FilterAlt.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); @@ -25533,7 +25527,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$h = FilterList.default = void 0; var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); - var _jsxRuntime$h = requireJsxRuntime(); + var _jsxRuntime$h = jsxRuntimeExports; var _default$h = default_1$h = FilterList.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); @@ -25546,7 +25540,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$g = FilterListOff.default = void 0; var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); - var _jsxRuntime$g = requireJsxRuntime(); + var _jsxRuntime$g = jsxRuntimeExports; var _default$g = default_1$g = FilterListOff.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); @@ -25559,7 +25553,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$f = FirstPage.default = void 0; var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); - var _jsxRuntime$f = requireJsxRuntime(); + var _jsxRuntime$f = jsxRuntimeExports; var _default$f = default_1$f = FirstPage.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); @@ -25572,7 +25566,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$e = Fullscreen.default = void 0; var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); - var _jsxRuntime$e = requireJsxRuntime(); + var _jsxRuntime$e = jsxRuntimeExports; var _default$e = default_1$e = Fullscreen.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); @@ -25585,7 +25579,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$d = FullscreenExit.default = void 0; var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); - var _jsxRuntime$d = requireJsxRuntime(); + var _jsxRuntime$d = jsxRuntimeExports; var _default$d = default_1$d = FullscreenExit.default = (0, _createSvgIcon$d.default)(/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); @@ -25598,7 +25592,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$c = KeyboardDoubleArrowDown.default = void 0; var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); - var _jsxRuntime$c = requireJsxRuntime(); + var _jsxRuntime$c = jsxRuntimeExports; var _default$c = default_1$c = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$c.default)([/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { @@ -25613,7 +25607,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$b = LastPage.default = void 0; var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); - var _jsxRuntime$b = requireJsxRuntime(); + var _jsxRuntime$b = jsxRuntimeExports; var _default$b = default_1$b = LastPage.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); @@ -25626,7 +25620,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$a = MoreHoriz.default = void 0; var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); - var _jsxRuntime$a = requireJsxRuntime(); + var _jsxRuntime$a = jsxRuntimeExports; var _default$a = default_1$a = MoreHoriz.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); @@ -25639,7 +25633,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$9 = MoreVert.default = void 0; var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); - var _jsxRuntime$9 = requireJsxRuntime(); + var _jsxRuntime$9 = jsxRuntimeExports; var _default$9 = default_1$9 = MoreVert.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); @@ -25652,7 +25646,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$8 = PushPin.default = void 0; var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); - var _jsxRuntime$8 = requireJsxRuntime(); + var _jsxRuntime$8 = jsxRuntimeExports; var _default$8 = default_1$8 = PushPin.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" @@ -25666,7 +25660,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$7 = RestartAlt.default = void 0; var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); - var _jsxRuntime$7 = requireJsxRuntime(); + var _jsxRuntime$7 = jsxRuntimeExports; var _default$7 = default_1$7 = RestartAlt.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); @@ -25679,7 +25673,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$6 = Save.default = void 0; var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); - var _jsxRuntime$6 = requireJsxRuntime(); + var _jsxRuntime$6 = jsxRuntimeExports; var _default$6 = default_1$6 = Save.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); @@ -25692,7 +25686,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$5 = Search.default = void 0; var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); - var _jsxRuntime$5 = requireJsxRuntime(); + var _jsxRuntime$5 = jsxRuntimeExports; var _default$5 = default_1$5 = Search.default = (0, _createSvgIcon$5.default)(/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); @@ -25705,7 +25699,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$4 = SearchOff.default = void 0; var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); - var _jsxRuntime$4 = requireJsxRuntime(); + var _jsxRuntime$4 = jsxRuntimeExports; var _default$4 = default_1$4 = SearchOff.default = (0, _createSvgIcon$4.default)([/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { @@ -25720,7 +25714,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$3 = Sort.default = void 0; var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); - var _jsxRuntime$3 = requireJsxRuntime(); + var _jsxRuntime$3 = jsxRuntimeExports; var _default$3 = default_1$3 = Sort.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); @@ -25733,7 +25727,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$2 = SyncAlt.default = void 0; var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); - var _jsxRuntime$2 = requireJsxRuntime(); + var _jsxRuntime$2 = jsxRuntimeExports; var _default$2 = default_1$2 = SyncAlt.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); @@ -25746,7 +25740,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$1 = ViewColumn.default = void 0; var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); - var _jsxRuntime$1 = requireJsxRuntime(); + var _jsxRuntime$1 = jsxRuntimeExports; var _default$1 = default_1$1 = ViewColumn.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); @@ -25759,7 +25753,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1 = VisibilityOff.default = void 0; var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); - var _jsxRuntime = requireJsxRuntime(); + var _jsxRuntime = jsxRuntimeExports; var _default = default_1 = VisibilityOff.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); @@ -62718,8 +62712,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } return jsxRuntimeExports.jsx(MRT_TablePaper, { table }); }; - const { Open: Open$7, Child: Child$4 } = gubu_minExports.Gubu; - const Shape$2 = gubu_minExports.Gubu(Open$7({ + const { Open: Open$8, Child: Child$4 } = gubu_minExports.Gubu; + const Shape$2 = gubu_minExports.Gubu(Open$8({ name: String, prefix: String, ent: String, @@ -62764,7 +62758,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } }); Object.defineProperty(VxgBasicEntityListPlugin, "name", { value: "VxgBasicEntityListPlugin" }); - const CMPNAME$9 = "BasicEntityList"; + const CMPNAME$a = "BasicEntityList"; function BasicEntityList(props) { const { ctx } = props; const { seneca } = ctx(); @@ -64684,31 +64678,44 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha _formControl.current.formState = getProxyFormState(formState, control); return _formControl.current; } + const CMPNAME$9 = "BasicEntitySliderField"; + const { Open: Open$7 } = gubu_minExports.Gubu; + const BasicEntityRadioGroupFieldSpecShape = gubu_minExports.Gubu(Open$7({ + field: Open$7({ + id: String, + name: String, + kind: String, + label: gubu_minExports.Default("", String), + ux: Open$7({ + kind: gubu_minExports.Exact("RadioGroup"), + edit: gubu_minExports.Default(true), + direction: gubu_minExports.Exact("row", "column").Default("row") + }) + }) + }), { name: CMPNAME$9 }); function BasicEntityRadioGroupField(props) { const { spec } = props; - const { field, getValues, control } = spec; - const val = getValues(field.name); + const basicEntityRadioGroupField = BasicEntityRadioGroupFieldSpecShape(spec); + const { control, field } = basicEntityRadioGroupField; return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [ - /* @__PURE__ */ jsxRuntimeExports.jsx(material.FormLabel, { id: field.id, children: field.label }), + /* @__PURE__ */ jsxRuntimeExports.jsx(material.FormLabel, { children: field.label }, `${field.id}-label`), /* @__PURE__ */ jsxRuntimeExports.jsx( Controller, { name: field.name, control, defaultValue: field.default, - render: ({ field: { onChange, value } }) => { - var _a; - return /* @__PURE__ */ jsxRuntimeExports.jsx(material.RadioGroup, { id: field.id, value, onChange, row: "row" === ((_a = field.ux) == null ? void 0 : _a.direction), children: field.options.map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx( - material.FormControlLabel, - { - value: option.value, - control: /* @__PURE__ */ jsxRuntimeExports.jsx(material.Radio, { disabled: !field.ux.edit }), - label: option.label - }, - option.value - )) }); - } - } + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.RadioGroup, { value, onChange, row: "row" === field.ux.direction, children: field.options.map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx( + material.FormControlLabel, + { + value: option.value, + control: /* @__PURE__ */ jsxRuntimeExports.jsx(material.Radio, { disabled: !field.ux.edit }), + label: option.label + }, + `${option.value}-option` + )) }, field.id) + }, + `${field.id}-controller` ) ] }); } diff --git a/src/lib/BasicEntityRadioGroupField.tsx b/src/lib/BasicEntityRadioGroupField.tsx index 7221225..045bb1e 100644 --- a/src/lib/BasicEntityRadioGroupField.tsx +++ b/src/lib/BasicEntityRadioGroupField.tsx @@ -20,8 +20,7 @@ const BasicEntityRadioGroupFieldSpecShape = Gubu(Open({ edit: Default(true), direction: Exact('row', 'column').Default('row'), }) - }), - errors: Open({}), + }) }), {name: CMPNAME}) function BasicEntityRadioGroupField(props: any) { From 3a7fd8323e205c4fd92de6b798c03d64fca552e5 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 25 Jul 2024 19:52:07 +0100 Subject: [PATCH 030/122] Update orientation prop to use direction field from field.ux object --- src/lib/BasicEntitySliderField.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/BasicEntitySliderField.tsx b/src/lib/BasicEntitySliderField.tsx index 2d958e6..47bbee5 100644 --- a/src/lib/BasicEntitySliderField.tsx +++ b/src/lib/BasicEntitySliderField.tsx @@ -23,7 +23,7 @@ const BasicEntitySliderFieldSpecShape = Gubu(Open({ max: Default(100), props: { valueLabelDisplay: Exact('on', 'auto', 'off').Default('auto'), - orient: Exact('horizontal', 'vertical').Default('horizontal'), + direction: Exact('horizontal', 'vertical').Default('horizontal'), track: Exact('normal', 'inverted', 'disabled').Default('normal'), }, }) @@ -50,7 +50,7 @@ function BasicEntitySliderField(props: any) { render={({ field: { onChange, value } }) => ( Date: Thu, 25 Jul 2024 19:53:52 +0100 Subject: [PATCH 031/122] Simplified marks prop to be always object --- dist/voxgig-model-react.es.js | 131 +++++++++++++++-------------- dist/voxgig-model-react.umd.js | 131 +++++++++++++++-------------- src/lib/BasicEntitySliderField.tsx | 16 ++-- 3 files changed, 145 insertions(+), 133 deletions(-) diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index 3b19f71..2f8f660 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -1030,21 +1030,15 @@ function requireReactJsxRuntime_development() { } return reactJsxRuntime_development; } -var jsxRuntime$1 = jsxRuntime$2.exports; -var hasRequiredJsxRuntime; -function requireJsxRuntime() { - if (hasRequiredJsxRuntime) return jsxRuntime$2.exports; - hasRequiredJsxRuntime = 1; - "use strict"; - if (process.env.NODE_ENV === "production") { - jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); - } else { - jsxRuntime$2.exports = requireReactJsxRuntime_development(); - } - return jsxRuntime$2.exports; +var jsxRuntime = jsxRuntime$2.exports; +"use strict"; +if (process.env.NODE_ENV === "production") { + jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); +} else { + jsxRuntime$2.exports = requireReactJsxRuntime_development(); } -var jsxRuntimeExports = requireJsxRuntime(); -const jsxRuntime = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); +var jsxRuntimeExports = jsxRuntime$2.exports; +const jsxRuntime$1 = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); var gubu_min$2 = { exports: {} }; var gubu_min = gubu_min$2.exports; (function(module, exports) { @@ -25311,7 +25305,7 @@ Object.defineProperty(ArrowDownward, "__esModule", { }); var default_1$x = ArrowDownward.default = void 0; var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); -var _jsxRuntime$x = requireJsxRuntime(); +var _jsxRuntime$x = jsxRuntimeExports; var _default$x = default_1$x = ArrowDownward.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); @@ -25324,7 +25318,7 @@ Object.defineProperty(ArrowRight, "__esModule", { }); var default_1$w = ArrowRight.default = void 0; var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); -var _jsxRuntime$w = requireJsxRuntime(); +var _jsxRuntime$w = jsxRuntimeExports; var _default$w = default_1$w = ArrowRight.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); @@ -25337,7 +25331,7 @@ Object.defineProperty(Cancel, "__esModule", { }); var default_1$v = Cancel.default = void 0; var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); -var _jsxRuntime$v = requireJsxRuntime(); +var _jsxRuntime$v = jsxRuntimeExports; var _default$v = default_1$v = Cancel.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); @@ -25350,7 +25344,7 @@ Object.defineProperty(ChevronLeft, "__esModule", { }); var default_1$u = ChevronLeft.default = void 0; var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); -var _jsxRuntime$u = requireJsxRuntime(); +var _jsxRuntime$u = jsxRuntimeExports; var _default$u = default_1$u = ChevronLeft.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); @@ -25363,7 +25357,7 @@ Object.defineProperty(ChevronRight, "__esModule", { }); var default_1$t = ChevronRight.default = void 0; var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); -var _jsxRuntime$t = requireJsxRuntime(); +var _jsxRuntime$t = jsxRuntimeExports; var _default$t = default_1$t = ChevronRight.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); @@ -25376,7 +25370,7 @@ Object.defineProperty(ClearAll, "__esModule", { }); var default_1$s = ClearAll.default = void 0; var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); -var _jsxRuntime$s = requireJsxRuntime(); +var _jsxRuntime$s = jsxRuntimeExports; var _default$s = default_1$s = ClearAll.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); @@ -25389,7 +25383,7 @@ Object.defineProperty(Close, "__esModule", { }); var default_1$r = Close.default = void 0; var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); -var _jsxRuntime$r = requireJsxRuntime(); +var _jsxRuntime$r = jsxRuntimeExports; var _default$r = default_1$r = Close.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); @@ -25402,7 +25396,7 @@ Object.defineProperty(ContentCopy, "__esModule", { }); var default_1$q = ContentCopy.default = void 0; var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); -var _jsxRuntime$q = requireJsxRuntime(); +var _jsxRuntime$q = jsxRuntimeExports; var _default$q = default_1$q = ContentCopy.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); @@ -25415,7 +25409,7 @@ Object.defineProperty(DensityLarge, "__esModule", { }); var default_1$p = DensityLarge.default = void 0; var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); -var _jsxRuntime$p = requireJsxRuntime(); +var _jsxRuntime$p = jsxRuntimeExports; var _default$p = default_1$p = DensityLarge.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); @@ -25428,7 +25422,7 @@ Object.defineProperty(DensityMedium, "__esModule", { }); var default_1$o = DensityMedium.default = void 0; var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); -var _jsxRuntime$o = requireJsxRuntime(); +var _jsxRuntime$o = jsxRuntimeExports; var _default$o = default_1$o = DensityMedium.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); @@ -25441,7 +25435,7 @@ Object.defineProperty(DensitySmall, "__esModule", { }); var default_1$n = DensitySmall.default = void 0; var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); -var _jsxRuntime$n = requireJsxRuntime(); +var _jsxRuntime$n = jsxRuntimeExports; var _default$n = default_1$n = DensitySmall.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); @@ -25454,7 +25448,7 @@ Object.defineProperty(DragHandle, "__esModule", { }); var default_1$m = DragHandle.default = void 0; var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); -var _jsxRuntime$m = requireJsxRuntime(); +var _jsxRuntime$m = jsxRuntimeExports; var _default$m = default_1$m = DragHandle.default = (0, _createSvgIcon$m.default)(/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); @@ -25467,7 +25461,7 @@ Object.defineProperty(DynamicFeed, "__esModule", { }); var default_1$l = DynamicFeed.default = void 0; var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); -var _jsxRuntime$l = requireJsxRuntime(); +var _jsxRuntime$l = jsxRuntimeExports; var _default$l = default_1$l = DynamicFeed.default = (0, _createSvgIcon$l.default)([/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { @@ -25482,7 +25476,7 @@ Object.defineProperty(Edit, "__esModule", { }); var default_1$k = Edit.default = void 0; var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); -var _jsxRuntime$k = requireJsxRuntime(); +var _jsxRuntime$k = jsxRuntimeExports; var _default$k = default_1$k = Edit.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); @@ -25495,7 +25489,7 @@ Object.defineProperty(ExpandMore, "__esModule", { }); var default_1$j = ExpandMore.default = void 0; var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); -var _jsxRuntime$j = requireJsxRuntime(); +var _jsxRuntime$j = jsxRuntimeExports; var _default$j = default_1$j = ExpandMore.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); @@ -25508,7 +25502,7 @@ Object.defineProperty(FilterAlt, "__esModule", { }); var default_1$i = FilterAlt.default = void 0; var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); -var _jsxRuntime$i = requireJsxRuntime(); +var _jsxRuntime$i = jsxRuntimeExports; var _default$i = default_1$i = FilterAlt.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); @@ -25521,7 +25515,7 @@ Object.defineProperty(FilterList, "__esModule", { }); var default_1$h = FilterList.default = void 0; var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); -var _jsxRuntime$h = requireJsxRuntime(); +var _jsxRuntime$h = jsxRuntimeExports; var _default$h = default_1$h = FilterList.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); @@ -25534,7 +25528,7 @@ Object.defineProperty(FilterListOff, "__esModule", { }); var default_1$g = FilterListOff.default = void 0; var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); -var _jsxRuntime$g = requireJsxRuntime(); +var _jsxRuntime$g = jsxRuntimeExports; var _default$g = default_1$g = FilterListOff.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); @@ -25547,7 +25541,7 @@ Object.defineProperty(FirstPage, "__esModule", { }); var default_1$f = FirstPage.default = void 0; var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); -var _jsxRuntime$f = requireJsxRuntime(); +var _jsxRuntime$f = jsxRuntimeExports; var _default$f = default_1$f = FirstPage.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); @@ -25560,7 +25554,7 @@ Object.defineProperty(Fullscreen, "__esModule", { }); var default_1$e = Fullscreen.default = void 0; var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); -var _jsxRuntime$e = requireJsxRuntime(); +var _jsxRuntime$e = jsxRuntimeExports; var _default$e = default_1$e = Fullscreen.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); @@ -25573,7 +25567,7 @@ Object.defineProperty(FullscreenExit, "__esModule", { }); var default_1$d = FullscreenExit.default = void 0; var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); -var _jsxRuntime$d = requireJsxRuntime(); +var _jsxRuntime$d = jsxRuntimeExports; var _default$d = default_1$d = FullscreenExit.default = (0, _createSvgIcon$d.default)(/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); @@ -25586,7 +25580,7 @@ Object.defineProperty(KeyboardDoubleArrowDown, "__esModule", { }); var default_1$c = KeyboardDoubleArrowDown.default = void 0; var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); -var _jsxRuntime$c = requireJsxRuntime(); +var _jsxRuntime$c = jsxRuntimeExports; var _default$c = default_1$c = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$c.default)([/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { @@ -25601,7 +25595,7 @@ Object.defineProperty(LastPage, "__esModule", { }); var default_1$b = LastPage.default = void 0; var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); -var _jsxRuntime$b = requireJsxRuntime(); +var _jsxRuntime$b = jsxRuntimeExports; var _default$b = default_1$b = LastPage.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); @@ -25614,7 +25608,7 @@ Object.defineProperty(MoreHoriz, "__esModule", { }); var default_1$a = MoreHoriz.default = void 0; var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); -var _jsxRuntime$a = requireJsxRuntime(); +var _jsxRuntime$a = jsxRuntimeExports; var _default$a = default_1$a = MoreHoriz.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); @@ -25627,7 +25621,7 @@ Object.defineProperty(MoreVert, "__esModule", { }); var default_1$9 = MoreVert.default = void 0; var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); -var _jsxRuntime$9 = requireJsxRuntime(); +var _jsxRuntime$9 = jsxRuntimeExports; var _default$9 = default_1$9 = MoreVert.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); @@ -25640,7 +25634,7 @@ Object.defineProperty(PushPin, "__esModule", { }); var default_1$8 = PushPin.default = void 0; var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); -var _jsxRuntime$8 = requireJsxRuntime(); +var _jsxRuntime$8 = jsxRuntimeExports; var _default$8 = default_1$8 = PushPin.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" @@ -25654,7 +25648,7 @@ Object.defineProperty(RestartAlt, "__esModule", { }); var default_1$7 = RestartAlt.default = void 0; var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); -var _jsxRuntime$7 = requireJsxRuntime(); +var _jsxRuntime$7 = jsxRuntimeExports; var _default$7 = default_1$7 = RestartAlt.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); @@ -25667,7 +25661,7 @@ Object.defineProperty(Save, "__esModule", { }); var default_1$6 = Save.default = void 0; var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); -var _jsxRuntime$6 = requireJsxRuntime(); +var _jsxRuntime$6 = jsxRuntimeExports; var _default$6 = default_1$6 = Save.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); @@ -25680,7 +25674,7 @@ Object.defineProperty(Search, "__esModule", { }); var default_1$5 = Search.default = void 0; var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); -var _jsxRuntime$5 = requireJsxRuntime(); +var _jsxRuntime$5 = jsxRuntimeExports; var _default$5 = default_1$5 = Search.default = (0, _createSvgIcon$5.default)(/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); @@ -25693,7 +25687,7 @@ Object.defineProperty(SearchOff, "__esModule", { }); var default_1$4 = SearchOff.default = void 0; var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); -var _jsxRuntime$4 = requireJsxRuntime(); +var _jsxRuntime$4 = jsxRuntimeExports; var _default$4 = default_1$4 = SearchOff.default = (0, _createSvgIcon$4.default)([/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { @@ -25708,7 +25702,7 @@ Object.defineProperty(Sort, "__esModule", { }); var default_1$3 = Sort.default = void 0; var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); -var _jsxRuntime$3 = requireJsxRuntime(); +var _jsxRuntime$3 = jsxRuntimeExports; var _default$3 = default_1$3 = Sort.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); @@ -25721,7 +25715,7 @@ Object.defineProperty(SyncAlt, "__esModule", { }); var default_1$2 = SyncAlt.default = void 0; var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); -var _jsxRuntime$2 = requireJsxRuntime(); +var _jsxRuntime$2 = jsxRuntimeExports; var _default$2 = default_1$2 = SyncAlt.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); @@ -25734,7 +25728,7 @@ Object.defineProperty(ViewColumn, "__esModule", { }); var default_1$1 = ViewColumn.default = void 0; var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); -var _jsxRuntime$1 = requireJsxRuntime(); +var _jsxRuntime$1 = jsxRuntimeExports; var _default$1 = default_1$1 = ViewColumn.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); @@ -25747,7 +25741,7 @@ Object.defineProperty(VisibilityOff, "__esModule", { }); var default_1 = VisibilityOff.default = void 0; var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); -var _jsxRuntime = requireJsxRuntime(); +var _jsxRuntime = jsxRuntimeExports; var _default = default_1 = VisibilityOff.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); @@ -64682,16 +64676,18 @@ const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu(Open$7({ label: gubu_minExports.Default("", String), ux: Open$7({ kind: gubu_minExports.Exact("Slider"), - edit: gubu_minExports.Default(true, Boolean), - valueLabelDisplay: gubu_minExports.Exact("on", "auto", "off").Default("auto"), - orient: gubu_minExports.Exact("horizontal", "vertical").Default("horizontal"), - track: gubu_minExports.Exact("normal", "inverted", false).Default("normal"), - step: gubu_minExports.One(null, Number), - min: gubu_minExports.Default(0, Number), - max: gubu_minExports.Default(100, Number) + edit: gubu_minExports.Default(true), + step: gubu_minExports.Default(1), + min: gubu_minExports.Default(0), + max: gubu_minExports.Default(100), + props: { + marks: gubu_minExports.Default({}), + valueLabelDisplay: gubu_minExports.Exact("on", "auto", "off").Default("auto"), + direction: gubu_minExports.Exact("horizontal", "vertical").Default("horizontal"), + track: gubu_minExports.Exact("normal", "inverted", "disabled").Default("normal") + } }) - }), - errors: Open$7({}) + }) }), { name: CMPNAME$9 }); function BasicEntitySliderField(props) { const { spec } = props; @@ -64699,7 +64695,7 @@ function BasicEntitySliderField(props) { const { control, field, getValues } = basicEntityAutocompleteField; const val = getValues(field.name); return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [ - /* @__PURE__ */ jsxRuntimeExports.jsx(FormLabel$1, { id: field.id, children: field.label }), + /* @__PURE__ */ jsxRuntimeExports.jsx(FormLabel$1, { children: field.label }, `${field.id}-label`), /* @__PURE__ */ jsxRuntimeExports.jsx( Controller, { @@ -64710,23 +64706,30 @@ function BasicEntitySliderField(props) { Slider$1, { disabled: !field.ux.edit, - orientation: field.ux.orientation, + orientation: field.ux.direction, track: field.ux.track, - valueLabelDisplay: field.ux.valueLabelDisplay, + valueLabelDisplay: field.ux.props.valueLabelDisplay, step: field.ux.step, - marks: resolveMarks(field.ux.marks), + marks: resolveMarks(field.ux.props.marks), min: field.ux.min, max: field.ux.max, value, - onChange: (_2, newValue) => onChange(newValue) + onChange: (_2, newVal) => onChange(newVal) } ) - } + }, + `${field.id}-controller` ) ] }); } function resolveMarks(marks) { - return marks && typeof marks === "object" ? Object.keys(marks).map((key) => ({ label: marks[key], value: +key })) : marks; + if (!marks || typeof marks === "object" && Object.keys(marks).length === 0) { + return false; + } + if (typeof marks === "object") { + return Object.entries(marks).map(([key, value]) => ({ label: value, value: +key })); + } + return marks; } const CMPNAME$8 = "BasicEntityField"; const { Open: Open$6 } = gubu_minExports.Gubu; diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index 5819e9a..2fbefa9 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -1042,21 +1042,15 @@ var __async = (__this, __arguments, generator) => { } return reactJsxRuntime_development; } - var jsxRuntime$1 = jsxRuntime$2.exports; - var hasRequiredJsxRuntime; - function requireJsxRuntime() { - if (hasRequiredJsxRuntime) return jsxRuntime$2.exports; - hasRequiredJsxRuntime = 1; - "use strict"; - if (process.env.NODE_ENV === "production") { - jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); - } else { - jsxRuntime$2.exports = requireReactJsxRuntime_development(); - } - return jsxRuntime$2.exports; + var jsxRuntime = jsxRuntime$2.exports; + "use strict"; + if (process.env.NODE_ENV === "production") { + jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); + } else { + jsxRuntime$2.exports = requireReactJsxRuntime_development(); } - var jsxRuntimeExports = requireJsxRuntime(); - const jsxRuntime = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); + var jsxRuntimeExports = jsxRuntime$2.exports; + const jsxRuntime$1 = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); var gubu_min$2 = { exports: {} }; var gubu_min = gubu_min$2.exports; (function(module2, exports3) { @@ -25323,7 +25317,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$x = ArrowDownward.default = void 0; var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); - var _jsxRuntime$x = requireJsxRuntime(); + var _jsxRuntime$x = jsxRuntimeExports; var _default$x = default_1$x = ArrowDownward.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); @@ -25336,7 +25330,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$w = ArrowRight.default = void 0; var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); - var _jsxRuntime$w = requireJsxRuntime(); + var _jsxRuntime$w = jsxRuntimeExports; var _default$w = default_1$w = ArrowRight.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); @@ -25349,7 +25343,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$v = Cancel.default = void 0; var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); - var _jsxRuntime$v = requireJsxRuntime(); + var _jsxRuntime$v = jsxRuntimeExports; var _default$v = default_1$v = Cancel.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); @@ -25362,7 +25356,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$u = ChevronLeft.default = void 0; var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); - var _jsxRuntime$u = requireJsxRuntime(); + var _jsxRuntime$u = jsxRuntimeExports; var _default$u = default_1$u = ChevronLeft.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); @@ -25375,7 +25369,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$t = ChevronRight.default = void 0; var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); - var _jsxRuntime$t = requireJsxRuntime(); + var _jsxRuntime$t = jsxRuntimeExports; var _default$t = default_1$t = ChevronRight.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); @@ -25388,7 +25382,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$s = ClearAll.default = void 0; var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); - var _jsxRuntime$s = requireJsxRuntime(); + var _jsxRuntime$s = jsxRuntimeExports; var _default$s = default_1$s = ClearAll.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); @@ -25401,7 +25395,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$r = Close.default = void 0; var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); - var _jsxRuntime$r = requireJsxRuntime(); + var _jsxRuntime$r = jsxRuntimeExports; var _default$r = default_1$r = Close.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); @@ -25414,7 +25408,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$q = ContentCopy.default = void 0; var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); - var _jsxRuntime$q = requireJsxRuntime(); + var _jsxRuntime$q = jsxRuntimeExports; var _default$q = default_1$q = ContentCopy.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); @@ -25427,7 +25421,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$p = DensityLarge.default = void 0; var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); - var _jsxRuntime$p = requireJsxRuntime(); + var _jsxRuntime$p = jsxRuntimeExports; var _default$p = default_1$p = DensityLarge.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); @@ -25440,7 +25434,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$o = DensityMedium.default = void 0; var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); - var _jsxRuntime$o = requireJsxRuntime(); + var _jsxRuntime$o = jsxRuntimeExports; var _default$o = default_1$o = DensityMedium.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); @@ -25453,7 +25447,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$n = DensitySmall.default = void 0; var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); - var _jsxRuntime$n = requireJsxRuntime(); + var _jsxRuntime$n = jsxRuntimeExports; var _default$n = default_1$n = DensitySmall.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); @@ -25466,7 +25460,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$m = DragHandle.default = void 0; var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); - var _jsxRuntime$m = requireJsxRuntime(); + var _jsxRuntime$m = jsxRuntimeExports; var _default$m = default_1$m = DragHandle.default = (0, _createSvgIcon$m.default)(/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); @@ -25479,7 +25473,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$l = DynamicFeed.default = void 0; var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); - var _jsxRuntime$l = requireJsxRuntime(); + var _jsxRuntime$l = jsxRuntimeExports; var _default$l = default_1$l = DynamicFeed.default = (0, _createSvgIcon$l.default)([/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { @@ -25494,7 +25488,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$k = Edit.default = void 0; var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); - var _jsxRuntime$k = requireJsxRuntime(); + var _jsxRuntime$k = jsxRuntimeExports; var _default$k = default_1$k = Edit.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); @@ -25507,7 +25501,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$j = ExpandMore.default = void 0; var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); - var _jsxRuntime$j = requireJsxRuntime(); + var _jsxRuntime$j = jsxRuntimeExports; var _default$j = default_1$j = ExpandMore.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); @@ -25520,7 +25514,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$i = FilterAlt.default = void 0; var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); - var _jsxRuntime$i = requireJsxRuntime(); + var _jsxRuntime$i = jsxRuntimeExports; var _default$i = default_1$i = FilterAlt.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); @@ -25533,7 +25527,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$h = FilterList.default = void 0; var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); - var _jsxRuntime$h = requireJsxRuntime(); + var _jsxRuntime$h = jsxRuntimeExports; var _default$h = default_1$h = FilterList.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); @@ -25546,7 +25540,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$g = FilterListOff.default = void 0; var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); - var _jsxRuntime$g = requireJsxRuntime(); + var _jsxRuntime$g = jsxRuntimeExports; var _default$g = default_1$g = FilterListOff.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); @@ -25559,7 +25553,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$f = FirstPage.default = void 0; var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); - var _jsxRuntime$f = requireJsxRuntime(); + var _jsxRuntime$f = jsxRuntimeExports; var _default$f = default_1$f = FirstPage.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); @@ -25572,7 +25566,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$e = Fullscreen.default = void 0; var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); - var _jsxRuntime$e = requireJsxRuntime(); + var _jsxRuntime$e = jsxRuntimeExports; var _default$e = default_1$e = Fullscreen.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); @@ -25585,7 +25579,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$d = FullscreenExit.default = void 0; var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); - var _jsxRuntime$d = requireJsxRuntime(); + var _jsxRuntime$d = jsxRuntimeExports; var _default$d = default_1$d = FullscreenExit.default = (0, _createSvgIcon$d.default)(/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); @@ -25598,7 +25592,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$c = KeyboardDoubleArrowDown.default = void 0; var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); - var _jsxRuntime$c = requireJsxRuntime(); + var _jsxRuntime$c = jsxRuntimeExports; var _default$c = default_1$c = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$c.default)([/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { @@ -25613,7 +25607,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$b = LastPage.default = void 0; var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); - var _jsxRuntime$b = requireJsxRuntime(); + var _jsxRuntime$b = jsxRuntimeExports; var _default$b = default_1$b = LastPage.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); @@ -25626,7 +25620,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$a = MoreHoriz.default = void 0; var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); - var _jsxRuntime$a = requireJsxRuntime(); + var _jsxRuntime$a = jsxRuntimeExports; var _default$a = default_1$a = MoreHoriz.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); @@ -25639,7 +25633,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$9 = MoreVert.default = void 0; var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); - var _jsxRuntime$9 = requireJsxRuntime(); + var _jsxRuntime$9 = jsxRuntimeExports; var _default$9 = default_1$9 = MoreVert.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); @@ -25652,7 +25646,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$8 = PushPin.default = void 0; var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); - var _jsxRuntime$8 = requireJsxRuntime(); + var _jsxRuntime$8 = jsxRuntimeExports; var _default$8 = default_1$8 = PushPin.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" @@ -25666,7 +25660,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$7 = RestartAlt.default = void 0; var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); - var _jsxRuntime$7 = requireJsxRuntime(); + var _jsxRuntime$7 = jsxRuntimeExports; var _default$7 = default_1$7 = RestartAlt.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); @@ -25679,7 +25673,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$6 = Save.default = void 0; var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); - var _jsxRuntime$6 = requireJsxRuntime(); + var _jsxRuntime$6 = jsxRuntimeExports; var _default$6 = default_1$6 = Save.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); @@ -25692,7 +25686,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$5 = Search.default = void 0; var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); - var _jsxRuntime$5 = requireJsxRuntime(); + var _jsxRuntime$5 = jsxRuntimeExports; var _default$5 = default_1$5 = Search.default = (0, _createSvgIcon$5.default)(/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); @@ -25705,7 +25699,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$4 = SearchOff.default = void 0; var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); - var _jsxRuntime$4 = requireJsxRuntime(); + var _jsxRuntime$4 = jsxRuntimeExports; var _default$4 = default_1$4 = SearchOff.default = (0, _createSvgIcon$4.default)([/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { @@ -25720,7 +25714,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$3 = Sort.default = void 0; var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); - var _jsxRuntime$3 = requireJsxRuntime(); + var _jsxRuntime$3 = jsxRuntimeExports; var _default$3 = default_1$3 = Sort.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); @@ -25733,7 +25727,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$2 = SyncAlt.default = void 0; var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); - var _jsxRuntime$2 = requireJsxRuntime(); + var _jsxRuntime$2 = jsxRuntimeExports; var _default$2 = default_1$2 = SyncAlt.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); @@ -25746,7 +25740,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$1 = ViewColumn.default = void 0; var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); - var _jsxRuntime$1 = requireJsxRuntime(); + var _jsxRuntime$1 = jsxRuntimeExports; var _default$1 = default_1$1 = ViewColumn.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); @@ -25759,7 +25753,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1 = VisibilityOff.default = void 0; var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); - var _jsxRuntime = requireJsxRuntime(); + var _jsxRuntime = jsxRuntimeExports; var _default = default_1 = VisibilityOff.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); @@ -64694,16 +64688,18 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha label: gubu_minExports.Default("", String), ux: Open$7({ kind: gubu_minExports.Exact("Slider"), - edit: gubu_minExports.Default(true, Boolean), - valueLabelDisplay: gubu_minExports.Exact("on", "auto", "off").Default("auto"), - orient: gubu_minExports.Exact("horizontal", "vertical").Default("horizontal"), - track: gubu_minExports.Exact("normal", "inverted", false).Default("normal"), - step: gubu_minExports.One(null, Number), - min: gubu_minExports.Default(0, Number), - max: gubu_minExports.Default(100, Number) + edit: gubu_minExports.Default(true), + step: gubu_minExports.Default(1), + min: gubu_minExports.Default(0), + max: gubu_minExports.Default(100), + props: { + marks: gubu_minExports.Default({}), + valueLabelDisplay: gubu_minExports.Exact("on", "auto", "off").Default("auto"), + direction: gubu_minExports.Exact("horizontal", "vertical").Default("horizontal"), + track: gubu_minExports.Exact("normal", "inverted", "disabled").Default("normal") + } }) - }), - errors: Open$7({}) + }) }), { name: CMPNAME$9 }); function BasicEntitySliderField(props) { const { spec } = props; @@ -64711,7 +64707,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const { control, field, getValues } = basicEntityAutocompleteField; const val = getValues(field.name); return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [ - /* @__PURE__ */ jsxRuntimeExports.jsx(material.FormLabel, { id: field.id, children: field.label }), + /* @__PURE__ */ jsxRuntimeExports.jsx(material.FormLabel, { children: field.label }, `${field.id}-label`), /* @__PURE__ */ jsxRuntimeExports.jsx( Controller, { @@ -64722,23 +64718,30 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha material.Slider, { disabled: !field.ux.edit, - orientation: field.ux.orientation, + orientation: field.ux.direction, track: field.ux.track, - valueLabelDisplay: field.ux.valueLabelDisplay, + valueLabelDisplay: field.ux.props.valueLabelDisplay, step: field.ux.step, - marks: resolveMarks(field.ux.marks), + marks: resolveMarks(field.ux.props.marks), min: field.ux.min, max: field.ux.max, value, - onChange: (_2, newValue) => onChange(newValue) + onChange: (_2, newVal) => onChange(newVal) } ) - } + }, + `${field.id}-controller` ) ] }); } function resolveMarks(marks) { - return marks && typeof marks === "object" ? Object.keys(marks).map((key) => ({ label: marks[key], value: +key })) : marks; + if (!marks || typeof marks === "object" && Object.keys(marks).length === 0) { + return false; + } + if (typeof marks === "object") { + return Object.entries(marks).map(([key, value]) => ({ label: value, value: +key })); + } + return marks; } const CMPNAME$8 = "BasicEntityField"; const { Open: Open$6 } = gubu_minExports.Gubu; diff --git a/src/lib/BasicEntitySliderField.tsx b/src/lib/BasicEntitySliderField.tsx index 47bbee5..ea182fb 100644 --- a/src/lib/BasicEntitySliderField.tsx +++ b/src/lib/BasicEntitySliderField.tsx @@ -22,6 +22,7 @@ const BasicEntitySliderFieldSpecShape = Gubu(Open({ min: Default(0), max: Default(100), props: { + marks: Default({}), valueLabelDisplay: Exact('on', 'auto', 'off').Default('auto'), direction: Exact('horizontal', 'vertical').Default('horizontal'), track: Exact('normal', 'inverted', 'disabled').Default('normal'), @@ -52,9 +53,9 @@ function BasicEntitySliderField(props: any) { disabled={!field.ux.edit} orientation={field.ux.direction} track={field.ux.track} - valueLabelDisplay={field.ux.valueLabelDisplay} + valueLabelDisplay={field.ux.props.valueLabelDisplay} step={field.ux.step} - marks={resolveMarks(field.ux.marks)} + marks={resolveMarks(field.ux.props.marks)} min={field.ux.min} max={field.ux.max} value={value} @@ -67,9 +68,14 @@ function BasicEntitySliderField(props: any) { } function resolveMarks(marks: any) { - return marks && typeof marks === 'object' - ? Object.keys(marks).map(key => ({ label: marks[key], value: +key })) - : marks + if (!marks || (typeof marks === 'object' && Object.keys(marks).length === 0)) { + return false; + } + if (typeof marks === 'object') { + return Object.entries(marks).map(([key, value]) => ({ label: value, value: +key })); + } + + return marks } From 865cb9b1117f31a57188b00cfb3d5a7297132448 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 25 Jul 2024 20:45:49 +0100 Subject: [PATCH 032/122] Refactor BasicEntityAutocompleteField component --- dist/voxgig-model-react.es.js | 145 +++++++++++++++-------- dist/voxgig-model-react.umd.js | 145 +++++++++++++++-------- src/lib/BasicEntityAutocompleteField.tsx | 60 +++++++--- 3 files changed, 228 insertions(+), 122 deletions(-) diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index 07dd080..9c06fac 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -1030,15 +1030,21 @@ function requireReactJsxRuntime_development() { } return reactJsxRuntime_development; } -var jsxRuntime = jsxRuntime$2.exports; -"use strict"; -if (process.env.NODE_ENV === "production") { - jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); -} else { - jsxRuntime$2.exports = requireReactJsxRuntime_development(); +var jsxRuntime$1 = jsxRuntime$2.exports; +var hasRequiredJsxRuntime; +function requireJsxRuntime() { + if (hasRequiredJsxRuntime) return jsxRuntime$2.exports; + hasRequiredJsxRuntime = 1; + "use strict"; + if (process.env.NODE_ENV === "production") { + jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); + } else { + jsxRuntime$2.exports = requireReactJsxRuntime_development(); + } + return jsxRuntime$2.exports; } -var jsxRuntimeExports = jsxRuntime$2.exports; -const jsxRuntime$1 = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); +var jsxRuntimeExports = requireJsxRuntime(); +const jsxRuntime = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); var gubu_min$2 = { exports: {} }; var gubu_min = gubu_min$2.exports; (function(module, exports) { @@ -25305,7 +25311,7 @@ Object.defineProperty(ArrowDownward, "__esModule", { }); var default_1$x = ArrowDownward.default = void 0; var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); -var _jsxRuntime$x = jsxRuntimeExports; +var _jsxRuntime$x = requireJsxRuntime(); var _default$x = default_1$x = ArrowDownward.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); @@ -25318,7 +25324,7 @@ Object.defineProperty(ArrowRight, "__esModule", { }); var default_1$w = ArrowRight.default = void 0; var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); -var _jsxRuntime$w = jsxRuntimeExports; +var _jsxRuntime$w = requireJsxRuntime(); var _default$w = default_1$w = ArrowRight.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); @@ -25331,7 +25337,7 @@ Object.defineProperty(Cancel, "__esModule", { }); var default_1$v = Cancel.default = void 0; var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); -var _jsxRuntime$v = jsxRuntimeExports; +var _jsxRuntime$v = requireJsxRuntime(); var _default$v = default_1$v = Cancel.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); @@ -25344,7 +25350,7 @@ Object.defineProperty(ChevronLeft, "__esModule", { }); var default_1$u = ChevronLeft.default = void 0; var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); -var _jsxRuntime$u = jsxRuntimeExports; +var _jsxRuntime$u = requireJsxRuntime(); var _default$u = default_1$u = ChevronLeft.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); @@ -25357,7 +25363,7 @@ Object.defineProperty(ChevronRight, "__esModule", { }); var default_1$t = ChevronRight.default = void 0; var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); -var _jsxRuntime$t = jsxRuntimeExports; +var _jsxRuntime$t = requireJsxRuntime(); var _default$t = default_1$t = ChevronRight.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); @@ -25370,7 +25376,7 @@ Object.defineProperty(ClearAll, "__esModule", { }); var default_1$s = ClearAll.default = void 0; var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); -var _jsxRuntime$s = jsxRuntimeExports; +var _jsxRuntime$s = requireJsxRuntime(); var _default$s = default_1$s = ClearAll.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); @@ -25383,7 +25389,7 @@ Object.defineProperty(Close, "__esModule", { }); var default_1$r = Close.default = void 0; var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); -var _jsxRuntime$r = jsxRuntimeExports; +var _jsxRuntime$r = requireJsxRuntime(); var _default$r = default_1$r = Close.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); @@ -25396,7 +25402,7 @@ Object.defineProperty(ContentCopy, "__esModule", { }); var default_1$q = ContentCopy.default = void 0; var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); -var _jsxRuntime$q = jsxRuntimeExports; +var _jsxRuntime$q = requireJsxRuntime(); var _default$q = default_1$q = ContentCopy.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); @@ -25409,7 +25415,7 @@ Object.defineProperty(DensityLarge, "__esModule", { }); var default_1$p = DensityLarge.default = void 0; var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); -var _jsxRuntime$p = jsxRuntimeExports; +var _jsxRuntime$p = requireJsxRuntime(); var _default$p = default_1$p = DensityLarge.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); @@ -25422,7 +25428,7 @@ Object.defineProperty(DensityMedium, "__esModule", { }); var default_1$o = DensityMedium.default = void 0; var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); -var _jsxRuntime$o = jsxRuntimeExports; +var _jsxRuntime$o = requireJsxRuntime(); var _default$o = default_1$o = DensityMedium.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); @@ -25435,7 +25441,7 @@ Object.defineProperty(DensitySmall, "__esModule", { }); var default_1$n = DensitySmall.default = void 0; var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); -var _jsxRuntime$n = jsxRuntimeExports; +var _jsxRuntime$n = requireJsxRuntime(); var _default$n = default_1$n = DensitySmall.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); @@ -25448,7 +25454,7 @@ Object.defineProperty(DragHandle, "__esModule", { }); var default_1$m = DragHandle.default = void 0; var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); -var _jsxRuntime$m = jsxRuntimeExports; +var _jsxRuntime$m = requireJsxRuntime(); var _default$m = default_1$m = DragHandle.default = (0, _createSvgIcon$m.default)(/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); @@ -25461,7 +25467,7 @@ Object.defineProperty(DynamicFeed, "__esModule", { }); var default_1$l = DynamicFeed.default = void 0; var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); -var _jsxRuntime$l = jsxRuntimeExports; +var _jsxRuntime$l = requireJsxRuntime(); var _default$l = default_1$l = DynamicFeed.default = (0, _createSvgIcon$l.default)([/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { @@ -25476,7 +25482,7 @@ Object.defineProperty(Edit, "__esModule", { }); var default_1$k = Edit.default = void 0; var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); -var _jsxRuntime$k = jsxRuntimeExports; +var _jsxRuntime$k = requireJsxRuntime(); var _default$k = default_1$k = Edit.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); @@ -25489,7 +25495,7 @@ Object.defineProperty(ExpandMore, "__esModule", { }); var default_1$j = ExpandMore.default = void 0; var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); -var _jsxRuntime$j = jsxRuntimeExports; +var _jsxRuntime$j = requireJsxRuntime(); var _default$j = default_1$j = ExpandMore.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); @@ -25502,7 +25508,7 @@ Object.defineProperty(FilterAlt, "__esModule", { }); var default_1$i = FilterAlt.default = void 0; var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); -var _jsxRuntime$i = jsxRuntimeExports; +var _jsxRuntime$i = requireJsxRuntime(); var _default$i = default_1$i = FilterAlt.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); @@ -25515,7 +25521,7 @@ Object.defineProperty(FilterList, "__esModule", { }); var default_1$h = FilterList.default = void 0; var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); -var _jsxRuntime$h = jsxRuntimeExports; +var _jsxRuntime$h = requireJsxRuntime(); var _default$h = default_1$h = FilterList.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); @@ -25528,7 +25534,7 @@ Object.defineProperty(FilterListOff, "__esModule", { }); var default_1$g = FilterListOff.default = void 0; var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); -var _jsxRuntime$g = jsxRuntimeExports; +var _jsxRuntime$g = requireJsxRuntime(); var _default$g = default_1$g = FilterListOff.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); @@ -25541,7 +25547,7 @@ Object.defineProperty(FirstPage, "__esModule", { }); var default_1$f = FirstPage.default = void 0; var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); -var _jsxRuntime$f = jsxRuntimeExports; +var _jsxRuntime$f = requireJsxRuntime(); var _default$f = default_1$f = FirstPage.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); @@ -25554,7 +25560,7 @@ Object.defineProperty(Fullscreen, "__esModule", { }); var default_1$e = Fullscreen.default = void 0; var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); -var _jsxRuntime$e = jsxRuntimeExports; +var _jsxRuntime$e = requireJsxRuntime(); var _default$e = default_1$e = Fullscreen.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); @@ -25567,7 +25573,7 @@ Object.defineProperty(FullscreenExit, "__esModule", { }); var default_1$d = FullscreenExit.default = void 0; var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); -var _jsxRuntime$d = jsxRuntimeExports; +var _jsxRuntime$d = requireJsxRuntime(); var _default$d = default_1$d = FullscreenExit.default = (0, _createSvgIcon$d.default)(/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); @@ -25580,7 +25586,7 @@ Object.defineProperty(KeyboardDoubleArrowDown, "__esModule", { }); var default_1$c = KeyboardDoubleArrowDown.default = void 0; var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); -var _jsxRuntime$c = jsxRuntimeExports; +var _jsxRuntime$c = requireJsxRuntime(); var _default$c = default_1$c = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$c.default)([/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { @@ -25595,7 +25601,7 @@ Object.defineProperty(LastPage, "__esModule", { }); var default_1$b = LastPage.default = void 0; var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); -var _jsxRuntime$b = jsxRuntimeExports; +var _jsxRuntime$b = requireJsxRuntime(); var _default$b = default_1$b = LastPage.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); @@ -25608,7 +25614,7 @@ Object.defineProperty(MoreHoriz, "__esModule", { }); var default_1$a = MoreHoriz.default = void 0; var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); -var _jsxRuntime$a = jsxRuntimeExports; +var _jsxRuntime$a = requireJsxRuntime(); var _default$a = default_1$a = MoreHoriz.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); @@ -25621,7 +25627,7 @@ Object.defineProperty(MoreVert, "__esModule", { }); var default_1$9 = MoreVert.default = void 0; var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); -var _jsxRuntime$9 = jsxRuntimeExports; +var _jsxRuntime$9 = requireJsxRuntime(); var _default$9 = default_1$9 = MoreVert.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); @@ -25634,7 +25640,7 @@ Object.defineProperty(PushPin, "__esModule", { }); var default_1$8 = PushPin.default = void 0; var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); -var _jsxRuntime$8 = jsxRuntimeExports; +var _jsxRuntime$8 = requireJsxRuntime(); var _default$8 = default_1$8 = PushPin.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" @@ -25648,7 +25654,7 @@ Object.defineProperty(RestartAlt, "__esModule", { }); var default_1$7 = RestartAlt.default = void 0; var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); -var _jsxRuntime$7 = jsxRuntimeExports; +var _jsxRuntime$7 = requireJsxRuntime(); var _default$7 = default_1$7 = RestartAlt.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); @@ -25661,7 +25667,7 @@ Object.defineProperty(Save, "__esModule", { }); var default_1$6 = Save.default = void 0; var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); -var _jsxRuntime$6 = jsxRuntimeExports; +var _jsxRuntime$6 = requireJsxRuntime(); var _default$6 = default_1$6 = Save.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); @@ -25674,7 +25680,7 @@ Object.defineProperty(Search, "__esModule", { }); var default_1$5 = Search.default = void 0; var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); -var _jsxRuntime$5 = jsxRuntimeExports; +var _jsxRuntime$5 = requireJsxRuntime(); var _default$5 = default_1$5 = Search.default = (0, _createSvgIcon$5.default)(/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); @@ -25687,7 +25693,7 @@ Object.defineProperty(SearchOff, "__esModule", { }); var default_1$4 = SearchOff.default = void 0; var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); -var _jsxRuntime$4 = jsxRuntimeExports; +var _jsxRuntime$4 = requireJsxRuntime(); var _default$4 = default_1$4 = SearchOff.default = (0, _createSvgIcon$4.default)([/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { @@ -25702,7 +25708,7 @@ Object.defineProperty(Sort, "__esModule", { }); var default_1$3 = Sort.default = void 0; var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); -var _jsxRuntime$3 = jsxRuntimeExports; +var _jsxRuntime$3 = requireJsxRuntime(); var _default$3 = default_1$3 = Sort.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); @@ -25715,7 +25721,7 @@ Object.defineProperty(SyncAlt, "__esModule", { }); var default_1$2 = SyncAlt.default = void 0; var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); -var _jsxRuntime$2 = jsxRuntimeExports; +var _jsxRuntime$2 = requireJsxRuntime(); var _default$2 = default_1$2 = SyncAlt.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); @@ -25728,7 +25734,7 @@ Object.defineProperty(ViewColumn, "__esModule", { }); var default_1$1 = ViewColumn.default = void 0; var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); -var _jsxRuntime$1 = jsxRuntimeExports; +var _jsxRuntime$1 = requireJsxRuntime(); var _default$1 = default_1$1 = ViewColumn.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); @@ -25741,7 +25747,7 @@ Object.defineProperty(VisibilityOff, "__esModule", { }); var default_1 = VisibilityOff.default = void 0; var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); -var _jsxRuntime = jsxRuntimeExports; +var _jsxRuntime = requireJsxRuntime(); var _default = default_1 = VisibilityOff.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); @@ -64675,9 +64681,10 @@ const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu(Open$7({ kind: String, label: gubu_minExports.Default(""), options: Open$7({ - default: Open$7({}), label: { field: gubu_minExports.Default("label") }, + value: { field: gubu_minExports.Default("value") }, multiple: gubu_minExports.Default(false), + default: Open$7({}), ents: Open$7({}) }), ux: Open$7({ @@ -64706,7 +64713,7 @@ function BasicEntityAutocompleteField(props) { options: resolvedOptions, isOptionEqualToValue: (opt, val) => opt === val || (opt == null ? void 0 : opt.id) != null && (val == null ? void 0 : val.id) != null && opt.id === val.id || (opt == null ? void 0 : opt.value) != null && (val == null ? void 0 : val.value) != null && opt.value === val.value, getOptionLabel: (option) => option[field.options.label.field], - value, + value: resolveValue(field.options, value), onChange: (_2, newVal) => onChange(newVal), renderInput: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx(TextField$1, __spreadProps(__spreadValues({}, params), { label: field.label })) } @@ -64716,19 +64723,53 @@ function BasicEntityAutocompleteField(props) { ); } function resolveOptions(options) { - const resolvedOptions = Object.keys(options.ents).map((key) => ({ - label: options.ents[key].label, - value: key - })); - const resolvedDefault = options.multiple === false ? Object.keys(options.default).length > 0 ? { value: Object.keys(options.default)[0], label: options.default[Object.keys(options.default)[0]].label } : null : Object.keys(options.default).map((key) => ({ - label: options.default[key].label, - value: key - })); + const { multiple, ents, label, value, default: defaultValues } = options; + const labelField = label == null ? void 0 : label.field; + const valueField = value == null ? void 0 : value.field; + const resolvedOptions = Object.keys(ents).map((key) => { + var _a; + return { + [labelField]: (_a = ents == null ? void 0 : ents[key]) == null ? void 0 : _a[labelField], + [valueField]: key + }; + }); + let resolvedDefault; + if (multiple === false) { + if (Object.keys(defaultValues).length > 0) { + const firstKey = Object.keys(defaultValues)[0]; + resolvedDefault = { value: firstKey, label: defaultValues[firstKey][labelField] }; + } else { + resolvedDefault = null; + } + } else { + resolvedDefault = Object.keys(defaultValues).map((key) => ({ + label: defaultValues[key].label, + value: key + })); + } return { resolvedOptions, resolvedDefault }; } +function resolveValue(options, val) { + const { multiple, ents, label, value } = options; + const labelField = label == null ? void 0 : label.field; + const valueField = value == null ? void 0 : value.field; + const getValue2 = (val2) => { + var _a; + return ((_a = ents == null ? void 0 : ents[val2]) == null ? void 0 : _a[labelField]) ? { [valueField]: val2, [labelField]: ents[val2][labelField] || val2 } : void 0; + }; + if (!multiple) { + return typeof val === "string" ? getValue2(val) : val || void 0; + } else { + if (typeof val === "string") { + const resolvedValue = getValue2(val); + return resolvedValue ? [resolvedValue] : []; + } + return val || []; + } +} const CMPNAME$8 = "BasicEntityField"; const { Open: Open$6 } = gubu_minExports.Gubu; const BasicEntityFieldSpecShape = gubu_minExports.Gubu(Open$6({}), { name: CMPNAME$8 }); diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index ffb79bd..482b77d 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -1042,15 +1042,21 @@ var __async = (__this, __arguments, generator) => { } return reactJsxRuntime_development; } - var jsxRuntime = jsxRuntime$2.exports; - "use strict"; - if (process.env.NODE_ENV === "production") { - jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); - } else { - jsxRuntime$2.exports = requireReactJsxRuntime_development(); + var jsxRuntime$1 = jsxRuntime$2.exports; + var hasRequiredJsxRuntime; + function requireJsxRuntime() { + if (hasRequiredJsxRuntime) return jsxRuntime$2.exports; + hasRequiredJsxRuntime = 1; + "use strict"; + if (process.env.NODE_ENV === "production") { + jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); + } else { + jsxRuntime$2.exports = requireReactJsxRuntime_development(); + } + return jsxRuntime$2.exports; } - var jsxRuntimeExports = jsxRuntime$2.exports; - const jsxRuntime$1 = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); + var jsxRuntimeExports = requireJsxRuntime(); + const jsxRuntime = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); var gubu_min$2 = { exports: {} }; var gubu_min = gubu_min$2.exports; (function(module2, exports3) { @@ -25317,7 +25323,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$x = ArrowDownward.default = void 0; var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); - var _jsxRuntime$x = jsxRuntimeExports; + var _jsxRuntime$x = requireJsxRuntime(); var _default$x = default_1$x = ArrowDownward.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); @@ -25330,7 +25336,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$w = ArrowRight.default = void 0; var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); - var _jsxRuntime$w = jsxRuntimeExports; + var _jsxRuntime$w = requireJsxRuntime(); var _default$w = default_1$w = ArrowRight.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); @@ -25343,7 +25349,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$v = Cancel.default = void 0; var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); - var _jsxRuntime$v = jsxRuntimeExports; + var _jsxRuntime$v = requireJsxRuntime(); var _default$v = default_1$v = Cancel.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); @@ -25356,7 +25362,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$u = ChevronLeft.default = void 0; var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); - var _jsxRuntime$u = jsxRuntimeExports; + var _jsxRuntime$u = requireJsxRuntime(); var _default$u = default_1$u = ChevronLeft.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); @@ -25369,7 +25375,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$t = ChevronRight.default = void 0; var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); - var _jsxRuntime$t = jsxRuntimeExports; + var _jsxRuntime$t = requireJsxRuntime(); var _default$t = default_1$t = ChevronRight.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); @@ -25382,7 +25388,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$s = ClearAll.default = void 0; var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); - var _jsxRuntime$s = jsxRuntimeExports; + var _jsxRuntime$s = requireJsxRuntime(); var _default$s = default_1$s = ClearAll.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); @@ -25395,7 +25401,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$r = Close.default = void 0; var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); - var _jsxRuntime$r = jsxRuntimeExports; + var _jsxRuntime$r = requireJsxRuntime(); var _default$r = default_1$r = Close.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); @@ -25408,7 +25414,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$q = ContentCopy.default = void 0; var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); - var _jsxRuntime$q = jsxRuntimeExports; + var _jsxRuntime$q = requireJsxRuntime(); var _default$q = default_1$q = ContentCopy.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); @@ -25421,7 +25427,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$p = DensityLarge.default = void 0; var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); - var _jsxRuntime$p = jsxRuntimeExports; + var _jsxRuntime$p = requireJsxRuntime(); var _default$p = default_1$p = DensityLarge.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); @@ -25434,7 +25440,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$o = DensityMedium.default = void 0; var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); - var _jsxRuntime$o = jsxRuntimeExports; + var _jsxRuntime$o = requireJsxRuntime(); var _default$o = default_1$o = DensityMedium.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); @@ -25447,7 +25453,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$n = DensitySmall.default = void 0; var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); - var _jsxRuntime$n = jsxRuntimeExports; + var _jsxRuntime$n = requireJsxRuntime(); var _default$n = default_1$n = DensitySmall.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); @@ -25460,7 +25466,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$m = DragHandle.default = void 0; var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); - var _jsxRuntime$m = jsxRuntimeExports; + var _jsxRuntime$m = requireJsxRuntime(); var _default$m = default_1$m = DragHandle.default = (0, _createSvgIcon$m.default)(/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); @@ -25473,7 +25479,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$l = DynamicFeed.default = void 0; var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); - var _jsxRuntime$l = jsxRuntimeExports; + var _jsxRuntime$l = requireJsxRuntime(); var _default$l = default_1$l = DynamicFeed.default = (0, _createSvgIcon$l.default)([/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { @@ -25488,7 +25494,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$k = Edit.default = void 0; var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); - var _jsxRuntime$k = jsxRuntimeExports; + var _jsxRuntime$k = requireJsxRuntime(); var _default$k = default_1$k = Edit.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); @@ -25501,7 +25507,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$j = ExpandMore.default = void 0; var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); - var _jsxRuntime$j = jsxRuntimeExports; + var _jsxRuntime$j = requireJsxRuntime(); var _default$j = default_1$j = ExpandMore.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); @@ -25514,7 +25520,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$i = FilterAlt.default = void 0; var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); - var _jsxRuntime$i = jsxRuntimeExports; + var _jsxRuntime$i = requireJsxRuntime(); var _default$i = default_1$i = FilterAlt.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); @@ -25527,7 +25533,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$h = FilterList.default = void 0; var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); - var _jsxRuntime$h = jsxRuntimeExports; + var _jsxRuntime$h = requireJsxRuntime(); var _default$h = default_1$h = FilterList.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); @@ -25540,7 +25546,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$g = FilterListOff.default = void 0; var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); - var _jsxRuntime$g = jsxRuntimeExports; + var _jsxRuntime$g = requireJsxRuntime(); var _default$g = default_1$g = FilterListOff.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); @@ -25553,7 +25559,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$f = FirstPage.default = void 0; var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); - var _jsxRuntime$f = jsxRuntimeExports; + var _jsxRuntime$f = requireJsxRuntime(); var _default$f = default_1$f = FirstPage.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); @@ -25566,7 +25572,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$e = Fullscreen.default = void 0; var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); - var _jsxRuntime$e = jsxRuntimeExports; + var _jsxRuntime$e = requireJsxRuntime(); var _default$e = default_1$e = Fullscreen.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); @@ -25579,7 +25585,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$d = FullscreenExit.default = void 0; var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); - var _jsxRuntime$d = jsxRuntimeExports; + var _jsxRuntime$d = requireJsxRuntime(); var _default$d = default_1$d = FullscreenExit.default = (0, _createSvgIcon$d.default)(/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); @@ -25592,7 +25598,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$c = KeyboardDoubleArrowDown.default = void 0; var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); - var _jsxRuntime$c = jsxRuntimeExports; + var _jsxRuntime$c = requireJsxRuntime(); var _default$c = default_1$c = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$c.default)([/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { @@ -25607,7 +25613,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$b = LastPage.default = void 0; var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); - var _jsxRuntime$b = jsxRuntimeExports; + var _jsxRuntime$b = requireJsxRuntime(); var _default$b = default_1$b = LastPage.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); @@ -25620,7 +25626,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$a = MoreHoriz.default = void 0; var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); - var _jsxRuntime$a = jsxRuntimeExports; + var _jsxRuntime$a = requireJsxRuntime(); var _default$a = default_1$a = MoreHoriz.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); @@ -25633,7 +25639,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$9 = MoreVert.default = void 0; var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); - var _jsxRuntime$9 = jsxRuntimeExports; + var _jsxRuntime$9 = requireJsxRuntime(); var _default$9 = default_1$9 = MoreVert.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); @@ -25646,7 +25652,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$8 = PushPin.default = void 0; var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); - var _jsxRuntime$8 = jsxRuntimeExports; + var _jsxRuntime$8 = requireJsxRuntime(); var _default$8 = default_1$8 = PushPin.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" @@ -25660,7 +25666,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$7 = RestartAlt.default = void 0; var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); - var _jsxRuntime$7 = jsxRuntimeExports; + var _jsxRuntime$7 = requireJsxRuntime(); var _default$7 = default_1$7 = RestartAlt.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); @@ -25673,7 +25679,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$6 = Save.default = void 0; var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); - var _jsxRuntime$6 = jsxRuntimeExports; + var _jsxRuntime$6 = requireJsxRuntime(); var _default$6 = default_1$6 = Save.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); @@ -25686,7 +25692,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$5 = Search.default = void 0; var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); - var _jsxRuntime$5 = jsxRuntimeExports; + var _jsxRuntime$5 = requireJsxRuntime(); var _default$5 = default_1$5 = Search.default = (0, _createSvgIcon$5.default)(/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); @@ -25699,7 +25705,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$4 = SearchOff.default = void 0; var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); - var _jsxRuntime$4 = jsxRuntimeExports; + var _jsxRuntime$4 = requireJsxRuntime(); var _default$4 = default_1$4 = SearchOff.default = (0, _createSvgIcon$4.default)([/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { @@ -25714,7 +25720,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$3 = Sort.default = void 0; var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); - var _jsxRuntime$3 = jsxRuntimeExports; + var _jsxRuntime$3 = requireJsxRuntime(); var _default$3 = default_1$3 = Sort.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); @@ -25727,7 +25733,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$2 = SyncAlt.default = void 0; var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); - var _jsxRuntime$2 = jsxRuntimeExports; + var _jsxRuntime$2 = requireJsxRuntime(); var _default$2 = default_1$2 = SyncAlt.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); @@ -25740,7 +25746,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$1 = ViewColumn.default = void 0; var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); - var _jsxRuntime$1 = jsxRuntimeExports; + var _jsxRuntime$1 = requireJsxRuntime(); var _default$1 = default_1$1 = ViewColumn.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); @@ -25753,7 +25759,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1 = VisibilityOff.default = void 0; var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); - var _jsxRuntime = jsxRuntimeExports; + var _jsxRuntime = requireJsxRuntime(); var _default = default_1 = VisibilityOff.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); @@ -64687,9 +64693,10 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha kind: String, label: gubu_minExports.Default(""), options: Open$7({ - default: Open$7({}), label: { field: gubu_minExports.Default("label") }, + value: { field: gubu_minExports.Default("value") }, multiple: gubu_minExports.Default(false), + default: Open$7({}), ents: Open$7({}) }), ux: Open$7({ @@ -64718,7 +64725,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha options: resolvedOptions, isOptionEqualToValue: (opt, val) => opt === val || (opt == null ? void 0 : opt.id) != null && (val == null ? void 0 : val.id) != null && opt.id === val.id || (opt == null ? void 0 : opt.value) != null && (val == null ? void 0 : val.value) != null && opt.value === val.value, getOptionLabel: (option) => option[field.options.label.field], - value, + value: resolveValue(field.options, value), onChange: (_2, newVal) => onChange(newVal), renderInput: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.TextField, __spreadProps(__spreadValues({}, params), { label: field.label })) } @@ -64728,19 +64735,53 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ); } function resolveOptions(options) { - const resolvedOptions = Object.keys(options.ents).map((key) => ({ - label: options.ents[key].label, - value: key - })); - const resolvedDefault = options.multiple === false ? Object.keys(options.default).length > 0 ? { value: Object.keys(options.default)[0], label: options.default[Object.keys(options.default)[0]].label } : null : Object.keys(options.default).map((key) => ({ - label: options.default[key].label, - value: key - })); + const { multiple, ents, label, value, default: defaultValues } = options; + const labelField = label == null ? void 0 : label.field; + const valueField = value == null ? void 0 : value.field; + const resolvedOptions = Object.keys(ents).map((key) => { + var _a; + return { + [labelField]: (_a = ents == null ? void 0 : ents[key]) == null ? void 0 : _a[labelField], + [valueField]: key + }; + }); + let resolvedDefault; + if (multiple === false) { + if (Object.keys(defaultValues).length > 0) { + const firstKey = Object.keys(defaultValues)[0]; + resolvedDefault = { value: firstKey, label: defaultValues[firstKey][labelField] }; + } else { + resolvedDefault = null; + } + } else { + resolvedDefault = Object.keys(defaultValues).map((key) => ({ + label: defaultValues[key].label, + value: key + })); + } return { resolvedOptions, resolvedDefault }; } + function resolveValue(options, val) { + const { multiple, ents, label, value } = options; + const labelField = label == null ? void 0 : label.field; + const valueField = value == null ? void 0 : value.field; + const getValue2 = (val2) => { + var _a; + return ((_a = ents == null ? void 0 : ents[val2]) == null ? void 0 : _a[labelField]) ? { [valueField]: val2, [labelField]: ents[val2][labelField] || val2 } : void 0; + }; + if (!multiple) { + return typeof val === "string" ? getValue2(val) : val || void 0; + } else { + if (typeof val === "string") { + const resolvedValue = getValue2(val); + return resolvedValue ? [resolvedValue] : []; + } + return val || []; + } + } const CMPNAME$8 = "BasicEntityField"; const { Open: Open$6 } = gubu_minExports.Gubu; const BasicEntityFieldSpecShape = gubu_minExports.Gubu(Open$6({}), { name: CMPNAME$8 }); diff --git a/src/lib/BasicEntityAutocompleteField.tsx b/src/lib/BasicEntityAutocompleteField.tsx index bd42836..bd8e816 100644 --- a/src/lib/BasicEntityAutocompleteField.tsx +++ b/src/lib/BasicEntityAutocompleteField.tsx @@ -16,9 +16,10 @@ const BasicEntityAutocompleteFieldSpecShape = Gubu(Open({ kind: String, label: Default(''), options: Open({ - default: Open({}), label: { field: Default('label') }, + value: { field: Default('value') }, multiple: Default(false), + default: Open({}), ents: Open({}) }), ux: Open({ @@ -31,8 +32,6 @@ const BasicEntityAutocompleteFieldSpecShape = Gubu(Open({ function BasicEntityAutocompleteField(props: any) { const { spec } = props - // console.log('BasicEntityAutocompleteField', spec) - const basicEntityAutocompleteField: Spec = BasicEntityAutocompleteFieldSpecShape(spec) const { control, field } = basicEntityAutocompleteField const { resolvedOptions, resolvedDefault } = resolveOptions(field.options); @@ -55,7 +54,7 @@ function BasicEntityAutocompleteField(props: any) { (opt?.value != null && val?.value != null && opt.value === val.value) } getOptionLabel={(option: any) => option[field.options.label.field]} - value={value} + value={resolveValue(field.options, value)} onChange={(_, newVal: any) => onChange(newVal)} renderInput={(params: any) => } /> @@ -66,27 +65,52 @@ function BasicEntityAutocompleteField(props: any) { // Returns array of options and default value(s) based on the options object function resolveOptions(options: any) { + const { multiple, ents, label, value, default: defaultValues } = options; + const labelField = label?.field; + const valueField = value?.field; + // Array of options - const resolvedOptions = Object.keys(options.ents).map(key => ({ - label: options.ents[key].label, - value: key - })) + const resolvedOptions = Object.keys(ents).map(key => ({ + [labelField]: ents?.[key]?.[labelField], + [valueField]: key + })); - // Array of default values (or single value if multiple is false) - const resolvedDefault = options.multiple === false ? ( - Object.keys(options.default).length > 0 - ? { value: Object.keys(options.default)[0], label: options.default[Object.keys(options.default)[0]].label } - : null - ) : ( - Object.keys(options.default).map(key => ({ - label: options.default[key].label, + let resolvedDefault; + if (multiple === false) { + if (Object.keys(defaultValues).length > 0) { + const firstKey = Object.keys(defaultValues)[0]; + resolvedDefault = { value: firstKey, label: defaultValues[firstKey][labelField] }; + } else { + resolvedDefault = null; + } + } else { + resolvedDefault = Object.keys(defaultValues).map(key => ({ + label: defaultValues[key].label, value: key - })) - ) + })); + } return { resolvedOptions, resolvedDefault + }; +} + +function resolveValue(options: any, val: any) { + const { multiple, ents, label, value } = options; + const labelField = label?.field; + const valueField = value?.field; + + const getValue = (val: string) => ents?.[val]?.[labelField] ? { [valueField]: val, [labelField]: ents[val][labelField] || val } : undefined; + + if (!multiple) { + return typeof val === 'string' ? getValue(val) : (val || undefined); + } else { + if (typeof val === 'string') { + const resolvedValue = getValue(val); + return resolvedValue ? [resolvedValue] : []; + } + return val || []; } } From ea83f312f4e5d52209cbc07fac0e0f8a3363a451 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 25 Jul 2024 20:51:32 +0100 Subject: [PATCH 033/122] Refactor BasicEntityCheckBoxField component --- dist/voxgig-model-react.es.js | 95 +++++++++++++--------------- dist/voxgig-model-react.umd.js | 95 +++++++++++++--------------- src/lib/BasicEntityCheckBoxField.tsx | 2 +- 3 files changed, 89 insertions(+), 103 deletions(-) diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index 7d42374..ecbf96f 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -1030,21 +1030,15 @@ function requireReactJsxRuntime_development() { } return reactJsxRuntime_development; } -var jsxRuntime$1 = jsxRuntime$2.exports; -var hasRequiredJsxRuntime; -function requireJsxRuntime() { - if (hasRequiredJsxRuntime) return jsxRuntime$2.exports; - hasRequiredJsxRuntime = 1; - "use strict"; - if (process.env.NODE_ENV === "production") { - jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); - } else { - jsxRuntime$2.exports = requireReactJsxRuntime_development(); - } - return jsxRuntime$2.exports; +var jsxRuntime = jsxRuntime$2.exports; +"use strict"; +if (process.env.NODE_ENV === "production") { + jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); +} else { + jsxRuntime$2.exports = requireReactJsxRuntime_development(); } -var jsxRuntimeExports = requireJsxRuntime(); -const jsxRuntime = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); +var jsxRuntimeExports = jsxRuntime$2.exports; +const jsxRuntime$1 = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); var gubu_min$2 = { exports: {} }; var gubu_min = gubu_min$2.exports; (function(module, exports) { @@ -25311,7 +25305,7 @@ Object.defineProperty(ArrowDownward, "__esModule", { }); var default_1$x = ArrowDownward.default = void 0; var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); -var _jsxRuntime$x = requireJsxRuntime(); +var _jsxRuntime$x = jsxRuntimeExports; var _default$x = default_1$x = ArrowDownward.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); @@ -25324,7 +25318,7 @@ Object.defineProperty(ArrowRight, "__esModule", { }); var default_1$w = ArrowRight.default = void 0; var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); -var _jsxRuntime$w = requireJsxRuntime(); +var _jsxRuntime$w = jsxRuntimeExports; var _default$w = default_1$w = ArrowRight.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); @@ -25337,7 +25331,7 @@ Object.defineProperty(Cancel, "__esModule", { }); var default_1$v = Cancel.default = void 0; var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); -var _jsxRuntime$v = requireJsxRuntime(); +var _jsxRuntime$v = jsxRuntimeExports; var _default$v = default_1$v = Cancel.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); @@ -25350,7 +25344,7 @@ Object.defineProperty(ChevronLeft, "__esModule", { }); var default_1$u = ChevronLeft.default = void 0; var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); -var _jsxRuntime$u = requireJsxRuntime(); +var _jsxRuntime$u = jsxRuntimeExports; var _default$u = default_1$u = ChevronLeft.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); @@ -25363,7 +25357,7 @@ Object.defineProperty(ChevronRight, "__esModule", { }); var default_1$t = ChevronRight.default = void 0; var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); -var _jsxRuntime$t = requireJsxRuntime(); +var _jsxRuntime$t = jsxRuntimeExports; var _default$t = default_1$t = ChevronRight.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); @@ -25376,7 +25370,7 @@ Object.defineProperty(ClearAll, "__esModule", { }); var default_1$s = ClearAll.default = void 0; var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); -var _jsxRuntime$s = requireJsxRuntime(); +var _jsxRuntime$s = jsxRuntimeExports; var _default$s = default_1$s = ClearAll.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); @@ -25389,7 +25383,7 @@ Object.defineProperty(Close, "__esModule", { }); var default_1$r = Close.default = void 0; var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); -var _jsxRuntime$r = requireJsxRuntime(); +var _jsxRuntime$r = jsxRuntimeExports; var _default$r = default_1$r = Close.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); @@ -25402,7 +25396,7 @@ Object.defineProperty(ContentCopy, "__esModule", { }); var default_1$q = ContentCopy.default = void 0; var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); -var _jsxRuntime$q = requireJsxRuntime(); +var _jsxRuntime$q = jsxRuntimeExports; var _default$q = default_1$q = ContentCopy.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); @@ -25415,7 +25409,7 @@ Object.defineProperty(DensityLarge, "__esModule", { }); var default_1$p = DensityLarge.default = void 0; var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); -var _jsxRuntime$p = requireJsxRuntime(); +var _jsxRuntime$p = jsxRuntimeExports; var _default$p = default_1$p = DensityLarge.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); @@ -25428,7 +25422,7 @@ Object.defineProperty(DensityMedium, "__esModule", { }); var default_1$o = DensityMedium.default = void 0; var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); -var _jsxRuntime$o = requireJsxRuntime(); +var _jsxRuntime$o = jsxRuntimeExports; var _default$o = default_1$o = DensityMedium.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); @@ -25441,7 +25435,7 @@ Object.defineProperty(DensitySmall, "__esModule", { }); var default_1$n = DensitySmall.default = void 0; var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); -var _jsxRuntime$n = requireJsxRuntime(); +var _jsxRuntime$n = jsxRuntimeExports; var _default$n = default_1$n = DensitySmall.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); @@ -25454,7 +25448,7 @@ Object.defineProperty(DragHandle, "__esModule", { }); var default_1$m = DragHandle.default = void 0; var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); -var _jsxRuntime$m = requireJsxRuntime(); +var _jsxRuntime$m = jsxRuntimeExports; var _default$m = default_1$m = DragHandle.default = (0, _createSvgIcon$m.default)(/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); @@ -25467,7 +25461,7 @@ Object.defineProperty(DynamicFeed, "__esModule", { }); var default_1$l = DynamicFeed.default = void 0; var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); -var _jsxRuntime$l = requireJsxRuntime(); +var _jsxRuntime$l = jsxRuntimeExports; var _default$l = default_1$l = DynamicFeed.default = (0, _createSvgIcon$l.default)([/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { @@ -25482,7 +25476,7 @@ Object.defineProperty(Edit, "__esModule", { }); var default_1$k = Edit.default = void 0; var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); -var _jsxRuntime$k = requireJsxRuntime(); +var _jsxRuntime$k = jsxRuntimeExports; var _default$k = default_1$k = Edit.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); @@ -25495,7 +25489,7 @@ Object.defineProperty(ExpandMore, "__esModule", { }); var default_1$j = ExpandMore.default = void 0; var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); -var _jsxRuntime$j = requireJsxRuntime(); +var _jsxRuntime$j = jsxRuntimeExports; var _default$j = default_1$j = ExpandMore.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); @@ -25508,7 +25502,7 @@ Object.defineProperty(FilterAlt, "__esModule", { }); var default_1$i = FilterAlt.default = void 0; var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); -var _jsxRuntime$i = requireJsxRuntime(); +var _jsxRuntime$i = jsxRuntimeExports; var _default$i = default_1$i = FilterAlt.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); @@ -25521,7 +25515,7 @@ Object.defineProperty(FilterList, "__esModule", { }); var default_1$h = FilterList.default = void 0; var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); -var _jsxRuntime$h = requireJsxRuntime(); +var _jsxRuntime$h = jsxRuntimeExports; var _default$h = default_1$h = FilterList.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); @@ -25534,7 +25528,7 @@ Object.defineProperty(FilterListOff, "__esModule", { }); var default_1$g = FilterListOff.default = void 0; var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); -var _jsxRuntime$g = requireJsxRuntime(); +var _jsxRuntime$g = jsxRuntimeExports; var _default$g = default_1$g = FilterListOff.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); @@ -25547,7 +25541,7 @@ Object.defineProperty(FirstPage, "__esModule", { }); var default_1$f = FirstPage.default = void 0; var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); -var _jsxRuntime$f = requireJsxRuntime(); +var _jsxRuntime$f = jsxRuntimeExports; var _default$f = default_1$f = FirstPage.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); @@ -25560,7 +25554,7 @@ Object.defineProperty(Fullscreen, "__esModule", { }); var default_1$e = Fullscreen.default = void 0; var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); -var _jsxRuntime$e = requireJsxRuntime(); +var _jsxRuntime$e = jsxRuntimeExports; var _default$e = default_1$e = Fullscreen.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); @@ -25573,7 +25567,7 @@ Object.defineProperty(FullscreenExit, "__esModule", { }); var default_1$d = FullscreenExit.default = void 0; var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); -var _jsxRuntime$d = requireJsxRuntime(); +var _jsxRuntime$d = jsxRuntimeExports; var _default$d = default_1$d = FullscreenExit.default = (0, _createSvgIcon$d.default)(/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); @@ -25586,7 +25580,7 @@ Object.defineProperty(KeyboardDoubleArrowDown, "__esModule", { }); var default_1$c = KeyboardDoubleArrowDown.default = void 0; var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); -var _jsxRuntime$c = requireJsxRuntime(); +var _jsxRuntime$c = jsxRuntimeExports; var _default$c = default_1$c = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$c.default)([/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { @@ -25601,7 +25595,7 @@ Object.defineProperty(LastPage, "__esModule", { }); var default_1$b = LastPage.default = void 0; var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); -var _jsxRuntime$b = requireJsxRuntime(); +var _jsxRuntime$b = jsxRuntimeExports; var _default$b = default_1$b = LastPage.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); @@ -25614,7 +25608,7 @@ Object.defineProperty(MoreHoriz, "__esModule", { }); var default_1$a = MoreHoriz.default = void 0; var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); -var _jsxRuntime$a = requireJsxRuntime(); +var _jsxRuntime$a = jsxRuntimeExports; var _default$a = default_1$a = MoreHoriz.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); @@ -25627,7 +25621,7 @@ Object.defineProperty(MoreVert, "__esModule", { }); var default_1$9 = MoreVert.default = void 0; var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); -var _jsxRuntime$9 = requireJsxRuntime(); +var _jsxRuntime$9 = jsxRuntimeExports; var _default$9 = default_1$9 = MoreVert.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); @@ -25640,7 +25634,7 @@ Object.defineProperty(PushPin, "__esModule", { }); var default_1$8 = PushPin.default = void 0; var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); -var _jsxRuntime$8 = requireJsxRuntime(); +var _jsxRuntime$8 = jsxRuntimeExports; var _default$8 = default_1$8 = PushPin.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" @@ -25654,7 +25648,7 @@ Object.defineProperty(RestartAlt, "__esModule", { }); var default_1$7 = RestartAlt.default = void 0; var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); -var _jsxRuntime$7 = requireJsxRuntime(); +var _jsxRuntime$7 = jsxRuntimeExports; var _default$7 = default_1$7 = RestartAlt.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); @@ -25667,7 +25661,7 @@ Object.defineProperty(Save, "__esModule", { }); var default_1$6 = Save.default = void 0; var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); -var _jsxRuntime$6 = requireJsxRuntime(); +var _jsxRuntime$6 = jsxRuntimeExports; var _default$6 = default_1$6 = Save.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); @@ -25680,7 +25674,7 @@ Object.defineProperty(Search, "__esModule", { }); var default_1$5 = Search.default = void 0; var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); -var _jsxRuntime$5 = requireJsxRuntime(); +var _jsxRuntime$5 = jsxRuntimeExports; var _default$5 = default_1$5 = Search.default = (0, _createSvgIcon$5.default)(/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); @@ -25693,7 +25687,7 @@ Object.defineProperty(SearchOff, "__esModule", { }); var default_1$4 = SearchOff.default = void 0; var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); -var _jsxRuntime$4 = requireJsxRuntime(); +var _jsxRuntime$4 = jsxRuntimeExports; var _default$4 = default_1$4 = SearchOff.default = (0, _createSvgIcon$4.default)([/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { @@ -25708,7 +25702,7 @@ Object.defineProperty(Sort, "__esModule", { }); var default_1$3 = Sort.default = void 0; var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); -var _jsxRuntime$3 = requireJsxRuntime(); +var _jsxRuntime$3 = jsxRuntimeExports; var _default$3 = default_1$3 = Sort.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); @@ -25721,7 +25715,7 @@ Object.defineProperty(SyncAlt, "__esModule", { }); var default_1$2 = SyncAlt.default = void 0; var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); -var _jsxRuntime$2 = requireJsxRuntime(); +var _jsxRuntime$2 = jsxRuntimeExports; var _default$2 = default_1$2 = SyncAlt.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); @@ -25734,7 +25728,7 @@ Object.defineProperty(ViewColumn, "__esModule", { }); var default_1$1 = ViewColumn.default = void 0; var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); -var _jsxRuntime$1 = requireJsxRuntime(); +var _jsxRuntime$1 = jsxRuntimeExports; var _default$1 = default_1$1 = ViewColumn.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); @@ -25747,7 +25741,7 @@ Object.defineProperty(VisibilityOff, "__esModule", { }); var default_1 = VisibilityOff.default = void 0; var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); -var _jsxRuntime = requireJsxRuntime(); +var _jsxRuntime = jsxRuntimeExports; var _default = default_1 = VisibilityOff.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); @@ -64695,8 +64689,7 @@ function BasicEntityCheckBoxField(props) { console.log("BasicEntityCheckBoxField", field.ux.props); return /* @__PURE__ */ jsxRuntimeExports.jsx( Box$2, - { - sx: __spreadValues({}, field.ux.props), + __spreadProps(__spreadValues({}, field.ux.props), { children: /* @__PURE__ */ jsxRuntimeExports.jsx( FormControlLabel$1, { @@ -64722,7 +64715,7 @@ function BasicEntityCheckBoxField(props) { label: field.label } ) - }, + }), `${field.id}-box` ); } diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index 0070198..6527110 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -1042,21 +1042,15 @@ var __async = (__this, __arguments, generator) => { } return reactJsxRuntime_development; } - var jsxRuntime$1 = jsxRuntime$2.exports; - var hasRequiredJsxRuntime; - function requireJsxRuntime() { - if (hasRequiredJsxRuntime) return jsxRuntime$2.exports; - hasRequiredJsxRuntime = 1; - "use strict"; - if (process.env.NODE_ENV === "production") { - jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); - } else { - jsxRuntime$2.exports = requireReactJsxRuntime_development(); - } - return jsxRuntime$2.exports; + var jsxRuntime = jsxRuntime$2.exports; + "use strict"; + if (process.env.NODE_ENV === "production") { + jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); + } else { + jsxRuntime$2.exports = requireReactJsxRuntime_development(); } - var jsxRuntimeExports = requireJsxRuntime(); - const jsxRuntime = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); + var jsxRuntimeExports = jsxRuntime$2.exports; + const jsxRuntime$1 = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); var gubu_min$2 = { exports: {} }; var gubu_min = gubu_min$2.exports; (function(module2, exports3) { @@ -25323,7 +25317,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$x = ArrowDownward.default = void 0; var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); - var _jsxRuntime$x = requireJsxRuntime(); + var _jsxRuntime$x = jsxRuntimeExports; var _default$x = default_1$x = ArrowDownward.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); @@ -25336,7 +25330,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$w = ArrowRight.default = void 0; var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); - var _jsxRuntime$w = requireJsxRuntime(); + var _jsxRuntime$w = jsxRuntimeExports; var _default$w = default_1$w = ArrowRight.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); @@ -25349,7 +25343,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$v = Cancel.default = void 0; var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); - var _jsxRuntime$v = requireJsxRuntime(); + var _jsxRuntime$v = jsxRuntimeExports; var _default$v = default_1$v = Cancel.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); @@ -25362,7 +25356,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$u = ChevronLeft.default = void 0; var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); - var _jsxRuntime$u = requireJsxRuntime(); + var _jsxRuntime$u = jsxRuntimeExports; var _default$u = default_1$u = ChevronLeft.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); @@ -25375,7 +25369,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$t = ChevronRight.default = void 0; var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); - var _jsxRuntime$t = requireJsxRuntime(); + var _jsxRuntime$t = jsxRuntimeExports; var _default$t = default_1$t = ChevronRight.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); @@ -25388,7 +25382,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$s = ClearAll.default = void 0; var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); - var _jsxRuntime$s = requireJsxRuntime(); + var _jsxRuntime$s = jsxRuntimeExports; var _default$s = default_1$s = ClearAll.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); @@ -25401,7 +25395,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$r = Close.default = void 0; var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); - var _jsxRuntime$r = requireJsxRuntime(); + var _jsxRuntime$r = jsxRuntimeExports; var _default$r = default_1$r = Close.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); @@ -25414,7 +25408,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$q = ContentCopy.default = void 0; var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); - var _jsxRuntime$q = requireJsxRuntime(); + var _jsxRuntime$q = jsxRuntimeExports; var _default$q = default_1$q = ContentCopy.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); @@ -25427,7 +25421,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$p = DensityLarge.default = void 0; var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); - var _jsxRuntime$p = requireJsxRuntime(); + var _jsxRuntime$p = jsxRuntimeExports; var _default$p = default_1$p = DensityLarge.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); @@ -25440,7 +25434,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$o = DensityMedium.default = void 0; var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); - var _jsxRuntime$o = requireJsxRuntime(); + var _jsxRuntime$o = jsxRuntimeExports; var _default$o = default_1$o = DensityMedium.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); @@ -25453,7 +25447,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$n = DensitySmall.default = void 0; var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); - var _jsxRuntime$n = requireJsxRuntime(); + var _jsxRuntime$n = jsxRuntimeExports; var _default$n = default_1$n = DensitySmall.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); @@ -25466,7 +25460,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$m = DragHandle.default = void 0; var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); - var _jsxRuntime$m = requireJsxRuntime(); + var _jsxRuntime$m = jsxRuntimeExports; var _default$m = default_1$m = DragHandle.default = (0, _createSvgIcon$m.default)(/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); @@ -25479,7 +25473,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$l = DynamicFeed.default = void 0; var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); - var _jsxRuntime$l = requireJsxRuntime(); + var _jsxRuntime$l = jsxRuntimeExports; var _default$l = default_1$l = DynamicFeed.default = (0, _createSvgIcon$l.default)([/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { @@ -25494,7 +25488,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$k = Edit.default = void 0; var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); - var _jsxRuntime$k = requireJsxRuntime(); + var _jsxRuntime$k = jsxRuntimeExports; var _default$k = default_1$k = Edit.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); @@ -25507,7 +25501,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$j = ExpandMore.default = void 0; var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); - var _jsxRuntime$j = requireJsxRuntime(); + var _jsxRuntime$j = jsxRuntimeExports; var _default$j = default_1$j = ExpandMore.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); @@ -25520,7 +25514,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$i = FilterAlt.default = void 0; var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); - var _jsxRuntime$i = requireJsxRuntime(); + var _jsxRuntime$i = jsxRuntimeExports; var _default$i = default_1$i = FilterAlt.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); @@ -25533,7 +25527,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$h = FilterList.default = void 0; var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); - var _jsxRuntime$h = requireJsxRuntime(); + var _jsxRuntime$h = jsxRuntimeExports; var _default$h = default_1$h = FilterList.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); @@ -25546,7 +25540,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$g = FilterListOff.default = void 0; var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); - var _jsxRuntime$g = requireJsxRuntime(); + var _jsxRuntime$g = jsxRuntimeExports; var _default$g = default_1$g = FilterListOff.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); @@ -25559,7 +25553,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$f = FirstPage.default = void 0; var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); - var _jsxRuntime$f = requireJsxRuntime(); + var _jsxRuntime$f = jsxRuntimeExports; var _default$f = default_1$f = FirstPage.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); @@ -25572,7 +25566,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$e = Fullscreen.default = void 0; var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); - var _jsxRuntime$e = requireJsxRuntime(); + var _jsxRuntime$e = jsxRuntimeExports; var _default$e = default_1$e = Fullscreen.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); @@ -25585,7 +25579,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$d = FullscreenExit.default = void 0; var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); - var _jsxRuntime$d = requireJsxRuntime(); + var _jsxRuntime$d = jsxRuntimeExports; var _default$d = default_1$d = FullscreenExit.default = (0, _createSvgIcon$d.default)(/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); @@ -25598,7 +25592,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$c = KeyboardDoubleArrowDown.default = void 0; var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); - var _jsxRuntime$c = requireJsxRuntime(); + var _jsxRuntime$c = jsxRuntimeExports; var _default$c = default_1$c = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$c.default)([/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { @@ -25613,7 +25607,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$b = LastPage.default = void 0; var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); - var _jsxRuntime$b = requireJsxRuntime(); + var _jsxRuntime$b = jsxRuntimeExports; var _default$b = default_1$b = LastPage.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); @@ -25626,7 +25620,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$a = MoreHoriz.default = void 0; var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); - var _jsxRuntime$a = requireJsxRuntime(); + var _jsxRuntime$a = jsxRuntimeExports; var _default$a = default_1$a = MoreHoriz.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); @@ -25639,7 +25633,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$9 = MoreVert.default = void 0; var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); - var _jsxRuntime$9 = requireJsxRuntime(); + var _jsxRuntime$9 = jsxRuntimeExports; var _default$9 = default_1$9 = MoreVert.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); @@ -25652,7 +25646,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$8 = PushPin.default = void 0; var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); - var _jsxRuntime$8 = requireJsxRuntime(); + var _jsxRuntime$8 = jsxRuntimeExports; var _default$8 = default_1$8 = PushPin.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" @@ -25666,7 +25660,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$7 = RestartAlt.default = void 0; var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); - var _jsxRuntime$7 = requireJsxRuntime(); + var _jsxRuntime$7 = jsxRuntimeExports; var _default$7 = default_1$7 = RestartAlt.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); @@ -25679,7 +25673,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$6 = Save.default = void 0; var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); - var _jsxRuntime$6 = requireJsxRuntime(); + var _jsxRuntime$6 = jsxRuntimeExports; var _default$6 = default_1$6 = Save.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); @@ -25692,7 +25686,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$5 = Search.default = void 0; var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); - var _jsxRuntime$5 = requireJsxRuntime(); + var _jsxRuntime$5 = jsxRuntimeExports; var _default$5 = default_1$5 = Search.default = (0, _createSvgIcon$5.default)(/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); @@ -25705,7 +25699,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$4 = SearchOff.default = void 0; var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); - var _jsxRuntime$4 = requireJsxRuntime(); + var _jsxRuntime$4 = jsxRuntimeExports; var _default$4 = default_1$4 = SearchOff.default = (0, _createSvgIcon$4.default)([/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { @@ -25720,7 +25714,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$3 = Sort.default = void 0; var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); - var _jsxRuntime$3 = requireJsxRuntime(); + var _jsxRuntime$3 = jsxRuntimeExports; var _default$3 = default_1$3 = Sort.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); @@ -25733,7 +25727,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$2 = SyncAlt.default = void 0; var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); - var _jsxRuntime$2 = requireJsxRuntime(); + var _jsxRuntime$2 = jsxRuntimeExports; var _default$2 = default_1$2 = SyncAlt.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); @@ -25746,7 +25740,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$1 = ViewColumn.default = void 0; var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); - var _jsxRuntime$1 = requireJsxRuntime(); + var _jsxRuntime$1 = jsxRuntimeExports; var _default$1 = default_1$1 = ViewColumn.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); @@ -25759,7 +25753,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1 = VisibilityOff.default = void 0; var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); - var _jsxRuntime = requireJsxRuntime(); + var _jsxRuntime = jsxRuntimeExports; var _default = default_1 = VisibilityOff.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); @@ -64707,8 +64701,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha console.log("BasicEntityCheckBoxField", field.ux.props); return /* @__PURE__ */ jsxRuntimeExports.jsx( material.Box, - { - sx: __spreadValues({}, field.ux.props), + __spreadProps(__spreadValues({}, field.ux.props), { children: /* @__PURE__ */ jsxRuntimeExports.jsx( material.FormControlLabel, { @@ -64734,7 +64727,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha label: field.label } ) - }, + }), `${field.id}-box` ); } diff --git a/src/lib/BasicEntityCheckBoxField.tsx b/src/lib/BasicEntityCheckBoxField.tsx index f46c8b6..a51fe55 100644 --- a/src/lib/BasicEntityCheckBoxField.tsx +++ b/src/lib/BasicEntityCheckBoxField.tsx @@ -39,7 +39,7 @@ function BasicEntityCheckBoxField(props: any) { return ( Date: Thu, 25 Jul 2024 21:00:45 +0100 Subject: [PATCH 034/122] feat: Add support for CheckBox, Autocomplete, Slider, and RadioGroup fields in BasicEntityField --- src/lib/BasicEntityField.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/BasicEntityField.tsx b/src/lib/BasicEntityField.tsx index c74da8d..41cad53 100644 --- a/src/lib/BasicEntityField.tsx +++ b/src/lib/BasicEntityField.tsx @@ -26,7 +26,7 @@ const BasicEntityFieldSpecShape = Gubu(Open({ kind: String, label: Default('', String), ux: Open({ - kind: Exact('Text', 'TextBox', 'Date', 'DateTime', 'Time'), + kind: Exact('Text', 'TextBox', 'Date', 'DateTime', 'Time', 'CheckBox', 'Autocomplete', 'Slider', 'RadioGroup'), edit: Default(true), rows: Default(3), props: Open({}), From 10210f462a6e4ea7895f73b49a5824496e19d074 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 25 Jul 2024 21:03:27 +0100 Subject: [PATCH 035/122] Update dist folder files --- dist/BasicEntityAutocompleteField.d.ts | 2 + dist/BasicEntityRadioGroupField.d.ts | 2 + dist/BasicEntitySliderField.d.ts | 2 + dist/voxgig-model-react.es.js | 259 ++++++++++++++++++++++--- dist/voxgig-model-react.umd.js | 257 +++++++++++++++++++++--- 5 files changed, 471 insertions(+), 51 deletions(-) create mode 100644 dist/BasicEntityAutocompleteField.d.ts create mode 100644 dist/BasicEntityRadioGroupField.d.ts create mode 100644 dist/BasicEntitySliderField.d.ts diff --git a/dist/BasicEntityAutocompleteField.d.ts b/dist/BasicEntityAutocompleteField.d.ts new file mode 100644 index 0000000..cf25015 --- /dev/null +++ b/dist/BasicEntityAutocompleteField.d.ts @@ -0,0 +1,2 @@ +declare function BasicEntityAutocompleteField(props: any): import("react/jsx-runtime").JSX.Element; +export { BasicEntityAutocompleteField }; diff --git a/dist/BasicEntityRadioGroupField.d.ts b/dist/BasicEntityRadioGroupField.d.ts new file mode 100644 index 0000000..3219868 --- /dev/null +++ b/dist/BasicEntityRadioGroupField.d.ts @@ -0,0 +1,2 @@ +declare function BasicEntityRadioGroupField(props: any): import("react/jsx-runtime").JSX.Element; +export { BasicEntityRadioGroupField }; diff --git a/dist/BasicEntitySliderField.d.ts b/dist/BasicEntitySliderField.d.ts new file mode 100644 index 0000000..2e8f094 --- /dev/null +++ b/dist/BasicEntitySliderField.d.ts @@ -0,0 +1,2 @@ +declare function BasicEntitySliderField(props: any): import("react/jsx-runtime").JSX.Element; +export { BasicEntitySliderField }; diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index e8b2f0a..d43894a 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -54,7 +54,7 @@ var __async = (__this, __arguments, generator) => { }; import * as React$1 from "react"; import React__default, { isValidElement, Children, cloneElement, useMemo, useState, useReducer, useRef, useEffect, useCallback, memo as memo$2, Fragment, useLayoutEffect } from "react"; -import { Button as Button$1, Avatar, Menu as Menu$1, MenuItem as MenuItem$1, IconButton as IconButton$1, useTheme as useTheme$5, Box as Box$2, FormControlLabel as FormControlLabel$1, Checkbox as Checkbox$1, TextField as TextField$1, Grid as Grid$1, Toolbar as Toolbar$1, Container as Container$2, Drawer as Drawer$1, List as List$1, ListItem as ListItem$1, ListItemButton as ListItemButton$1, ListItemIcon as ListItemIcon$1, ListItemText as ListItemText$1, Divider as Divider$1, Typography as Typography$1 } from "@mui/material"; +import { Button as Button$1, Avatar, Menu as Menu$1, MenuItem as MenuItem$1, IconButton as IconButton$1, useTheme as useTheme$5, Box as Box$2, FormControlLabel as FormControlLabel$1, Checkbox as Checkbox$1, Autocomplete as Autocomplete$1, TextField as TextField$1, FormLabel as FormLabel$1, Slider as Slider$1, RadioGroup, Radio as Radio$1, Grid as Grid$1, Toolbar as Toolbar$1, Container as Container$2, Drawer as Drawer$1, List as List$1, ListItem as ListItem$1, ListItemButton as ListItemButton$1, ListItemIcon as ListItemIcon$1, ListItemText as ListItemText$1, Divider as Divider$1, Typography as Typography$1 } from "@mui/material"; import emStyled from "@emotion/styled"; import { CacheProvider, Global, ThemeContext as ThemeContext$1, css, keyframes } from "@emotion/react"; import { useSelector } from "react-redux"; @@ -10582,8 +10582,8 @@ process.env.NODE_ENV !== "production" ? Toolbar.propTypes = { */ variant: PropTypes.oneOfType([PropTypes.oneOf(["dense", "regular"]), PropTypes.string]) } : void 0; -const CMPNAME$d = "BasicAccountTool"; -console.log(CMPNAME$d, "1"); +const CMPNAME$g = "BasicAccountTool"; +console.log(CMPNAME$g, "1"); const { Exact: Exact$2 } = gubu_minExports.Gubu; const BasicAccountToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10593,7 +10593,7 @@ const BasicAccountToolSpecShape = gubu_minExports.Gubu({ attr: {}, sx: {}, style: {} -}, { name: CMPNAME$d }); +}, { name: CMPNAME$g }); function BasicAccountTool(props) { var _a; const { ctx, spec } = props; @@ -10667,8 +10667,8 @@ function stringAvatar(s) { children: `${parts.join("")}` }; } -const CMPNAME$c = "BasicHeadTool"; -console.log(CMPNAME$c, "1"); +const CMPNAME$f = "BasicHeadTool"; +console.log(CMPNAME$f, "1"); const { Exact: Exact$1 } = gubu_minExports.Gubu; const BasicHeadToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10678,7 +10678,7 @@ const BasicHeadToolSpecShape = gubu_minExports.Gubu({ attr: {}, sx: {}, style: {} -}, { name: CMPNAME$c }); +}, { name: CMPNAME$f }); function BasicHeadTool(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -10687,7 +10687,7 @@ function BasicHeadTool(props) { const { name, kind, attr, sx, style: style2 } = basicHeadToolSpec; let tool = /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}); if ("" === kind) { - console.warn(CMPNAME$c, "empty-tool-kind", basicHeadToolSpec); + console.warn(CMPNAME$f, "empty-tool-kind", basicHeadToolSpec); } else if ("logo" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsxs( "div", @@ -10704,7 +10704,7 @@ function BasicHeadTool(props) { { href: "/", style: style2, - className: `vxg-${CMPNAME$c}-logo`, + className: `vxg-${CMPNAME$f}-logo`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: attr.img }) } ), @@ -10736,17 +10736,17 @@ function BasicHeadTool(props) { } else if ("account" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsx(BasicAccountTool, { ctx, spec }); } else { - console.warn(CMPNAME$c, "unknown-tool-kind", kind, basicHeadToolSpec); + console.warn(CMPNAME$f, "unknown-tool-kind", kind, basicHeadToolSpec); } return tool; } -const CMPNAME$b = "BasicHead"; -const { Child: Child$5, Exact, Open: Open$9, Required: Required$1 } = gubu_minExports.Gubu; +const CMPNAME$e = "BasicHead"; +const { Child: Child$5, Exact, Open: Open$c, Required: Required$1 } = gubu_minExports.Gubu; const BasicHeadSpecShape = gubu_minExports.Gubu({ head: { name: String, active: Boolean, - tool: Child$5(Open$9({ + tool: Child$5(Open$c({ align: Exact("left", "right") })) }, @@ -10756,7 +10756,7 @@ const BasicHeadSpecShape = gubu_minExports.Gubu({ AppBar: {}, ToolBar: {} } -}, { name: CMPNAME$b }); +}, { name: CMPNAME$e }); function BasicHead(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -62700,8 +62700,8 @@ const MaterialReactTable = (props) => { } return jsxRuntimeExports.jsx(MRT_TablePaper, { table }); }; -const { Open: Open$8, Child: Child$4 } = gubu_minExports.Gubu; -const Shape$2 = gubu_minExports.Gubu(Open$8({ +const { Open: Open$b, Child: Child$4 } = gubu_minExports.Gubu; +const Shape$2 = gubu_minExports.Gubu(Open$b({ name: String, prefix: String, ent: String, @@ -62746,7 +62746,7 @@ Object.assign(VxgBasicEntityListPlugin, { } }); Object.defineProperty(VxgBasicEntityListPlugin, "name", { value: "VxgBasicEntityListPlugin" }); -const CMPNAME$a = "BasicEntityList"; +const CMPNAME$d = "BasicEntityList"; function BasicEntityList(props) { const { ctx } = props; const { seneca } = ctx(); @@ -64666,21 +64666,21 @@ function useForm(props = {}) { _formControl.current.formState = getProxyFormState(formState, control); return _formControl.current; } -const CMPNAME$9 = "BasicEntitySliderField"; -const { Open: Open$7 } = gubu_minExports.Gubu; -const BasicEntityCheckBoxFieldSpecShape = gubu_minExports.Gubu(Open$7({ - field: Open$7({ +const CMPNAME$c = "BasicEntitySliderField"; +const { Open: Open$a } = gubu_minExports.Gubu; +const BasicEntityCheckBoxFieldSpecShape = gubu_minExports.Gubu(Open$a({ + field: Open$a({ id: String, name: String, kind: String, label: gubu_minExports.Default("", String), - ux: Open$7({ + ux: Open$a({ kind: gubu_minExports.Exact("CheckBox"), edit: gubu_minExports.Default(true), - props: Open$7({}) + props: Open$a({}) }) }) -}), { name: CMPNAME$9 }); +}), { name: CMPNAME$c }); function BasicEntityCheckBoxField(props) { const { spec } = props; const basicEntityCheckBoxField = BasicEntityCheckBoxFieldSpecShape(spec); @@ -64719,6 +64719,210 @@ function BasicEntityCheckBoxField(props) { `${field.id}-box` ); } +const CMPNAME$b = "BasicEntityAutocompleteField"; +const { Open: Open$9 } = gubu_minExports.Gubu; +const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu(Open$9({ + field: Open$9({ + id: String, + name: String, + kind: String, + label: gubu_minExports.Default(""), + options: Open$9({ + label: { field: gubu_minExports.Default("label") }, + value: { field: gubu_minExports.Default("value") }, + multiple: gubu_minExports.Default(false), + default: Open$9({}), + ents: Open$9({}) + }), + ux: Open$9({ + kind: gubu_minExports.Exact("Autocomplete"), + edit: gubu_minExports.Default(true) + }) + }) +}), { name: CMPNAME$b }); +function BasicEntityAutocompleteField(props) { + const { spec } = props; + const basicEntityAutocompleteField = BasicEntityAutocompleteFieldSpecShape(spec); + const { control, field } = basicEntityAutocompleteField; + const { resolvedOptions, resolvedDefault } = resolveOptions(field.options); + return /* @__PURE__ */ jsxRuntimeExports.jsx( + Controller, + { + name: field.name, + control, + defaultValue: resolvedDefault, + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( + Autocomplete$1, + { + freeSolo: true, + forcePopupIcon: true, + multiple: field.options.multiple, + options: resolvedOptions, + isOptionEqualToValue: (opt, val) => opt === val || (opt == null ? void 0 : opt.id) != null && (val == null ? void 0 : val.id) != null && opt.id === val.id || (opt == null ? void 0 : opt.value) != null && (val == null ? void 0 : val.value) != null && opt.value === val.value, + getOptionLabel: (option) => option[field.options.label.field], + value: resolveValue(field.options, value), + onChange: (_2, newVal) => onChange(newVal), + renderInput: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx(TextField$1, __spreadProps(__spreadValues({}, params), { label: field.label })) + } + ) + }, + `${field.id}-controller` + ); +} +function resolveOptions(options) { + const { multiple, ents, label, value, default: defaultValues } = options; + const labelField = label == null ? void 0 : label.field; + const valueField = value == null ? void 0 : value.field; + const resolvedOptions = Object.keys(ents).map((key) => { + var _a; + return { + [labelField]: (_a = ents == null ? void 0 : ents[key]) == null ? void 0 : _a[labelField], + [valueField]: key + }; + }); + let resolvedDefault; + if (multiple === false) { + if (Object.keys(defaultValues).length > 0) { + const firstKey = Object.keys(defaultValues)[0]; + resolvedDefault = { value: firstKey, label: defaultValues[firstKey][labelField] }; + } else { + resolvedDefault = null; + } + } else { + resolvedDefault = Object.keys(defaultValues).map((key) => ({ + label: defaultValues[key].label, + value: key + })); + } + return { + resolvedOptions, + resolvedDefault + }; +} +function resolveValue(options, val) { + const { multiple, ents, label, value } = options; + const labelField = label == null ? void 0 : label.field; + const valueField = value == null ? void 0 : value.field; + const getValue2 = (val2) => { + var _a; + return ((_a = ents == null ? void 0 : ents[val2]) == null ? void 0 : _a[labelField]) ? { [valueField]: val2, [labelField]: ents[val2][labelField] || val2 } : void 0; + }; + if (!multiple) { + return typeof val === "string" ? getValue2(val) : val || void 0; + } else { + if (typeof val === "string") { + const resolvedValue = getValue2(val); + return resolvedValue ? [resolvedValue] : []; + } + return val || []; + } +} +const CMPNAME$a = "BasicEntitySliderField"; +const { Open: Open$8 } = gubu_minExports.Gubu; +const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu(Open$8({ + field: Open$8({ + id: String, + name: String, + kind: String, + label: gubu_minExports.Default("", String), + ux: Open$8({ + kind: gubu_minExports.Exact("Slider"), + edit: gubu_minExports.Default(true), + step: gubu_minExports.Default(1), + min: gubu_minExports.Default(0), + max: gubu_minExports.Default(100), + props: { + marks: gubu_minExports.Default({}), + valueLabelDisplay: gubu_minExports.Exact("on", "auto", "off").Default("auto"), + direction: gubu_minExports.Exact("horizontal", "vertical").Default("horizontal"), + track: gubu_minExports.Exact("normal", "inverted", "disabled").Default("normal") + } + }) + }) +}), { name: CMPNAME$a }); +function BasicEntitySliderField(props) { + const { spec } = props; + const basicEntityAutocompleteField = BasicEntitySliderFieldSpecShape(spec); + const { control, field, getValues } = basicEntityAutocompleteField; + const val = getValues(field.name); + return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx(FormLabel$1, { children: field.label }, `${field.id}-label`), + /* @__PURE__ */ jsxRuntimeExports.jsx( + Controller, + { + name: field.name, + control, + defaultValue: val || field.ux.min, + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( + Slider$1, + { + disabled: !field.ux.edit, + orientation: field.ux.direction, + track: field.ux.track, + valueLabelDisplay: field.ux.props.valueLabelDisplay, + step: field.ux.step, + marks: resolveMarks(field.ux.props.marks), + min: field.ux.min, + max: field.ux.max, + value, + onChange: (_2, newVal) => onChange(newVal) + } + ) + }, + `${field.id}-controller` + ) + ] }); +} +function resolveMarks(marks) { + if (!marks || typeof marks === "object" && Object.keys(marks).length === 0) { + return false; + } + if (typeof marks === "object") { + return Object.entries(marks).map(([key, value]) => ({ label: value, value: +key })); + } + return marks; +} +const CMPNAME$9 = "BasicEntitySliderField"; +const { Open: Open$7 } = gubu_minExports.Gubu; +const BasicEntityRadioGroupFieldSpecShape = gubu_minExports.Gubu(Open$7({ + field: Open$7({ + id: String, + name: String, + kind: String, + label: gubu_minExports.Default("", String), + ux: Open$7({ + kind: gubu_minExports.Exact("RadioGroup"), + edit: gubu_minExports.Default(true), + direction: gubu_minExports.Exact("row", "column").Default("row") + }) + }) +}), { name: CMPNAME$9 }); +function BasicEntityRadioGroupField(props) { + const { spec } = props; + const basicEntityRadioGroupField = BasicEntityRadioGroupFieldSpecShape(spec); + const { control, field } = basicEntityRadioGroupField; + return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx(FormLabel$1, { children: field.label }, `${field.id}-label`), + /* @__PURE__ */ jsxRuntimeExports.jsx( + Controller, + { + name: field.name, + control, + defaultValue: field.default, + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx(RadioGroup, { value, onChange, row: "row" === field.ux.direction, children: field.options.map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx( + FormControlLabel$1, + { + value: option.value, + control: /* @__PURE__ */ jsxRuntimeExports.jsx(Radio$1, { disabled: !field.ux.edit }), + label: option.label + }, + `${option.value}-option` + )) }, field.id) + }, + `${field.id}-controller` + ) + ] }); +} const CMPNAME$8 = "BasicEntityField"; const { Open: Open$6 } = gubu_minExports.Gubu; const BasicEntityFieldSpecShape = gubu_minExports.Gubu(Open$6({ @@ -64729,7 +64933,7 @@ const BasicEntityFieldSpecShape = gubu_minExports.Gubu(Open$6({ kind: String, label: gubu_minExports.Default("", String), ux: Open$6({ - kind: gubu_minExports.Exact("Text", "TextBox", "Date", "DateTime", "Time"), + kind: gubu_minExports.Exact("Text", "TextBox", "Date", "DateTime", "Time", "CheckBox", "Autocomplete", "Slider", "RadioGroup"), edit: gubu_minExports.Default(true), rows: gubu_minExports.Default(3), props: Open$6({}) @@ -64743,7 +64947,10 @@ const fieldMap = { Date: BasicEntityDateField, DateTime: BasicEntityDateTimeField, Time: BasicEntityTimeField, - CheckBox: BasicEntityCheckBoxField + CheckBox: BasicEntityCheckBoxField, + Autocomplete: BasicEntityAutocompleteField, + Slider: BasicEntitySliderField, + RadioGroup: BasicEntityRadioGroupField }; function BasicEntityField(props) { const { ctx, spec } = props; diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index 0b91861..24ed2eb 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -10594,8 +10594,8 @@ try { */ variant: PropTypes.oneOfType([PropTypes.oneOf(["dense", "regular"]), PropTypes.string]) } : void 0; - const CMPNAME$d = "BasicAccountTool"; - console.log(CMPNAME$d, "1"); + const CMPNAME$g = "BasicAccountTool"; + console.log(CMPNAME$g, "1"); const { Exact: Exact$2 } = gubu_minExports.Gubu; const BasicAccountToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10605,7 +10605,7 @@ try { attr: {}, sx: {}, style: {} - }, { name: CMPNAME$d }); + }, { name: CMPNAME$g }); function BasicAccountTool(props) { var _a; const { ctx, spec } = props; @@ -10679,8 +10679,8 @@ try { children: `${parts.join("")}` }; } - const CMPNAME$c = "BasicHeadTool"; - console.log(CMPNAME$c, "1"); + const CMPNAME$f = "BasicHeadTool"; + console.log(CMPNAME$f, "1"); const { Exact: Exact$1 } = gubu_minExports.Gubu; const BasicHeadToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10690,7 +10690,7 @@ try { attr: {}, sx: {}, style: {} - }, { name: CMPNAME$c }); + }, { name: CMPNAME$f }); function BasicHeadTool(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -10699,7 +10699,7 @@ try { const { name, kind, attr, sx, style: style2 } = basicHeadToolSpec; let tool = /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}); if ("" === kind) { - console.warn(CMPNAME$c, "empty-tool-kind", basicHeadToolSpec); + console.warn(CMPNAME$f, "empty-tool-kind", basicHeadToolSpec); } else if ("logo" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsxs( "div", @@ -10716,7 +10716,7 @@ try { { href: "/", style: style2, - className: `vxg-${CMPNAME$c}-logo`, + className: `vxg-${CMPNAME$f}-logo`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: attr.img }) } ), @@ -10748,17 +10748,17 @@ try { } else if ("account" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsx(BasicAccountTool, { ctx, spec }); } else { - console.warn(CMPNAME$c, "unknown-tool-kind", kind, basicHeadToolSpec); + console.warn(CMPNAME$f, "unknown-tool-kind", kind, basicHeadToolSpec); } return tool; } - const CMPNAME$b = "BasicHead"; - const { Child: Child$5, Exact, Open: Open$9, Required: Required$1 } = gubu_minExports.Gubu; + const CMPNAME$e = "BasicHead"; + const { Child: Child$5, Exact, Open: Open$c, Required: Required$1 } = gubu_minExports.Gubu; const BasicHeadSpecShape = gubu_minExports.Gubu({ head: { name: String, active: Boolean, - tool: Child$5(Open$9({ + tool: Child$5(Open$c({ align: Exact("left", "right") })) }, @@ -10768,7 +10768,7 @@ try { AppBar: {}, ToolBar: {} } - }, { name: CMPNAME$b }); + }, { name: CMPNAME$e }); function BasicHead(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -62712,8 +62712,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } return jsxRuntimeExports.jsx(MRT_TablePaper, { table }); }; - const { Open: Open$8, Child: Child$4 } = gubu_minExports.Gubu; - const Shape$2 = gubu_minExports.Gubu(Open$8({ + const { Open: Open$b, Child: Child$4 } = gubu_minExports.Gubu; + const Shape$2 = gubu_minExports.Gubu(Open$b({ name: String, prefix: String, ent: String, @@ -62758,7 +62758,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } }); Object.defineProperty(VxgBasicEntityListPlugin, "name", { value: "VxgBasicEntityListPlugin" }); - const CMPNAME$a = "BasicEntityList"; + const CMPNAME$d = "BasicEntityList"; function BasicEntityList(props) { const { ctx } = props; const { seneca } = ctx(); @@ -64678,21 +64678,21 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha _formControl.current.formState = getProxyFormState(formState, control); return _formControl.current; } - const CMPNAME$9 = "BasicEntitySliderField"; - const { Open: Open$7 } = gubu_minExports.Gubu; - const BasicEntityCheckBoxFieldSpecShape = gubu_minExports.Gubu(Open$7({ - field: Open$7({ + const CMPNAME$c = "BasicEntitySliderField"; + const { Open: Open$a } = gubu_minExports.Gubu; + const BasicEntityCheckBoxFieldSpecShape = gubu_minExports.Gubu(Open$a({ + field: Open$a({ id: String, name: String, kind: String, label: gubu_minExports.Default("", String), - ux: Open$7({ + ux: Open$a({ kind: gubu_minExports.Exact("CheckBox"), edit: gubu_minExports.Default(true), - props: Open$7({}) + props: Open$a({}) }) }) - }), { name: CMPNAME$9 }); + }), { name: CMPNAME$c }); function BasicEntityCheckBoxField(props) { const { spec } = props; const basicEntityCheckBoxField = BasicEntityCheckBoxFieldSpecShape(spec); @@ -64731,6 +64731,210 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha `${field.id}-box` ); } + const CMPNAME$b = "BasicEntityAutocompleteField"; + const { Open: Open$9 } = gubu_minExports.Gubu; + const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu(Open$9({ + field: Open$9({ + id: String, + name: String, + kind: String, + label: gubu_minExports.Default(""), + options: Open$9({ + label: { field: gubu_minExports.Default("label") }, + value: { field: gubu_minExports.Default("value") }, + multiple: gubu_minExports.Default(false), + default: Open$9({}), + ents: Open$9({}) + }), + ux: Open$9({ + kind: gubu_minExports.Exact("Autocomplete"), + edit: gubu_minExports.Default(true) + }) + }) + }), { name: CMPNAME$b }); + function BasicEntityAutocompleteField(props) { + const { spec } = props; + const basicEntityAutocompleteField = BasicEntityAutocompleteFieldSpecShape(spec); + const { control, field } = basicEntityAutocompleteField; + const { resolvedOptions, resolvedDefault } = resolveOptions(field.options); + return /* @__PURE__ */ jsxRuntimeExports.jsx( + Controller, + { + name: field.name, + control, + defaultValue: resolvedDefault, + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( + material.Autocomplete, + { + freeSolo: true, + forcePopupIcon: true, + multiple: field.options.multiple, + options: resolvedOptions, + isOptionEqualToValue: (opt, val) => opt === val || (opt == null ? void 0 : opt.id) != null && (val == null ? void 0 : val.id) != null && opt.id === val.id || (opt == null ? void 0 : opt.value) != null && (val == null ? void 0 : val.value) != null && opt.value === val.value, + getOptionLabel: (option) => option[field.options.label.field], + value: resolveValue(field.options, value), + onChange: (_2, newVal) => onChange(newVal), + renderInput: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.TextField, __spreadProps(__spreadValues({}, params), { label: field.label })) + } + ) + }, + `${field.id}-controller` + ); + } + function resolveOptions(options) { + const { multiple, ents, label, value, default: defaultValues } = options; + const labelField = label == null ? void 0 : label.field; + const valueField = value == null ? void 0 : value.field; + const resolvedOptions = Object.keys(ents).map((key) => { + var _a; + return { + [labelField]: (_a = ents == null ? void 0 : ents[key]) == null ? void 0 : _a[labelField], + [valueField]: key + }; + }); + let resolvedDefault; + if (multiple === false) { + if (Object.keys(defaultValues).length > 0) { + const firstKey = Object.keys(defaultValues)[0]; + resolvedDefault = { value: firstKey, label: defaultValues[firstKey][labelField] }; + } else { + resolvedDefault = null; + } + } else { + resolvedDefault = Object.keys(defaultValues).map((key) => ({ + label: defaultValues[key].label, + value: key + })); + } + return { + resolvedOptions, + resolvedDefault + }; + } + function resolveValue(options, val) { + const { multiple, ents, label, value } = options; + const labelField = label == null ? void 0 : label.field; + const valueField = value == null ? void 0 : value.field; + const getValue2 = (val2) => { + var _a; + return ((_a = ents == null ? void 0 : ents[val2]) == null ? void 0 : _a[labelField]) ? { [valueField]: val2, [labelField]: ents[val2][labelField] || val2 } : void 0; + }; + if (!multiple) { + return typeof val === "string" ? getValue2(val) : val || void 0; + } else { + if (typeof val === "string") { + const resolvedValue = getValue2(val); + return resolvedValue ? [resolvedValue] : []; + } + return val || []; + } + } + const CMPNAME$a = "BasicEntitySliderField"; + const { Open: Open$8 } = gubu_minExports.Gubu; + const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu(Open$8({ + field: Open$8({ + id: String, + name: String, + kind: String, + label: gubu_minExports.Default("", String), + ux: Open$8({ + kind: gubu_minExports.Exact("Slider"), + edit: gubu_minExports.Default(true), + step: gubu_minExports.Default(1), + min: gubu_minExports.Default(0), + max: gubu_minExports.Default(100), + props: { + marks: gubu_minExports.Default({}), + valueLabelDisplay: gubu_minExports.Exact("on", "auto", "off").Default("auto"), + direction: gubu_minExports.Exact("horizontal", "vertical").Default("horizontal"), + track: gubu_minExports.Exact("normal", "inverted", "disabled").Default("normal") + } + }) + }) + }), { name: CMPNAME$a }); + function BasicEntitySliderField(props) { + const { spec } = props; + const basicEntityAutocompleteField = BasicEntitySliderFieldSpecShape(spec); + const { control, field, getValues } = basicEntityAutocompleteField; + const val = getValues(field.name); + return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx(material.FormLabel, { children: field.label }, `${field.id}-label`), + /* @__PURE__ */ jsxRuntimeExports.jsx( + Controller, + { + name: field.name, + control, + defaultValue: val || field.ux.min, + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( + material.Slider, + { + disabled: !field.ux.edit, + orientation: field.ux.direction, + track: field.ux.track, + valueLabelDisplay: field.ux.props.valueLabelDisplay, + step: field.ux.step, + marks: resolveMarks(field.ux.props.marks), + min: field.ux.min, + max: field.ux.max, + value, + onChange: (_2, newVal) => onChange(newVal) + } + ) + }, + `${field.id}-controller` + ) + ] }); + } + function resolveMarks(marks) { + if (!marks || typeof marks === "object" && Object.keys(marks).length === 0) { + return false; + } + if (typeof marks === "object") { + return Object.entries(marks).map(([key, value]) => ({ label: value, value: +key })); + } + return marks; + } + const CMPNAME$9 = "BasicEntitySliderField"; + const { Open: Open$7 } = gubu_minExports.Gubu; + const BasicEntityRadioGroupFieldSpecShape = gubu_minExports.Gubu(Open$7({ + field: Open$7({ + id: String, + name: String, + kind: String, + label: gubu_minExports.Default("", String), + ux: Open$7({ + kind: gubu_minExports.Exact("RadioGroup"), + edit: gubu_minExports.Default(true), + direction: gubu_minExports.Exact("row", "column").Default("row") + }) + }) + }), { name: CMPNAME$9 }); + function BasicEntityRadioGroupField(props) { + const { spec } = props; + const basicEntityRadioGroupField = BasicEntityRadioGroupFieldSpecShape(spec); + const { control, field } = basicEntityRadioGroupField; + return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx(material.FormLabel, { children: field.label }, `${field.id}-label`), + /* @__PURE__ */ jsxRuntimeExports.jsx( + Controller, + { + name: field.name, + control, + defaultValue: field.default, + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.RadioGroup, { value, onChange, row: "row" === field.ux.direction, children: field.options.map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx( + material.FormControlLabel, + { + value: option.value, + control: /* @__PURE__ */ jsxRuntimeExports.jsx(material.Radio, { disabled: !field.ux.edit }), + label: option.label + }, + `${option.value}-option` + )) }, field.id) + }, + `${field.id}-controller` + ) + ] }); + } const CMPNAME$8 = "BasicEntityField"; const { Open: Open$6 } = gubu_minExports.Gubu; const BasicEntityFieldSpecShape = gubu_minExports.Gubu(Open$6({ @@ -64741,7 +64945,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha kind: String, label: gubu_minExports.Default("", String), ux: Open$6({ - kind: gubu_minExports.Exact("Text", "TextBox", "Date", "DateTime", "Time"), + kind: gubu_minExports.Exact("Text", "TextBox", "Date", "DateTime", "Time", "CheckBox", "Autocomplete", "Slider", "RadioGroup"), edit: gubu_minExports.Default(true), rows: gubu_minExports.Default(3), props: Open$6({}) @@ -64755,7 +64959,10 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha Date: BasicEntityDateField, DateTime: BasicEntityDateTimeField, Time: BasicEntityTimeField, - CheckBox: BasicEntityCheckBoxField + CheckBox: BasicEntityCheckBoxField, + Autocomplete: BasicEntityAutocompleteField, + Slider: BasicEntitySliderField, + RadioGroup: BasicEntityRadioGroupField }; function BasicEntityField(props) { const { ctx, spec } = props; From 404d2ec0ff7f2312313f960736abd9f4a3c8a8b3 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 25 Jul 2024 21:29:22 +0100 Subject: [PATCH 036/122] Add Skip option to kind field in BasicEntity fields --- src/lib/BasicEntityAutocompleteField.tsx | 4 ++-- src/lib/BasicEntityCheckBoxField.tsx | 6 ++--- src/lib/BasicEntityField.tsx | 28 ++++++++++-------------- src/lib/BasicEntityRadioGroupField.tsx | 4 ++-- src/lib/BasicEntitySliderField.tsx | 4 ++-- 5 files changed, 20 insertions(+), 26 deletions(-) diff --git a/src/lib/BasicEntityAutocompleteField.tsx b/src/lib/BasicEntityAutocompleteField.tsx index bd8e816..cdd7552 100644 --- a/src/lib/BasicEntityAutocompleteField.tsx +++ b/src/lib/BasicEntityAutocompleteField.tsx @@ -5,7 +5,7 @@ import { Controller } from "react-hook-form"; import type { Spec } from './basic-types' -import { Default, Exact, Gubu } from 'gubu' +import { Default, Exact, Gubu, Skip } from 'gubu' const CMPNAME = 'BasicEntityAutocompleteField' const { Open } = Gubu @@ -13,7 +13,7 @@ const BasicEntityAutocompleteFieldSpecShape = Gubu(Open({ field: Open({ id: String, name: String, - kind: String, + kind: Skip(String), label: Default(''), options: Open({ label: { field: Default('label') }, diff --git a/src/lib/BasicEntityCheckBoxField.tsx b/src/lib/BasicEntityCheckBoxField.tsx index a51fe55..214da91 100644 --- a/src/lib/BasicEntityCheckBoxField.tsx +++ b/src/lib/BasicEntityCheckBoxField.tsx @@ -9,7 +9,7 @@ import { Controller } from "react-hook-form"; import type { Spec } from './basic-types' -import { Default, Exact, Gubu, One } from 'gubu' +import { Default, Exact, Gubu, Skip } from 'gubu' const CMPNAME = 'BasicEntitySliderField' const { Open } = Gubu @@ -17,7 +17,7 @@ const BasicEntityCheckBoxFieldSpecShape = Gubu(Open({ field: Open({ id: String, name: String, - kind: String, + kind: Skip(String), label: Default('', String), ux: Open({ kind: Exact('CheckBox'), @@ -34,8 +34,6 @@ function BasicEntityCheckBoxField(props: any) { const { control, field, getValues } = basicEntityCheckBoxField const val = getValues(field.name) - console.log('BasicEntityCheckBoxField', field.ux.props) - return ( Date: Thu, 25 Jul 2024 21:29:43 +0100 Subject: [PATCH 037/122] Add BasicEntityDateField, BasicEntityTextField, BasicEntityTimeField, BasicEntityFieldError, and BasicEntityTextBoxField components --- dist/BasicEntityDateField.d.ts | 2 + dist/BasicEntityDateTimeField.d.ts | 2 + dist/BasicEntityFieldError.d.ts | 2 + dist/BasicEntityTextBoxField.d.ts | 2 + dist/BasicEntityTextField.d.ts | 2 + dist/BasicEntityTimeField.d.ts | 2 + dist/voxgig-model-react.es.js | 377 ++++++++++++++++----------- dist/voxgig-model-react.umd.js | 377 ++++++++++++++++----------- src/lib/BasicEntityDateField.tsx | 48 ++++ src/lib/BasicEntityDateTimeField.tsx | 50 ++++ src/lib/BasicEntityField.tsx | 142 +--------- src/lib/BasicEntityFieldError.tsx | 10 + src/lib/BasicEntityTextBoxField.tsx | 49 ++++ src/lib/BasicEntityTextField.tsx | 51 ++++ src/lib/BasicEntityTimeField.tsx | 49 ++++ 15 files changed, 734 insertions(+), 431 deletions(-) create mode 100644 dist/BasicEntityDateField.d.ts create mode 100644 dist/BasicEntityDateTimeField.d.ts create mode 100644 dist/BasicEntityFieldError.d.ts create mode 100644 dist/BasicEntityTextBoxField.d.ts create mode 100644 dist/BasicEntityTextField.d.ts create mode 100644 dist/BasicEntityTimeField.d.ts create mode 100644 src/lib/BasicEntityDateField.tsx create mode 100644 src/lib/BasicEntityDateTimeField.tsx create mode 100644 src/lib/BasicEntityFieldError.tsx create mode 100644 src/lib/BasicEntityTextBoxField.tsx create mode 100644 src/lib/BasicEntityTextField.tsx create mode 100644 src/lib/BasicEntityTimeField.tsx diff --git a/dist/BasicEntityDateField.d.ts b/dist/BasicEntityDateField.d.ts new file mode 100644 index 0000000..4f592f2 --- /dev/null +++ b/dist/BasicEntityDateField.d.ts @@ -0,0 +1,2 @@ +declare function BasicEntityDateField(props: any): import("react/jsx-runtime").JSX.Element; +export { BasicEntityDateField }; diff --git a/dist/BasicEntityDateTimeField.d.ts b/dist/BasicEntityDateTimeField.d.ts new file mode 100644 index 0000000..ad1ae9a --- /dev/null +++ b/dist/BasicEntityDateTimeField.d.ts @@ -0,0 +1,2 @@ +declare function BasicEntityDateTimeField(props: any): import("react/jsx-runtime").JSX.Element; +export { BasicEntityDateTimeField }; diff --git a/dist/BasicEntityFieldError.d.ts b/dist/BasicEntityFieldError.d.ts new file mode 100644 index 0000000..07da7c1 --- /dev/null +++ b/dist/BasicEntityFieldError.d.ts @@ -0,0 +1,2 @@ +declare function BasicEntityFieldError(props: any): import("react/jsx-runtime").JSX.Element; +export { BasicEntityFieldError }; diff --git a/dist/BasicEntityTextBoxField.d.ts b/dist/BasicEntityTextBoxField.d.ts new file mode 100644 index 0000000..42a9682 --- /dev/null +++ b/dist/BasicEntityTextBoxField.d.ts @@ -0,0 +1,2 @@ +declare function BasicEntityTextBoxField(props: any): import("react/jsx-runtime").JSX.Element; +export { BasicEntityTextBoxField }; diff --git a/dist/BasicEntityTextField.d.ts b/dist/BasicEntityTextField.d.ts new file mode 100644 index 0000000..e070d64 --- /dev/null +++ b/dist/BasicEntityTextField.d.ts @@ -0,0 +1,2 @@ +declare function BasicEntityTextField(props: any): import("react/jsx-runtime").JSX.Element; +export { BasicEntityTextField }; diff --git a/dist/BasicEntityTimeField.d.ts b/dist/BasicEntityTimeField.d.ts new file mode 100644 index 0000000..1709418 --- /dev/null +++ b/dist/BasicEntityTimeField.d.ts @@ -0,0 +1,2 @@ +declare function BasicEntityTimeField(props: any): import("react/jsx-runtime").JSX.Element; +export { BasicEntityTimeField }; diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index d43894a..0f12387 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -1030,15 +1030,21 @@ function requireReactJsxRuntime_development() { } return reactJsxRuntime_development; } -var jsxRuntime = jsxRuntime$2.exports; -"use strict"; -if (process.env.NODE_ENV === "production") { - jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); -} else { - jsxRuntime$2.exports = requireReactJsxRuntime_development(); +var jsxRuntime$1 = jsxRuntime$2.exports; +var hasRequiredJsxRuntime; +function requireJsxRuntime() { + if (hasRequiredJsxRuntime) return jsxRuntime$2.exports; + hasRequiredJsxRuntime = 1; + "use strict"; + if (process.env.NODE_ENV === "production") { + jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); + } else { + jsxRuntime$2.exports = requireReactJsxRuntime_development(); + } + return jsxRuntime$2.exports; } -var jsxRuntimeExports = jsxRuntime$2.exports; -const jsxRuntime$1 = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); +var jsxRuntimeExports = requireJsxRuntime(); +const jsxRuntime = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); var gubu_min$2 = { exports: {} }; var gubu_min = gubu_min$2.exports; (function(module, exports) { @@ -10582,8 +10588,8 @@ process.env.NODE_ENV !== "production" ? Toolbar.propTypes = { */ variant: PropTypes.oneOfType([PropTypes.oneOf(["dense", "regular"]), PropTypes.string]) } : void 0; -const CMPNAME$g = "BasicAccountTool"; -console.log(CMPNAME$g, "1"); +const CMPNAME$l = "BasicAccountTool"; +console.log(CMPNAME$l, "1"); const { Exact: Exact$2 } = gubu_minExports.Gubu; const BasicAccountToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10593,7 +10599,7 @@ const BasicAccountToolSpecShape = gubu_minExports.Gubu({ attr: {}, sx: {}, style: {} -}, { name: CMPNAME$g }); +}, { name: CMPNAME$l }); function BasicAccountTool(props) { var _a; const { ctx, spec } = props; @@ -10667,8 +10673,8 @@ function stringAvatar(s) { children: `${parts.join("")}` }; } -const CMPNAME$f = "BasicHeadTool"; -console.log(CMPNAME$f, "1"); +const CMPNAME$k = "BasicHeadTool"; +console.log(CMPNAME$k, "1"); const { Exact: Exact$1 } = gubu_minExports.Gubu; const BasicHeadToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10678,7 +10684,7 @@ const BasicHeadToolSpecShape = gubu_minExports.Gubu({ attr: {}, sx: {}, style: {} -}, { name: CMPNAME$f }); +}, { name: CMPNAME$k }); function BasicHeadTool(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -10687,7 +10693,7 @@ function BasicHeadTool(props) { const { name, kind, attr, sx, style: style2 } = basicHeadToolSpec; let tool = /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}); if ("" === kind) { - console.warn(CMPNAME$f, "empty-tool-kind", basicHeadToolSpec); + console.warn(CMPNAME$k, "empty-tool-kind", basicHeadToolSpec); } else if ("logo" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsxs( "div", @@ -10704,7 +10710,7 @@ function BasicHeadTool(props) { { href: "/", style: style2, - className: `vxg-${CMPNAME$f}-logo`, + className: `vxg-${CMPNAME$k}-logo`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: attr.img }) } ), @@ -10736,17 +10742,17 @@ function BasicHeadTool(props) { } else if ("account" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsx(BasicAccountTool, { ctx, spec }); } else { - console.warn(CMPNAME$f, "unknown-tool-kind", kind, basicHeadToolSpec); + console.warn(CMPNAME$k, "unknown-tool-kind", kind, basicHeadToolSpec); } return tool; } -const CMPNAME$e = "BasicHead"; -const { Child: Child$5, Exact, Open: Open$c, Required: Required$1 } = gubu_minExports.Gubu; +const CMPNAME$j = "BasicHead"; +const { Child: Child$5, Exact, Open: Open$h, Required: Required$1 } = gubu_minExports.Gubu; const BasicHeadSpecShape = gubu_minExports.Gubu({ head: { name: String, active: Boolean, - tool: Child$5(Open$c({ + tool: Child$5(Open$h({ align: Exact("left", "right") })) }, @@ -10756,7 +10762,7 @@ const BasicHeadSpecShape = gubu_minExports.Gubu({ AppBar: {}, ToolBar: {} } -}, { name: CMPNAME$e }); +}, { name: CMPNAME$j }); function BasicHead(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -25305,7 +25311,7 @@ Object.defineProperty(ArrowDownward, "__esModule", { }); var default_1$x = ArrowDownward.default = void 0; var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); -var _jsxRuntime$x = jsxRuntimeExports; +var _jsxRuntime$x = requireJsxRuntime(); var _default$x = default_1$x = ArrowDownward.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); @@ -25318,7 +25324,7 @@ Object.defineProperty(ArrowRight, "__esModule", { }); var default_1$w = ArrowRight.default = void 0; var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); -var _jsxRuntime$w = jsxRuntimeExports; +var _jsxRuntime$w = requireJsxRuntime(); var _default$w = default_1$w = ArrowRight.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); @@ -25331,7 +25337,7 @@ Object.defineProperty(Cancel, "__esModule", { }); var default_1$v = Cancel.default = void 0; var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); -var _jsxRuntime$v = jsxRuntimeExports; +var _jsxRuntime$v = requireJsxRuntime(); var _default$v = default_1$v = Cancel.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); @@ -25344,7 +25350,7 @@ Object.defineProperty(ChevronLeft, "__esModule", { }); var default_1$u = ChevronLeft.default = void 0; var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); -var _jsxRuntime$u = jsxRuntimeExports; +var _jsxRuntime$u = requireJsxRuntime(); var _default$u = default_1$u = ChevronLeft.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); @@ -25357,7 +25363,7 @@ Object.defineProperty(ChevronRight, "__esModule", { }); var default_1$t = ChevronRight.default = void 0; var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); -var _jsxRuntime$t = jsxRuntimeExports; +var _jsxRuntime$t = requireJsxRuntime(); var _default$t = default_1$t = ChevronRight.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); @@ -25370,7 +25376,7 @@ Object.defineProperty(ClearAll, "__esModule", { }); var default_1$s = ClearAll.default = void 0; var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); -var _jsxRuntime$s = jsxRuntimeExports; +var _jsxRuntime$s = requireJsxRuntime(); var _default$s = default_1$s = ClearAll.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); @@ -25383,7 +25389,7 @@ Object.defineProperty(Close, "__esModule", { }); var default_1$r = Close.default = void 0; var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); -var _jsxRuntime$r = jsxRuntimeExports; +var _jsxRuntime$r = requireJsxRuntime(); var _default$r = default_1$r = Close.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); @@ -25396,7 +25402,7 @@ Object.defineProperty(ContentCopy, "__esModule", { }); var default_1$q = ContentCopy.default = void 0; var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); -var _jsxRuntime$q = jsxRuntimeExports; +var _jsxRuntime$q = requireJsxRuntime(); var _default$q = default_1$q = ContentCopy.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); @@ -25409,7 +25415,7 @@ Object.defineProperty(DensityLarge, "__esModule", { }); var default_1$p = DensityLarge.default = void 0; var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); -var _jsxRuntime$p = jsxRuntimeExports; +var _jsxRuntime$p = requireJsxRuntime(); var _default$p = default_1$p = DensityLarge.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); @@ -25422,7 +25428,7 @@ Object.defineProperty(DensityMedium, "__esModule", { }); var default_1$o = DensityMedium.default = void 0; var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); -var _jsxRuntime$o = jsxRuntimeExports; +var _jsxRuntime$o = requireJsxRuntime(); var _default$o = default_1$o = DensityMedium.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); @@ -25435,7 +25441,7 @@ Object.defineProperty(DensitySmall, "__esModule", { }); var default_1$n = DensitySmall.default = void 0; var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); -var _jsxRuntime$n = jsxRuntimeExports; +var _jsxRuntime$n = requireJsxRuntime(); var _default$n = default_1$n = DensitySmall.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); @@ -25448,7 +25454,7 @@ Object.defineProperty(DragHandle, "__esModule", { }); var default_1$m = DragHandle.default = void 0; var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); -var _jsxRuntime$m = jsxRuntimeExports; +var _jsxRuntime$m = requireJsxRuntime(); var _default$m = default_1$m = DragHandle.default = (0, _createSvgIcon$m.default)(/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); @@ -25461,7 +25467,7 @@ Object.defineProperty(DynamicFeed, "__esModule", { }); var default_1$l = DynamicFeed.default = void 0; var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); -var _jsxRuntime$l = jsxRuntimeExports; +var _jsxRuntime$l = requireJsxRuntime(); var _default$l = default_1$l = DynamicFeed.default = (0, _createSvgIcon$l.default)([/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { @@ -25476,7 +25482,7 @@ Object.defineProperty(Edit, "__esModule", { }); var default_1$k = Edit.default = void 0; var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); -var _jsxRuntime$k = jsxRuntimeExports; +var _jsxRuntime$k = requireJsxRuntime(); var _default$k = default_1$k = Edit.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); @@ -25489,7 +25495,7 @@ Object.defineProperty(ExpandMore, "__esModule", { }); var default_1$j = ExpandMore.default = void 0; var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); -var _jsxRuntime$j = jsxRuntimeExports; +var _jsxRuntime$j = requireJsxRuntime(); var _default$j = default_1$j = ExpandMore.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); @@ -25502,7 +25508,7 @@ Object.defineProperty(FilterAlt, "__esModule", { }); var default_1$i = FilterAlt.default = void 0; var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); -var _jsxRuntime$i = jsxRuntimeExports; +var _jsxRuntime$i = requireJsxRuntime(); var _default$i = default_1$i = FilterAlt.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); @@ -25515,7 +25521,7 @@ Object.defineProperty(FilterList, "__esModule", { }); var default_1$h = FilterList.default = void 0; var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); -var _jsxRuntime$h = jsxRuntimeExports; +var _jsxRuntime$h = requireJsxRuntime(); var _default$h = default_1$h = FilterList.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); @@ -25528,7 +25534,7 @@ Object.defineProperty(FilterListOff, "__esModule", { }); var default_1$g = FilterListOff.default = void 0; var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); -var _jsxRuntime$g = jsxRuntimeExports; +var _jsxRuntime$g = requireJsxRuntime(); var _default$g = default_1$g = FilterListOff.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); @@ -25541,7 +25547,7 @@ Object.defineProperty(FirstPage, "__esModule", { }); var default_1$f = FirstPage.default = void 0; var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); -var _jsxRuntime$f = jsxRuntimeExports; +var _jsxRuntime$f = requireJsxRuntime(); var _default$f = default_1$f = FirstPage.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); @@ -25554,7 +25560,7 @@ Object.defineProperty(Fullscreen, "__esModule", { }); var default_1$e = Fullscreen.default = void 0; var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); -var _jsxRuntime$e = jsxRuntimeExports; +var _jsxRuntime$e = requireJsxRuntime(); var _default$e = default_1$e = Fullscreen.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); @@ -25567,7 +25573,7 @@ Object.defineProperty(FullscreenExit, "__esModule", { }); var default_1$d = FullscreenExit.default = void 0; var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); -var _jsxRuntime$d = jsxRuntimeExports; +var _jsxRuntime$d = requireJsxRuntime(); var _default$d = default_1$d = FullscreenExit.default = (0, _createSvgIcon$d.default)(/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); @@ -25580,7 +25586,7 @@ Object.defineProperty(KeyboardDoubleArrowDown, "__esModule", { }); var default_1$c = KeyboardDoubleArrowDown.default = void 0; var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); -var _jsxRuntime$c = jsxRuntimeExports; +var _jsxRuntime$c = requireJsxRuntime(); var _default$c = default_1$c = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$c.default)([/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { @@ -25595,7 +25601,7 @@ Object.defineProperty(LastPage, "__esModule", { }); var default_1$b = LastPage.default = void 0; var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); -var _jsxRuntime$b = jsxRuntimeExports; +var _jsxRuntime$b = requireJsxRuntime(); var _default$b = default_1$b = LastPage.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); @@ -25608,7 +25614,7 @@ Object.defineProperty(MoreHoriz, "__esModule", { }); var default_1$a = MoreHoriz.default = void 0; var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); -var _jsxRuntime$a = jsxRuntimeExports; +var _jsxRuntime$a = requireJsxRuntime(); var _default$a = default_1$a = MoreHoriz.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); @@ -25621,7 +25627,7 @@ Object.defineProperty(MoreVert, "__esModule", { }); var default_1$9 = MoreVert.default = void 0; var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); -var _jsxRuntime$9 = jsxRuntimeExports; +var _jsxRuntime$9 = requireJsxRuntime(); var _default$9 = default_1$9 = MoreVert.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); @@ -25634,7 +25640,7 @@ Object.defineProperty(PushPin, "__esModule", { }); var default_1$8 = PushPin.default = void 0; var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); -var _jsxRuntime$8 = jsxRuntimeExports; +var _jsxRuntime$8 = requireJsxRuntime(); var _default$8 = default_1$8 = PushPin.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" @@ -25648,7 +25654,7 @@ Object.defineProperty(RestartAlt, "__esModule", { }); var default_1$7 = RestartAlt.default = void 0; var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); -var _jsxRuntime$7 = jsxRuntimeExports; +var _jsxRuntime$7 = requireJsxRuntime(); var _default$7 = default_1$7 = RestartAlt.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); @@ -25661,7 +25667,7 @@ Object.defineProperty(Save, "__esModule", { }); var default_1$6 = Save.default = void 0; var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); -var _jsxRuntime$6 = jsxRuntimeExports; +var _jsxRuntime$6 = requireJsxRuntime(); var _default$6 = default_1$6 = Save.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); @@ -25674,7 +25680,7 @@ Object.defineProperty(Search, "__esModule", { }); var default_1$5 = Search.default = void 0; var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); -var _jsxRuntime$5 = jsxRuntimeExports; +var _jsxRuntime$5 = requireJsxRuntime(); var _default$5 = default_1$5 = Search.default = (0, _createSvgIcon$5.default)(/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); @@ -25687,7 +25693,7 @@ Object.defineProperty(SearchOff, "__esModule", { }); var default_1$4 = SearchOff.default = void 0; var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); -var _jsxRuntime$4 = jsxRuntimeExports; +var _jsxRuntime$4 = requireJsxRuntime(); var _default$4 = default_1$4 = SearchOff.default = (0, _createSvgIcon$4.default)([/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { @@ -25702,7 +25708,7 @@ Object.defineProperty(Sort, "__esModule", { }); var default_1$3 = Sort.default = void 0; var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); -var _jsxRuntime$3 = jsxRuntimeExports; +var _jsxRuntime$3 = requireJsxRuntime(); var _default$3 = default_1$3 = Sort.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); @@ -25715,7 +25721,7 @@ Object.defineProperty(SyncAlt, "__esModule", { }); var default_1$2 = SyncAlt.default = void 0; var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); -var _jsxRuntime$2 = jsxRuntimeExports; +var _jsxRuntime$2 = requireJsxRuntime(); var _default$2 = default_1$2 = SyncAlt.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); @@ -25728,7 +25734,7 @@ Object.defineProperty(ViewColumn, "__esModule", { }); var default_1$1 = ViewColumn.default = void 0; var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); -var _jsxRuntime$1 = jsxRuntimeExports; +var _jsxRuntime$1 = requireJsxRuntime(); var _default$1 = default_1$1 = ViewColumn.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); @@ -25741,7 +25747,7 @@ Object.defineProperty(VisibilityOff, "__esModule", { }); var default_1 = VisibilityOff.default = void 0; var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); -var _jsxRuntime = jsxRuntimeExports; +var _jsxRuntime = requireJsxRuntime(); var _default = default_1 = VisibilityOff.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); @@ -62700,8 +62706,8 @@ const MaterialReactTable = (props) => { } return jsxRuntimeExports.jsx(MRT_TablePaper, { table }); }; -const { Open: Open$b, Child: Child$4 } = gubu_minExports.Gubu; -const Shape$2 = gubu_minExports.Gubu(Open$b({ +const { Open: Open$g, Child: Child$4 } = gubu_minExports.Gubu; +const Shape$2 = gubu_minExports.Gubu(Open$g({ name: String, prefix: String, ent: String, @@ -62746,7 +62752,7 @@ Object.assign(VxgBasicEntityListPlugin, { } }); Object.defineProperty(VxgBasicEntityListPlugin, "name", { value: "VxgBasicEntityListPlugin" }); -const CMPNAME$d = "BasicEntityList"; +const CMPNAME$i = "BasicEntityList"; function BasicEntityList(props) { const { ctx } = props; const { seneca } = ctx(); @@ -64666,27 +64672,26 @@ function useForm(props = {}) { _formControl.current.formState = getProxyFormState(formState, control); return _formControl.current; } -const CMPNAME$c = "BasicEntitySliderField"; -const { Open: Open$a } = gubu_minExports.Gubu; -const BasicEntityCheckBoxFieldSpecShape = gubu_minExports.Gubu(Open$a({ - field: Open$a({ +const CMPNAME$h = "BasicEntitySliderField"; +const { Open: Open$f } = gubu_minExports.Gubu; +const BasicEntityCheckBoxFieldSpecShape = gubu_minExports.Gubu(Open$f({ + field: Open$f({ id: String, name: String, - kind: String, + kind: gubu_minExports.Skip(String), label: gubu_minExports.Default("", String), - ux: Open$a({ + ux: Open$f({ kind: gubu_minExports.Exact("CheckBox"), edit: gubu_minExports.Default(true), - props: Open$a({}) + props: Open$f({}) }) }) -}), { name: CMPNAME$c }); +}), { name: CMPNAME$h }); function BasicEntityCheckBoxField(props) { const { spec } = props; const basicEntityCheckBoxField = BasicEntityCheckBoxFieldSpecShape(spec); const { control, field, getValues } = basicEntityCheckBoxField; const val = getValues(field.name); - console.log("BasicEntityCheckBoxField", field.ux.props); return /* @__PURE__ */ jsxRuntimeExports.jsx( Box$2, __spreadProps(__spreadValues({}, field.ux.props), { @@ -64719,27 +64724,27 @@ function BasicEntityCheckBoxField(props) { `${field.id}-box` ); } -const CMPNAME$b = "BasicEntityAutocompleteField"; -const { Open: Open$9 } = gubu_minExports.Gubu; -const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu(Open$9({ - field: Open$9({ +const CMPNAME$g = "BasicEntityAutocompleteField"; +const { Open: Open$e } = gubu_minExports.Gubu; +const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu(Open$e({ + field: Open$e({ id: String, name: String, - kind: String, + kind: gubu_minExports.Skip(String), label: gubu_minExports.Default(""), - options: Open$9({ + options: Open$e({ label: { field: gubu_minExports.Default("label") }, value: { field: gubu_minExports.Default("value") }, multiple: gubu_minExports.Default(false), - default: Open$9({}), - ents: Open$9({}) + default: Open$e({}), + ents: Open$e({}) }), - ux: Open$9({ + ux: Open$e({ kind: gubu_minExports.Exact("Autocomplete"), edit: gubu_minExports.Default(true) }) }) -}), { name: CMPNAME$b }); +}), { name: CMPNAME$g }); function BasicEntityAutocompleteField(props) { const { spec } = props; const basicEntityAutocompleteField = BasicEntityAutocompleteFieldSpecShape(spec); @@ -64817,15 +64822,15 @@ function resolveValue(options, val) { return val || []; } } -const CMPNAME$a = "BasicEntitySliderField"; -const { Open: Open$8 } = gubu_minExports.Gubu; -const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu(Open$8({ - field: Open$8({ +const CMPNAME$f = "BasicEntitySliderField"; +const { Open: Open$d } = gubu_minExports.Gubu; +const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu(Open$d({ + field: Open$d({ id: String, name: String, - kind: String, + kind: gubu_minExports.Skip(String), label: gubu_minExports.Default("", String), - ux: Open$8({ + ux: Open$d({ kind: gubu_minExports.Exact("Slider"), edit: gubu_minExports.Default(true), step: gubu_minExports.Default(1), @@ -64839,7 +64844,7 @@ const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu(Open$8({ } }) }) -}), { name: CMPNAME$a }); +}), { name: CMPNAME$f }); function BasicEntitySliderField(props) { const { spec } = props; const basicEntityAutocompleteField = BasicEntitySliderFieldSpecShape(spec); @@ -64882,21 +64887,21 @@ function resolveMarks(marks) { } return marks; } -const CMPNAME$9 = "BasicEntitySliderField"; -const { Open: Open$7 } = gubu_minExports.Gubu; -const BasicEntityRadioGroupFieldSpecShape = gubu_minExports.Gubu(Open$7({ - field: Open$7({ +const CMPNAME$e = "BasicEntitySliderField"; +const { Open: Open$c } = gubu_minExports.Gubu; +const BasicEntityRadioGroupFieldSpecShape = gubu_minExports.Gubu(Open$c({ + field: Open$c({ id: String, name: String, - kind: String, + kind: gubu_minExports.Skip(String), label: gubu_minExports.Default("", String), - ux: Open$7({ + ux: Open$c({ kind: gubu_minExports.Exact("RadioGroup"), edit: gubu_minExports.Default(true), direction: gubu_minExports.Exact("row", "column").Default("row") }) }) -}), { name: CMPNAME$9 }); +}), { name: CMPNAME$e }); function BasicEntityRadioGroupField(props) { const { spec } = props; const basicEntityRadioGroupField = BasicEntityRadioGroupFieldSpecShape(spec); @@ -64923,51 +64928,65 @@ function BasicEntityRadioGroupField(props) { ) ] }); } -const CMPNAME$8 = "BasicEntityField"; -const { Open: Open$6 } = gubu_minExports.Gubu; -const BasicEntityFieldSpecShape = gubu_minExports.Gubu(Open$6({ - field: Open$6({ - field: Open$6({ - id: String, - name: String, - kind: String, - label: gubu_minExports.Default("", String), - ux: Open$6({ - kind: gubu_minExports.Exact("Text", "TextBox", "Date", "DateTime", "Time", "CheckBox", "Autocomplete", "Slider", "RadioGroup"), - edit: gubu_minExports.Default(true), - rows: gubu_minExports.Default(3), - props: Open$6({}) - }) +const CMPNAME$d = "BasicEntityTextBoxField"; +const { Open: Open$b } = gubu_minExports.Gubu; +const BasicEntityTextBoxFieldSpecShape = gubu_minExports.Gubu(Open$b({ + field: Open$b({ + id: String, + name: String, + kind: gubu_minExports.Skip(String), + label: gubu_minExports.Default("", String), + ux: Open$b({ + kind: gubu_minExports.Exact("TextBox"), + edit: gubu_minExports.Default(true), + props: Open$b({}) }) }) -}), { name: CMPNAME$8 }); -const fieldMap = { - Text: BasicEntityTextField, - TextBox: BasicEntityTextBoxField, - Date: BasicEntityDateField, - DateTime: BasicEntityDateTimeField, - Time: BasicEntityTimeField, - CheckBox: BasicEntityCheckBoxField, - Autocomplete: BasicEntityAutocompleteField, - Slider: BasicEntitySliderField, - RadioGroup: BasicEntityRadioGroupField -}; -function BasicEntityField(props) { - const { ctx, spec } = props; - const basicEntityFieldSpec = BasicEntityFieldSpecShape(spec); - const field = basicEntityFieldSpec.field; - const Field = fieldMap[field.ux.kind]; - return /* @__PURE__ */ jsxRuntimeExports.jsx(Field, { ctx, spec }); +}), { name: CMPNAME$d }); +function BasicEntityTextBoxField(props) { + const { spec } = props; + const basicEntityTextBoxField = BasicEntityTextBoxFieldSpecShape(spec); + const { field, getValues, register } = basicEntityTextBoxField; + const val = getValues(field.name); + return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx( + TextField$1, + __spreadValues({ + id: field.id, + name: field.name, + label: field.label, + variant: "outlined", + fullWidth: true, + multiline: true, + rows: field.ux.rows, + InputLabelProps: { shrink: (val == null ? void 0 : val.length) > 0 } + }, register(field.name)) + ) }, field.name); } function BasicEntityFieldError(props) { const { err } = props; return err ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-active", children: err.message }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-none" }); } +const CMPNAME$c = "BasicEntityTextField"; +const { Open: Open$a } = gubu_minExports.Gubu; +const BasicEntityTextFieldSpecShape = gubu_minExports.Gubu(Open$a({ + field: Open$a({ + id: String, + name: String, + kind: gubu_minExports.Skip(String), + label: gubu_minExports.Default("", String), + ux: Open$a({ + kind: gubu_minExports.Exact("Text"), + edit: gubu_minExports.Default(true), + props: Open$a({}) + }) + }) +}), { name: CMPNAME$c }); function BasicEntityTextField(props) { const { spec } = props; - const { field, register, getValues, errors } = spec; - const err = errors[field.name]; + const basicEntityTextBoxField = BasicEntityTextFieldSpecShape(spec); + const { field, getValues, register, errors } = basicEntityTextBoxField; const val = getValues(field.name); + const err = errors[field.name]; return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx( TextField$1, @@ -64983,27 +65002,25 @@ function BasicEntityTextField(props) { /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, field.id); } -function BasicEntityTextBoxField(props) { - const { spec } = props; - const { field, register, getValues } = spec; - const val = getValues(field.name); - return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx( - TextField$1, - __spreadValues({ - id: field.id, - name: field.name, - label: field.label, - variant: "outlined", - fullWidth: true, - multiline: true, - rows: field.ux.rows, - InputLabelProps: { shrink: (val == null ? void 0 : val.length) > 0 } - }, register(field.name)) - ) }, field.name); -} +const CMPNAME$b = "BasicEntityDateField"; +const { Open: Open$9 } = gubu_minExports.Gubu; +const BasicEntityDateFieldSpecShape = gubu_minExports.Gubu(Open$9({ + field: Open$9({ + id: String, + name: String, + kind: gubu_minExports.Skip(String), + label: gubu_minExports.Default("", String), + ux: Open$9({ + kind: gubu_minExports.Exact("Date"), + edit: gubu_minExports.Default(true), + props: Open$9({}) + }) + }) +}), { name: CMPNAME$b }); function BasicEntityDateField(props) { const { spec } = props; - const { field, register, getValues } = spec; + const basicEntityDateField = BasicEntityDateFieldSpecShape(spec); + const { field, getValues, register } = basicEntityDateField; const val = getValues(field.name); return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx( TextField$1, @@ -65019,9 +65036,25 @@ function BasicEntityDateField(props) { }, register(field.name)) ) }, field.id); } +const CMPNAME$a = "BasicEntityTimeField"; +const { Open: Open$8 } = gubu_minExports.Gubu; +const BasicEntityTimeFieldSpecShape = gubu_minExports.Gubu(Open$8({ + field: Open$8({ + id: String, + name: String, + kind: gubu_minExports.Skip(String), + label: gubu_minExports.Default("", String), + ux: Open$8({ + kind: gubu_minExports.Exact("Time"), + edit: gubu_minExports.Default(true), + props: Open$8({}) + }) + }) +}), { name: CMPNAME$a }); function BasicEntityTimeField(props) { const { spec } = props; - const { field, register, getValues } = spec; + const basicEntityTimeField = BasicEntityTimeFieldSpecShape(spec); + const { field, getValues, register } = basicEntityTimeField; const val = getValues(field.name); return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx( TextField$1, @@ -65037,9 +65070,25 @@ function BasicEntityTimeField(props) { }, register(field.name)) ) }, field.id); } +const CMPNAME$9 = "BasicEntityDateTimeField"; +const { Open: Open$7 } = gubu_minExports.Gubu; +const BasicEntityDateTimeFieldSpecShape = gubu_minExports.Gubu(Open$7({ + field: Open$7({ + id: String, + name: String, + kind: gubu_minExports.Skip(String), + label: gubu_minExports.Default("", String), + ux: Open$7({ + kind: gubu_minExports.Exact("DateTime"), + edit: gubu_minExports.Default(true), + props: Open$7({}) + }) + }) +}), { name: CMPNAME$9 }); function BasicEntityDateTimeField(props) { const { spec } = props; - const { field, register, getValues } = spec; + const basicEntityDateTimeField = BasicEntityDateTimeFieldSpecShape(spec); + const { field, getValues, register } = basicEntityDateTimeField; const val = getValues(field.name); return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx( TextField$1, @@ -65055,6 +65104,40 @@ function BasicEntityDateTimeField(props) { }, register(field.name)) ) }, field.id); } +const CMPNAME$8 = "BasicEntityField"; +const { Open: Open$6 } = gubu_minExports.Gubu; +const BasicEntityFieldSpecShape = gubu_minExports.Gubu(Open$6({ + field: Open$6({ + id: String, + name: String, + kind: gubu_minExports.Skip(String), + label: gubu_minExports.Default("", String), + ux: Open$6({ + kind: gubu_minExports.Exact("Text", "TextBox", "Date", "DateTime", "Time", "CheckBox", "Autocomplete", "Slider", "RadioGroup"), + edit: gubu_minExports.Default(true), + rows: gubu_minExports.Default(3), + props: Open$6({}) + }) + }) +}), { name: CMPNAME$8 }); +const fieldMap = { + Text: BasicEntityTextField, + TextBox: BasicEntityTextBoxField, + Date: BasicEntityDateField, + DateTime: BasicEntityDateTimeField, + Time: BasicEntityTimeField, + CheckBox: BasicEntityCheckBoxField, + Autocomplete: BasicEntityAutocompleteField, + Slider: BasicEntitySliderField, + RadioGroup: BasicEntityRadioGroupField +}; +function BasicEntityField(props) { + const { ctx, spec } = props; + const basicEntityFieldSpec = BasicEntityFieldSpecShape(spec); + const field = basicEntityFieldSpec.field; + const Field = fieldMap[field.ux.kind]; + return /* @__PURE__ */ jsxRuntimeExports.jsx(Field, { ctx, spec }); +} const { Open: Open$5, Child: Child$3 } = gubu_minExports.Gubu; const Shape$1 = gubu_minExports.Gubu(Open$5({ name: String, diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index 24ed2eb..fe00b28 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -1042,15 +1042,21 @@ var __async = (__this, __arguments, generator) => { } return reactJsxRuntime_development; } - var jsxRuntime = jsxRuntime$2.exports; - "use strict"; - if (process.env.NODE_ENV === "production") { - jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); - } else { - jsxRuntime$2.exports = requireReactJsxRuntime_development(); + var jsxRuntime$1 = jsxRuntime$2.exports; + var hasRequiredJsxRuntime; + function requireJsxRuntime() { + if (hasRequiredJsxRuntime) return jsxRuntime$2.exports; + hasRequiredJsxRuntime = 1; + "use strict"; + if (process.env.NODE_ENV === "production") { + jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); + } else { + jsxRuntime$2.exports = requireReactJsxRuntime_development(); + } + return jsxRuntime$2.exports; } - var jsxRuntimeExports = jsxRuntime$2.exports; - const jsxRuntime$1 = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); + var jsxRuntimeExports = requireJsxRuntime(); + const jsxRuntime = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); var gubu_min$2 = { exports: {} }; var gubu_min = gubu_min$2.exports; (function(module2, exports3) { @@ -10594,8 +10600,8 @@ try { */ variant: PropTypes.oneOfType([PropTypes.oneOf(["dense", "regular"]), PropTypes.string]) } : void 0; - const CMPNAME$g = "BasicAccountTool"; - console.log(CMPNAME$g, "1"); + const CMPNAME$l = "BasicAccountTool"; + console.log(CMPNAME$l, "1"); const { Exact: Exact$2 } = gubu_minExports.Gubu; const BasicAccountToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10605,7 +10611,7 @@ try { attr: {}, sx: {}, style: {} - }, { name: CMPNAME$g }); + }, { name: CMPNAME$l }); function BasicAccountTool(props) { var _a; const { ctx, spec } = props; @@ -10679,8 +10685,8 @@ try { children: `${parts.join("")}` }; } - const CMPNAME$f = "BasicHeadTool"; - console.log(CMPNAME$f, "1"); + const CMPNAME$k = "BasicHeadTool"; + console.log(CMPNAME$k, "1"); const { Exact: Exact$1 } = gubu_minExports.Gubu; const BasicHeadToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10690,7 +10696,7 @@ try { attr: {}, sx: {}, style: {} - }, { name: CMPNAME$f }); + }, { name: CMPNAME$k }); function BasicHeadTool(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -10699,7 +10705,7 @@ try { const { name, kind, attr, sx, style: style2 } = basicHeadToolSpec; let tool = /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}); if ("" === kind) { - console.warn(CMPNAME$f, "empty-tool-kind", basicHeadToolSpec); + console.warn(CMPNAME$k, "empty-tool-kind", basicHeadToolSpec); } else if ("logo" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsxs( "div", @@ -10716,7 +10722,7 @@ try { { href: "/", style: style2, - className: `vxg-${CMPNAME$f}-logo`, + className: `vxg-${CMPNAME$k}-logo`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: attr.img }) } ), @@ -10748,17 +10754,17 @@ try { } else if ("account" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsx(BasicAccountTool, { ctx, spec }); } else { - console.warn(CMPNAME$f, "unknown-tool-kind", kind, basicHeadToolSpec); + console.warn(CMPNAME$k, "unknown-tool-kind", kind, basicHeadToolSpec); } return tool; } - const CMPNAME$e = "BasicHead"; - const { Child: Child$5, Exact, Open: Open$c, Required: Required$1 } = gubu_minExports.Gubu; + const CMPNAME$j = "BasicHead"; + const { Child: Child$5, Exact, Open: Open$h, Required: Required$1 } = gubu_minExports.Gubu; const BasicHeadSpecShape = gubu_minExports.Gubu({ head: { name: String, active: Boolean, - tool: Child$5(Open$c({ + tool: Child$5(Open$h({ align: Exact("left", "right") })) }, @@ -10768,7 +10774,7 @@ try { AppBar: {}, ToolBar: {} } - }, { name: CMPNAME$e }); + }, { name: CMPNAME$j }); function BasicHead(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -25317,7 +25323,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$x = ArrowDownward.default = void 0; var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); - var _jsxRuntime$x = jsxRuntimeExports; + var _jsxRuntime$x = requireJsxRuntime(); var _default$x = default_1$x = ArrowDownward.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); @@ -25330,7 +25336,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$w = ArrowRight.default = void 0; var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); - var _jsxRuntime$w = jsxRuntimeExports; + var _jsxRuntime$w = requireJsxRuntime(); var _default$w = default_1$w = ArrowRight.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); @@ -25343,7 +25349,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$v = Cancel.default = void 0; var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); - var _jsxRuntime$v = jsxRuntimeExports; + var _jsxRuntime$v = requireJsxRuntime(); var _default$v = default_1$v = Cancel.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); @@ -25356,7 +25362,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$u = ChevronLeft.default = void 0; var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); - var _jsxRuntime$u = jsxRuntimeExports; + var _jsxRuntime$u = requireJsxRuntime(); var _default$u = default_1$u = ChevronLeft.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); @@ -25369,7 +25375,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$t = ChevronRight.default = void 0; var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); - var _jsxRuntime$t = jsxRuntimeExports; + var _jsxRuntime$t = requireJsxRuntime(); var _default$t = default_1$t = ChevronRight.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); @@ -25382,7 +25388,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$s = ClearAll.default = void 0; var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); - var _jsxRuntime$s = jsxRuntimeExports; + var _jsxRuntime$s = requireJsxRuntime(); var _default$s = default_1$s = ClearAll.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); @@ -25395,7 +25401,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$r = Close.default = void 0; var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); - var _jsxRuntime$r = jsxRuntimeExports; + var _jsxRuntime$r = requireJsxRuntime(); var _default$r = default_1$r = Close.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); @@ -25408,7 +25414,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$q = ContentCopy.default = void 0; var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); - var _jsxRuntime$q = jsxRuntimeExports; + var _jsxRuntime$q = requireJsxRuntime(); var _default$q = default_1$q = ContentCopy.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); @@ -25421,7 +25427,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$p = DensityLarge.default = void 0; var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); - var _jsxRuntime$p = jsxRuntimeExports; + var _jsxRuntime$p = requireJsxRuntime(); var _default$p = default_1$p = DensityLarge.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); @@ -25434,7 +25440,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$o = DensityMedium.default = void 0; var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); - var _jsxRuntime$o = jsxRuntimeExports; + var _jsxRuntime$o = requireJsxRuntime(); var _default$o = default_1$o = DensityMedium.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); @@ -25447,7 +25453,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$n = DensitySmall.default = void 0; var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); - var _jsxRuntime$n = jsxRuntimeExports; + var _jsxRuntime$n = requireJsxRuntime(); var _default$n = default_1$n = DensitySmall.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); @@ -25460,7 +25466,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$m = DragHandle.default = void 0; var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); - var _jsxRuntime$m = jsxRuntimeExports; + var _jsxRuntime$m = requireJsxRuntime(); var _default$m = default_1$m = DragHandle.default = (0, _createSvgIcon$m.default)(/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); @@ -25473,7 +25479,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$l = DynamicFeed.default = void 0; var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); - var _jsxRuntime$l = jsxRuntimeExports; + var _jsxRuntime$l = requireJsxRuntime(); var _default$l = default_1$l = DynamicFeed.default = (0, _createSvgIcon$l.default)([/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { @@ -25488,7 +25494,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$k = Edit.default = void 0; var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); - var _jsxRuntime$k = jsxRuntimeExports; + var _jsxRuntime$k = requireJsxRuntime(); var _default$k = default_1$k = Edit.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); @@ -25501,7 +25507,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$j = ExpandMore.default = void 0; var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); - var _jsxRuntime$j = jsxRuntimeExports; + var _jsxRuntime$j = requireJsxRuntime(); var _default$j = default_1$j = ExpandMore.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); @@ -25514,7 +25520,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$i = FilterAlt.default = void 0; var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); - var _jsxRuntime$i = jsxRuntimeExports; + var _jsxRuntime$i = requireJsxRuntime(); var _default$i = default_1$i = FilterAlt.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); @@ -25527,7 +25533,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$h = FilterList.default = void 0; var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); - var _jsxRuntime$h = jsxRuntimeExports; + var _jsxRuntime$h = requireJsxRuntime(); var _default$h = default_1$h = FilterList.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); @@ -25540,7 +25546,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$g = FilterListOff.default = void 0; var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); - var _jsxRuntime$g = jsxRuntimeExports; + var _jsxRuntime$g = requireJsxRuntime(); var _default$g = default_1$g = FilterListOff.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); @@ -25553,7 +25559,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$f = FirstPage.default = void 0; var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); - var _jsxRuntime$f = jsxRuntimeExports; + var _jsxRuntime$f = requireJsxRuntime(); var _default$f = default_1$f = FirstPage.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); @@ -25566,7 +25572,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$e = Fullscreen.default = void 0; var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); - var _jsxRuntime$e = jsxRuntimeExports; + var _jsxRuntime$e = requireJsxRuntime(); var _default$e = default_1$e = Fullscreen.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); @@ -25579,7 +25585,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$d = FullscreenExit.default = void 0; var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); - var _jsxRuntime$d = jsxRuntimeExports; + var _jsxRuntime$d = requireJsxRuntime(); var _default$d = default_1$d = FullscreenExit.default = (0, _createSvgIcon$d.default)(/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); @@ -25592,7 +25598,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$c = KeyboardDoubleArrowDown.default = void 0; var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); - var _jsxRuntime$c = jsxRuntimeExports; + var _jsxRuntime$c = requireJsxRuntime(); var _default$c = default_1$c = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$c.default)([/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { @@ -25607,7 +25613,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$b = LastPage.default = void 0; var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); - var _jsxRuntime$b = jsxRuntimeExports; + var _jsxRuntime$b = requireJsxRuntime(); var _default$b = default_1$b = LastPage.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); @@ -25620,7 +25626,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$a = MoreHoriz.default = void 0; var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); - var _jsxRuntime$a = jsxRuntimeExports; + var _jsxRuntime$a = requireJsxRuntime(); var _default$a = default_1$a = MoreHoriz.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); @@ -25633,7 +25639,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$9 = MoreVert.default = void 0; var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); - var _jsxRuntime$9 = jsxRuntimeExports; + var _jsxRuntime$9 = requireJsxRuntime(); var _default$9 = default_1$9 = MoreVert.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); @@ -25646,7 +25652,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$8 = PushPin.default = void 0; var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); - var _jsxRuntime$8 = jsxRuntimeExports; + var _jsxRuntime$8 = requireJsxRuntime(); var _default$8 = default_1$8 = PushPin.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" @@ -25660,7 +25666,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$7 = RestartAlt.default = void 0; var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); - var _jsxRuntime$7 = jsxRuntimeExports; + var _jsxRuntime$7 = requireJsxRuntime(); var _default$7 = default_1$7 = RestartAlt.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); @@ -25673,7 +25679,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$6 = Save.default = void 0; var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); - var _jsxRuntime$6 = jsxRuntimeExports; + var _jsxRuntime$6 = requireJsxRuntime(); var _default$6 = default_1$6 = Save.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); @@ -25686,7 +25692,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$5 = Search.default = void 0; var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); - var _jsxRuntime$5 = jsxRuntimeExports; + var _jsxRuntime$5 = requireJsxRuntime(); var _default$5 = default_1$5 = Search.default = (0, _createSvgIcon$5.default)(/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); @@ -25699,7 +25705,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$4 = SearchOff.default = void 0; var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); - var _jsxRuntime$4 = jsxRuntimeExports; + var _jsxRuntime$4 = requireJsxRuntime(); var _default$4 = default_1$4 = SearchOff.default = (0, _createSvgIcon$4.default)([/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { @@ -25714,7 +25720,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$3 = Sort.default = void 0; var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); - var _jsxRuntime$3 = jsxRuntimeExports; + var _jsxRuntime$3 = requireJsxRuntime(); var _default$3 = default_1$3 = Sort.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); @@ -25727,7 +25733,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$2 = SyncAlt.default = void 0; var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); - var _jsxRuntime$2 = jsxRuntimeExports; + var _jsxRuntime$2 = requireJsxRuntime(); var _default$2 = default_1$2 = SyncAlt.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); @@ -25740,7 +25746,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$1 = ViewColumn.default = void 0; var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); - var _jsxRuntime$1 = jsxRuntimeExports; + var _jsxRuntime$1 = requireJsxRuntime(); var _default$1 = default_1$1 = ViewColumn.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); @@ -25753,7 +25759,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1 = VisibilityOff.default = void 0; var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); - var _jsxRuntime = jsxRuntimeExports; + var _jsxRuntime = requireJsxRuntime(); var _default = default_1 = VisibilityOff.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); @@ -62712,8 +62718,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } return jsxRuntimeExports.jsx(MRT_TablePaper, { table }); }; - const { Open: Open$b, Child: Child$4 } = gubu_minExports.Gubu; - const Shape$2 = gubu_minExports.Gubu(Open$b({ + const { Open: Open$g, Child: Child$4 } = gubu_minExports.Gubu; + const Shape$2 = gubu_minExports.Gubu(Open$g({ name: String, prefix: String, ent: String, @@ -62758,7 +62764,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } }); Object.defineProperty(VxgBasicEntityListPlugin, "name", { value: "VxgBasicEntityListPlugin" }); - const CMPNAME$d = "BasicEntityList"; + const CMPNAME$i = "BasicEntityList"; function BasicEntityList(props) { const { ctx } = props; const { seneca } = ctx(); @@ -64678,27 +64684,26 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha _formControl.current.formState = getProxyFormState(formState, control); return _formControl.current; } - const CMPNAME$c = "BasicEntitySliderField"; - const { Open: Open$a } = gubu_minExports.Gubu; - const BasicEntityCheckBoxFieldSpecShape = gubu_minExports.Gubu(Open$a({ - field: Open$a({ + const CMPNAME$h = "BasicEntitySliderField"; + const { Open: Open$f } = gubu_minExports.Gubu; + const BasicEntityCheckBoxFieldSpecShape = gubu_minExports.Gubu(Open$f({ + field: Open$f({ id: String, name: String, - kind: String, + kind: gubu_minExports.Skip(String), label: gubu_minExports.Default("", String), - ux: Open$a({ + ux: Open$f({ kind: gubu_minExports.Exact("CheckBox"), edit: gubu_minExports.Default(true), - props: Open$a({}) + props: Open$f({}) }) }) - }), { name: CMPNAME$c }); + }), { name: CMPNAME$h }); function BasicEntityCheckBoxField(props) { const { spec } = props; const basicEntityCheckBoxField = BasicEntityCheckBoxFieldSpecShape(spec); const { control, field, getValues } = basicEntityCheckBoxField; const val = getValues(field.name); - console.log("BasicEntityCheckBoxField", field.ux.props); return /* @__PURE__ */ jsxRuntimeExports.jsx( material.Box, __spreadProps(__spreadValues({}, field.ux.props), { @@ -64731,27 +64736,27 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha `${field.id}-box` ); } - const CMPNAME$b = "BasicEntityAutocompleteField"; - const { Open: Open$9 } = gubu_minExports.Gubu; - const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu(Open$9({ - field: Open$9({ + const CMPNAME$g = "BasicEntityAutocompleteField"; + const { Open: Open$e } = gubu_minExports.Gubu; + const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu(Open$e({ + field: Open$e({ id: String, name: String, - kind: String, + kind: gubu_minExports.Skip(String), label: gubu_minExports.Default(""), - options: Open$9({ + options: Open$e({ label: { field: gubu_minExports.Default("label") }, value: { field: gubu_minExports.Default("value") }, multiple: gubu_minExports.Default(false), - default: Open$9({}), - ents: Open$9({}) + default: Open$e({}), + ents: Open$e({}) }), - ux: Open$9({ + ux: Open$e({ kind: gubu_minExports.Exact("Autocomplete"), edit: gubu_minExports.Default(true) }) }) - }), { name: CMPNAME$b }); + }), { name: CMPNAME$g }); function BasicEntityAutocompleteField(props) { const { spec } = props; const basicEntityAutocompleteField = BasicEntityAutocompleteFieldSpecShape(spec); @@ -64829,15 +64834,15 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha return val || []; } } - const CMPNAME$a = "BasicEntitySliderField"; - const { Open: Open$8 } = gubu_minExports.Gubu; - const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu(Open$8({ - field: Open$8({ + const CMPNAME$f = "BasicEntitySliderField"; + const { Open: Open$d } = gubu_minExports.Gubu; + const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu(Open$d({ + field: Open$d({ id: String, name: String, - kind: String, + kind: gubu_minExports.Skip(String), label: gubu_minExports.Default("", String), - ux: Open$8({ + ux: Open$d({ kind: gubu_minExports.Exact("Slider"), edit: gubu_minExports.Default(true), step: gubu_minExports.Default(1), @@ -64851,7 +64856,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } }) }) - }), { name: CMPNAME$a }); + }), { name: CMPNAME$f }); function BasicEntitySliderField(props) { const { spec } = props; const basicEntityAutocompleteField = BasicEntitySliderFieldSpecShape(spec); @@ -64894,21 +64899,21 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } return marks; } - const CMPNAME$9 = "BasicEntitySliderField"; - const { Open: Open$7 } = gubu_minExports.Gubu; - const BasicEntityRadioGroupFieldSpecShape = gubu_minExports.Gubu(Open$7({ - field: Open$7({ + const CMPNAME$e = "BasicEntitySliderField"; + const { Open: Open$c } = gubu_minExports.Gubu; + const BasicEntityRadioGroupFieldSpecShape = gubu_minExports.Gubu(Open$c({ + field: Open$c({ id: String, name: String, - kind: String, + kind: gubu_minExports.Skip(String), label: gubu_minExports.Default("", String), - ux: Open$7({ + ux: Open$c({ kind: gubu_minExports.Exact("RadioGroup"), edit: gubu_minExports.Default(true), direction: gubu_minExports.Exact("row", "column").Default("row") }) }) - }), { name: CMPNAME$9 }); + }), { name: CMPNAME$e }); function BasicEntityRadioGroupField(props) { const { spec } = props; const basicEntityRadioGroupField = BasicEntityRadioGroupFieldSpecShape(spec); @@ -64935,51 +64940,65 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ) ] }); } - const CMPNAME$8 = "BasicEntityField"; - const { Open: Open$6 } = gubu_minExports.Gubu; - const BasicEntityFieldSpecShape = gubu_minExports.Gubu(Open$6({ - field: Open$6({ - field: Open$6({ - id: String, - name: String, - kind: String, - label: gubu_minExports.Default("", String), - ux: Open$6({ - kind: gubu_minExports.Exact("Text", "TextBox", "Date", "DateTime", "Time", "CheckBox", "Autocomplete", "Slider", "RadioGroup"), - edit: gubu_minExports.Default(true), - rows: gubu_minExports.Default(3), - props: Open$6({}) - }) + const CMPNAME$d = "BasicEntityTextBoxField"; + const { Open: Open$b } = gubu_minExports.Gubu; + const BasicEntityTextBoxFieldSpecShape = gubu_minExports.Gubu(Open$b({ + field: Open$b({ + id: String, + name: String, + kind: gubu_minExports.Skip(String), + label: gubu_minExports.Default("", String), + ux: Open$b({ + kind: gubu_minExports.Exact("TextBox"), + edit: gubu_minExports.Default(true), + props: Open$b({}) }) }) - }), { name: CMPNAME$8 }); - const fieldMap = { - Text: BasicEntityTextField, - TextBox: BasicEntityTextBoxField, - Date: BasicEntityDateField, - DateTime: BasicEntityDateTimeField, - Time: BasicEntityTimeField, - CheckBox: BasicEntityCheckBoxField, - Autocomplete: BasicEntityAutocompleteField, - Slider: BasicEntitySliderField, - RadioGroup: BasicEntityRadioGroupField - }; - function BasicEntityField(props) { - const { ctx, spec } = props; - const basicEntityFieldSpec = BasicEntityFieldSpecShape(spec); - const field = basicEntityFieldSpec.field; - const Field = fieldMap[field.ux.kind]; - return /* @__PURE__ */ jsxRuntimeExports.jsx(Field, { ctx, spec }); + }), { name: CMPNAME$d }); + function BasicEntityTextBoxField(props) { + const { spec } = props; + const basicEntityTextBoxField = BasicEntityTextBoxFieldSpecShape(spec); + const { field, getValues, register } = basicEntityTextBoxField; + const val = getValues(field.name); + return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx( + material.TextField, + __spreadValues({ + id: field.id, + name: field.name, + label: field.label, + variant: "outlined", + fullWidth: true, + multiline: true, + rows: field.ux.rows, + InputLabelProps: { shrink: (val == null ? void 0 : val.length) > 0 } + }, register(field.name)) + ) }, field.name); } function BasicEntityFieldError(props) { const { err } = props; return err ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-active", children: err.message }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-none" }); } + const CMPNAME$c = "BasicEntityTextField"; + const { Open: Open$a } = gubu_minExports.Gubu; + const BasicEntityTextFieldSpecShape = gubu_minExports.Gubu(Open$a({ + field: Open$a({ + id: String, + name: String, + kind: gubu_minExports.Skip(String), + label: gubu_minExports.Default("", String), + ux: Open$a({ + kind: gubu_minExports.Exact("Text"), + edit: gubu_minExports.Default(true), + props: Open$a({}) + }) + }) + }), { name: CMPNAME$c }); function BasicEntityTextField(props) { const { spec } = props; - const { field, register, getValues, errors } = spec; - const err = errors[field.name]; + const basicEntityTextBoxField = BasicEntityTextFieldSpecShape(spec); + const { field, getValues, register, errors } = basicEntityTextBoxField; const val = getValues(field.name); + const err = errors[field.name]; return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx( material.TextField, @@ -64995,27 +65014,25 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, field.id); } - function BasicEntityTextBoxField(props) { - const { spec } = props; - const { field, register, getValues } = spec; - const val = getValues(field.name); - return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx( - material.TextField, - __spreadValues({ - id: field.id, - name: field.name, - label: field.label, - variant: "outlined", - fullWidth: true, - multiline: true, - rows: field.ux.rows, - InputLabelProps: { shrink: (val == null ? void 0 : val.length) > 0 } - }, register(field.name)) - ) }, field.name); - } + const CMPNAME$b = "BasicEntityDateField"; + const { Open: Open$9 } = gubu_minExports.Gubu; + const BasicEntityDateFieldSpecShape = gubu_minExports.Gubu(Open$9({ + field: Open$9({ + id: String, + name: String, + kind: gubu_minExports.Skip(String), + label: gubu_minExports.Default("", String), + ux: Open$9({ + kind: gubu_minExports.Exact("Date"), + edit: gubu_minExports.Default(true), + props: Open$9({}) + }) + }) + }), { name: CMPNAME$b }); function BasicEntityDateField(props) { const { spec } = props; - const { field, register, getValues } = spec; + const basicEntityDateField = BasicEntityDateFieldSpecShape(spec); + const { field, getValues, register } = basicEntityDateField; const val = getValues(field.name); return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx( material.TextField, @@ -65031,9 +65048,25 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }, register(field.name)) ) }, field.id); } + const CMPNAME$a = "BasicEntityTimeField"; + const { Open: Open$8 } = gubu_minExports.Gubu; + const BasicEntityTimeFieldSpecShape = gubu_minExports.Gubu(Open$8({ + field: Open$8({ + id: String, + name: String, + kind: gubu_minExports.Skip(String), + label: gubu_minExports.Default("", String), + ux: Open$8({ + kind: gubu_minExports.Exact("Time"), + edit: gubu_minExports.Default(true), + props: Open$8({}) + }) + }) + }), { name: CMPNAME$a }); function BasicEntityTimeField(props) { const { spec } = props; - const { field, register, getValues } = spec; + const basicEntityTimeField = BasicEntityTimeFieldSpecShape(spec); + const { field, getValues, register } = basicEntityTimeField; const val = getValues(field.name); return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx( material.TextField, @@ -65049,9 +65082,25 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }, register(field.name)) ) }, field.id); } + const CMPNAME$9 = "BasicEntityDateTimeField"; + const { Open: Open$7 } = gubu_minExports.Gubu; + const BasicEntityDateTimeFieldSpecShape = gubu_minExports.Gubu(Open$7({ + field: Open$7({ + id: String, + name: String, + kind: gubu_minExports.Skip(String), + label: gubu_minExports.Default("", String), + ux: Open$7({ + kind: gubu_minExports.Exact("DateTime"), + edit: gubu_minExports.Default(true), + props: Open$7({}) + }) + }) + }), { name: CMPNAME$9 }); function BasicEntityDateTimeField(props) { const { spec } = props; - const { field, register, getValues } = spec; + const basicEntityDateTimeField = BasicEntityDateTimeFieldSpecShape(spec); + const { field, getValues, register } = basicEntityDateTimeField; const val = getValues(field.name); return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx( material.TextField, @@ -65067,6 +65116,40 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }, register(field.name)) ) }, field.id); } + const CMPNAME$8 = "BasicEntityField"; + const { Open: Open$6 } = gubu_minExports.Gubu; + const BasicEntityFieldSpecShape = gubu_minExports.Gubu(Open$6({ + field: Open$6({ + id: String, + name: String, + kind: gubu_minExports.Skip(String), + label: gubu_minExports.Default("", String), + ux: Open$6({ + kind: gubu_minExports.Exact("Text", "TextBox", "Date", "DateTime", "Time", "CheckBox", "Autocomplete", "Slider", "RadioGroup"), + edit: gubu_minExports.Default(true), + rows: gubu_minExports.Default(3), + props: Open$6({}) + }) + }) + }), { name: CMPNAME$8 }); + const fieldMap = { + Text: BasicEntityTextField, + TextBox: BasicEntityTextBoxField, + Date: BasicEntityDateField, + DateTime: BasicEntityDateTimeField, + Time: BasicEntityTimeField, + CheckBox: BasicEntityCheckBoxField, + Autocomplete: BasicEntityAutocompleteField, + Slider: BasicEntitySliderField, + RadioGroup: BasicEntityRadioGroupField + }; + function BasicEntityField(props) { + const { ctx, spec } = props; + const basicEntityFieldSpec = BasicEntityFieldSpecShape(spec); + const field = basicEntityFieldSpec.field; + const Field = fieldMap[field.ux.kind]; + return /* @__PURE__ */ jsxRuntimeExports.jsx(Field, { ctx, spec }); + } const { Open: Open$5, Child: Child$3 } = gubu_minExports.Gubu; const Shape$1 = gubu_minExports.Gubu(Open$5({ name: String, diff --git a/src/lib/BasicEntityDateField.tsx b/src/lib/BasicEntityDateField.tsx new file mode 100644 index 0000000..814b454 --- /dev/null +++ b/src/lib/BasicEntityDateField.tsx @@ -0,0 +1,48 @@ +import React from 'react' +import { TextField } from "@mui/material" + +import type { Spec } from './basic-types' + +import { Default, Exact, Gubu, Skip } from 'gubu' +const CMPNAME = 'BasicEntityDateField' + +const { Open } = Gubu +const BasicEntityDateFieldSpecShape = Gubu(Open({ + field: Open({ + id: String, + name: String, + kind: Skip(String), + label: Default('', String), + ux: Open({ + kind: Exact('Date'), + edit: Default(true), + props: Open({}) + }) + }) +}), {name: CMPNAME}) + +function BasicEntityDateField (props: any) { + const { spec } = props + + const basicEntityDateField: Spec = BasicEntityDateFieldSpecShape(spec) + const { field, getValues, register } = basicEntityDateField + const val = getValues(field.name) + + return ( +
+ 0 }} + {...register(field.name)} + /> +
+ ) + } + + export { BasicEntityDateField } \ No newline at end of file diff --git a/src/lib/BasicEntityDateTimeField.tsx b/src/lib/BasicEntityDateTimeField.tsx new file mode 100644 index 0000000..06abe20 --- /dev/null +++ b/src/lib/BasicEntityDateTimeField.tsx @@ -0,0 +1,50 @@ +import React from 'react' +import { TextField } from "@mui/material" + +import type { Spec } from './basic-types' + +import { Default, Exact, Gubu, Skip } from 'gubu' +const CMPNAME = 'BasicEntityDateTimeField' + +const { Open } = Gubu +const BasicEntityDateTimeFieldSpecShape = Gubu(Open({ + field: Open({ + id: String, + name: String, + kind: Skip(String), + label: Default('', String), + ux: Open({ + kind: Exact('DateTime'), + edit: Default(true), + props: Open({}) + }) + }) +}), {name: CMPNAME}) + + +function BasicEntityDateTimeField (props: any) { + const { spec } = props + + const basicEntityDateTimeField: Spec = BasicEntityDateTimeFieldSpecShape(spec) + const { field, getValues, register } = basicEntityDateTimeField + + const val = getValues(field.name) + + return ( +
+ 0 }} + {...register(field.name)} + /> +
+ ) + } + + export { BasicEntityDateTimeField } \ No newline at end of file diff --git a/src/lib/BasicEntityField.tsx b/src/lib/BasicEntityField.tsx index 1b5a49c..4bb8559 100644 --- a/src/lib/BasicEntityField.tsx +++ b/src/lib/BasicEntityField.tsx @@ -12,6 +12,11 @@ import { BasicEntityCheckBoxField } from './BasicEntityCheckBoxField' import { BasicEntityAutocompleteField } from './BasicEntityAutocompleteField' import { BasicEntitySliderField } from './BasicEntitySliderField' import { BasicEntityRadioGroupField } from './BasicEntityRadioGroupField' +import { BasicEntityTextBoxField } from './BasicEntityTextBoxField' +import { BasicEntityTextField } from './BasicEntityTextField' +import { BasicEntityDateField } from './BasicEntityDateField' +import { BasicEntityTimeField } from './BasicEntityTimeField' +import { BasicEntityDateTimeField } from './BasicEntityDateTimeField' const CMPNAME = 'BasicEntityField' @@ -56,143 +61,6 @@ function BasicEntityField (props: any) { return } - -function BasicEntityFieldError (props: any) { - const { err } = props - return err ? -
{err.message}
: -
-} - - -function BasicEntityTextField (props: any) { - const { spec } = props - - const { field, register, getValues, errors } = spec - - const err = errors[field.name] - // console.log('BET', err, field.name, errors) - - const val = getValues(field.name) - - return ( -
- 0 }} - {...register(field.name)} - /> - -
- ) -} - - -function BasicEntityTextBoxField (props: any) { - const { spec } = props - - const { field, register, getValues } = spec - - const val = getValues(field.name) - - return ( -
- 0 }} - {...register(field.name)} - /> -
- ) -} - - -function BasicEntityDateField (props: any) { - const { spec } = props - - const { field, register, getValues } = spec - - const val = getValues(field.name) - - return ( -
- 0 }} - {...register(field.name)} - /> -
- ) -} - - -function BasicEntityTimeField (props: any) { - const { spec } = props - - const { field, register, getValues } = spec - - const val = getValues(field.name) - - return ( -
- 0 }} - {...register(field.name)} - /> -
- ) -} - - -function BasicEntityDateTimeField (props: any) { - const { spec } = props - - const { field, register, getValues } = spec - - const val = getValues(field.name) - - return ( -
- 0 }} - {...register(field.name)} - /> -
- ) -} - - - /* function BasicEntityDateTimeField (props: any) { const { spec } = props diff --git a/src/lib/BasicEntityFieldError.tsx b/src/lib/BasicEntityFieldError.tsx new file mode 100644 index 0000000..9fafa23 --- /dev/null +++ b/src/lib/BasicEntityFieldError.tsx @@ -0,0 +1,10 @@ +import React from 'react' + +function BasicEntityFieldError (props: any) { + const { err } = props + return err ? +
{err.message}
: +
+} + +export { BasicEntityFieldError } \ No newline at end of file diff --git a/src/lib/BasicEntityTextBoxField.tsx b/src/lib/BasicEntityTextBoxField.tsx new file mode 100644 index 0000000..4856a8c --- /dev/null +++ b/src/lib/BasicEntityTextBoxField.tsx @@ -0,0 +1,49 @@ +import React from 'react' +import { TextField } from "@mui/material" + +import type { Spec } from './basic-types' + +import { Default, Exact, Gubu, Skip } from 'gubu' +const CMPNAME = 'BasicEntityTextBoxField' + +const { Open } = Gubu +const BasicEntityTextBoxFieldSpecShape = Gubu(Open({ + field: Open({ + id: String, + name: String, + kind: Skip(String), + label: Default('', String), + ux: Open({ + kind: Exact('TextBox'), + edit: Default(true), + props: Open({}) + }) + }) +}), {name: CMPNAME}) + + +function BasicEntityTextBoxField (props: any) { + const { spec } = props + + const basicEntityTextBoxField: Spec = BasicEntityTextBoxFieldSpecShape(spec) + const { field, getValues, register } = basicEntityTextBoxField + const val = getValues(field.name) + + return ( +
+ 0 }} + {...register(field.name)} + /> +
+ ) + } + + export { BasicEntityTextBoxField } \ No newline at end of file diff --git a/src/lib/BasicEntityTextField.tsx b/src/lib/BasicEntityTextField.tsx new file mode 100644 index 0000000..fc497a2 --- /dev/null +++ b/src/lib/BasicEntityTextField.tsx @@ -0,0 +1,51 @@ +import React from 'react' +import { TextField } from "@mui/material" + +import type { Spec } from './basic-types' + +import { Default, Exact, Gubu, Skip } from 'gubu' +import { BasicEntityFieldError } from './BasicEntityFieldError' +const CMPNAME = 'BasicEntityTextField' + +const { Open } = Gubu +const BasicEntityTextFieldSpecShape = Gubu(Open({ + field: Open({ + id: String, + name: String, + kind: Skip(String), + label: Default('', String), + ux: Open({ + kind: Exact('Text'), + edit: Default(true), + props: Open({}) + }) + }) +}), {name: CMPNAME}) + +function BasicEntityTextField (props: any) { + const { spec } = props + + const basicEntityTextBoxField: Spec = BasicEntityTextFieldSpecShape(spec) + const { field, getValues, register, errors } = basicEntityTextBoxField + const val = getValues(field.name) + + const err = errors[field.name] + // console.log('BET', err, field.name, errors) + + return ( +
+ 0 }} + {...register(field.name)} + /> + +
+ ) + } + + export { BasicEntityTextField } \ No newline at end of file diff --git a/src/lib/BasicEntityTimeField.tsx b/src/lib/BasicEntityTimeField.tsx new file mode 100644 index 0000000..6316f6b --- /dev/null +++ b/src/lib/BasicEntityTimeField.tsx @@ -0,0 +1,49 @@ +import React from 'react' +import { TextField } from "@mui/material" + +import type { Spec } from './basic-types' + +import { Default, Exact, Gubu, Skip } from 'gubu' +const CMPNAME = 'BasicEntityTimeField' + +const { Open } = Gubu +const BasicEntityTimeFieldSpecShape = Gubu(Open({ + field: Open({ + id: String, + name: String, + kind: Skip(String), + label: Default('', String), + ux: Open({ + kind: Exact('Time'), + edit: Default(true), + props: Open({}) + }) + }) +}), {name: CMPNAME}) + +function BasicEntityTimeField (props: any) { + const { spec } = props + + const basicEntityTimeField: Spec = BasicEntityTimeFieldSpecShape(spec) + const { field, getValues, register } = basicEntityTimeField + + const val = getValues(field.name) + + return ( +
+ 0 }} + {...register(field.name)} + /> +
+ ) + } + + export { BasicEntityTimeField } \ No newline at end of file From 9049cafb3393dd361cba9d1f1072e4a2fa720b87 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 25 Jul 2024 21:38:56 +0100 Subject: [PATCH 038/122] Refactor BasicEntityRadioGroupField component and resolve options in BasicEntityRadioGroupField --- dist/voxgig-model-react.es.js | 45 +++++++++++++++++++++++--- dist/voxgig-model-react.umd.js | 45 +++++++++++++++++++++++--- src/lib/BasicEntityRadioGroupField.tsx | 45 ++++++++++++++++++++++++-- 3 files changed, 125 insertions(+), 10 deletions(-) diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index 0f12387..95135a2 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -64749,7 +64749,7 @@ function BasicEntityAutocompleteField(props) { const { spec } = props; const basicEntityAutocompleteField = BasicEntityAutocompleteFieldSpecShape(spec); const { control, field } = basicEntityAutocompleteField; - const { resolvedOptions, resolvedDefault } = resolveOptions(field.options); + const { resolvedOptions, resolvedDefault } = resolveOptions$1(field.options); return /* @__PURE__ */ jsxRuntimeExports.jsx( Controller, { @@ -64774,7 +64774,7 @@ function BasicEntityAutocompleteField(props) { `${field.id}-controller` ); } -function resolveOptions(options) { +function resolveOptions$1(options) { const { multiple, ents, label, value, default: defaultValues } = options; const labelField = label == null ? void 0 : label.field; const valueField = value == null ? void 0 : value.field; @@ -64899,6 +64899,12 @@ const BasicEntityRadioGroupFieldSpecShape = gubu_minExports.Gubu(Open$c({ kind: gubu_minExports.Exact("RadioGroup"), edit: gubu_minExports.Default(true), direction: gubu_minExports.Exact("row", "column").Default("row") + }), + options: Open$c({ + label: { field: gubu_minExports.Default("label") }, + value: { field: gubu_minExports.Default("value") }, + default: Open$c({}), + ents: Open$c({}) }) }) }), { name: CMPNAME$e }); @@ -64906,6 +64912,7 @@ function BasicEntityRadioGroupField(props) { const { spec } = props; const basicEntityRadioGroupField = BasicEntityRadioGroupFieldSpecShape(spec); const { control, field } = basicEntityRadioGroupField; + const { resolvedOptions, resolvedDefault } = resolveOptions(field.options); return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx(FormLabel$1, { children: field.label }, `${field.id}-label`), /* @__PURE__ */ jsxRuntimeExports.jsx( @@ -64913,8 +64920,8 @@ function BasicEntityRadioGroupField(props) { { name: field.name, control, - defaultValue: field.default, - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx(RadioGroup, { value, onChange, row: "row" === field.ux.direction, children: field.options.map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx( + defaultValue: resolvedDefault, + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx(RadioGroup, { value, onChange, row: "row" === field.ux.direction, children: resolvedOptions.map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx( FormControlLabel$1, { value: option.value, @@ -64928,6 +64935,36 @@ function BasicEntityRadioGroupField(props) { ) ] }); } +function resolveOptions(options) { + const { multiple, ents, label, value, default: defaultValues } = options; + const labelField = label == null ? void 0 : label.field; + const valueField = value == null ? void 0 : value.field; + const resolvedOptions = Object.keys(ents).map((key) => { + var _a; + return { + [labelField]: (_a = ents == null ? void 0 : ents[key]) == null ? void 0 : _a[labelField], + [valueField]: key + }; + }); + let resolvedDefault; + if (multiple === false) { + if (Object.keys(defaultValues).length > 0) { + const firstKey = Object.keys(defaultValues)[0]; + resolvedDefault = { value: firstKey, label: defaultValues[firstKey][labelField] }; + } else { + resolvedDefault = null; + } + } else { + resolvedDefault = Object.keys(defaultValues).map((key) => ({ + label: defaultValues[key].label, + value: key + })); + } + return { + resolvedOptions, + resolvedDefault + }; +} const CMPNAME$d = "BasicEntityTextBoxField"; const { Open: Open$b } = gubu_minExports.Gubu; const BasicEntityTextBoxFieldSpecShape = gubu_minExports.Gubu(Open$b({ diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index fe00b28..76ea48a 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -64761,7 +64761,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const { spec } = props; const basicEntityAutocompleteField = BasicEntityAutocompleteFieldSpecShape(spec); const { control, field } = basicEntityAutocompleteField; - const { resolvedOptions, resolvedDefault } = resolveOptions(field.options); + const { resolvedOptions, resolvedDefault } = resolveOptions$1(field.options); return /* @__PURE__ */ jsxRuntimeExports.jsx( Controller, { @@ -64786,7 +64786,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha `${field.id}-controller` ); } - function resolveOptions(options) { + function resolveOptions$1(options) { const { multiple, ents, label, value, default: defaultValues } = options; const labelField = label == null ? void 0 : label.field; const valueField = value == null ? void 0 : value.field; @@ -64911,6 +64911,12 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha kind: gubu_minExports.Exact("RadioGroup"), edit: gubu_minExports.Default(true), direction: gubu_minExports.Exact("row", "column").Default("row") + }), + options: Open$c({ + label: { field: gubu_minExports.Default("label") }, + value: { field: gubu_minExports.Default("value") }, + default: Open$c({}), + ents: Open$c({}) }) }) }), { name: CMPNAME$e }); @@ -64918,6 +64924,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const { spec } = props; const basicEntityRadioGroupField = BasicEntityRadioGroupFieldSpecShape(spec); const { control, field } = basicEntityRadioGroupField; + const { resolvedOptions, resolvedDefault } = resolveOptions(field.options); return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx(material.FormLabel, { children: field.label }, `${field.id}-label`), /* @__PURE__ */ jsxRuntimeExports.jsx( @@ -64925,8 +64932,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha { name: field.name, control, - defaultValue: field.default, - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.RadioGroup, { value, onChange, row: "row" === field.ux.direction, children: field.options.map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx( + defaultValue: resolvedDefault, + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.RadioGroup, { value, onChange, row: "row" === field.ux.direction, children: resolvedOptions.map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx( material.FormControlLabel, { value: option.value, @@ -64940,6 +64947,36 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ) ] }); } + function resolveOptions(options) { + const { multiple, ents, label, value, default: defaultValues } = options; + const labelField = label == null ? void 0 : label.field; + const valueField = value == null ? void 0 : value.field; + const resolvedOptions = Object.keys(ents).map((key) => { + var _a; + return { + [labelField]: (_a = ents == null ? void 0 : ents[key]) == null ? void 0 : _a[labelField], + [valueField]: key + }; + }); + let resolvedDefault; + if (multiple === false) { + if (Object.keys(defaultValues).length > 0) { + const firstKey = Object.keys(defaultValues)[0]; + resolvedDefault = { value: firstKey, label: defaultValues[firstKey][labelField] }; + } else { + resolvedDefault = null; + } + } else { + resolvedDefault = Object.keys(defaultValues).map((key) => ({ + label: defaultValues[key].label, + value: key + })); + } + return { + resolvedOptions, + resolvedDefault + }; + } const CMPNAME$d = "BasicEntityTextBoxField"; const { Open: Open$b } = gubu_minExports.Gubu; const BasicEntityTextBoxFieldSpecShape = gubu_minExports.Gubu(Open$b({ diff --git a/src/lib/BasicEntityRadioGroupField.tsx b/src/lib/BasicEntityRadioGroupField.tsx index 79ee244..e6cebd1 100644 --- a/src/lib/BasicEntityRadioGroupField.tsx +++ b/src/lib/BasicEntityRadioGroupField.tsx @@ -19,6 +19,12 @@ const BasicEntityRadioGroupFieldSpecShape = Gubu(Open({ kind: Exact('RadioGroup'), edit: Default(true), direction: Exact('row', 'column').Default('row'), + }), + options: Open({ + label: { field: Default('label') }, + value: { field: Default('value') }, + default: Open({}), + ents: Open({}) }) }) }), {name: CMPNAME}) @@ -28,6 +34,8 @@ function BasicEntityRadioGroupField(props: any) { const basicEntityRadioGroupField: Spec = BasicEntityRadioGroupFieldSpecShape(spec) const { control, field } = basicEntityRadioGroupField + + const { resolvedOptions, resolvedDefault } = resolveOptions(field.options); return ( <> @@ -36,10 +44,10 @@ function BasicEntityRadioGroupField(props: any) { key={`${field.id}-controller`} name={field.name} control={control} - defaultValue={field.default} + defaultValue={resolvedDefault} render={({ field: { onChange, value } }) => ( - {field.options.map((option: any) => ( + {resolvedOptions.map((option: any) => ( ({ + [labelField]: ents?.[key]?.[labelField], + [valueField]: key + })); + + let resolvedDefault; + if (multiple === false) { + if (Object.keys(defaultValues).length > 0) { + const firstKey = Object.keys(defaultValues)[0]; + resolvedDefault = { value: firstKey, label: defaultValues[firstKey][labelField] }; + } else { + resolvedDefault = null; + } + } else { + resolvedDefault = Object.keys(defaultValues).map(key => ({ + label: defaultValues[key].label, + value: key + })); + } + + return { + resolvedOptions, + resolvedDefault + }; +} + export { BasicEntityRadioGroupField }; From 3e6fead4a50e1634c16b870e432cfa3b6ee5739f Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Fri, 26 Jul 2024 19:26:06 +0100 Subject: [PATCH 039/122] Refactor BasicEntityCheckBoxField component and add BasicEntityRatingField --- dist/BasicEntityCheckBoxField.d.ts | 4 +- dist/BasicEntityRatingField.d.ts | 2 + dist/voxgig-model-react.es.js | 355 ++++++++++++++++----------- dist/voxgig-model-react.umd.js | 353 +++++++++++++++----------- src/lib/BasicEntityCheckBoxField.tsx | 12 +- src/lib/BasicEntityField.tsx | 115 ++++----- src/lib/BasicEntityRatingField.tsx | 67 +++++ 7 files changed, 546 insertions(+), 362 deletions(-) create mode 100644 dist/BasicEntityRatingField.d.ts create mode 100644 src/lib/BasicEntityRatingField.tsx diff --git a/dist/BasicEntityCheckBoxField.d.ts b/dist/BasicEntityCheckBoxField.d.ts index 3a9d2ea..6013c8a 100644 --- a/dist/BasicEntityCheckBoxField.d.ts +++ b/dist/BasicEntityCheckBoxField.d.ts @@ -1,2 +1,2 @@ -declare function BasicEntityCheckBoxField(props: any): import("react/jsx-runtime").JSX.Element; -export { BasicEntityCheckBoxField }; +declare function BasicEntityCheckboxField(props: any): import("react/jsx-runtime").JSX.Element; +export { BasicEntityCheckboxField }; diff --git a/dist/BasicEntityRatingField.d.ts b/dist/BasicEntityRatingField.d.ts new file mode 100644 index 0000000..1bfd202 --- /dev/null +++ b/dist/BasicEntityRatingField.d.ts @@ -0,0 +1,2 @@ +declare function BasicEntityRatingField(props: any): import("react/jsx-runtime").JSX.Element; +export { BasicEntityRatingField }; diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index 95135a2..8c0e165 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -54,7 +54,7 @@ var __async = (__this, __arguments, generator) => { }; import * as React$1 from "react"; import React__default, { isValidElement, Children, cloneElement, useMemo, useState, useReducer, useRef, useEffect, useCallback, memo as memo$2, Fragment, useLayoutEffect } from "react"; -import { Button as Button$1, Avatar, Menu as Menu$1, MenuItem as MenuItem$1, IconButton as IconButton$1, useTheme as useTheme$5, Box as Box$2, FormControlLabel as FormControlLabel$1, Checkbox as Checkbox$1, Autocomplete as Autocomplete$1, TextField as TextField$1, FormLabel as FormLabel$1, Slider as Slider$1, RadioGroup, Radio as Radio$1, Grid as Grid$1, Toolbar as Toolbar$1, Container as Container$2, Drawer as Drawer$1, List as List$1, ListItem as ListItem$1, ListItemButton as ListItemButton$1, ListItemIcon as ListItemIcon$1, ListItemText as ListItemText$1, Divider as Divider$1, Typography as Typography$1 } from "@mui/material"; +import { Button as Button$1, Avatar, Menu as Menu$1, MenuItem as MenuItem$1, IconButton as IconButton$1, useTheme as useTheme$5, Box as Box$2, FormControlLabel as FormControlLabel$1, Checkbox as Checkbox$1, Autocomplete as Autocomplete$1, TextField as TextField$1, FormLabel as FormLabel$1, Slider as Slider$1, RadioGroup, Radio as Radio$1, Rating, Grid as Grid$1, Toolbar as Toolbar$1, Container as Container$2, Drawer as Drawer$1, List as List$1, ListItem as ListItem$1, ListItemButton as ListItemButton$1, ListItemIcon as ListItemIcon$1, ListItemText as ListItemText$1, Divider as Divider$1, Typography as Typography$1 } from "@mui/material"; import emStyled from "@emotion/styled"; import { CacheProvider, Global, ThemeContext as ThemeContext$1, css, keyframes } from "@emotion/react"; import { useSelector } from "react-redux"; @@ -1030,21 +1030,15 @@ function requireReactJsxRuntime_development() { } return reactJsxRuntime_development; } -var jsxRuntime$1 = jsxRuntime$2.exports; -var hasRequiredJsxRuntime; -function requireJsxRuntime() { - if (hasRequiredJsxRuntime) return jsxRuntime$2.exports; - hasRequiredJsxRuntime = 1; - "use strict"; - if (process.env.NODE_ENV === "production") { - jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); - } else { - jsxRuntime$2.exports = requireReactJsxRuntime_development(); - } - return jsxRuntime$2.exports; +var jsxRuntime = jsxRuntime$2.exports; +"use strict"; +if (process.env.NODE_ENV === "production") { + jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); +} else { + jsxRuntime$2.exports = requireReactJsxRuntime_development(); } -var jsxRuntimeExports = requireJsxRuntime(); -const jsxRuntime = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); +var jsxRuntimeExports = jsxRuntime$2.exports; +const jsxRuntime$1 = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); var gubu_min$2 = { exports: {} }; var gubu_min = gubu_min$2.exports; (function(module, exports) { @@ -10588,8 +10582,8 @@ process.env.NODE_ENV !== "production" ? Toolbar.propTypes = { */ variant: PropTypes.oneOfType([PropTypes.oneOf(["dense", "regular"]), PropTypes.string]) } : void 0; -const CMPNAME$l = "BasicAccountTool"; -console.log(CMPNAME$l, "1"); +const CMPNAME$m = "BasicAccountTool"; +console.log(CMPNAME$m, "1"); const { Exact: Exact$2 } = gubu_minExports.Gubu; const BasicAccountToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10599,7 +10593,7 @@ const BasicAccountToolSpecShape = gubu_minExports.Gubu({ attr: {}, sx: {}, style: {} -}, { name: CMPNAME$l }); +}, { name: CMPNAME$m }); function BasicAccountTool(props) { var _a; const { ctx, spec } = props; @@ -10673,8 +10667,8 @@ function stringAvatar(s) { children: `${parts.join("")}` }; } -const CMPNAME$k = "BasicHeadTool"; -console.log(CMPNAME$k, "1"); +const CMPNAME$l = "BasicHeadTool"; +console.log(CMPNAME$l, "1"); const { Exact: Exact$1 } = gubu_minExports.Gubu; const BasicHeadToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10684,7 +10678,7 @@ const BasicHeadToolSpecShape = gubu_minExports.Gubu({ attr: {}, sx: {}, style: {} -}, { name: CMPNAME$k }); +}, { name: CMPNAME$l }); function BasicHeadTool(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -10693,7 +10687,7 @@ function BasicHeadTool(props) { const { name, kind, attr, sx, style: style2 } = basicHeadToolSpec; let tool = /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}); if ("" === kind) { - console.warn(CMPNAME$k, "empty-tool-kind", basicHeadToolSpec); + console.warn(CMPNAME$l, "empty-tool-kind", basicHeadToolSpec); } else if ("logo" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsxs( "div", @@ -10710,7 +10704,7 @@ function BasicHeadTool(props) { { href: "/", style: style2, - className: `vxg-${CMPNAME$k}-logo`, + className: `vxg-${CMPNAME$l}-logo`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: attr.img }) } ), @@ -10742,17 +10736,17 @@ function BasicHeadTool(props) { } else if ("account" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsx(BasicAccountTool, { ctx, spec }); } else { - console.warn(CMPNAME$k, "unknown-tool-kind", kind, basicHeadToolSpec); + console.warn(CMPNAME$l, "unknown-tool-kind", kind, basicHeadToolSpec); } return tool; } -const CMPNAME$j = "BasicHead"; -const { Child: Child$5, Exact, Open: Open$h, Required: Required$1 } = gubu_minExports.Gubu; +const CMPNAME$k = "BasicHead"; +const { Child: Child$5, Exact, Open: Open$i, Required: Required$1 } = gubu_minExports.Gubu; const BasicHeadSpecShape = gubu_minExports.Gubu({ head: { name: String, active: Boolean, - tool: Child$5(Open$h({ + tool: Child$5(Open$i({ align: Exact("left", "right") })) }, @@ -10762,7 +10756,7 @@ const BasicHeadSpecShape = gubu_minExports.Gubu({ AppBar: {}, ToolBar: {} } -}, { name: CMPNAME$j }); +}, { name: CMPNAME$k }); function BasicHead(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -25311,7 +25305,7 @@ Object.defineProperty(ArrowDownward, "__esModule", { }); var default_1$x = ArrowDownward.default = void 0; var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); -var _jsxRuntime$x = requireJsxRuntime(); +var _jsxRuntime$x = jsxRuntimeExports; var _default$x = default_1$x = ArrowDownward.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); @@ -25324,7 +25318,7 @@ Object.defineProperty(ArrowRight, "__esModule", { }); var default_1$w = ArrowRight.default = void 0; var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); -var _jsxRuntime$w = requireJsxRuntime(); +var _jsxRuntime$w = jsxRuntimeExports; var _default$w = default_1$w = ArrowRight.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); @@ -25337,7 +25331,7 @@ Object.defineProperty(Cancel, "__esModule", { }); var default_1$v = Cancel.default = void 0; var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); -var _jsxRuntime$v = requireJsxRuntime(); +var _jsxRuntime$v = jsxRuntimeExports; var _default$v = default_1$v = Cancel.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); @@ -25350,7 +25344,7 @@ Object.defineProperty(ChevronLeft, "__esModule", { }); var default_1$u = ChevronLeft.default = void 0; var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); -var _jsxRuntime$u = requireJsxRuntime(); +var _jsxRuntime$u = jsxRuntimeExports; var _default$u = default_1$u = ChevronLeft.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); @@ -25363,7 +25357,7 @@ Object.defineProperty(ChevronRight, "__esModule", { }); var default_1$t = ChevronRight.default = void 0; var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); -var _jsxRuntime$t = requireJsxRuntime(); +var _jsxRuntime$t = jsxRuntimeExports; var _default$t = default_1$t = ChevronRight.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); @@ -25376,7 +25370,7 @@ Object.defineProperty(ClearAll, "__esModule", { }); var default_1$s = ClearAll.default = void 0; var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); -var _jsxRuntime$s = requireJsxRuntime(); +var _jsxRuntime$s = jsxRuntimeExports; var _default$s = default_1$s = ClearAll.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); @@ -25389,7 +25383,7 @@ Object.defineProperty(Close, "__esModule", { }); var default_1$r = Close.default = void 0; var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); -var _jsxRuntime$r = requireJsxRuntime(); +var _jsxRuntime$r = jsxRuntimeExports; var _default$r = default_1$r = Close.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); @@ -25402,7 +25396,7 @@ Object.defineProperty(ContentCopy, "__esModule", { }); var default_1$q = ContentCopy.default = void 0; var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); -var _jsxRuntime$q = requireJsxRuntime(); +var _jsxRuntime$q = jsxRuntimeExports; var _default$q = default_1$q = ContentCopy.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); @@ -25415,7 +25409,7 @@ Object.defineProperty(DensityLarge, "__esModule", { }); var default_1$p = DensityLarge.default = void 0; var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); -var _jsxRuntime$p = requireJsxRuntime(); +var _jsxRuntime$p = jsxRuntimeExports; var _default$p = default_1$p = DensityLarge.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); @@ -25428,7 +25422,7 @@ Object.defineProperty(DensityMedium, "__esModule", { }); var default_1$o = DensityMedium.default = void 0; var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); -var _jsxRuntime$o = requireJsxRuntime(); +var _jsxRuntime$o = jsxRuntimeExports; var _default$o = default_1$o = DensityMedium.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); @@ -25441,7 +25435,7 @@ Object.defineProperty(DensitySmall, "__esModule", { }); var default_1$n = DensitySmall.default = void 0; var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); -var _jsxRuntime$n = requireJsxRuntime(); +var _jsxRuntime$n = jsxRuntimeExports; var _default$n = default_1$n = DensitySmall.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); @@ -25454,7 +25448,7 @@ Object.defineProperty(DragHandle, "__esModule", { }); var default_1$m = DragHandle.default = void 0; var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); -var _jsxRuntime$m = requireJsxRuntime(); +var _jsxRuntime$m = jsxRuntimeExports; var _default$m = default_1$m = DragHandle.default = (0, _createSvgIcon$m.default)(/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); @@ -25467,7 +25461,7 @@ Object.defineProperty(DynamicFeed, "__esModule", { }); var default_1$l = DynamicFeed.default = void 0; var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); -var _jsxRuntime$l = requireJsxRuntime(); +var _jsxRuntime$l = jsxRuntimeExports; var _default$l = default_1$l = DynamicFeed.default = (0, _createSvgIcon$l.default)([/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { @@ -25482,7 +25476,7 @@ Object.defineProperty(Edit, "__esModule", { }); var default_1$k = Edit.default = void 0; var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); -var _jsxRuntime$k = requireJsxRuntime(); +var _jsxRuntime$k = jsxRuntimeExports; var _default$k = default_1$k = Edit.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); @@ -25495,7 +25489,7 @@ Object.defineProperty(ExpandMore, "__esModule", { }); var default_1$j = ExpandMore.default = void 0; var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); -var _jsxRuntime$j = requireJsxRuntime(); +var _jsxRuntime$j = jsxRuntimeExports; var _default$j = default_1$j = ExpandMore.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); @@ -25508,7 +25502,7 @@ Object.defineProperty(FilterAlt, "__esModule", { }); var default_1$i = FilterAlt.default = void 0; var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); -var _jsxRuntime$i = requireJsxRuntime(); +var _jsxRuntime$i = jsxRuntimeExports; var _default$i = default_1$i = FilterAlt.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); @@ -25521,7 +25515,7 @@ Object.defineProperty(FilterList, "__esModule", { }); var default_1$h = FilterList.default = void 0; var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); -var _jsxRuntime$h = requireJsxRuntime(); +var _jsxRuntime$h = jsxRuntimeExports; var _default$h = default_1$h = FilterList.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); @@ -25534,7 +25528,7 @@ Object.defineProperty(FilterListOff, "__esModule", { }); var default_1$g = FilterListOff.default = void 0; var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); -var _jsxRuntime$g = requireJsxRuntime(); +var _jsxRuntime$g = jsxRuntimeExports; var _default$g = default_1$g = FilterListOff.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); @@ -25547,7 +25541,7 @@ Object.defineProperty(FirstPage, "__esModule", { }); var default_1$f = FirstPage.default = void 0; var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); -var _jsxRuntime$f = requireJsxRuntime(); +var _jsxRuntime$f = jsxRuntimeExports; var _default$f = default_1$f = FirstPage.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); @@ -25560,7 +25554,7 @@ Object.defineProperty(Fullscreen, "__esModule", { }); var default_1$e = Fullscreen.default = void 0; var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); -var _jsxRuntime$e = requireJsxRuntime(); +var _jsxRuntime$e = jsxRuntimeExports; var _default$e = default_1$e = Fullscreen.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); @@ -25573,7 +25567,7 @@ Object.defineProperty(FullscreenExit, "__esModule", { }); var default_1$d = FullscreenExit.default = void 0; var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); -var _jsxRuntime$d = requireJsxRuntime(); +var _jsxRuntime$d = jsxRuntimeExports; var _default$d = default_1$d = FullscreenExit.default = (0, _createSvgIcon$d.default)(/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); @@ -25586,7 +25580,7 @@ Object.defineProperty(KeyboardDoubleArrowDown, "__esModule", { }); var default_1$c = KeyboardDoubleArrowDown.default = void 0; var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); -var _jsxRuntime$c = requireJsxRuntime(); +var _jsxRuntime$c = jsxRuntimeExports; var _default$c = default_1$c = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$c.default)([/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { @@ -25601,7 +25595,7 @@ Object.defineProperty(LastPage, "__esModule", { }); var default_1$b = LastPage.default = void 0; var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); -var _jsxRuntime$b = requireJsxRuntime(); +var _jsxRuntime$b = jsxRuntimeExports; var _default$b = default_1$b = LastPage.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); @@ -25614,7 +25608,7 @@ Object.defineProperty(MoreHoriz, "__esModule", { }); var default_1$a = MoreHoriz.default = void 0; var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); -var _jsxRuntime$a = requireJsxRuntime(); +var _jsxRuntime$a = jsxRuntimeExports; var _default$a = default_1$a = MoreHoriz.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); @@ -25627,7 +25621,7 @@ Object.defineProperty(MoreVert, "__esModule", { }); var default_1$9 = MoreVert.default = void 0; var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); -var _jsxRuntime$9 = requireJsxRuntime(); +var _jsxRuntime$9 = jsxRuntimeExports; var _default$9 = default_1$9 = MoreVert.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); @@ -25640,7 +25634,7 @@ Object.defineProperty(PushPin, "__esModule", { }); var default_1$8 = PushPin.default = void 0; var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); -var _jsxRuntime$8 = requireJsxRuntime(); +var _jsxRuntime$8 = jsxRuntimeExports; var _default$8 = default_1$8 = PushPin.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" @@ -25654,7 +25648,7 @@ Object.defineProperty(RestartAlt, "__esModule", { }); var default_1$7 = RestartAlt.default = void 0; var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); -var _jsxRuntime$7 = requireJsxRuntime(); +var _jsxRuntime$7 = jsxRuntimeExports; var _default$7 = default_1$7 = RestartAlt.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); @@ -25667,7 +25661,7 @@ Object.defineProperty(Save, "__esModule", { }); var default_1$6 = Save.default = void 0; var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); -var _jsxRuntime$6 = requireJsxRuntime(); +var _jsxRuntime$6 = jsxRuntimeExports; var _default$6 = default_1$6 = Save.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); @@ -25680,7 +25674,7 @@ Object.defineProperty(Search, "__esModule", { }); var default_1$5 = Search.default = void 0; var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); -var _jsxRuntime$5 = requireJsxRuntime(); +var _jsxRuntime$5 = jsxRuntimeExports; var _default$5 = default_1$5 = Search.default = (0, _createSvgIcon$5.default)(/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); @@ -25693,7 +25687,7 @@ Object.defineProperty(SearchOff, "__esModule", { }); var default_1$4 = SearchOff.default = void 0; var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); -var _jsxRuntime$4 = requireJsxRuntime(); +var _jsxRuntime$4 = jsxRuntimeExports; var _default$4 = default_1$4 = SearchOff.default = (0, _createSvgIcon$4.default)([/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { @@ -25708,7 +25702,7 @@ Object.defineProperty(Sort, "__esModule", { }); var default_1$3 = Sort.default = void 0; var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); -var _jsxRuntime$3 = requireJsxRuntime(); +var _jsxRuntime$3 = jsxRuntimeExports; var _default$3 = default_1$3 = Sort.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); @@ -25721,7 +25715,7 @@ Object.defineProperty(SyncAlt, "__esModule", { }); var default_1$2 = SyncAlt.default = void 0; var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); -var _jsxRuntime$2 = requireJsxRuntime(); +var _jsxRuntime$2 = jsxRuntimeExports; var _default$2 = default_1$2 = SyncAlt.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); @@ -25734,7 +25728,7 @@ Object.defineProperty(ViewColumn, "__esModule", { }); var default_1$1 = ViewColumn.default = void 0; var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); -var _jsxRuntime$1 = requireJsxRuntime(); +var _jsxRuntime$1 = jsxRuntimeExports; var _default$1 = default_1$1 = ViewColumn.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); @@ -25747,7 +25741,7 @@ Object.defineProperty(VisibilityOff, "__esModule", { }); var default_1 = VisibilityOff.default = void 0; var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); -var _jsxRuntime = requireJsxRuntime(); +var _jsxRuntime = jsxRuntimeExports; var _default = default_1 = VisibilityOff.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); @@ -62706,8 +62700,8 @@ const MaterialReactTable = (props) => { } return jsxRuntimeExports.jsx(MRT_TablePaper, { table }); }; -const { Open: Open$g, Child: Child$4 } = gubu_minExports.Gubu; -const Shape$2 = gubu_minExports.Gubu(Open$g({ +const { Open: Open$h, Child: Child$4 } = gubu_minExports.Gubu; +const Shape$2 = gubu_minExports.Gubu(Open$h({ name: String, prefix: String, ent: String, @@ -62752,7 +62746,7 @@ Object.assign(VxgBasicEntityListPlugin, { } }); Object.defineProperty(VxgBasicEntityListPlugin, "name", { value: "VxgBasicEntityListPlugin" }); -const CMPNAME$i = "BasicEntityList"; +const CMPNAME$j = "BasicEntityList"; function BasicEntityList(props) { const { ctx } = props; const { seneca } = ctx(); @@ -64672,25 +64666,25 @@ function useForm(props = {}) { _formControl.current.formState = getProxyFormState(formState, control); return _formControl.current; } -const CMPNAME$h = "BasicEntitySliderField"; -const { Open: Open$f } = gubu_minExports.Gubu; -const BasicEntityCheckBoxFieldSpecShape = gubu_minExports.Gubu(Open$f({ - field: Open$f({ +const CMPNAME$i = "BasicEntitySliderField"; +const { Open: Open$g } = gubu_minExports.Gubu; +const BasicEntityCheckboxFieldSpecShape = gubu_minExports.Gubu(Open$g({ + field: Open$g({ id: String, name: String, kind: gubu_minExports.Skip(String), label: gubu_minExports.Default("", String), - ux: Open$f({ - kind: gubu_minExports.Exact("CheckBox"), + ux: Open$g({ + kind: gubu_minExports.Exact("Checkbox"), edit: gubu_minExports.Default(true), - props: Open$f({}) + props: Open$g({}) }) }) -}), { name: CMPNAME$h }); -function BasicEntityCheckBoxField(props) { +}), { name: CMPNAME$i }); +function BasicEntityCheckboxField(props) { const { spec } = props; - const basicEntityCheckBoxField = BasicEntityCheckBoxFieldSpecShape(spec); - const { control, field, getValues } = basicEntityCheckBoxField; + const basicEntityCheckboxField = BasicEntityCheckboxFieldSpecShape(spec); + const { control, field, getValues } = basicEntityCheckboxField; const val = getValues(field.name); return /* @__PURE__ */ jsxRuntimeExports.jsx( Box$2, @@ -64724,27 +64718,27 @@ function BasicEntityCheckBoxField(props) { `${field.id}-box` ); } -const CMPNAME$g = "BasicEntityAutocompleteField"; -const { Open: Open$e } = gubu_minExports.Gubu; -const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu(Open$e({ - field: Open$e({ +const CMPNAME$h = "BasicEntityAutocompleteField"; +const { Open: Open$f } = gubu_minExports.Gubu; +const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu(Open$f({ + field: Open$f({ id: String, name: String, kind: gubu_minExports.Skip(String), label: gubu_minExports.Default(""), - options: Open$e({ + options: Open$f({ label: { field: gubu_minExports.Default("label") }, value: { field: gubu_minExports.Default("value") }, multiple: gubu_minExports.Default(false), - default: Open$e({}), - ents: Open$e({}) + default: Open$f({}), + ents: Open$f({}) }), - ux: Open$e({ + ux: Open$f({ kind: gubu_minExports.Exact("Autocomplete"), edit: gubu_minExports.Default(true) }) }) -}), { name: CMPNAME$g }); +}), { name: CMPNAME$h }); function BasicEntityAutocompleteField(props) { const { spec } = props; const basicEntityAutocompleteField = BasicEntityAutocompleteFieldSpecShape(spec); @@ -64822,15 +64816,15 @@ function resolveValue(options, val) { return val || []; } } -const CMPNAME$f = "BasicEntitySliderField"; -const { Open: Open$d } = gubu_minExports.Gubu; -const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu(Open$d({ - field: Open$d({ +const CMPNAME$g = "BasicEntitySliderField"; +const { Open: Open$e } = gubu_minExports.Gubu; +const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu(Open$e({ + field: Open$e({ id: String, name: String, kind: gubu_minExports.Skip(String), label: gubu_minExports.Default("", String), - ux: Open$d({ + ux: Open$e({ kind: gubu_minExports.Exact("Slider"), edit: gubu_minExports.Default(true), step: gubu_minExports.Default(1), @@ -64844,7 +64838,7 @@ const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu(Open$d({ } }) }) -}), { name: CMPNAME$f }); +}), { name: CMPNAME$g }); function BasicEntitySliderField(props) { const { spec } = props; const basicEntityAutocompleteField = BasicEntitySliderFieldSpecShape(spec); @@ -64887,27 +64881,27 @@ function resolveMarks(marks) { } return marks; } -const CMPNAME$e = "BasicEntitySliderField"; -const { Open: Open$c } = gubu_minExports.Gubu; -const BasicEntityRadioGroupFieldSpecShape = gubu_minExports.Gubu(Open$c({ - field: Open$c({ +const CMPNAME$f = "BasicEntitySliderField"; +const { Open: Open$d } = gubu_minExports.Gubu; +const BasicEntityRadioGroupFieldSpecShape = gubu_minExports.Gubu(Open$d({ + field: Open$d({ id: String, name: String, kind: gubu_minExports.Skip(String), label: gubu_minExports.Default("", String), - ux: Open$c({ + ux: Open$d({ kind: gubu_minExports.Exact("RadioGroup"), edit: gubu_minExports.Default(true), direction: gubu_minExports.Exact("row", "column").Default("row") }), - options: Open$c({ + options: Open$d({ label: { field: gubu_minExports.Default("label") }, value: { field: gubu_minExports.Default("value") }, - default: Open$c({}), - ents: Open$c({}) + default: Open$d({}), + ents: Open$d({}) }) }) -}), { name: CMPNAME$e }); +}), { name: CMPNAME$f }); function BasicEntityRadioGroupField(props) { const { spec } = props; const basicEntityRadioGroupField = BasicEntityRadioGroupFieldSpecShape(spec); @@ -64965,21 +64959,21 @@ function resolveOptions(options) { resolvedDefault }; } -const CMPNAME$d = "BasicEntityTextBoxField"; -const { Open: Open$b } = gubu_minExports.Gubu; -const BasicEntityTextBoxFieldSpecShape = gubu_minExports.Gubu(Open$b({ - field: Open$b({ +const CMPNAME$e = "BasicEntityTextBoxField"; +const { Open: Open$c } = gubu_minExports.Gubu; +const BasicEntityTextBoxFieldSpecShape = gubu_minExports.Gubu(Open$c({ + field: Open$c({ id: String, name: String, kind: gubu_minExports.Skip(String), label: gubu_minExports.Default("", String), - ux: Open$b({ + ux: Open$c({ kind: gubu_minExports.Exact("TextBox"), edit: gubu_minExports.Default(true), - props: Open$b({}) + props: Open$c({}) }) }) -}), { name: CMPNAME$d }); +}), { name: CMPNAME$e }); function BasicEntityTextBoxField(props) { const { spec } = props; const basicEntityTextBoxField = BasicEntityTextBoxFieldSpecShape(spec); @@ -65003,21 +64997,21 @@ function BasicEntityFieldError(props) { const { err } = props; return err ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-active", children: err.message }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-none" }); } -const CMPNAME$c = "BasicEntityTextField"; -const { Open: Open$a } = gubu_minExports.Gubu; -const BasicEntityTextFieldSpecShape = gubu_minExports.Gubu(Open$a({ - field: Open$a({ +const CMPNAME$d = "BasicEntityTextField"; +const { Open: Open$b } = gubu_minExports.Gubu; +const BasicEntityTextFieldSpecShape = gubu_minExports.Gubu(Open$b({ + field: Open$b({ id: String, name: String, kind: gubu_minExports.Skip(String), label: gubu_minExports.Default("", String), - ux: Open$a({ + ux: Open$b({ kind: gubu_minExports.Exact("Text"), edit: gubu_minExports.Default(true), - props: Open$a({}) + props: Open$b({}) }) }) -}), { name: CMPNAME$c }); +}), { name: CMPNAME$d }); function BasicEntityTextField(props) { const { spec } = props; const basicEntityTextBoxField = BasicEntityTextFieldSpecShape(spec); @@ -65039,21 +65033,21 @@ function BasicEntityTextField(props) { /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, field.id); } -const CMPNAME$b = "BasicEntityDateField"; -const { Open: Open$9 } = gubu_minExports.Gubu; -const BasicEntityDateFieldSpecShape = gubu_minExports.Gubu(Open$9({ - field: Open$9({ +const CMPNAME$c = "BasicEntityDateField"; +const { Open: Open$a } = gubu_minExports.Gubu; +const BasicEntityDateFieldSpecShape = gubu_minExports.Gubu(Open$a({ + field: Open$a({ id: String, name: String, kind: gubu_minExports.Skip(String), label: gubu_minExports.Default("", String), - ux: Open$9({ + ux: Open$a({ kind: gubu_minExports.Exact("Date"), edit: gubu_minExports.Default(true), - props: Open$9({}) + props: Open$a({}) }) }) -}), { name: CMPNAME$b }); +}), { name: CMPNAME$c }); function BasicEntityDateField(props) { const { spec } = props; const basicEntityDateField = BasicEntityDateFieldSpecShape(spec); @@ -65073,21 +65067,21 @@ function BasicEntityDateField(props) { }, register(field.name)) ) }, field.id); } -const CMPNAME$a = "BasicEntityTimeField"; -const { Open: Open$8 } = gubu_minExports.Gubu; -const BasicEntityTimeFieldSpecShape = gubu_minExports.Gubu(Open$8({ - field: Open$8({ +const CMPNAME$b = "BasicEntityTimeField"; +const { Open: Open$9 } = gubu_minExports.Gubu; +const BasicEntityTimeFieldSpecShape = gubu_minExports.Gubu(Open$9({ + field: Open$9({ id: String, name: String, kind: gubu_minExports.Skip(String), label: gubu_minExports.Default("", String), - ux: Open$8({ + ux: Open$9({ kind: gubu_minExports.Exact("Time"), edit: gubu_minExports.Default(true), - props: Open$8({}) + props: Open$9({}) }) }) -}), { name: CMPNAME$a }); +}), { name: CMPNAME$b }); function BasicEntityTimeField(props) { const { spec } = props; const basicEntityTimeField = BasicEntityTimeFieldSpecShape(spec); @@ -65107,21 +65101,21 @@ function BasicEntityTimeField(props) { }, register(field.name)) ) }, field.id); } -const CMPNAME$9 = "BasicEntityDateTimeField"; -const { Open: Open$7 } = gubu_minExports.Gubu; -const BasicEntityDateTimeFieldSpecShape = gubu_minExports.Gubu(Open$7({ - field: Open$7({ +const CMPNAME$a = "BasicEntityDateTimeField"; +const { Open: Open$8 } = gubu_minExports.Gubu; +const BasicEntityDateTimeFieldSpecShape = gubu_minExports.Gubu(Open$8({ + field: Open$8({ id: String, name: String, kind: gubu_minExports.Skip(String), label: gubu_minExports.Default("", String), - ux: Open$7({ + ux: Open$8({ kind: gubu_minExports.Exact("DateTime"), edit: gubu_minExports.Default(true), - props: Open$7({}) + props: Open$8({}) }) }) -}), { name: CMPNAME$9 }); +}), { name: CMPNAME$a }); function BasicEntityDateTimeField(props) { const { spec } = props; const basicEntityDateTimeField = BasicEntityDateTimeFieldSpecShape(spec); @@ -65141,32 +65135,93 @@ function BasicEntityDateTimeField(props) { }, register(field.name)) ) }, field.id); } +const CMPNAME$9 = "BasicEntitySliderField"; +const { Open: Open$7 } = gubu_minExports.Gubu; +const BasicEntityRatingFieldSpecShape = gubu_minExports.Gubu( + Open$7({ + field: Open$7({ + id: String, + name: String, + kind: gubu_minExports.Skip(String), + label: gubu_minExports.Default("", String), + ux: Open$7({ + kind: gubu_minExports.Exact("Rating"), + edit: gubu_minExports.Default(true), + precision: 1, + props: Open$7({}) + }) + }) + }), + { name: CMPNAME$9 } +); +function BasicEntityRatingField(props) { + const { spec } = props; + const basicEntityRatingField = BasicEntityRatingFieldSpecShape(spec); + const { control, field, getValues } = basicEntityRatingField; + const val = getValues(field.name); + return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx(FormLabel$1, { component: "legend", children: field.label }), + /* @__PURE__ */ jsxRuntimeExports.jsx( + Controller, + { + name: field.name, + control, + defaultValue: !!val || 0, + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( + Rating, + __spreadValues({ + name: field.name, + value, + precision: field.ux.precision, + onChange: (_2, newValue) => onChange(newValue) + }, field.ux.props) + ) + }, + `${field.id}-controller` + ) + ] }, `${field.id}-div`); +} const CMPNAME$8 = "BasicEntityField"; const { Open: Open$6 } = gubu_minExports.Gubu; -const BasicEntityFieldSpecShape = gubu_minExports.Gubu(Open$6({ - field: Open$6({ - id: String, - name: String, - kind: gubu_minExports.Skip(String), - label: gubu_minExports.Default("", String), - ux: Open$6({ - kind: gubu_minExports.Exact("Text", "TextBox", "Date", "DateTime", "Time", "CheckBox", "Autocomplete", "Slider", "RadioGroup"), - edit: gubu_minExports.Default(true), - rows: gubu_minExports.Default(3), - props: Open$6({}) +const BasicEntityFieldSpecShape = gubu_minExports.Gubu( + Open$6({ + field: Open$6({ + id: String, + name: String, + kind: gubu_minExports.Skip(String), + label: gubu_minExports.Default("", String), + ux: Open$6({ + kind: gubu_minExports.Exact( + "Text", + "TextBox", + "Date", + "DateTime", + "Time", + "Checkbox", + "Autocomplete", + "Slider", + "RadioGroup", + "Rating" + ), + edit: gubu_minExports.Default(true), + rows: gubu_minExports.Default(3), + props: Open$6({}) + }) }) - }) -}), { name: CMPNAME$8 }); + }), + { name: CMPNAME$8 } +); const fieldMap = { Text: BasicEntityTextField, TextBox: BasicEntityTextBoxField, Date: BasicEntityDateField, DateTime: BasicEntityDateTimeField, Time: BasicEntityTimeField, - CheckBox: BasicEntityCheckBoxField, + Checkbox: BasicEntityCheckboxField, Autocomplete: BasicEntityAutocompleteField, Slider: BasicEntitySliderField, - RadioGroup: BasicEntityRadioGroupField + RadioGroup: BasicEntityRadioGroupField, + Rating: BasicEntityRatingField }; function BasicEntityField(props) { const { ctx, spec } = props; diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index 76ea48a..f380239 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -1042,21 +1042,15 @@ var __async = (__this, __arguments, generator) => { } return reactJsxRuntime_development; } - var jsxRuntime$1 = jsxRuntime$2.exports; - var hasRequiredJsxRuntime; - function requireJsxRuntime() { - if (hasRequiredJsxRuntime) return jsxRuntime$2.exports; - hasRequiredJsxRuntime = 1; - "use strict"; - if (process.env.NODE_ENV === "production") { - jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); - } else { - jsxRuntime$2.exports = requireReactJsxRuntime_development(); - } - return jsxRuntime$2.exports; + var jsxRuntime = jsxRuntime$2.exports; + "use strict"; + if (process.env.NODE_ENV === "production") { + jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); + } else { + jsxRuntime$2.exports = requireReactJsxRuntime_development(); } - var jsxRuntimeExports = requireJsxRuntime(); - const jsxRuntime = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); + var jsxRuntimeExports = jsxRuntime$2.exports; + const jsxRuntime$1 = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); var gubu_min$2 = { exports: {} }; var gubu_min = gubu_min$2.exports; (function(module2, exports3) { @@ -10600,8 +10594,8 @@ try { */ variant: PropTypes.oneOfType([PropTypes.oneOf(["dense", "regular"]), PropTypes.string]) } : void 0; - const CMPNAME$l = "BasicAccountTool"; - console.log(CMPNAME$l, "1"); + const CMPNAME$m = "BasicAccountTool"; + console.log(CMPNAME$m, "1"); const { Exact: Exact$2 } = gubu_minExports.Gubu; const BasicAccountToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10611,7 +10605,7 @@ try { attr: {}, sx: {}, style: {} - }, { name: CMPNAME$l }); + }, { name: CMPNAME$m }); function BasicAccountTool(props) { var _a; const { ctx, spec } = props; @@ -10685,8 +10679,8 @@ try { children: `${parts.join("")}` }; } - const CMPNAME$k = "BasicHeadTool"; - console.log(CMPNAME$k, "1"); + const CMPNAME$l = "BasicHeadTool"; + console.log(CMPNAME$l, "1"); const { Exact: Exact$1 } = gubu_minExports.Gubu; const BasicHeadToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10696,7 +10690,7 @@ try { attr: {}, sx: {}, style: {} - }, { name: CMPNAME$k }); + }, { name: CMPNAME$l }); function BasicHeadTool(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -10705,7 +10699,7 @@ try { const { name, kind, attr, sx, style: style2 } = basicHeadToolSpec; let tool = /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}); if ("" === kind) { - console.warn(CMPNAME$k, "empty-tool-kind", basicHeadToolSpec); + console.warn(CMPNAME$l, "empty-tool-kind", basicHeadToolSpec); } else if ("logo" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsxs( "div", @@ -10722,7 +10716,7 @@ try { { href: "/", style: style2, - className: `vxg-${CMPNAME$k}-logo`, + className: `vxg-${CMPNAME$l}-logo`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: attr.img }) } ), @@ -10754,17 +10748,17 @@ try { } else if ("account" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsx(BasicAccountTool, { ctx, spec }); } else { - console.warn(CMPNAME$k, "unknown-tool-kind", kind, basicHeadToolSpec); + console.warn(CMPNAME$l, "unknown-tool-kind", kind, basicHeadToolSpec); } return tool; } - const CMPNAME$j = "BasicHead"; - const { Child: Child$5, Exact, Open: Open$h, Required: Required$1 } = gubu_minExports.Gubu; + const CMPNAME$k = "BasicHead"; + const { Child: Child$5, Exact, Open: Open$i, Required: Required$1 } = gubu_minExports.Gubu; const BasicHeadSpecShape = gubu_minExports.Gubu({ head: { name: String, active: Boolean, - tool: Child$5(Open$h({ + tool: Child$5(Open$i({ align: Exact("left", "right") })) }, @@ -10774,7 +10768,7 @@ try { AppBar: {}, ToolBar: {} } - }, { name: CMPNAME$j }); + }, { name: CMPNAME$k }); function BasicHead(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -25323,7 +25317,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$x = ArrowDownward.default = void 0; var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); - var _jsxRuntime$x = requireJsxRuntime(); + var _jsxRuntime$x = jsxRuntimeExports; var _default$x = default_1$x = ArrowDownward.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); @@ -25336,7 +25330,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$w = ArrowRight.default = void 0; var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); - var _jsxRuntime$w = requireJsxRuntime(); + var _jsxRuntime$w = jsxRuntimeExports; var _default$w = default_1$w = ArrowRight.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); @@ -25349,7 +25343,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$v = Cancel.default = void 0; var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); - var _jsxRuntime$v = requireJsxRuntime(); + var _jsxRuntime$v = jsxRuntimeExports; var _default$v = default_1$v = Cancel.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); @@ -25362,7 +25356,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$u = ChevronLeft.default = void 0; var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); - var _jsxRuntime$u = requireJsxRuntime(); + var _jsxRuntime$u = jsxRuntimeExports; var _default$u = default_1$u = ChevronLeft.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); @@ -25375,7 +25369,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$t = ChevronRight.default = void 0; var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); - var _jsxRuntime$t = requireJsxRuntime(); + var _jsxRuntime$t = jsxRuntimeExports; var _default$t = default_1$t = ChevronRight.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); @@ -25388,7 +25382,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$s = ClearAll.default = void 0; var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); - var _jsxRuntime$s = requireJsxRuntime(); + var _jsxRuntime$s = jsxRuntimeExports; var _default$s = default_1$s = ClearAll.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); @@ -25401,7 +25395,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$r = Close.default = void 0; var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); - var _jsxRuntime$r = requireJsxRuntime(); + var _jsxRuntime$r = jsxRuntimeExports; var _default$r = default_1$r = Close.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); @@ -25414,7 +25408,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$q = ContentCopy.default = void 0; var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); - var _jsxRuntime$q = requireJsxRuntime(); + var _jsxRuntime$q = jsxRuntimeExports; var _default$q = default_1$q = ContentCopy.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); @@ -25427,7 +25421,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$p = DensityLarge.default = void 0; var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); - var _jsxRuntime$p = requireJsxRuntime(); + var _jsxRuntime$p = jsxRuntimeExports; var _default$p = default_1$p = DensityLarge.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); @@ -25440,7 +25434,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$o = DensityMedium.default = void 0; var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); - var _jsxRuntime$o = requireJsxRuntime(); + var _jsxRuntime$o = jsxRuntimeExports; var _default$o = default_1$o = DensityMedium.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); @@ -25453,7 +25447,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$n = DensitySmall.default = void 0; var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); - var _jsxRuntime$n = requireJsxRuntime(); + var _jsxRuntime$n = jsxRuntimeExports; var _default$n = default_1$n = DensitySmall.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); @@ -25466,7 +25460,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$m = DragHandle.default = void 0; var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); - var _jsxRuntime$m = requireJsxRuntime(); + var _jsxRuntime$m = jsxRuntimeExports; var _default$m = default_1$m = DragHandle.default = (0, _createSvgIcon$m.default)(/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); @@ -25479,7 +25473,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$l = DynamicFeed.default = void 0; var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); - var _jsxRuntime$l = requireJsxRuntime(); + var _jsxRuntime$l = jsxRuntimeExports; var _default$l = default_1$l = DynamicFeed.default = (0, _createSvgIcon$l.default)([/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { @@ -25494,7 +25488,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$k = Edit.default = void 0; var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); - var _jsxRuntime$k = requireJsxRuntime(); + var _jsxRuntime$k = jsxRuntimeExports; var _default$k = default_1$k = Edit.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); @@ -25507,7 +25501,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$j = ExpandMore.default = void 0; var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); - var _jsxRuntime$j = requireJsxRuntime(); + var _jsxRuntime$j = jsxRuntimeExports; var _default$j = default_1$j = ExpandMore.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); @@ -25520,7 +25514,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$i = FilterAlt.default = void 0; var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); - var _jsxRuntime$i = requireJsxRuntime(); + var _jsxRuntime$i = jsxRuntimeExports; var _default$i = default_1$i = FilterAlt.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); @@ -25533,7 +25527,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$h = FilterList.default = void 0; var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); - var _jsxRuntime$h = requireJsxRuntime(); + var _jsxRuntime$h = jsxRuntimeExports; var _default$h = default_1$h = FilterList.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); @@ -25546,7 +25540,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$g = FilterListOff.default = void 0; var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); - var _jsxRuntime$g = requireJsxRuntime(); + var _jsxRuntime$g = jsxRuntimeExports; var _default$g = default_1$g = FilterListOff.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); @@ -25559,7 +25553,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$f = FirstPage.default = void 0; var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); - var _jsxRuntime$f = requireJsxRuntime(); + var _jsxRuntime$f = jsxRuntimeExports; var _default$f = default_1$f = FirstPage.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); @@ -25572,7 +25566,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$e = Fullscreen.default = void 0; var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); - var _jsxRuntime$e = requireJsxRuntime(); + var _jsxRuntime$e = jsxRuntimeExports; var _default$e = default_1$e = Fullscreen.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); @@ -25585,7 +25579,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$d = FullscreenExit.default = void 0; var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); - var _jsxRuntime$d = requireJsxRuntime(); + var _jsxRuntime$d = jsxRuntimeExports; var _default$d = default_1$d = FullscreenExit.default = (0, _createSvgIcon$d.default)(/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); @@ -25598,7 +25592,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$c = KeyboardDoubleArrowDown.default = void 0; var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); - var _jsxRuntime$c = requireJsxRuntime(); + var _jsxRuntime$c = jsxRuntimeExports; var _default$c = default_1$c = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$c.default)([/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { @@ -25613,7 +25607,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$b = LastPage.default = void 0; var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); - var _jsxRuntime$b = requireJsxRuntime(); + var _jsxRuntime$b = jsxRuntimeExports; var _default$b = default_1$b = LastPage.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); @@ -25626,7 +25620,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$a = MoreHoriz.default = void 0; var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); - var _jsxRuntime$a = requireJsxRuntime(); + var _jsxRuntime$a = jsxRuntimeExports; var _default$a = default_1$a = MoreHoriz.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); @@ -25639,7 +25633,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$9 = MoreVert.default = void 0; var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); - var _jsxRuntime$9 = requireJsxRuntime(); + var _jsxRuntime$9 = jsxRuntimeExports; var _default$9 = default_1$9 = MoreVert.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); @@ -25652,7 +25646,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$8 = PushPin.default = void 0; var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); - var _jsxRuntime$8 = requireJsxRuntime(); + var _jsxRuntime$8 = jsxRuntimeExports; var _default$8 = default_1$8 = PushPin.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" @@ -25666,7 +25660,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$7 = RestartAlt.default = void 0; var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); - var _jsxRuntime$7 = requireJsxRuntime(); + var _jsxRuntime$7 = jsxRuntimeExports; var _default$7 = default_1$7 = RestartAlt.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); @@ -25679,7 +25673,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$6 = Save.default = void 0; var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); - var _jsxRuntime$6 = requireJsxRuntime(); + var _jsxRuntime$6 = jsxRuntimeExports; var _default$6 = default_1$6 = Save.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); @@ -25692,7 +25686,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$5 = Search.default = void 0; var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); - var _jsxRuntime$5 = requireJsxRuntime(); + var _jsxRuntime$5 = jsxRuntimeExports; var _default$5 = default_1$5 = Search.default = (0, _createSvgIcon$5.default)(/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); @@ -25705,7 +25699,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$4 = SearchOff.default = void 0; var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); - var _jsxRuntime$4 = requireJsxRuntime(); + var _jsxRuntime$4 = jsxRuntimeExports; var _default$4 = default_1$4 = SearchOff.default = (0, _createSvgIcon$4.default)([/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { @@ -25720,7 +25714,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$3 = Sort.default = void 0; var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); - var _jsxRuntime$3 = requireJsxRuntime(); + var _jsxRuntime$3 = jsxRuntimeExports; var _default$3 = default_1$3 = Sort.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); @@ -25733,7 +25727,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$2 = SyncAlt.default = void 0; var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); - var _jsxRuntime$2 = requireJsxRuntime(); + var _jsxRuntime$2 = jsxRuntimeExports; var _default$2 = default_1$2 = SyncAlt.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); @@ -25746,7 +25740,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$1 = ViewColumn.default = void 0; var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); - var _jsxRuntime$1 = requireJsxRuntime(); + var _jsxRuntime$1 = jsxRuntimeExports; var _default$1 = default_1$1 = ViewColumn.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); @@ -25759,7 +25753,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1 = VisibilityOff.default = void 0; var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); - var _jsxRuntime = requireJsxRuntime(); + var _jsxRuntime = jsxRuntimeExports; var _default = default_1 = VisibilityOff.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); @@ -62718,8 +62712,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } return jsxRuntimeExports.jsx(MRT_TablePaper, { table }); }; - const { Open: Open$g, Child: Child$4 } = gubu_minExports.Gubu; - const Shape$2 = gubu_minExports.Gubu(Open$g({ + const { Open: Open$h, Child: Child$4 } = gubu_minExports.Gubu; + const Shape$2 = gubu_minExports.Gubu(Open$h({ name: String, prefix: String, ent: String, @@ -62764,7 +62758,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } }); Object.defineProperty(VxgBasicEntityListPlugin, "name", { value: "VxgBasicEntityListPlugin" }); - const CMPNAME$i = "BasicEntityList"; + const CMPNAME$j = "BasicEntityList"; function BasicEntityList(props) { const { ctx } = props; const { seneca } = ctx(); @@ -64684,25 +64678,25 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha _formControl.current.formState = getProxyFormState(formState, control); return _formControl.current; } - const CMPNAME$h = "BasicEntitySliderField"; - const { Open: Open$f } = gubu_minExports.Gubu; - const BasicEntityCheckBoxFieldSpecShape = gubu_minExports.Gubu(Open$f({ - field: Open$f({ + const CMPNAME$i = "BasicEntitySliderField"; + const { Open: Open$g } = gubu_minExports.Gubu; + const BasicEntityCheckboxFieldSpecShape = gubu_minExports.Gubu(Open$g({ + field: Open$g({ id: String, name: String, kind: gubu_minExports.Skip(String), label: gubu_minExports.Default("", String), - ux: Open$f({ - kind: gubu_minExports.Exact("CheckBox"), + ux: Open$g({ + kind: gubu_minExports.Exact("Checkbox"), edit: gubu_minExports.Default(true), - props: Open$f({}) + props: Open$g({}) }) }) - }), { name: CMPNAME$h }); - function BasicEntityCheckBoxField(props) { + }), { name: CMPNAME$i }); + function BasicEntityCheckboxField(props) { const { spec } = props; - const basicEntityCheckBoxField = BasicEntityCheckBoxFieldSpecShape(spec); - const { control, field, getValues } = basicEntityCheckBoxField; + const basicEntityCheckboxField = BasicEntityCheckboxFieldSpecShape(spec); + const { control, field, getValues } = basicEntityCheckboxField; const val = getValues(field.name); return /* @__PURE__ */ jsxRuntimeExports.jsx( material.Box, @@ -64736,27 +64730,27 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha `${field.id}-box` ); } - const CMPNAME$g = "BasicEntityAutocompleteField"; - const { Open: Open$e } = gubu_minExports.Gubu; - const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu(Open$e({ - field: Open$e({ + const CMPNAME$h = "BasicEntityAutocompleteField"; + const { Open: Open$f } = gubu_minExports.Gubu; + const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu(Open$f({ + field: Open$f({ id: String, name: String, kind: gubu_minExports.Skip(String), label: gubu_minExports.Default(""), - options: Open$e({ + options: Open$f({ label: { field: gubu_minExports.Default("label") }, value: { field: gubu_minExports.Default("value") }, multiple: gubu_minExports.Default(false), - default: Open$e({}), - ents: Open$e({}) + default: Open$f({}), + ents: Open$f({}) }), - ux: Open$e({ + ux: Open$f({ kind: gubu_minExports.Exact("Autocomplete"), edit: gubu_minExports.Default(true) }) }) - }), { name: CMPNAME$g }); + }), { name: CMPNAME$h }); function BasicEntityAutocompleteField(props) { const { spec } = props; const basicEntityAutocompleteField = BasicEntityAutocompleteFieldSpecShape(spec); @@ -64834,15 +64828,15 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha return val || []; } } - const CMPNAME$f = "BasicEntitySliderField"; - const { Open: Open$d } = gubu_minExports.Gubu; - const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu(Open$d({ - field: Open$d({ + const CMPNAME$g = "BasicEntitySliderField"; + const { Open: Open$e } = gubu_minExports.Gubu; + const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu(Open$e({ + field: Open$e({ id: String, name: String, kind: gubu_minExports.Skip(String), label: gubu_minExports.Default("", String), - ux: Open$d({ + ux: Open$e({ kind: gubu_minExports.Exact("Slider"), edit: gubu_minExports.Default(true), step: gubu_minExports.Default(1), @@ -64856,7 +64850,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } }) }) - }), { name: CMPNAME$f }); + }), { name: CMPNAME$g }); function BasicEntitySliderField(props) { const { spec } = props; const basicEntityAutocompleteField = BasicEntitySliderFieldSpecShape(spec); @@ -64899,27 +64893,27 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } return marks; } - const CMPNAME$e = "BasicEntitySliderField"; - const { Open: Open$c } = gubu_minExports.Gubu; - const BasicEntityRadioGroupFieldSpecShape = gubu_minExports.Gubu(Open$c({ - field: Open$c({ + const CMPNAME$f = "BasicEntitySliderField"; + const { Open: Open$d } = gubu_minExports.Gubu; + const BasicEntityRadioGroupFieldSpecShape = gubu_minExports.Gubu(Open$d({ + field: Open$d({ id: String, name: String, kind: gubu_minExports.Skip(String), label: gubu_minExports.Default("", String), - ux: Open$c({ + ux: Open$d({ kind: gubu_minExports.Exact("RadioGroup"), edit: gubu_minExports.Default(true), direction: gubu_minExports.Exact("row", "column").Default("row") }), - options: Open$c({ + options: Open$d({ label: { field: gubu_minExports.Default("label") }, value: { field: gubu_minExports.Default("value") }, - default: Open$c({}), - ents: Open$c({}) + default: Open$d({}), + ents: Open$d({}) }) }) - }), { name: CMPNAME$e }); + }), { name: CMPNAME$f }); function BasicEntityRadioGroupField(props) { const { spec } = props; const basicEntityRadioGroupField = BasicEntityRadioGroupFieldSpecShape(spec); @@ -64977,21 +64971,21 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha resolvedDefault }; } - const CMPNAME$d = "BasicEntityTextBoxField"; - const { Open: Open$b } = gubu_minExports.Gubu; - const BasicEntityTextBoxFieldSpecShape = gubu_minExports.Gubu(Open$b({ - field: Open$b({ + const CMPNAME$e = "BasicEntityTextBoxField"; + const { Open: Open$c } = gubu_minExports.Gubu; + const BasicEntityTextBoxFieldSpecShape = gubu_minExports.Gubu(Open$c({ + field: Open$c({ id: String, name: String, kind: gubu_minExports.Skip(String), label: gubu_minExports.Default("", String), - ux: Open$b({ + ux: Open$c({ kind: gubu_minExports.Exact("TextBox"), edit: gubu_minExports.Default(true), - props: Open$b({}) + props: Open$c({}) }) }) - }), { name: CMPNAME$d }); + }), { name: CMPNAME$e }); function BasicEntityTextBoxField(props) { const { spec } = props; const basicEntityTextBoxField = BasicEntityTextBoxFieldSpecShape(spec); @@ -65015,21 +65009,21 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const { err } = props; return err ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-active", children: err.message }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-none" }); } - const CMPNAME$c = "BasicEntityTextField"; - const { Open: Open$a } = gubu_minExports.Gubu; - const BasicEntityTextFieldSpecShape = gubu_minExports.Gubu(Open$a({ - field: Open$a({ + const CMPNAME$d = "BasicEntityTextField"; + const { Open: Open$b } = gubu_minExports.Gubu; + const BasicEntityTextFieldSpecShape = gubu_minExports.Gubu(Open$b({ + field: Open$b({ id: String, name: String, kind: gubu_minExports.Skip(String), label: gubu_minExports.Default("", String), - ux: Open$a({ + ux: Open$b({ kind: gubu_minExports.Exact("Text"), edit: gubu_minExports.Default(true), - props: Open$a({}) + props: Open$b({}) }) }) - }), { name: CMPNAME$c }); + }), { name: CMPNAME$d }); function BasicEntityTextField(props) { const { spec } = props; const basicEntityTextBoxField = BasicEntityTextFieldSpecShape(spec); @@ -65051,21 +65045,21 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, field.id); } - const CMPNAME$b = "BasicEntityDateField"; - const { Open: Open$9 } = gubu_minExports.Gubu; - const BasicEntityDateFieldSpecShape = gubu_minExports.Gubu(Open$9({ - field: Open$9({ + const CMPNAME$c = "BasicEntityDateField"; + const { Open: Open$a } = gubu_minExports.Gubu; + const BasicEntityDateFieldSpecShape = gubu_minExports.Gubu(Open$a({ + field: Open$a({ id: String, name: String, kind: gubu_minExports.Skip(String), label: gubu_minExports.Default("", String), - ux: Open$9({ + ux: Open$a({ kind: gubu_minExports.Exact("Date"), edit: gubu_minExports.Default(true), - props: Open$9({}) + props: Open$a({}) }) }) - }), { name: CMPNAME$b }); + }), { name: CMPNAME$c }); function BasicEntityDateField(props) { const { spec } = props; const basicEntityDateField = BasicEntityDateFieldSpecShape(spec); @@ -65085,21 +65079,21 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }, register(field.name)) ) }, field.id); } - const CMPNAME$a = "BasicEntityTimeField"; - const { Open: Open$8 } = gubu_minExports.Gubu; - const BasicEntityTimeFieldSpecShape = gubu_minExports.Gubu(Open$8({ - field: Open$8({ + const CMPNAME$b = "BasicEntityTimeField"; + const { Open: Open$9 } = gubu_minExports.Gubu; + const BasicEntityTimeFieldSpecShape = gubu_minExports.Gubu(Open$9({ + field: Open$9({ id: String, name: String, kind: gubu_minExports.Skip(String), label: gubu_minExports.Default("", String), - ux: Open$8({ + ux: Open$9({ kind: gubu_minExports.Exact("Time"), edit: gubu_minExports.Default(true), - props: Open$8({}) + props: Open$9({}) }) }) - }), { name: CMPNAME$a }); + }), { name: CMPNAME$b }); function BasicEntityTimeField(props) { const { spec } = props; const basicEntityTimeField = BasicEntityTimeFieldSpecShape(spec); @@ -65119,21 +65113,21 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }, register(field.name)) ) }, field.id); } - const CMPNAME$9 = "BasicEntityDateTimeField"; - const { Open: Open$7 } = gubu_minExports.Gubu; - const BasicEntityDateTimeFieldSpecShape = gubu_minExports.Gubu(Open$7({ - field: Open$7({ + const CMPNAME$a = "BasicEntityDateTimeField"; + const { Open: Open$8 } = gubu_minExports.Gubu; + const BasicEntityDateTimeFieldSpecShape = gubu_minExports.Gubu(Open$8({ + field: Open$8({ id: String, name: String, kind: gubu_minExports.Skip(String), label: gubu_minExports.Default("", String), - ux: Open$7({ + ux: Open$8({ kind: gubu_minExports.Exact("DateTime"), edit: gubu_minExports.Default(true), - props: Open$7({}) + props: Open$8({}) }) }) - }), { name: CMPNAME$9 }); + }), { name: CMPNAME$a }); function BasicEntityDateTimeField(props) { const { spec } = props; const basicEntityDateTimeField = BasicEntityDateTimeFieldSpecShape(spec); @@ -65153,32 +65147,93 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }, register(field.name)) ) }, field.id); } + const CMPNAME$9 = "BasicEntitySliderField"; + const { Open: Open$7 } = gubu_minExports.Gubu; + const BasicEntityRatingFieldSpecShape = gubu_minExports.Gubu( + Open$7({ + field: Open$7({ + id: String, + name: String, + kind: gubu_minExports.Skip(String), + label: gubu_minExports.Default("", String), + ux: Open$7({ + kind: gubu_minExports.Exact("Rating"), + edit: gubu_minExports.Default(true), + precision: 1, + props: Open$7({}) + }) + }) + }), + { name: CMPNAME$9 } + ); + function BasicEntityRatingField(props) { + const { spec } = props; + const basicEntityRatingField = BasicEntityRatingFieldSpecShape(spec); + const { control, field, getValues } = basicEntityRatingField; + const val = getValues(field.name); + return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx(material.FormLabel, { component: "legend", children: field.label }), + /* @__PURE__ */ jsxRuntimeExports.jsx( + Controller, + { + name: field.name, + control, + defaultValue: !!val || 0, + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( + material.Rating, + __spreadValues({ + name: field.name, + value, + precision: field.ux.precision, + onChange: (_2, newValue) => onChange(newValue) + }, field.ux.props) + ) + }, + `${field.id}-controller` + ) + ] }, `${field.id}-div`); + } const CMPNAME$8 = "BasicEntityField"; const { Open: Open$6 } = gubu_minExports.Gubu; - const BasicEntityFieldSpecShape = gubu_minExports.Gubu(Open$6({ - field: Open$6({ - id: String, - name: String, - kind: gubu_minExports.Skip(String), - label: gubu_minExports.Default("", String), - ux: Open$6({ - kind: gubu_minExports.Exact("Text", "TextBox", "Date", "DateTime", "Time", "CheckBox", "Autocomplete", "Slider", "RadioGroup"), - edit: gubu_minExports.Default(true), - rows: gubu_minExports.Default(3), - props: Open$6({}) + const BasicEntityFieldSpecShape = gubu_minExports.Gubu( + Open$6({ + field: Open$6({ + id: String, + name: String, + kind: gubu_minExports.Skip(String), + label: gubu_minExports.Default("", String), + ux: Open$6({ + kind: gubu_minExports.Exact( + "Text", + "TextBox", + "Date", + "DateTime", + "Time", + "Checkbox", + "Autocomplete", + "Slider", + "RadioGroup", + "Rating" + ), + edit: gubu_minExports.Default(true), + rows: gubu_minExports.Default(3), + props: Open$6({}) + }) }) - }) - }), { name: CMPNAME$8 }); + }), + { name: CMPNAME$8 } + ); const fieldMap = { Text: BasicEntityTextField, TextBox: BasicEntityTextBoxField, Date: BasicEntityDateField, DateTime: BasicEntityDateTimeField, Time: BasicEntityTimeField, - CheckBox: BasicEntityCheckBoxField, + Checkbox: BasicEntityCheckboxField, Autocomplete: BasicEntityAutocompleteField, Slider: BasicEntitySliderField, - RadioGroup: BasicEntityRadioGroupField + RadioGroup: BasicEntityRadioGroupField, + Rating: BasicEntityRatingField }; function BasicEntityField(props) { const { ctx, spec } = props; diff --git a/src/lib/BasicEntityCheckBoxField.tsx b/src/lib/BasicEntityCheckBoxField.tsx index 214da91..c867c56 100644 --- a/src/lib/BasicEntityCheckBoxField.tsx +++ b/src/lib/BasicEntityCheckBoxField.tsx @@ -13,25 +13,25 @@ import { Default, Exact, Gubu, Skip } from 'gubu' const CMPNAME = 'BasicEntitySliderField' const { Open } = Gubu -const BasicEntityCheckBoxFieldSpecShape = Gubu(Open({ +const BasicEntityCheckboxFieldSpecShape = Gubu(Open({ field: Open({ id: String, name: String, kind: Skip(String), label: Default('', String), ux: Open({ - kind: Exact('CheckBox'), + kind: Exact('Checkbox'), edit: Default(true), props: Open({}), }) }), }), {name: CMPNAME}) -function BasicEntityCheckBoxField(props: any) { +function BasicEntityCheckboxField(props: any) { const { spec } = props; - const basicEntityCheckBoxField: Spec = BasicEntityCheckBoxFieldSpecShape(spec) - const { control, field, getValues } = basicEntityCheckBoxField + const basicEntityCheckboxField: Spec = BasicEntityCheckboxFieldSpecShape(spec) + const { control, field, getValues } = basicEntityCheckboxField const val = getValues(field.name) return ( @@ -63,4 +63,4 @@ function BasicEntityCheckBoxField(props: any) { ); } -export { BasicEntityCheckBoxField }; \ No newline at end of file +export { BasicEntityCheckboxField }; \ No newline at end of file diff --git a/src/lib/BasicEntityField.tsx b/src/lib/BasicEntityField.tsx index 4bb8559..f3e60e9 100644 --- a/src/lib/BasicEntityField.tsx +++ b/src/lib/BasicEntityField.tsx @@ -1,40 +1,52 @@ -import React, { useEffect, forwardRef } from 'react' - -import { - TextField, -} from '@mui/material' - - -import type { Spec } from './basic-types' - -import { Default, Exact, Gubu, Skip } from 'gubu' -import { BasicEntityCheckBoxField } from './BasicEntityCheckBoxField' -import { BasicEntityAutocompleteField } from './BasicEntityAutocompleteField' -import { BasicEntitySliderField } from './BasicEntitySliderField' -import { BasicEntityRadioGroupField } from './BasicEntityRadioGroupField' -import { BasicEntityTextBoxField } from './BasicEntityTextBoxField' -import { BasicEntityTextField } from './BasicEntityTextField' -import { BasicEntityDateField } from './BasicEntityDateField' -import { BasicEntityTimeField } from './BasicEntityTimeField' -import { BasicEntityDateTimeField } from './BasicEntityDateTimeField' - -const CMPNAME = 'BasicEntityField' - -const { Open } = Gubu -const BasicEntityFieldSpecShape = Gubu(Open({ - field: Open({ - id: String, - name: String, - kind: Skip(String), - label: Default('', String), - ux: Open({ - kind: Exact('Text', 'TextBox', 'Date', 'DateTime', 'Time', 'CheckBox', 'Autocomplete', 'Slider', 'RadioGroup'), - edit: Default(true), - rows: Default(3), - props: Open({}), - }) +import React, { useEffect, forwardRef } from "react"; + +import { TextField } from "@mui/material"; + +import type { Spec } from "./basic-types"; + +import { Default, Exact, Gubu, Skip } from "gubu"; +import { BasicEntityCheckboxField } from "./BasicEntityCheckboxField"; +import { BasicEntityAutocompleteField } from "./BasicEntityAutocompleteField"; +import { BasicEntitySliderField } from "./BasicEntitySliderField"; +import { BasicEntityRadioGroupField } from "./BasicEntityRadioGroupField"; +import { BasicEntityTextBoxField } from "./BasicEntityTextBoxField"; +import { BasicEntityTextField } from "./BasicEntityTextField"; +import { BasicEntityDateField } from "./BasicEntityDateField"; +import { BasicEntityTimeField } from "./BasicEntityTimeField"; +import { BasicEntityDateTimeField } from "./BasicEntityDateTimeField"; +import { BasicEntityRatingField } from "./BasicEntityRatingField"; + +const CMPNAME = "BasicEntityField"; + +const { Open } = Gubu; +const BasicEntityFieldSpecShape = Gubu( + Open({ + field: Open({ + id: String, + name: String, + kind: Skip(String), + label: Default("", String), + ux: Open({ + kind: Exact( + "Text", + "TextBox", + "Date", + "DateTime", + "Time", + "Checkbox", + "Autocomplete", + "Slider", + "RadioGroup", + "Rating" + ), + edit: Default(true), + rows: Default(3), + props: Open({}), + }), + }), }), -}), {name: CMPNAME}) + { name: CMPNAME } +); const fieldMap: any = { Text: BasicEntityTextField, @@ -42,23 +54,23 @@ const fieldMap: any = { Date: BasicEntityDateField, DateTime: BasicEntityDateTimeField, Time: BasicEntityTimeField, - CheckBox: BasicEntityCheckBoxField, + Checkbox: BasicEntityCheckboxField, Autocomplete: BasicEntityAutocompleteField, Slider: BasicEntitySliderField, - RadioGroup: BasicEntityRadioGroupField -} - + RadioGroup: BasicEntityRadioGroupField, + Rating: BasicEntityRatingField, +}; -function BasicEntityField (props: any) { - const { ctx, spec } = props +function BasicEntityField(props: any) { + const { ctx, spec } = props; - const basicEntityFieldSpec: Spec = BasicEntityFieldSpecShape(spec) - const field: any = basicEntityFieldSpec.field - const Field: any = fieldMap[field.ux.kind] + const basicEntityFieldSpec: Spec = BasicEntityFieldSpecShape(spec); + const field: any = basicEntityFieldSpec.field; + const Field: any = fieldMap[field.ux.kind]; // console.log('BEF ERR', spec) - - return + + return ; } /* @@ -105,9 +117,6 @@ function BasicEntityDateTimeField (props: any) { } */ - - - /* Notes https://www.react-hook-form.com/ @@ -119,8 +128,4 @@ https://mui.com/material-ui/react-grid/ */ - - -export { - BasicEntityField -} +export { BasicEntityField }; diff --git a/src/lib/BasicEntityRatingField.tsx b/src/lib/BasicEntityRatingField.tsx new file mode 100644 index 0000000..63d25e1 --- /dev/null +++ b/src/lib/BasicEntityRatingField.tsx @@ -0,0 +1,67 @@ +import React, { useEffect, forwardRef } from "react"; + +import { + FormControlLabel, + Checkbox, + Box, + Rating, + FormLabel, +} from "@mui/material"; +import { Controller } from "react-hook-form"; + +import type { Spec } from "./basic-types"; + +import { Default, Exact, Gubu, Skip } from "gubu"; +const CMPNAME = "BasicEntitySliderField"; + +const { Open } = Gubu; +const BasicEntityRatingFieldSpecShape = Gubu( + Open({ + field: Open({ + id: String, + name: String, + kind: Skip(String), + label: Default("", String), + ux: Open({ + kind: Exact("Rating"), + edit: Default(true), + precision: 1, + props: Open({}), + }), + }), + }), + { name: CMPNAME } +); + +function BasicEntityRatingField(props: any) { + const { spec } = props; + + const basicEntityRatingField: Spec = BasicEntityRatingFieldSpecShape(spec); + const { control, field, getValues } = basicEntityRatingField; + const val = getValues(field.name); + + // console.log("BasicEntityRatingField", "val", val); + + return ( +
+ {field.label} + ( + onChange(newValue)} + {...field.ux.props} + /> + )} + /> +
+ ); +} + +export { BasicEntityRatingField }; From 8a7aaf94cb7dea104dbd543a3147e182e5ff955a Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Fri, 26 Jul 2024 19:29:49 +0100 Subject: [PATCH 040/122] Rename BasicEntityCheckBoxField to temp name --- .../{BasicEntityCheckBoxField.tsx => BasicEntityCheckField.tsx} | 0 src/lib/BasicEntityField.tsx | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename src/lib/{BasicEntityCheckBoxField.tsx => BasicEntityCheckField.tsx} (100%) diff --git a/src/lib/BasicEntityCheckBoxField.tsx b/src/lib/BasicEntityCheckField.tsx similarity index 100% rename from src/lib/BasicEntityCheckBoxField.tsx rename to src/lib/BasicEntityCheckField.tsx diff --git a/src/lib/BasicEntityField.tsx b/src/lib/BasicEntityField.tsx index f3e60e9..994e1af 100644 --- a/src/lib/BasicEntityField.tsx +++ b/src/lib/BasicEntityField.tsx @@ -5,7 +5,7 @@ import { TextField } from "@mui/material"; import type { Spec } from "./basic-types"; import { Default, Exact, Gubu, Skip } from "gubu"; -import { BasicEntityCheckboxField } from "./BasicEntityCheckboxField"; +import { BasicEntityCheckboxField } from "./BasicEntityCheckField"; import { BasicEntityAutocompleteField } from "./BasicEntityAutocompleteField"; import { BasicEntitySliderField } from "./BasicEntitySliderField"; import { BasicEntityRadioGroupField } from "./BasicEntityRadioGroupField"; From ee2fc3955c75cd2e381aa9a836257f073b8eb0d2 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Fri, 26 Jul 2024 19:30:41 +0100 Subject: [PATCH 041/122] Rename BasicEntityCheckboxField from temp name --- ...sicEntityCheckField.tsx => BasicEntityCheckboxField.tsx} | 0 src/lib/BasicEntityField.tsx | 6 ++---- 2 files changed, 2 insertions(+), 4 deletions(-) rename src/lib/{BasicEntityCheckField.tsx => BasicEntityCheckboxField.tsx} (100%) diff --git a/src/lib/BasicEntityCheckField.tsx b/src/lib/BasicEntityCheckboxField.tsx similarity index 100% rename from src/lib/BasicEntityCheckField.tsx rename to src/lib/BasicEntityCheckboxField.tsx diff --git a/src/lib/BasicEntityField.tsx b/src/lib/BasicEntityField.tsx index 994e1af..7981f18 100644 --- a/src/lib/BasicEntityField.tsx +++ b/src/lib/BasicEntityField.tsx @@ -1,11 +1,9 @@ -import React, { useEffect, forwardRef } from "react"; - -import { TextField } from "@mui/material"; +import React from "react"; import type { Spec } from "./basic-types"; import { Default, Exact, Gubu, Skip } from "gubu"; -import { BasicEntityCheckboxField } from "./BasicEntityCheckField"; +import { BasicEntityCheckboxField } from "./BasicEntityCheckboxField"; import { BasicEntityAutocompleteField } from "./BasicEntityAutocompleteField"; import { BasicEntitySliderField } from "./BasicEntitySliderField"; import { BasicEntityRadioGroupField } from "./BasicEntityRadioGroupField"; From d401b23cd52c7b188ec268bb002949fd1e76a576 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Fri, 26 Jul 2024 19:32:04 +0100 Subject: [PATCH 042/122] Rename BasicEntityCheckBoxField.d.ts to BasicEntityCheckboxField.d.ts --- ...asicEntityCheckBoxField.d.ts => BasicEntityCheckboxField.d.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename dist/{BasicEntityCheckBoxField.d.ts => BasicEntityCheckboxField.d.ts} (100%) diff --git a/dist/BasicEntityCheckBoxField.d.ts b/dist/BasicEntityCheckboxField.d.ts similarity index 100% rename from dist/BasicEntityCheckBoxField.d.ts rename to dist/BasicEntityCheckboxField.d.ts From bac6145ada8367c8b9e28c34364615c92c3b9cd7 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Fri, 26 Jul 2024 19:56:59 +0100 Subject: [PATCH 043/122] Format code with standard-prettier --- src/lib/BasicEntityAutocompleteField.tsx | 150 ++++++++-------- src/lib/BasicEntityCheckboxField.tsx | 48 +++--- src/lib/BasicEntityDateField.tsx | 75 ++++---- src/lib/BasicEntityDateTimeField.tsx | 80 ++++----- src/lib/BasicEntityEdit.tsx | 207 +++++++++++------------ src/lib/BasicEntityField.tsx | 78 ++++----- src/lib/BasicEntityFieldError.tsx | 12 +- src/lib/BasicEntityRadioGroupField.tsx | 90 +++++----- src/lib/BasicEntityRatingField.tsx | 44 ++--- src/lib/BasicEntitySliderField.tsx | 121 +++++++------ src/lib/BasicEntityTextBoxField.tsx | 76 +++++---- src/lib/BasicEntityTextField.tsx | 81 ++++----- src/lib/BasicEntityTimeField.tsx | 79 ++++----- 13 files changed, 592 insertions(+), 549 deletions(-) diff --git a/src/lib/BasicEntityAutocompleteField.tsx b/src/lib/BasicEntityAutocompleteField.tsx index cdd7552..cfc095c 100644 --- a/src/lib/BasicEntityAutocompleteField.tsx +++ b/src/lib/BasicEntityAutocompleteField.tsx @@ -1,7 +1,7 @@ -import React, { useEffect, forwardRef } from "react"; +import React, { useEffect, forwardRef } from 'react' -import { TextField, Autocomplete } from "@mui/material"; -import { Controller } from "react-hook-form"; +import { TextField, Autocomplete } from '@mui/material' +import { Controller } from 'react-hook-form' import type { Spec } from './basic-types' @@ -9,109 +9,123 @@ import { Default, Exact, Gubu, Skip } from 'gubu' const CMPNAME = 'BasicEntityAutocompleteField' const { Open } = Gubu -const BasicEntityAutocompleteFieldSpecShape = Gubu(Open({ - field: Open({ - id: String, - name: String, - kind: Skip(String), - label: Default(''), - options: Open({ - label: { field: Default('label') }, - value: { field: Default('value') }, - multiple: Default(false), - default: Open({}), - ents: Open({}) - }), - ux: Open({ - kind: Exact('Autocomplete'), - edit: Default(true), +const BasicEntityAutocompleteFieldSpecShape = Gubu( + Open({ + field: Open({ + id: String, + name: String, + kind: Skip(String), + label: Default(''), + options: Open({ + label: { field: Default('label') }, + value: { field: Default('value') }, + multiple: Default(false), + default: Open({}), + ents: Open({}) + }), + ux: Open({ + kind: Exact('Autocomplete'), + edit: Default(true) + }) }) - }) -}), {name: CMPNAME}) + }), + { name: CMPNAME } +) -function BasicEntityAutocompleteField(props: any) { +function BasicEntityAutocompleteField (props: any) { const { spec } = props - const basicEntityAutocompleteField: Spec = BasicEntityAutocompleteFieldSpecShape(spec) + const basicEntityAutocompleteField: Spec = + BasicEntityAutocompleteFieldSpecShape(spec) const { control, field } = basicEntityAutocompleteField - const { resolvedOptions, resolvedDefault } = resolveOptions(field.options); + const { resolvedOptions, resolvedDefault } = resolveOptions(field.options) return ( - ( - - opt === val || - (opt?.id != null && val?.id != null && opt.id === val.id) || - (opt?.value != null && val?.value != null && opt.value === val.value) - } - getOptionLabel={(option: any) => option[field.options.label.field]} - value={resolveValue(field.options, value)} - onChange={(_, newVal: any) => onChange(newVal)} - renderInput={(params: any) => } - /> - )} - /> + ( + + opt === val || + (opt?.id != null && val?.id != null && opt.id === val.id) || + (opt?.value != null && + val?.value != null && + opt.value === val.value) + } + getOptionLabel={(option: any) => option[field.options.label.field]} + value={resolveValue(field.options, value)} + onChange={(_, newVal: any) => onChange(newVal)} + renderInput={(params: any) => ( + + )} + /> + )} + /> ) } // Returns array of options and default value(s) based on the options object -function resolveOptions(options: any) { - const { multiple, ents, label, value, default: defaultValues } = options; - const labelField = label?.field; - const valueField = value?.field; +function resolveOptions (options: any) { + const { multiple, ents, label, value, default: defaultValues } = options + const labelField = label?.field + const valueField = value?.field // Array of options const resolvedOptions = Object.keys(ents).map(key => ({ [labelField]: ents?.[key]?.[labelField], [valueField]: key - })); + })) - let resolvedDefault; + let resolvedDefault if (multiple === false) { if (Object.keys(defaultValues).length > 0) { - const firstKey = Object.keys(defaultValues)[0]; - resolvedDefault = { value: firstKey, label: defaultValues[firstKey][labelField] }; + const firstKey = Object.keys(defaultValues)[0] + resolvedDefault = { + value: firstKey, + label: defaultValues[firstKey][labelField] + } } else { - resolvedDefault = null; + resolvedDefault = null } } else { resolvedDefault = Object.keys(defaultValues).map(key => ({ label: defaultValues[key].label, value: key - })); + })) } return { resolvedOptions, resolvedDefault - }; + } } -function resolveValue(options: any, val: any) { - const { multiple, ents, label, value } = options; - const labelField = label?.field; - const valueField = value?.field; +function resolveValue (options: any, val: any) { + const { multiple, ents, label, value } = options + const labelField = label?.field + const valueField = value?.field - const getValue = (val: string) => ents?.[val]?.[labelField] ? { [valueField]: val, [labelField]: ents[val][labelField] || val } : undefined; + const getValue = (val: string) => + ents?.[val]?.[labelField] + ? { [valueField]: val, [labelField]: ents[val][labelField] || val } + : undefined if (!multiple) { - return typeof val === 'string' ? getValue(val) : (val || undefined); + return typeof val === 'string' ? getValue(val) : val || undefined } else { if (typeof val === 'string') { - const resolvedValue = getValue(val); - return resolvedValue ? [resolvedValue] : []; + const resolvedValue = getValue(val) + return resolvedValue ? [resolvedValue] : [] } - return val || []; + return val || [] } } -export { BasicEntityAutocompleteField } \ No newline at end of file +export { BasicEntityAutocompleteField } diff --git a/src/lib/BasicEntityCheckboxField.tsx b/src/lib/BasicEntityCheckboxField.tsx index c867c56..0a2a31d 100644 --- a/src/lib/BasicEntityCheckboxField.tsx +++ b/src/lib/BasicEntityCheckboxField.tsx @@ -1,11 +1,7 @@ -import React, { useEffect, forwardRef } from "react"; +import React, { useEffect, forwardRef } from 'react' -import { - FormControlLabel, - Checkbox, - Box -} from "@mui/material"; -import { Controller } from "react-hook-form"; +import { FormControlLabel, Checkbox, Box } from '@mui/material' +import { Controller } from 'react-hook-form' import type { Spec } from './basic-types' @@ -13,32 +9,32 @@ import { Default, Exact, Gubu, Skip } from 'gubu' const CMPNAME = 'BasicEntitySliderField' const { Open } = Gubu -const BasicEntityCheckboxFieldSpecShape = Gubu(Open({ - field: Open({ - id: String, - name: String, - kind: Skip(String), - label: Default('', String), - ux: Open({ - kind: Exact('Checkbox'), - edit: Default(true), - props: Open({}), +const BasicEntityCheckboxFieldSpecShape = Gubu( + Open({ + field: Open({ + id: String, + name: String, + kind: Skip(String), + label: Default('', String), + ux: Open({ + kind: Exact('Checkbox'), + edit: Default(true), + props: Open({}) + }) }) }), -}), {name: CMPNAME}) + { name: CMPNAME } +) -function BasicEntityCheckboxField(props: any) { - const { spec } = props; +function BasicEntityCheckboxField (props: any) { + const { spec } = props const basicEntityCheckboxField: Spec = BasicEntityCheckboxFieldSpecShape(spec) const { control, field, getValues } = basicEntityCheckboxField const val = getValues(field.name) return ( - + - ); + ) } -export { BasicEntityCheckboxField }; \ No newline at end of file +export { BasicEntityCheckboxField } diff --git a/src/lib/BasicEntityDateField.tsx b/src/lib/BasicEntityDateField.tsx index 814b454..e59065f 100644 --- a/src/lib/BasicEntityDateField.tsx +++ b/src/lib/BasicEntityDateField.tsx @@ -1,5 +1,5 @@ import React from 'react' -import { TextField } from "@mui/material" +import { TextField } from '@mui/material' import type { Spec } from './basic-types' @@ -7,42 +7,45 @@ import { Default, Exact, Gubu, Skip } from 'gubu' const CMPNAME = 'BasicEntityDateField' const { Open } = Gubu -const BasicEntityDateFieldSpecShape = Gubu(Open({ - field: Open({ - id: String, - name: String, - kind: Skip(String), - label: Default('', String), - ux: Open({ - kind: Exact('Date'), - edit: Default(true), - props: Open({}) +const BasicEntityDateFieldSpecShape = Gubu( + Open({ + field: Open({ + id: String, + name: String, + kind: Skip(String), + label: Default('', String), + ux: Open({ + kind: Exact('Date'), + edit: Default(true), + props: Open({}) + }) }) - }) -}), {name: CMPNAME}) + }), + { name: CMPNAME } +) function BasicEntityDateField (props: any) { - const { spec } = props - - const basicEntityDateField: Spec = BasicEntityDateFieldSpecShape(spec) - const { field, getValues, register } = basicEntityDateField - const val = getValues(field.name) - - return ( -
- 0 }} - {...register(field.name)} - /> -
- ) - } + const { spec } = props - export { BasicEntityDateField } \ No newline at end of file + const basicEntityDateField: Spec = BasicEntityDateFieldSpecShape(spec) + const { field, getValues, register } = basicEntityDateField + const val = getValues(field.name) + + return ( +
+ 0 }} + {...register(field.name)} + /> +
+ ) +} + +export { BasicEntityDateField } diff --git a/src/lib/BasicEntityDateTimeField.tsx b/src/lib/BasicEntityDateTimeField.tsx index 06abe20..04a41b3 100644 --- a/src/lib/BasicEntityDateTimeField.tsx +++ b/src/lib/BasicEntityDateTimeField.tsx @@ -1,5 +1,5 @@ import React from 'react' -import { TextField } from "@mui/material" +import { TextField } from '@mui/material' import type { Spec } from './basic-types' @@ -7,44 +7,46 @@ import { Default, Exact, Gubu, Skip } from 'gubu' const CMPNAME = 'BasicEntityDateTimeField' const { Open } = Gubu -const BasicEntityDateTimeFieldSpecShape = Gubu(Open({ - field: Open({ - id: String, - name: String, - kind: Skip(String), - label: Default('', String), - ux: Open({ - kind: Exact('DateTime'), - edit: Default(true), - props: Open({}) +const BasicEntityDateTimeFieldSpecShape = Gubu( + Open({ + field: Open({ + id: String, + name: String, + kind: Skip(String), + label: Default('', String), + ux: Open({ + kind: Exact('DateTime'), + edit: Default(true), + props: Open({}) + }) }) - }) -}), {name: CMPNAME}) - + }), + { name: CMPNAME } +) function BasicEntityDateTimeField (props: any) { - const { spec } = props - - const basicEntityDateTimeField: Spec = BasicEntityDateTimeFieldSpecShape(spec) - const { field, getValues, register } = basicEntityDateTimeField - - const val = getValues(field.name) - - return ( -
- 0 }} - {...register(field.name)} - /> -
- ) - } - - export { BasicEntityDateTimeField } \ No newline at end of file + const { spec } = props + + const basicEntityDateTimeField: Spec = BasicEntityDateTimeFieldSpecShape(spec) + const { field, getValues, register } = basicEntityDateTimeField + + const val = getValues(field.name) + + return ( +
+ 0 }} + {...register(field.name)} + /> +
+ ) +} + +export { BasicEntityDateTimeField } diff --git a/src/lib/BasicEntityEdit.tsx b/src/lib/BasicEntityEdit.tsx index 391dd3c..46abf7e 100644 --- a/src/lib/BasicEntityEdit.tsx +++ b/src/lib/BasicEntityEdit.tsx @@ -4,108 +4,110 @@ import { useSelector } from 'react-redux' import { useParams } from 'react-router-dom' - -import { - Box, - Grid, - Button, - Toolbar, -} from '@mui/material' +import { Box, Grid, Button, Toolbar } from '@mui/material' import { useForm } from 'react-hook-form' - import { BasicEntityField } from './BasicEntityField' - import { VxgBasicEntityEditPlugin } from './VxgBasicEntityEditPlugin' - const CMPNAME = 'BasicEntityEdit' - // TODO: make this debuggable -const makeResolver = (entity:any) => useCallback(async (data:any) => { - // const shape = entity.valid$({shape:true}) - entity = entity.make$().data$(data) - let errors = entity.valid$({errors:true}) - - // TODO: use a seneca sub message to provide errors for other uses - debugging etc. - - // TODO: need a better way to access this; also namespaced! - const errmsg = entity.private$.get_instance().context.errmsg - console.log('ERRORS', errors, 'ERRMSG', errmsg.print()) - - errors = errors - .map((e:any)=>(e.tag_kind='ent',e)) - .reduce((a:any,e:any,_:any)=>(a[e.key]={ - type: e.type, - message: errmsg ? ((_=errmsg.find(e))?_.text:e.text) : e.text - },a),{}) - - const values = entity.data$(false) - const out = { - values, - errors, - } +const makeResolver = (entity: any) => + useCallback( + async (data: any) => { + // const shape = entity.valid$({shape:true}) + entity = entity.make$().data$(data) + let errors = entity.valid$({ errors: true }) + + // TODO: use a seneca sub message to provide errors for other uses - debugging etc. + + // TODO: need a better way to access this; also namespaced! + const errmsg = entity.private$.get_instance().context.errmsg + console.log('ERRORS', errors, 'ERRMSG', errmsg.print()) + + errors = errors + .map((e: any) => ((e.tag_kind = 'ent'), e)) + .reduce( + (a: any, e: any, _: any) => ( + (a[e.key] = { + type: e.type, + message: errmsg + ? (_ = errmsg.find(e)) + ? _.text + : e.text + : e.text + }), + a + ), + {} + ) + + const values = entity.data$(false) + const out = { + values, + errors + } - console.log('ERROUT', out) - - return out -}, [entity.entity$]) + console.log('ERROUT', out) + return out + }, + [entity.entity$] + ) function BasicEntityEdit (props: any) { const { ctx } = props const { seneca } = ctx() - // const query = useSelector((state:any)=>state.main.current.view.query) - - const [plugin,setPlugin] = useState(false) + + const [plugin, setPlugin] = useState(false) const [ready, setReady] = useState(false) - - useEffect(()=>{ - if(!plugin) { + + useEffect(() => { + if (!plugin) { seneca.use({ tag: props.spec.name, define: VxgBasicEntityEditPlugin, options: { spec: props.spec, - setPlugin, + setPlugin } }) } - },[]) + }, []) - - const { spec, slot, fields } = - seneca.export('VxgBasicEntityEditPlugin/handle') || - { spec: {}, slot: null, fields: [] } + const { spec, slot, fields } = seneca.export( + 'VxgBasicEntityEditPlugin/handle' + ) || { spec: {}, slot: null, fields: [] } const { ent, name } = spec - if(plugin && !ready) { - seneca.act('aim:app,on:BasicLed,ready:edit',{view:name,setReady}) + if (plugin && !ready) { + seneca.act('aim:app,on:BasicLed,ready:edit', { view: name, setReady }) } const slotSelectors = seneca.export('Redux/slotSelectors') let { selectItem, selectList, selectMeta } = slotSelectors(slot) - let item = useSelector((state:any)=>selectItem(state)) + let item = useSelector((state: any) => selectItem(state)) - if(item && name) { - item = - seneca.direct('aim:app,on:BasicLed,modify:edit', { - view:name, item, fields + if (item && name) { + item = seneca.direct('aim:app,on:BasicLed,modify:edit', { + view: name, + item, + fields }) } const params: any = useParams() - useEffect(()=>{ - if(ready) { - if(null == item && null != params.item) { + useEffect(() => { + if (ready) { + if (null == item && null != params.item) { seneca.act('aim:app,on:BasicLed,edit:item', { view: name, fields, @@ -114,8 +116,7 @@ function BasicEntityEdit (props: any) { } reset(item) } - },[null==item,ready]) - + }, [null == item, ready]) const resolver = makeResolver(seneca.entity(ent)) @@ -125,57 +126,53 @@ function BasicEntityEdit (props: any) { getValues, reset, control, - formState: { errors }, + formState: { errors } } = useForm({ mode: 'onChange', - resolver, + resolver }) - const onSubmit = (data:any) => { - seneca.act('aim:app,on:BasicLed,save:item',{view:name,data}) + const onSubmit = (data: any) => { + seneca.act('aim:app,on:BasicLed,save:item', { view: name, data }) } - + return ( - { item ? -
- - - { fields.map((field:any)=> - - - - - )} - - - { /*

errors: {JSON.stringify(errors)}

*/ } - - - - -
- : <> } + {item ? ( +
+ + {fields.map((field: any) => ( + + + + ))} + + + {/*

errors: {JSON.stringify(errors)}

*/} + + + + +
+ ) : ( + <> + )}
) } - - -export { - BasicEntityEdit -} +export { BasicEntityEdit } diff --git a/src/lib/BasicEntityField.tsx b/src/lib/BasicEntityField.tsx index 7981f18..935702b 100644 --- a/src/lib/BasicEntityField.tsx +++ b/src/lib/BasicEntityField.tsx @@ -1,50 +1,50 @@ -import React from "react"; +import React from 'react' -import type { Spec } from "./basic-types"; +import type { Spec } from './basic-types' -import { Default, Exact, Gubu, Skip } from "gubu"; -import { BasicEntityCheckboxField } from "./BasicEntityCheckboxField"; -import { BasicEntityAutocompleteField } from "./BasicEntityAutocompleteField"; -import { BasicEntitySliderField } from "./BasicEntitySliderField"; -import { BasicEntityRadioGroupField } from "./BasicEntityRadioGroupField"; -import { BasicEntityTextBoxField } from "./BasicEntityTextBoxField"; -import { BasicEntityTextField } from "./BasicEntityTextField"; -import { BasicEntityDateField } from "./BasicEntityDateField"; -import { BasicEntityTimeField } from "./BasicEntityTimeField"; -import { BasicEntityDateTimeField } from "./BasicEntityDateTimeField"; -import { BasicEntityRatingField } from "./BasicEntityRatingField"; +import { Default, Exact, Gubu, Skip } from 'gubu' +import { BasicEntityCheckboxField } from './BasicEntityCheckboxField' +import { BasicEntityAutocompleteField } from './BasicEntityAutocompleteField' +import { BasicEntitySliderField } from './BasicEntitySliderField' +import { BasicEntityRadioGroupField } from './BasicEntityRadioGroupField' +import { BasicEntityTextBoxField } from './BasicEntityTextBoxField' +import { BasicEntityTextField } from './BasicEntityTextField' +import { BasicEntityDateField } from './BasicEntityDateField' +import { BasicEntityTimeField } from './BasicEntityTimeField' +import { BasicEntityDateTimeField } from './BasicEntityDateTimeField' +import { BasicEntityRatingField } from './BasicEntityRatingField' -const CMPNAME = "BasicEntityField"; +const CMPNAME = 'BasicEntityField' -const { Open } = Gubu; +const { Open } = Gubu const BasicEntityFieldSpecShape = Gubu( Open({ field: Open({ id: String, name: String, kind: Skip(String), - label: Default("", String), + label: Default('', String), ux: Open({ kind: Exact( - "Text", - "TextBox", - "Date", - "DateTime", - "Time", - "Checkbox", - "Autocomplete", - "Slider", - "RadioGroup", - "Rating" + 'Text', + 'TextBox', + 'Date', + 'DateTime', + 'Time', + 'Checkbox', + 'Autocomplete', + 'Slider', + 'RadioGroup', + 'Rating' ), edit: Default(true), rows: Default(3), - props: Open({}), - }), - }), + props: Open({}) + }) + }) }), { name: CMPNAME } -); +) const fieldMap: any = { Text: BasicEntityTextField, @@ -56,19 +56,19 @@ const fieldMap: any = { Autocomplete: BasicEntityAutocompleteField, Slider: BasicEntitySliderField, RadioGroup: BasicEntityRadioGroupField, - Rating: BasicEntityRatingField, -}; + Rating: BasicEntityRatingField +} -function BasicEntityField(props: any) { - const { ctx, spec } = props; +function BasicEntityField (props: any) { + const { ctx, spec } = props - const basicEntityFieldSpec: Spec = BasicEntityFieldSpecShape(spec); - const field: any = basicEntityFieldSpec.field; - const Field: any = fieldMap[field.ux.kind]; + const basicEntityFieldSpec: Spec = BasicEntityFieldSpecShape(spec) + const field: any = basicEntityFieldSpec.field + const Field: any = fieldMap[field.ux.kind] // console.log('BEF ERR', spec) - return ; + return } /* @@ -126,4 +126,4 @@ https://mui.com/material-ui/react-grid/ */ -export { BasicEntityField }; +export { BasicEntityField } diff --git a/src/lib/BasicEntityFieldError.tsx b/src/lib/BasicEntityFieldError.tsx index 9fafa23..238d380 100644 --- a/src/lib/BasicEntityFieldError.tsx +++ b/src/lib/BasicEntityFieldError.tsx @@ -1,10 +1,12 @@ import React from 'react' function BasicEntityFieldError (props: any) { - const { err } = props - return err ? -
{err.message}
: -
+ const { err } = props + return err ? ( +
{err.message}
+ ) : ( +
+ ) } -export { BasicEntityFieldError } \ No newline at end of file +export { BasicEntityFieldError } diff --git a/src/lib/BasicEntityRadioGroupField.tsx b/src/lib/BasicEntityRadioGroupField.tsx index e6cebd1..832f49c 100644 --- a/src/lib/BasicEntityRadioGroupField.tsx +++ b/src/lib/BasicEntityRadioGroupField.tsx @@ -1,7 +1,7 @@ -import React, { useEffect, forwardRef } from "react"; +import React, { useEffect, forwardRef } from 'react' -import { FormControlLabel, RadioGroup, Radio, FormLabel } from "@mui/material"; -import { Controller } from "react-hook-form"; +import { FormControlLabel, RadioGroup, Radio, FormLabel } from '@mui/material' +import { Controller } from 'react-hook-form' import type { Spec } from './basic-types' @@ -9,34 +9,38 @@ import { Default, Exact, Gubu, Skip } from 'gubu' const CMPNAME = 'BasicEntitySliderField' const { Open } = Gubu -const BasicEntityRadioGroupFieldSpecShape = Gubu(Open({ - field: Open({ - id: String, - name: String, - kind: Skip(String), - label: Default('', String), - ux: Open({ - kind: Exact('RadioGroup'), - edit: Default(true), - direction: Exact('row', 'column').Default('row'), - }), - options: Open({ - label: { field: Default('label') }, - value: { field: Default('value') }, - default: Open({}), - ents: Open({}) +const BasicEntityRadioGroupFieldSpecShape = Gubu( + Open({ + field: Open({ + id: String, + name: String, + kind: Skip(String), + label: Default('', String), + ux: Open({ + kind: Exact('RadioGroup'), + edit: Default(true), + direction: Exact('row', 'column').Default('row') + }), + options: Open({ + label: { field: Default('label') }, + value: { field: Default('value') }, + default: Open({}), + ents: Open({}) + }) }) - }) -}), {name: CMPNAME}) + }), + { name: CMPNAME } +) -function BasicEntityRadioGroupField(props: any) { - const { spec } = props; +function BasicEntityRadioGroupField (props: any) { + const { spec } = props - const basicEntityRadioGroupField: Spec = BasicEntityRadioGroupFieldSpecShape(spec) + const basicEntityRadioGroupField: Spec = + BasicEntityRadioGroupFieldSpecShape(spec) const { control, field } = basicEntityRadioGroupField - const { resolvedOptions, resolvedDefault } = resolveOptions(field.options); - + const { resolvedOptions, resolvedDefault } = resolveOptions(field.options) + return ( <> {field.label} @@ -46,7 +50,12 @@ function BasicEntityRadioGroupField(props: any) { control={control} defaultValue={resolvedDefault} render={({ field: { onChange, value } }) => ( - + {resolvedOptions.map((option: any) => ( ({ [labelField]: ents?.[key]?.[labelField], [valueField]: key - })); + })) - let resolvedDefault; + let resolvedDefault if (multiple === false) { if (Object.keys(defaultValues).length > 0) { - const firstKey = Object.keys(defaultValues)[0]; - resolvedDefault = { value: firstKey, label: defaultValues[firstKey][labelField] }; + const firstKey = Object.keys(defaultValues)[0] + resolvedDefault = { + value: firstKey, + label: defaultValues[firstKey][labelField] + } } else { - resolvedDefault = null; + resolvedDefault = null } } else { resolvedDefault = Object.keys(defaultValues).map(key => ({ label: defaultValues[key].label, value: key - })); + })) } return { resolvedOptions, resolvedDefault - }; + } } -export { BasicEntityRadioGroupField }; +export { BasicEntityRadioGroupField } diff --git a/src/lib/BasicEntityRatingField.tsx b/src/lib/BasicEntityRatingField.tsx index 63d25e1..fe91b49 100644 --- a/src/lib/BasicEntityRatingField.tsx +++ b/src/lib/BasicEntityRatingField.tsx @@ -1,50 +1,50 @@ -import React, { useEffect, forwardRef } from "react"; +import React, { useEffect, forwardRef } from 'react' import { FormControlLabel, Checkbox, Box, Rating, - FormLabel, -} from "@mui/material"; -import { Controller } from "react-hook-form"; + FormLabel +} from '@mui/material' +import { Controller } from 'react-hook-form' -import type { Spec } from "./basic-types"; +import type { Spec } from './basic-types' -import { Default, Exact, Gubu, Skip } from "gubu"; -const CMPNAME = "BasicEntitySliderField"; +import { Default, Exact, Gubu, Skip } from 'gubu' +const CMPNAME = 'BasicEntitySliderField' -const { Open } = Gubu; +const { Open } = Gubu const BasicEntityRatingFieldSpecShape = Gubu( Open({ field: Open({ id: String, name: String, kind: Skip(String), - label: Default("", String), + label: Default('', String), ux: Open({ - kind: Exact("Rating"), + kind: Exact('Rating'), edit: Default(true), precision: 1, - props: Open({}), - }), - }), + props: Open({}) + }) + }) }), { name: CMPNAME } -); +) -function BasicEntityRatingField(props: any) { - const { spec } = props; +function BasicEntityRatingField (props: any) { + const { spec } = props - const basicEntityRatingField: Spec = BasicEntityRatingFieldSpecShape(spec); - const { control, field, getValues } = basicEntityRatingField; - const val = getValues(field.name); + const basicEntityRatingField: Spec = BasicEntityRatingFieldSpecShape(spec) + const { control, field, getValues } = basicEntityRatingField + const val = getValues(field.name) // console.log("BasicEntityRatingField", "val", val); return (
- {field.label} + {field.label}
- ); + ) } -export { BasicEntityRatingField }; +export { BasicEntityRatingField } diff --git a/src/lib/BasicEntitySliderField.tsx b/src/lib/BasicEntitySliderField.tsx index d307b0e..6fe8b94 100644 --- a/src/lib/BasicEntitySliderField.tsx +++ b/src/lib/BasicEntitySliderField.tsx @@ -1,7 +1,7 @@ -import React, { useEffect, forwardRef } from "react"; +import React, { useEffect, forwardRef } from 'react' -import { FormLabel, Slider } from "@mui/material"; -import { Controller } from "react-hook-form"; +import { FormLabel, Slider } from '@mui/material' +import { Controller } from 'react-hook-form' import type { Spec } from './basic-types' @@ -9,74 +9,83 @@ import { Default, Exact, Gubu, Skip } from 'gubu' const CMPNAME = 'BasicEntitySliderField' const { Open } = Gubu -const BasicEntitySliderFieldSpecShape = Gubu(Open({ - field: Open({ - id: String, - name: String, - kind: Skip(String), - label: Default('', String), - ux: Open({ - kind: Exact('Slider'), - edit: Default(true), - step: Default(1), - min: Default(0), - max: Default(100), - props: { - marks: Default({}), - valueLabelDisplay: Exact('on', 'auto', 'off').Default('auto'), - direction: Exact('horizontal', 'vertical').Default('horizontal'), - track: Exact('normal', 'inverted', 'disabled').Default('normal'), - }, +const BasicEntitySliderFieldSpecShape = Gubu( + Open({ + field: Open({ + id: String, + name: String, + kind: Skip(String), + label: Default('', String), + ux: Open({ + kind: Exact('Slider'), + edit: Default(true), + step: Default(1), + min: Default(0), + max: Default(100), + props: { + marks: Default({}), + valueLabelDisplay: Exact('on', 'auto', 'off').Default('auto'), + direction: Exact('horizontal', 'vertical').Default('horizontal'), + track: Exact('normal', 'inverted', 'disabled').Default('normal') + } + }) }) - }) -}), {name: CMPNAME}) + }), + { name: CMPNAME } +) -function BasicEntitySliderField(props: any) { +function BasicEntitySliderField (props: any) { const { spec } = props - const basicEntityAutocompleteField: Spec = BasicEntitySliderFieldSpecShape(spec) + const basicEntityAutocompleteField: Spec = + BasicEntitySliderFieldSpecShape(spec) const { control, field, getValues } = basicEntityAutocompleteField const val = getValues(field.name) -// console.log('BESF', field, val) + // console.log('BESF', field, val) - return ( - <> - {field.label} - ( - onChange(newVal)} - /> - )} - /> - + return ( + <> + {field.label} + ( + onChange(newVal)} + /> + )} + /> + ) } -function resolveMarks(marks: any) { - if (!marks || (typeof marks === 'object' && Object.keys(marks).length === 0)) { - return false; +function resolveMarks (marks: any) { + if ( + !marks || + (typeof marks === 'object' && Object.keys(marks).length === 0) + ) { + return false } if (typeof marks === 'object') { - return Object.entries(marks).map(([key, value]) => ({ label: value, value: +key })); + return Object.entries(marks).map(([key, value]) => ({ + label: value, + value: +key + })) } return marks } - -export { BasicEntitySliderField } \ No newline at end of file +export { BasicEntitySliderField } diff --git a/src/lib/BasicEntityTextBoxField.tsx b/src/lib/BasicEntityTextBoxField.tsx index 4856a8c..2df5267 100644 --- a/src/lib/BasicEntityTextBoxField.tsx +++ b/src/lib/BasicEntityTextBoxField.tsx @@ -1,5 +1,5 @@ import React from 'react' -import { TextField } from "@mui/material" +import { TextField } from '@mui/material' import type { Spec } from './basic-types' @@ -7,43 +7,45 @@ import { Default, Exact, Gubu, Skip } from 'gubu' const CMPNAME = 'BasicEntityTextBoxField' const { Open } = Gubu -const BasicEntityTextBoxFieldSpecShape = Gubu(Open({ - field: Open({ - id: String, - name: String, - kind: Skip(String), - label: Default('', String), - ux: Open({ - kind: Exact('TextBox'), - edit: Default(true), - props: Open({}) +const BasicEntityTextBoxFieldSpecShape = Gubu( + Open({ + field: Open({ + id: String, + name: String, + kind: Skip(String), + label: Default('', String), + ux: Open({ + kind: Exact('TextBox'), + edit: Default(true), + props: Open({}) + }) }) - }) -}), {name: CMPNAME}) - + }), + { name: CMPNAME } +) function BasicEntityTextBoxField (props: any) { - const { spec } = props - - const basicEntityTextBoxField: Spec = BasicEntityTextBoxFieldSpecShape(spec) - const { field, getValues, register } = basicEntityTextBoxField - const val = getValues(field.name) - - return ( -
- 0 }} - {...register(field.name)} - /> -
- ) - } + const { spec } = props + + const basicEntityTextBoxField: Spec = BasicEntityTextBoxFieldSpecShape(spec) + const { field, getValues, register } = basicEntityTextBoxField + const val = getValues(field.name) + + return ( +
+ 0 }} + {...register(field.name)} + /> +
+ ) +} - export { BasicEntityTextBoxField } \ No newline at end of file +export { BasicEntityTextBoxField } diff --git a/src/lib/BasicEntityTextField.tsx b/src/lib/BasicEntityTextField.tsx index fc497a2..8b46b36 100644 --- a/src/lib/BasicEntityTextField.tsx +++ b/src/lib/BasicEntityTextField.tsx @@ -1,5 +1,5 @@ import React from 'react' -import { TextField } from "@mui/material" +import { TextField } from '@mui/material' import type { Spec } from './basic-types' @@ -8,44 +8,47 @@ import { BasicEntityFieldError } from './BasicEntityFieldError' const CMPNAME = 'BasicEntityTextField' const { Open } = Gubu -const BasicEntityTextFieldSpecShape = Gubu(Open({ - field: Open({ - id: String, - name: String, - kind: Skip(String), - label: Default('', String), - ux: Open({ - kind: Exact('Text'), - edit: Default(true), - props: Open({}) +const BasicEntityTextFieldSpecShape = Gubu( + Open({ + field: Open({ + id: String, + name: String, + kind: Skip(String), + label: Default('', String), + ux: Open({ + kind: Exact('Text'), + edit: Default(true), + props: Open({}) + }) }) - }) -}), {name: CMPNAME}) + }), + { name: CMPNAME } +) function BasicEntityTextField (props: any) { - const { spec } = props - - const basicEntityTextBoxField: Spec = BasicEntityTextFieldSpecShape(spec) - const { field, getValues, register, errors } = basicEntityTextBoxField - const val = getValues(field.name) - - const err = errors[field.name] - // console.log('BET', err, field.name, errors) - - return ( -
- 0 }} - {...register(field.name)} - /> - -
- ) - } - - export { BasicEntityTextField } \ No newline at end of file + const { spec } = props + + const basicEntityTextBoxField: Spec = BasicEntityTextFieldSpecShape(spec) + const { field, getValues, register, errors } = basicEntityTextBoxField + const val = getValues(field.name) + + const err = errors[field.name] + // console.log('BET', err, field.name, errors) + + return ( +
+ 0 }} + {...register(field.name)} + /> + +
+ ) +} + +export { BasicEntityTextField } diff --git a/src/lib/BasicEntityTimeField.tsx b/src/lib/BasicEntityTimeField.tsx index 6316f6b..6602ddf 100644 --- a/src/lib/BasicEntityTimeField.tsx +++ b/src/lib/BasicEntityTimeField.tsx @@ -1,5 +1,5 @@ import React from 'react' -import { TextField } from "@mui/material" +import { TextField } from '@mui/material' import type { Spec } from './basic-types' @@ -7,43 +7,46 @@ import { Default, Exact, Gubu, Skip } from 'gubu' const CMPNAME = 'BasicEntityTimeField' const { Open } = Gubu -const BasicEntityTimeFieldSpecShape = Gubu(Open({ - field: Open({ - id: String, - name: String, - kind: Skip(String), - label: Default('', String), - ux: Open({ - kind: Exact('Time'), - edit: Default(true), - props: Open({}) +const BasicEntityTimeFieldSpecShape = Gubu( + Open({ + field: Open({ + id: String, + name: String, + kind: Skip(String), + label: Default('', String), + ux: Open({ + kind: Exact('Time'), + edit: Default(true), + props: Open({}) + }) }) - }) -}), {name: CMPNAME}) + }), + { name: CMPNAME } +) function BasicEntityTimeField (props: any) { - const { spec } = props - - const basicEntityTimeField: Spec = BasicEntityTimeFieldSpecShape(spec) - const { field, getValues, register } = basicEntityTimeField - - const val = getValues(field.name) - - return ( -
- 0 }} - {...register(field.name)} - /> -
- ) - } - - export { BasicEntityTimeField } \ No newline at end of file + const { spec } = props + + const basicEntityTimeField: Spec = BasicEntityTimeFieldSpecShape(spec) + const { field, getValues, register } = basicEntityTimeField + + const val = getValues(field.name) + + return ( +
+ 0 }} + {...register(field.name)} + /> +
+ ) +} + +export { BasicEntityTimeField } From d5c0aebdc0bc0005505ea729aed329d9e37881c7 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Fri, 26 Jul 2024 20:20:58 +0100 Subject: [PATCH 044/122] Reformat code with vscode prettier --- .prettierrc | 12 +++ src/lib/BasicEntityAutocompleteField.tsx | 6 +- src/lib/BasicEntityCheckboxField.tsx | 2 +- src/lib/BasicEntityDateField.tsx | 2 +- src/lib/BasicEntityDateTimeField.tsx | 2 +- src/lib/BasicEntityEdit.tsx | 114 ++++++++++++----------- src/lib/BasicEntityField.tsx | 2 +- src/lib/BasicEntityFieldError.tsx | 2 +- src/lib/BasicEntityRadioGroupField.tsx | 4 +- src/lib/BasicEntityRatingField.tsx | 2 +- src/lib/BasicEntitySliderField.tsx | 4 +- src/lib/BasicEntityTextBoxField.tsx | 2 +- src/lib/BasicEntityTextField.tsx | 2 +- src/lib/BasicEntityTimeField.tsx | 2 +- 14 files changed, 87 insertions(+), 71 deletions(-) create mode 100644 .prettierrc diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..96237a6 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,12 @@ +{ + "semi": true, + "singleQuote": true, + "trailingComma": "es5", + "printWidth": 80, + "tabWidth": 2, + "useTabs": false, + "bracketSpacing": true, + "jsxBracketSameLine": false, + "arrowParens": "always", + "endOfLine": "lf" +} diff --git a/src/lib/BasicEntityAutocompleteField.tsx b/src/lib/BasicEntityAutocompleteField.tsx index cfc095c..efb1563 100644 --- a/src/lib/BasicEntityAutocompleteField.tsx +++ b/src/lib/BasicEntityAutocompleteField.tsx @@ -32,7 +32,7 @@ const BasicEntityAutocompleteFieldSpecShape = Gubu( { name: CMPNAME } ) -function BasicEntityAutocompleteField (props: any) { +function BasicEntityAutocompleteField(props: any) { const { spec } = props const basicEntityAutocompleteField: Spec = @@ -72,7 +72,7 @@ function BasicEntityAutocompleteField (props: any) { } // Returns array of options and default value(s) based on the options object -function resolveOptions (options: any) { +function resolveOptions(options: any) { const { multiple, ents, label, value, default: defaultValues } = options const labelField = label?.field const valueField = value?.field @@ -107,7 +107,7 @@ function resolveOptions (options: any) { } } -function resolveValue (options: any, val: any) { +function resolveValue(options: any, val: any) { const { multiple, ents, label, value } = options const labelField = label?.field const valueField = value?.field diff --git a/src/lib/BasicEntityCheckboxField.tsx b/src/lib/BasicEntityCheckboxField.tsx index 0a2a31d..e888d7e 100644 --- a/src/lib/BasicEntityCheckboxField.tsx +++ b/src/lib/BasicEntityCheckboxField.tsx @@ -26,7 +26,7 @@ const BasicEntityCheckboxFieldSpecShape = Gubu( { name: CMPNAME } ) -function BasicEntityCheckboxField (props: any) { +function BasicEntityCheckboxField(props: any) { const { spec } = props const basicEntityCheckboxField: Spec = BasicEntityCheckboxFieldSpecShape(spec) diff --git a/src/lib/BasicEntityDateField.tsx b/src/lib/BasicEntityDateField.tsx index e59065f..d696a25 100644 --- a/src/lib/BasicEntityDateField.tsx +++ b/src/lib/BasicEntityDateField.tsx @@ -24,7 +24,7 @@ const BasicEntityDateFieldSpecShape = Gubu( { name: CMPNAME } ) -function BasicEntityDateField (props: any) { +function BasicEntityDateField(props: any) { const { spec } = props const basicEntityDateField: Spec = BasicEntityDateFieldSpecShape(spec) diff --git a/src/lib/BasicEntityDateTimeField.tsx b/src/lib/BasicEntityDateTimeField.tsx index 04a41b3..1ff6ad8 100644 --- a/src/lib/BasicEntityDateTimeField.tsx +++ b/src/lib/BasicEntityDateTimeField.tsx @@ -24,7 +24,7 @@ const BasicEntityDateTimeFieldSpecShape = Gubu( { name: CMPNAME } ) -function BasicEntityDateTimeField (props: any) { +function BasicEntityDateTimeField(props: any) { const { spec } = props const basicEntityDateTimeField: Spec = BasicEntityDateTimeFieldSpecShape(spec) diff --git a/src/lib/BasicEntityEdit.tsx b/src/lib/BasicEntityEdit.tsx index 46abf7e..8781f23 100644 --- a/src/lib/BasicEntityEdit.tsx +++ b/src/lib/BasicEntityEdit.tsx @@ -1,32 +1,32 @@ -import React, { useEffect, useState, useCallback } from 'react' +import React, { useEffect, useState, useCallback } from 'react'; -import { useSelector } from 'react-redux' +import { useSelector } from 'react-redux'; -import { useParams } from 'react-router-dom' +import { useParams } from 'react-router-dom'; -import { Box, Grid, Button, Toolbar } from '@mui/material' +import { Box, Grid, Button, Toolbar } from '@mui/material'; -import { useForm } from 'react-hook-form' +import { useForm } from 'react-hook-form'; -import { BasicEntityField } from './BasicEntityField' +import { BasicEntityField } from './BasicEntityField'; -import { VxgBasicEntityEditPlugin } from './VxgBasicEntityEditPlugin' +import { VxgBasicEntityEditPlugin } from './VxgBasicEntityEditPlugin'; -const CMPNAME = 'BasicEntityEdit' +const CMPNAME = 'BasicEntityEdit'; // TODO: make this debuggable const makeResolver = (entity: any) => useCallback( async (data: any) => { // const shape = entity.valid$({shape:true}) - entity = entity.make$().data$(data) - let errors = entity.valid$({ errors: true }) + entity = entity.make$().data$(data); + let errors = entity.valid$({ errors: true }); // TODO: use a seneca sub message to provide errors for other uses - debugging etc. // TODO: need a better way to access this; also namespaced! - const errmsg = entity.private$.get_instance().context.errmsg - console.log('ERRORS', errors, 'ERRMSG', errmsg.print()) + const errmsg = entity.private$.get_instance().context.errmsg; + console.log('ERRORS', errors, 'ERRMSG', errmsg.print()); errors = errors .map((e: any) => ((e.tag_kind = 'ent'), e)) @@ -38,34 +38,34 @@ const makeResolver = (entity: any) => ? (_ = errmsg.find(e)) ? _.text : e.text - : e.text + : e.text, }), a ), {} - ) + ); - const values = entity.data$(false) + const values = entity.data$(false); const out = { values, - errors - } + errors, + }; - console.log('ERROUT', out) + console.log('ERROUT', out); - return out + return out; }, [entity.entity$] - ) + ); -function BasicEntityEdit (props: any) { - const { ctx } = props - const { seneca } = ctx() +function BasicEntityEdit(props: any) { + const { ctx } = props; + const { seneca } = ctx(); // const query = useSelector((state:any)=>state.main.current.view.query) - const [plugin, setPlugin] = useState(false) - const [ready, setReady] = useState(false) + const [plugin, setPlugin] = useState(false); + const [ready, setReady] = useState(false); useEffect(() => { if (!plugin) { @@ -74,36 +74,40 @@ function BasicEntityEdit (props: any) { define: VxgBasicEntityEditPlugin, options: { spec: props.spec, - setPlugin - } - }) + setPlugin, + }, + }); } - }, []) + }, []); const { spec, slot, fields } = seneca.export( 'VxgBasicEntityEditPlugin/handle' - ) || { spec: {}, slot: null, fields: [] } + ) || { + spec: {}, + slot: null, + fields: [], + }; - const { ent, name } = spec + const { ent, name } = spec; if (plugin && !ready) { - seneca.act('aim:app,on:BasicLed,ready:edit', { view: name, setReady }) + seneca.act('aim:app,on:BasicLed,ready:edit', { view: name, setReady }); } - const slotSelectors = seneca.export('Redux/slotSelectors') - let { selectItem, selectList, selectMeta } = slotSelectors(slot) + const slotSelectors = seneca.export('Redux/slotSelectors'); + let { selectItem, selectList, selectMeta } = slotSelectors(slot); - let item = useSelector((state: any) => selectItem(state)) + let item = useSelector((state: any) => selectItem(state)); if (item && name) { item = seneca.direct('aim:app,on:BasicLed,modify:edit', { view: name, item, - fields - }) + fields, + }); } - const params: any = useParams() + const params: any = useParams(); useEffect(() => { if (ready) { @@ -111,14 +115,14 @@ function BasicEntityEdit (props: any) { seneca.act('aim:app,on:BasicLed,edit:item', { view: name, fields, - item_id: params.item - }) + item_id: params.item, + }); } - reset(item) + reset(item); } - }, [null == item, ready]) + }, [null == item, ready]); - const resolver = makeResolver(seneca.entity(ent)) + const resolver = makeResolver(seneca.entity(ent)); const { register, @@ -126,21 +130,21 @@ function BasicEntityEdit (props: any) { getValues, reset, control, - formState: { errors } + formState: { errors }, } = useForm({ mode: 'onChange', - resolver - }) + resolver, + }); const onSubmit = (data: any) => { - seneca.act('aim:app,on:BasicLed,save:item', { view: name, data }) - } + seneca.act('aim:app,on:BasicLed,save:item', { view: name, data }); + }; return ( - + {item ? (
@@ -153,7 +157,7 @@ function BasicEntityEdit (props: any) { register, getValues, control, - errors + errors, }} /> @@ -162,8 +166,8 @@ function BasicEntityEdit (props: any) { {/*

errors: {JSON.stringify(errors)}

*/} - - @@ -172,7 +176,7 @@ function BasicEntityEdit (props: any) { <> )} - ) + ); } -export { BasicEntityEdit } +export { BasicEntityEdit }; diff --git a/src/lib/BasicEntityField.tsx b/src/lib/BasicEntityField.tsx index 935702b..9b4fcf4 100644 --- a/src/lib/BasicEntityField.tsx +++ b/src/lib/BasicEntityField.tsx @@ -59,7 +59,7 @@ const fieldMap: any = { Rating: BasicEntityRatingField } -function BasicEntityField (props: any) { +function BasicEntityField(props: any) { const { ctx, spec } = props const basicEntityFieldSpec: Spec = BasicEntityFieldSpecShape(spec) diff --git a/src/lib/BasicEntityFieldError.tsx b/src/lib/BasicEntityFieldError.tsx index 238d380..f099ffa 100644 --- a/src/lib/BasicEntityFieldError.tsx +++ b/src/lib/BasicEntityFieldError.tsx @@ -1,6 +1,6 @@ import React from 'react' -function BasicEntityFieldError (props: any) { +function BasicEntityFieldError(props: any) { const { err } = props return err ? (
{err.message}
diff --git a/src/lib/BasicEntityRadioGroupField.tsx b/src/lib/BasicEntityRadioGroupField.tsx index 832f49c..817c09a 100644 --- a/src/lib/BasicEntityRadioGroupField.tsx +++ b/src/lib/BasicEntityRadioGroupField.tsx @@ -32,7 +32,7 @@ const BasicEntityRadioGroupFieldSpecShape = Gubu( { name: CMPNAME } ) -function BasicEntityRadioGroupField (props: any) { +function BasicEntityRadioGroupField(props: any) { const { spec } = props const basicEntityRadioGroupField: Spec = @@ -72,7 +72,7 @@ function BasicEntityRadioGroupField (props: any) { } // Returns array of options and default value(s) based on the options object -function resolveOptions (options: any) { +function resolveOptions(options: any) { const { multiple, ents, label, value, default: defaultValues } = options const labelField = label?.field const valueField = value?.field diff --git a/src/lib/BasicEntityRatingField.tsx b/src/lib/BasicEntityRatingField.tsx index fe91b49..6e7f24c 100644 --- a/src/lib/BasicEntityRatingField.tsx +++ b/src/lib/BasicEntityRatingField.tsx @@ -33,7 +33,7 @@ const BasicEntityRatingFieldSpecShape = Gubu( { name: CMPNAME } ) -function BasicEntityRatingField (props: any) { +function BasicEntityRatingField(props: any) { const { spec } = props const basicEntityRatingField: Spec = BasicEntityRatingFieldSpecShape(spec) diff --git a/src/lib/BasicEntitySliderField.tsx b/src/lib/BasicEntitySliderField.tsx index 6fe8b94..f27ad20 100644 --- a/src/lib/BasicEntitySliderField.tsx +++ b/src/lib/BasicEntitySliderField.tsx @@ -34,7 +34,7 @@ const BasicEntitySliderFieldSpecShape = Gubu( { name: CMPNAME } ) -function BasicEntitySliderField (props: any) { +function BasicEntitySliderField(props: any) { const { spec } = props const basicEntityAutocompleteField: Spec = @@ -71,7 +71,7 @@ function BasicEntitySliderField (props: any) { ) } -function resolveMarks (marks: any) { +function resolveMarks(marks: any) { if ( !marks || (typeof marks === 'object' && Object.keys(marks).length === 0) diff --git a/src/lib/BasicEntityTextBoxField.tsx b/src/lib/BasicEntityTextBoxField.tsx index 2df5267..a8c0d21 100644 --- a/src/lib/BasicEntityTextBoxField.tsx +++ b/src/lib/BasicEntityTextBoxField.tsx @@ -24,7 +24,7 @@ const BasicEntityTextBoxFieldSpecShape = Gubu( { name: CMPNAME } ) -function BasicEntityTextBoxField (props: any) { +function BasicEntityTextBoxField(props: any) { const { spec } = props const basicEntityTextBoxField: Spec = BasicEntityTextBoxFieldSpecShape(spec) diff --git a/src/lib/BasicEntityTextField.tsx b/src/lib/BasicEntityTextField.tsx index 8b46b36..81a325b 100644 --- a/src/lib/BasicEntityTextField.tsx +++ b/src/lib/BasicEntityTextField.tsx @@ -25,7 +25,7 @@ const BasicEntityTextFieldSpecShape = Gubu( { name: CMPNAME } ) -function BasicEntityTextField (props: any) { +function BasicEntityTextField(props: any) { const { spec } = props const basicEntityTextBoxField: Spec = BasicEntityTextFieldSpecShape(spec) diff --git a/src/lib/BasicEntityTimeField.tsx b/src/lib/BasicEntityTimeField.tsx index 6602ddf..75bdfda 100644 --- a/src/lib/BasicEntityTimeField.tsx +++ b/src/lib/BasicEntityTimeField.tsx @@ -24,7 +24,7 @@ const BasicEntityTimeFieldSpecShape = Gubu( { name: CMPNAME } ) -function BasicEntityTimeField (props: any) { +function BasicEntityTimeField(props: any) { const { spec } = props const basicEntityTimeField: Spec = BasicEntityTimeFieldSpecShape(spec) From dd7d9443a69647ff965f5a1235ff843cf3e1b9ee Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Fri, 26 Jul 2024 20:20:58 +0100 Subject: [PATCH 045/122] Reformat code with vscode prettier --- .prettierrc | 12 +++++++++ src/lib/BasicEntityAutocompleteField.tsx | 26 +++++++++--------- src/lib/BasicEntityCheckboxField.tsx | 8 +++--- src/lib/BasicEntityDateField.tsx | 12 ++++----- src/lib/BasicEntityDateTimeField.tsx | 12 ++++----- src/lib/BasicEntityEdit.tsx | 34 +++++++++++++----------- src/lib/BasicEntityField.tsx | 10 +++---- src/lib/BasicEntityFieldError.tsx | 6 ++--- src/lib/BasicEntityRadioGroupField.tsx | 24 ++++++++--------- src/lib/BasicEntityRatingField.tsx | 12 ++++----- src/lib/BasicEntitySliderField.tsx | 14 +++++----- src/lib/BasicEntityTextBoxField.tsx | 10 +++---- src/lib/BasicEntityTextField.tsx | 10 +++---- src/lib/BasicEntityTimeField.tsx | 12 ++++----- 14 files changed, 109 insertions(+), 93 deletions(-) create mode 100644 .prettierrc diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..b62fe30 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,12 @@ +{ + "semi": false, + "singleQuote": true, + "trailingComma": "es5", + "printWidth": 80, + "tabWidth": 2, + "useTabs": false, + "bracketSpacing": true, + "jsxBracketSameLine": false, + "arrowParens": "always", + "endOfLine": "lf" +} diff --git a/src/lib/BasicEntityAutocompleteField.tsx b/src/lib/BasicEntityAutocompleteField.tsx index cfc095c..d871bbb 100644 --- a/src/lib/BasicEntityAutocompleteField.tsx +++ b/src/lib/BasicEntityAutocompleteField.tsx @@ -21,18 +21,18 @@ const BasicEntityAutocompleteFieldSpecShape = Gubu( value: { field: Default('value') }, multiple: Default(false), default: Open({}), - ents: Open({}) + ents: Open({}), }), ux: Open({ kind: Exact('Autocomplete'), - edit: Default(true) - }) - }) + edit: Default(true), + }), + }), }), { name: CMPNAME } ) -function BasicEntityAutocompleteField (props: any) { +function BasicEntityAutocompleteField(props: any) { const { spec } = props const basicEntityAutocompleteField: Spec = @@ -72,15 +72,15 @@ function BasicEntityAutocompleteField (props: any) { } // Returns array of options and default value(s) based on the options object -function resolveOptions (options: any) { +function resolveOptions(options: any) { const { multiple, ents, label, value, default: defaultValues } = options const labelField = label?.field const valueField = value?.field // Array of options - const resolvedOptions = Object.keys(ents).map(key => ({ + const resolvedOptions = Object.keys(ents).map((key) => ({ [labelField]: ents?.[key]?.[labelField], - [valueField]: key + [valueField]: key, })) let resolvedDefault @@ -89,25 +89,25 @@ function resolveOptions (options: any) { const firstKey = Object.keys(defaultValues)[0] resolvedDefault = { value: firstKey, - label: defaultValues[firstKey][labelField] + label: defaultValues[firstKey][labelField], } } else { resolvedDefault = null } } else { - resolvedDefault = Object.keys(defaultValues).map(key => ({ + resolvedDefault = Object.keys(defaultValues).map((key) => ({ label: defaultValues[key].label, - value: key + value: key, })) } return { resolvedOptions, - resolvedDefault + resolvedDefault, } } -function resolveValue (options: any, val: any) { +function resolveValue(options: any, val: any) { const { multiple, ents, label, value } = options const labelField = label?.field const valueField = value?.field diff --git a/src/lib/BasicEntityCheckboxField.tsx b/src/lib/BasicEntityCheckboxField.tsx index 0a2a31d..18c03fc 100644 --- a/src/lib/BasicEntityCheckboxField.tsx +++ b/src/lib/BasicEntityCheckboxField.tsx @@ -19,14 +19,14 @@ const BasicEntityCheckboxFieldSpecShape = Gubu( ux: Open({ kind: Exact('Checkbox'), edit: Default(true), - props: Open({}) - }) - }) + props: Open({}), + }), + }), }), { name: CMPNAME } ) -function BasicEntityCheckboxField (props: any) { +function BasicEntityCheckboxField(props: any) { const { spec } = props const basicEntityCheckboxField: Spec = BasicEntityCheckboxFieldSpecShape(spec) diff --git a/src/lib/BasicEntityDateField.tsx b/src/lib/BasicEntityDateField.tsx index e59065f..0601af4 100644 --- a/src/lib/BasicEntityDateField.tsx +++ b/src/lib/BasicEntityDateField.tsx @@ -17,14 +17,14 @@ const BasicEntityDateFieldSpecShape = Gubu( ux: Open({ kind: Exact('Date'), edit: Default(true), - props: Open({}) - }) - }) + props: Open({}), + }), + }), }), { name: CMPNAME } ) -function BasicEntityDateField (props: any) { +function BasicEntityDateField(props: any) { const { spec } = props const basicEntityDateField: Spec = BasicEntityDateFieldSpecShape(spec) @@ -38,8 +38,8 @@ function BasicEntityDateField (props: any) { name={field.name} label={field.label} fullWidth - variant='outlined' - type='date' + variant="outlined" + type="date" disabled={!field.ux.edit} InputLabelProps={{ shrink: val?.length > 0 }} {...register(field.name)} diff --git a/src/lib/BasicEntityDateTimeField.tsx b/src/lib/BasicEntityDateTimeField.tsx index 04a41b3..41632d0 100644 --- a/src/lib/BasicEntityDateTimeField.tsx +++ b/src/lib/BasicEntityDateTimeField.tsx @@ -17,14 +17,14 @@ const BasicEntityDateTimeFieldSpecShape = Gubu( ux: Open({ kind: Exact('DateTime'), edit: Default(true), - props: Open({}) - }) - }) + props: Open({}), + }), + }), }), { name: CMPNAME } ) -function BasicEntityDateTimeField (props: any) { +function BasicEntityDateTimeField(props: any) { const { spec } = props const basicEntityDateTimeField: Spec = BasicEntityDateTimeFieldSpecShape(spec) @@ -39,8 +39,8 @@ function BasicEntityDateTimeField (props: any) { name={field.name} label={field.label} fullWidth - variant='outlined' - type='datetime-local' + variant="outlined" + type="datetime-local" disabled={!field.ux.edit} InputLabelProps={{ shrink: val?.length > 0 }} {...register(field.name)} diff --git a/src/lib/BasicEntityEdit.tsx b/src/lib/BasicEntityEdit.tsx index 46abf7e..74b4b92 100644 --- a/src/lib/BasicEntityEdit.tsx +++ b/src/lib/BasicEntityEdit.tsx @@ -38,7 +38,7 @@ const makeResolver = (entity: any) => ? (_ = errmsg.find(e)) ? _.text : e.text - : e.text + : e.text, }), a ), @@ -48,7 +48,7 @@ const makeResolver = (entity: any) => const values = entity.data$(false) const out = { values, - errors + errors, } console.log('ERROUT', out) @@ -58,7 +58,7 @@ const makeResolver = (entity: any) => [entity.entity$] ) -function BasicEntityEdit (props: any) { +function BasicEntityEdit(props: any) { const { ctx } = props const { seneca } = ctx() @@ -74,15 +74,19 @@ function BasicEntityEdit (props: any) { define: VxgBasicEntityEditPlugin, options: { spec: props.spec, - setPlugin - } + setPlugin, + }, }) } }, []) const { spec, slot, fields } = seneca.export( 'VxgBasicEntityEditPlugin/handle' - ) || { spec: {}, slot: null, fields: [] } + ) || { + spec: {}, + slot: null, + fields: [], + } const { ent, name } = spec @@ -99,7 +103,7 @@ function BasicEntityEdit (props: any) { item = seneca.direct('aim:app,on:BasicLed,modify:edit', { view: name, item, - fields + fields, }) } @@ -111,7 +115,7 @@ function BasicEntityEdit (props: any) { seneca.act('aim:app,on:BasicLed,edit:item', { view: name, fields, - item_id: params.item + item_id: params.item, }) } reset(item) @@ -126,10 +130,10 @@ function BasicEntityEdit (props: any) { getValues, reset, control, - formState: { errors } + formState: { errors }, } = useForm({ mode: 'onChange', - resolver + resolver, }) const onSubmit = (data: any) => { @@ -137,10 +141,10 @@ function BasicEntityEdit (props: any) { } return ( - + {item ? ( @@ -153,7 +157,7 @@ function BasicEntityEdit (props: any) { register, getValues, control, - errors + errors, }} /> @@ -162,8 +166,8 @@ function BasicEntityEdit (props: any) { {/*

errors: {JSON.stringify(errors)}

*/} - - diff --git a/src/lib/BasicEntityField.tsx b/src/lib/BasicEntityField.tsx index 935702b..26bb0b6 100644 --- a/src/lib/BasicEntityField.tsx +++ b/src/lib/BasicEntityField.tsx @@ -39,9 +39,9 @@ const BasicEntityFieldSpecShape = Gubu( ), edit: Default(true), rows: Default(3), - props: Open({}) - }) - }) + props: Open({}), + }), + }), }), { name: CMPNAME } ) @@ -56,10 +56,10 @@ const fieldMap: any = { Autocomplete: BasicEntityAutocompleteField, Slider: BasicEntitySliderField, RadioGroup: BasicEntityRadioGroupField, - Rating: BasicEntityRatingField + Rating: BasicEntityRatingField, } -function BasicEntityField (props: any) { +function BasicEntityField(props: any) { const { ctx, spec } = props const basicEntityFieldSpec: Spec = BasicEntityFieldSpecShape(spec) diff --git a/src/lib/BasicEntityFieldError.tsx b/src/lib/BasicEntityFieldError.tsx index 238d380..3fa4a47 100644 --- a/src/lib/BasicEntityFieldError.tsx +++ b/src/lib/BasicEntityFieldError.tsx @@ -1,11 +1,11 @@ import React from 'react' -function BasicEntityFieldError (props: any) { +function BasicEntityFieldError(props: any) { const { err } = props return err ? ( -
{err.message}
+
{err.message}
) : ( -
+
) } diff --git a/src/lib/BasicEntityRadioGroupField.tsx b/src/lib/BasicEntityRadioGroupField.tsx index 832f49c..3a83534 100644 --- a/src/lib/BasicEntityRadioGroupField.tsx +++ b/src/lib/BasicEntityRadioGroupField.tsx @@ -19,20 +19,20 @@ const BasicEntityRadioGroupFieldSpecShape = Gubu( ux: Open({ kind: Exact('RadioGroup'), edit: Default(true), - direction: Exact('row', 'column').Default('row') + direction: Exact('row', 'column').Default('row'), }), options: Open({ label: { field: Default('label') }, value: { field: Default('value') }, default: Open({}), - ents: Open({}) - }) - }) + ents: Open({}), + }), + }), }), { name: CMPNAME } ) -function BasicEntityRadioGroupField (props: any) { +function BasicEntityRadioGroupField(props: any) { const { spec } = props const basicEntityRadioGroupField: Spec = @@ -72,15 +72,15 @@ function BasicEntityRadioGroupField (props: any) { } // Returns array of options and default value(s) based on the options object -function resolveOptions (options: any) { +function resolveOptions(options: any) { const { multiple, ents, label, value, default: defaultValues } = options const labelField = label?.field const valueField = value?.field // Array of options - const resolvedOptions = Object.keys(ents).map(key => ({ + const resolvedOptions = Object.keys(ents).map((key) => ({ [labelField]: ents?.[key]?.[labelField], - [valueField]: key + [valueField]: key, })) let resolvedDefault @@ -89,21 +89,21 @@ function resolveOptions (options: any) { const firstKey = Object.keys(defaultValues)[0] resolvedDefault = { value: firstKey, - label: defaultValues[firstKey][labelField] + label: defaultValues[firstKey][labelField], } } else { resolvedDefault = null } } else { - resolvedDefault = Object.keys(defaultValues).map(key => ({ + resolvedDefault = Object.keys(defaultValues).map((key) => ({ label: defaultValues[key].label, - value: key + value: key, })) } return { resolvedOptions, - resolvedDefault + resolvedDefault, } } diff --git a/src/lib/BasicEntityRatingField.tsx b/src/lib/BasicEntityRatingField.tsx index fe91b49..2c21d76 100644 --- a/src/lib/BasicEntityRatingField.tsx +++ b/src/lib/BasicEntityRatingField.tsx @@ -5,7 +5,7 @@ import { Checkbox, Box, Rating, - FormLabel + FormLabel, } from '@mui/material' import { Controller } from 'react-hook-form' @@ -26,14 +26,14 @@ const BasicEntityRatingFieldSpecShape = Gubu( kind: Exact('Rating'), edit: Default(true), precision: 1, - props: Open({}) - }) - }) + props: Open({}), + }), + }), }), { name: CMPNAME } ) -function BasicEntityRatingField (props: any) { +function BasicEntityRatingField(props: any) { const { spec } = props const basicEntityRatingField: Spec = BasicEntityRatingFieldSpecShape(spec) @@ -44,7 +44,7 @@ function BasicEntityRatingField (props: any) { return (
- {field.label} + {field.label} ({ label: value, - value: +key + value: +key, })) } diff --git a/src/lib/BasicEntityTextBoxField.tsx b/src/lib/BasicEntityTextBoxField.tsx index 2df5267..f9a4b81 100644 --- a/src/lib/BasicEntityTextBoxField.tsx +++ b/src/lib/BasicEntityTextBoxField.tsx @@ -17,14 +17,14 @@ const BasicEntityTextBoxFieldSpecShape = Gubu( ux: Open({ kind: Exact('TextBox'), edit: Default(true), - props: Open({}) - }) - }) + props: Open({}), + }), + }), }), { name: CMPNAME } ) -function BasicEntityTextBoxField (props: any) { +function BasicEntityTextBoxField(props: any) { const { spec } = props const basicEntityTextBoxField: Spec = BasicEntityTextBoxFieldSpecShape(spec) @@ -37,7 +37,7 @@ function BasicEntityTextBoxField (props: any) { id={field.id} name={field.name} label={field.label} - variant='outlined' + variant="outlined" fullWidth multiline rows={field.ux.rows} diff --git a/src/lib/BasicEntityTextField.tsx b/src/lib/BasicEntityTextField.tsx index 8b46b36..4d8fce9 100644 --- a/src/lib/BasicEntityTextField.tsx +++ b/src/lib/BasicEntityTextField.tsx @@ -18,14 +18,14 @@ const BasicEntityTextFieldSpecShape = Gubu( ux: Open({ kind: Exact('Text'), edit: Default(true), - props: Open({}) - }) - }) + props: Open({}), + }), + }), }), { name: CMPNAME } ) -function BasicEntityTextField (props: any) { +function BasicEntityTextField(props: any) { const { spec } = props const basicEntityTextBoxField: Spec = BasicEntityTextFieldSpecShape(spec) @@ -42,7 +42,7 @@ function BasicEntityTextField (props: any) { name={field.name} label={field.label} fullWidth - variant='outlined' + variant="outlined" InputLabelProps={{ shrink: val?.length > 0 }} {...register(field.name)} /> diff --git a/src/lib/BasicEntityTimeField.tsx b/src/lib/BasicEntityTimeField.tsx index 6602ddf..3dbc9fd 100644 --- a/src/lib/BasicEntityTimeField.tsx +++ b/src/lib/BasicEntityTimeField.tsx @@ -17,14 +17,14 @@ const BasicEntityTimeFieldSpecShape = Gubu( ux: Open({ kind: Exact('Time'), edit: Default(true), - props: Open({}) - }) - }) + props: Open({}), + }), + }), }), { name: CMPNAME } ) -function BasicEntityTimeField (props: any) { +function BasicEntityTimeField(props: any) { const { spec } = props const basicEntityTimeField: Spec = BasicEntityTimeFieldSpecShape(spec) @@ -39,8 +39,8 @@ function BasicEntityTimeField (props: any) { name={field.name} label={field.label} fullWidth - variant='outlined' - type='time' + variant="outlined" + type="time" disabled={!field.ux.edit} InputLabelProps={{ shrink: val?.length > 0 }} {...register(field.name)} From 7575a4264f7adae28ff25611e1d65a2b1fe73f7f Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Fri, 26 Jul 2024 20:34:26 +0100 Subject: [PATCH 046/122] Revert formatting of BasicEntityEdit --- src/lib/BasicEntityEdit.tsx | 209 ++++++++++++++++++------------------ 1 file changed, 106 insertions(+), 103 deletions(-) diff --git a/src/lib/BasicEntityEdit.tsx b/src/lib/BasicEntityEdit.tsx index 97ed96b..2cf0272 100644 --- a/src/lib/BasicEntityEdit.tsx +++ b/src/lib/BasicEntityEdit.tsx @@ -4,119 +4,118 @@ import { useSelector } from 'react-redux' import { useParams } from 'react-router-dom' -import { Box, Grid, Button, Toolbar } from '@mui/material' + +import { + Box, + Grid, + Button, + Toolbar, +} from '@mui/material' import { useForm } from 'react-hook-form' + import { BasicEntityField } from './BasicEntityField' + import { VxgBasicEntityEditPlugin } from './VxgBasicEntityEditPlugin' + const CMPNAME = 'BasicEntityEdit' + // TODO: make this debuggable -const makeResolver = (entity: any) => - useCallback( - async (data: any) => { - // const shape = entity.valid$({shape:true}) - entity = entity.make$().data$(data) - let errors = entity.valid$({ errors: true }) - - // TODO: use a seneca sub message to provide errors for other uses - debugging etc. - - // TODO: need a better way to access this; also namespaced! - const errmsg = entity.private$.get_instance().context.errmsg - console.log('ERRORS', errors, 'ERRMSG', errmsg.print()) - - errors = errors - .map((e: any) => ((e.tag_kind = 'ent'), e)) - .reduce( - (a: any, e: any, _: any) => ( - (a[e.key] = { - type: e.type, - message: errmsg - ? (_ = errmsg.find(e)) - ? _.text - : e.text - : e.text, - }), - a - ), - {} - ) - - const values = entity.data$(false) - const out = { - values, - errors, - } +const makeResolver = (entity:any) => useCallback(async (data:any) => { + // const shape = entity.valid$({shape:true}) + entity = entity.make$().data$(data) + let errors = entity.valid$({errors:true}) + + // TODO: use a seneca sub message to provide errors for other uses - debugging etc. + + // TODO: need a better way to access this; also namespaced! + const errmsg = entity.private$.get_instance().context.errmsg + console.log('ERRORS', errors, 'ERRMSG', errmsg.print()) + + errors = errors + .map((e:any)=>(e.tag_kind='ent',e)) + .reduce((a:any,e:any,_:any)=>(a[e.key]={ + type: e.type, + message: errmsg ? ((_=errmsg.find(e))?_.text:e.text) : e.text + },a),{}) + + const values = entity.data$(false) + const out = { + values, + errors, + } - console.log('ERROUT', out) + console.log('ERROUT', out) + + return out +}, [entity.entity$]) - return out - }, - [entity.entity$] - ) -function BasicEntityEdit(props: any) { +function BasicEntityEdit (props: any) { const { ctx } = props const { seneca } = ctx() - // const query = useSelector((state:any)=>state.main.current.view.query) - const [plugin, setPlugin] = useState(false) + // const query = useSelector((state:any)=>state.main.current.view.query) + + const [plugin,setPlugin] = useState(false) const [ready, setReady] = useState(false) - - useEffect(() => { - if (!plugin) { + + useEffect(()=>{ + if(!plugin) { seneca.use({ tag: props.spec.name, define: VxgBasicEntityEditPlugin, options: { spec: props.spec, setPlugin, - }, + } }) } - }, []) + },[]) + - const { spec, slot, fields } = seneca.export( - 'VxgBasicEntityEditPlugin/handle' - ) || { spec: {}, slot: null, fields: [] } + const { spec, slot, fields } = + seneca.export('VxgBasicEntityEditPlugin/handle') || + { spec: {}, slot: null, fields: [] } const { ent, name } = spec - if (plugin && !ready) { - seneca.act('aim:app,on:BasicLed,ready:edit', { view: name, setReady }) + if(plugin && !ready) { + seneca.act('aim:app,on:BasicLed,ready:edit',{view:name,setReady}) } const slotSelectors = seneca.export('Redux/slotSelectors') let { selectItem, selectList, selectMeta } = slotSelectors(slot) - let item = useSelector((state: any) => selectItem(state)) + let item = useSelector((state:any)=>selectItem(state)) - if (item && name) { - item = seneca.direct('aim:app,on:BasicLed,modify:edit', { - view: name, - item, - fields, + if(item && name) { + item = + seneca.direct('aim:app,on:BasicLed,modify:edit', { + view:name, item, fields }) } const params: any = useParams() - useEffect(() => { - if (ready) { - if (null == item && null != params.item) { + useEffect(()=>{ + if(ready) { + if(null == item && null != params.item) { seneca.act('aim:app,on:BasicLed,edit:item', { view: name, fields, - item_id: params.item, + item_id: params.item }) } reset(item) } - }, [null == item, ready]) + },[null==item,ready]) + const resolver = makeResolver(seneca.entity(ent)) @@ -132,47 +131,51 @@ function BasicEntityEdit(props: any) { resolver, }) - const onSubmit = (data: any) => { - seneca.act('aim:app,on:BasicLed,save:item', { view: name, data }) + const onSubmit = (data:any) => { + seneca.act('aim:app,on:BasicLed,save:item',{view:name,data}) } - + return ( - - {item ? ( - - - {fields.map((field: any) => ( - - - - ))} - - - {/*

errors: {JSON.stringify(errors)}

*/} - - - - - - ) : ( - <> - )} + + { item ? +
+ + + { fields.map((field:any)=> + + + + + )} + + + { /*

errors: {JSON.stringify(errors)}

*/ } + + + + +
+ : <> }
) } -export { BasicEntityEdit } + + +export { + BasicEntityEdit +} \ No newline at end of file From 1372834b31e2682fc9153e18d15873c5ddb22b97 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Sun, 28 Jul 2024 20:43:19 +0100 Subject: [PATCH 047/122] Add BasicEntityButtonField component --- dist/BasicEntityButtonField.d.ts | 2 + dist/voxgig-model-react.es.js | 592 +++++++++++++++++------------ dist/voxgig-model-react.umd.js | 592 +++++++++++++++++------------ src/lib/BasicEntityButtonField.tsx | 57 +++ src/lib/BasicEntityField.tsx | 5 +- src/lib/BasicEntityRatingField.tsx | 10 +- 6 files changed, 745 insertions(+), 513 deletions(-) create mode 100644 dist/BasicEntityButtonField.d.ts create mode 100644 src/lib/BasicEntityButtonField.tsx diff --git a/dist/BasicEntityButtonField.d.ts b/dist/BasicEntityButtonField.d.ts new file mode 100644 index 0000000..21481e6 --- /dev/null +++ b/dist/BasicEntityButtonField.d.ts @@ -0,0 +1,2 @@ +declare function BasicEntityButtonField(props: any): import("react/jsx-runtime").JSX.Element; +export { BasicEntityButtonField }; diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index 8c0e165..47e533c 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -1030,15 +1030,21 @@ function requireReactJsxRuntime_development() { } return reactJsxRuntime_development; } -var jsxRuntime = jsxRuntime$2.exports; -"use strict"; -if (process.env.NODE_ENV === "production") { - jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); -} else { - jsxRuntime$2.exports = requireReactJsxRuntime_development(); +var jsxRuntime$1 = jsxRuntime$2.exports; +var hasRequiredJsxRuntime; +function requireJsxRuntime() { + if (hasRequiredJsxRuntime) return jsxRuntime$2.exports; + hasRequiredJsxRuntime = 1; + "use strict"; + if (process.env.NODE_ENV === "production") { + jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); + } else { + jsxRuntime$2.exports = requireReactJsxRuntime_development(); + } + return jsxRuntime$2.exports; } -var jsxRuntimeExports = jsxRuntime$2.exports; -const jsxRuntime$1 = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); +var jsxRuntimeExports = requireJsxRuntime(); +const jsxRuntime = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); var gubu_min$2 = { exports: {} }; var gubu_min = gubu_min$2.exports; (function(module, exports) { @@ -10582,8 +10588,8 @@ process.env.NODE_ENV !== "production" ? Toolbar.propTypes = { */ variant: PropTypes.oneOfType([PropTypes.oneOf(["dense", "regular"]), PropTypes.string]) } : void 0; -const CMPNAME$m = "BasicAccountTool"; -console.log(CMPNAME$m, "1"); +const CMPNAME$n = "BasicAccountTool"; +console.log(CMPNAME$n, "1"); const { Exact: Exact$2 } = gubu_minExports.Gubu; const BasicAccountToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10593,7 +10599,7 @@ const BasicAccountToolSpecShape = gubu_minExports.Gubu({ attr: {}, sx: {}, style: {} -}, { name: CMPNAME$m }); +}, { name: CMPNAME$n }); function BasicAccountTool(props) { var _a; const { ctx, spec } = props; @@ -10667,8 +10673,8 @@ function stringAvatar(s) { children: `${parts.join("")}` }; } -const CMPNAME$l = "BasicHeadTool"; -console.log(CMPNAME$l, "1"); +const CMPNAME$m = "BasicHeadTool"; +console.log(CMPNAME$m, "1"); const { Exact: Exact$1 } = gubu_minExports.Gubu; const BasicHeadToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10678,7 +10684,7 @@ const BasicHeadToolSpecShape = gubu_minExports.Gubu({ attr: {}, sx: {}, style: {} -}, { name: CMPNAME$l }); +}, { name: CMPNAME$m }); function BasicHeadTool(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -10687,7 +10693,7 @@ function BasicHeadTool(props) { const { name, kind, attr, sx, style: style2 } = basicHeadToolSpec; let tool = /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}); if ("" === kind) { - console.warn(CMPNAME$l, "empty-tool-kind", basicHeadToolSpec); + console.warn(CMPNAME$m, "empty-tool-kind", basicHeadToolSpec); } else if ("logo" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsxs( "div", @@ -10704,7 +10710,7 @@ function BasicHeadTool(props) { { href: "/", style: style2, - className: `vxg-${CMPNAME$l}-logo`, + className: `vxg-${CMPNAME$m}-logo`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: attr.img }) } ), @@ -10736,17 +10742,17 @@ function BasicHeadTool(props) { } else if ("account" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsx(BasicAccountTool, { ctx, spec }); } else { - console.warn(CMPNAME$l, "unknown-tool-kind", kind, basicHeadToolSpec); + console.warn(CMPNAME$m, "unknown-tool-kind", kind, basicHeadToolSpec); } return tool; } -const CMPNAME$k = "BasicHead"; -const { Child: Child$5, Exact, Open: Open$i, Required: Required$1 } = gubu_minExports.Gubu; +const CMPNAME$l = "BasicHead"; +const { Child: Child$5, Exact, Open: Open$j, Required: Required$1 } = gubu_minExports.Gubu; const BasicHeadSpecShape = gubu_minExports.Gubu({ head: { name: String, active: Boolean, - tool: Child$5(Open$i({ + tool: Child$5(Open$j({ align: Exact("left", "right") })) }, @@ -10756,7 +10762,7 @@ const BasicHeadSpecShape = gubu_minExports.Gubu({ AppBar: {}, ToolBar: {} } -}, { name: CMPNAME$k }); +}, { name: CMPNAME$l }); function BasicHead(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -25305,7 +25311,7 @@ Object.defineProperty(ArrowDownward, "__esModule", { }); var default_1$x = ArrowDownward.default = void 0; var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); -var _jsxRuntime$x = jsxRuntimeExports; +var _jsxRuntime$x = requireJsxRuntime(); var _default$x = default_1$x = ArrowDownward.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); @@ -25318,7 +25324,7 @@ Object.defineProperty(ArrowRight, "__esModule", { }); var default_1$w = ArrowRight.default = void 0; var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); -var _jsxRuntime$w = jsxRuntimeExports; +var _jsxRuntime$w = requireJsxRuntime(); var _default$w = default_1$w = ArrowRight.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); @@ -25331,7 +25337,7 @@ Object.defineProperty(Cancel, "__esModule", { }); var default_1$v = Cancel.default = void 0; var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); -var _jsxRuntime$v = jsxRuntimeExports; +var _jsxRuntime$v = requireJsxRuntime(); var _default$v = default_1$v = Cancel.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); @@ -25344,7 +25350,7 @@ Object.defineProperty(ChevronLeft, "__esModule", { }); var default_1$u = ChevronLeft.default = void 0; var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); -var _jsxRuntime$u = jsxRuntimeExports; +var _jsxRuntime$u = requireJsxRuntime(); var _default$u = default_1$u = ChevronLeft.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); @@ -25357,7 +25363,7 @@ Object.defineProperty(ChevronRight, "__esModule", { }); var default_1$t = ChevronRight.default = void 0; var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); -var _jsxRuntime$t = jsxRuntimeExports; +var _jsxRuntime$t = requireJsxRuntime(); var _default$t = default_1$t = ChevronRight.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); @@ -25370,7 +25376,7 @@ Object.defineProperty(ClearAll, "__esModule", { }); var default_1$s = ClearAll.default = void 0; var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); -var _jsxRuntime$s = jsxRuntimeExports; +var _jsxRuntime$s = requireJsxRuntime(); var _default$s = default_1$s = ClearAll.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); @@ -25383,7 +25389,7 @@ Object.defineProperty(Close, "__esModule", { }); var default_1$r = Close.default = void 0; var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); -var _jsxRuntime$r = jsxRuntimeExports; +var _jsxRuntime$r = requireJsxRuntime(); var _default$r = default_1$r = Close.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); @@ -25396,7 +25402,7 @@ Object.defineProperty(ContentCopy, "__esModule", { }); var default_1$q = ContentCopy.default = void 0; var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); -var _jsxRuntime$q = jsxRuntimeExports; +var _jsxRuntime$q = requireJsxRuntime(); var _default$q = default_1$q = ContentCopy.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); @@ -25409,7 +25415,7 @@ Object.defineProperty(DensityLarge, "__esModule", { }); var default_1$p = DensityLarge.default = void 0; var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); -var _jsxRuntime$p = jsxRuntimeExports; +var _jsxRuntime$p = requireJsxRuntime(); var _default$p = default_1$p = DensityLarge.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); @@ -25422,7 +25428,7 @@ Object.defineProperty(DensityMedium, "__esModule", { }); var default_1$o = DensityMedium.default = void 0; var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); -var _jsxRuntime$o = jsxRuntimeExports; +var _jsxRuntime$o = requireJsxRuntime(); var _default$o = default_1$o = DensityMedium.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); @@ -25435,7 +25441,7 @@ Object.defineProperty(DensitySmall, "__esModule", { }); var default_1$n = DensitySmall.default = void 0; var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); -var _jsxRuntime$n = jsxRuntimeExports; +var _jsxRuntime$n = requireJsxRuntime(); var _default$n = default_1$n = DensitySmall.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); @@ -25448,7 +25454,7 @@ Object.defineProperty(DragHandle, "__esModule", { }); var default_1$m = DragHandle.default = void 0; var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); -var _jsxRuntime$m = jsxRuntimeExports; +var _jsxRuntime$m = requireJsxRuntime(); var _default$m = default_1$m = DragHandle.default = (0, _createSvgIcon$m.default)(/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); @@ -25461,7 +25467,7 @@ Object.defineProperty(DynamicFeed, "__esModule", { }); var default_1$l = DynamicFeed.default = void 0; var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); -var _jsxRuntime$l = jsxRuntimeExports; +var _jsxRuntime$l = requireJsxRuntime(); var _default$l = default_1$l = DynamicFeed.default = (0, _createSvgIcon$l.default)([/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { @@ -25476,7 +25482,7 @@ Object.defineProperty(Edit, "__esModule", { }); var default_1$k = Edit.default = void 0; var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); -var _jsxRuntime$k = jsxRuntimeExports; +var _jsxRuntime$k = requireJsxRuntime(); var _default$k = default_1$k = Edit.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); @@ -25489,7 +25495,7 @@ Object.defineProperty(ExpandMore, "__esModule", { }); var default_1$j = ExpandMore.default = void 0; var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); -var _jsxRuntime$j = jsxRuntimeExports; +var _jsxRuntime$j = requireJsxRuntime(); var _default$j = default_1$j = ExpandMore.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); @@ -25502,7 +25508,7 @@ Object.defineProperty(FilterAlt, "__esModule", { }); var default_1$i = FilterAlt.default = void 0; var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); -var _jsxRuntime$i = jsxRuntimeExports; +var _jsxRuntime$i = requireJsxRuntime(); var _default$i = default_1$i = FilterAlt.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); @@ -25515,7 +25521,7 @@ Object.defineProperty(FilterList, "__esModule", { }); var default_1$h = FilterList.default = void 0; var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); -var _jsxRuntime$h = jsxRuntimeExports; +var _jsxRuntime$h = requireJsxRuntime(); var _default$h = default_1$h = FilterList.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); @@ -25528,7 +25534,7 @@ Object.defineProperty(FilterListOff, "__esModule", { }); var default_1$g = FilterListOff.default = void 0; var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); -var _jsxRuntime$g = jsxRuntimeExports; +var _jsxRuntime$g = requireJsxRuntime(); var _default$g = default_1$g = FilterListOff.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); @@ -25541,7 +25547,7 @@ Object.defineProperty(FirstPage, "__esModule", { }); var default_1$f = FirstPage.default = void 0; var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); -var _jsxRuntime$f = jsxRuntimeExports; +var _jsxRuntime$f = requireJsxRuntime(); var _default$f = default_1$f = FirstPage.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); @@ -25554,7 +25560,7 @@ Object.defineProperty(Fullscreen, "__esModule", { }); var default_1$e = Fullscreen.default = void 0; var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); -var _jsxRuntime$e = jsxRuntimeExports; +var _jsxRuntime$e = requireJsxRuntime(); var _default$e = default_1$e = Fullscreen.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); @@ -25567,7 +25573,7 @@ Object.defineProperty(FullscreenExit, "__esModule", { }); var default_1$d = FullscreenExit.default = void 0; var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); -var _jsxRuntime$d = jsxRuntimeExports; +var _jsxRuntime$d = requireJsxRuntime(); var _default$d = default_1$d = FullscreenExit.default = (0, _createSvgIcon$d.default)(/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); @@ -25580,7 +25586,7 @@ Object.defineProperty(KeyboardDoubleArrowDown, "__esModule", { }); var default_1$c = KeyboardDoubleArrowDown.default = void 0; var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); -var _jsxRuntime$c = jsxRuntimeExports; +var _jsxRuntime$c = requireJsxRuntime(); var _default$c = default_1$c = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$c.default)([/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { @@ -25595,7 +25601,7 @@ Object.defineProperty(LastPage, "__esModule", { }); var default_1$b = LastPage.default = void 0; var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); -var _jsxRuntime$b = jsxRuntimeExports; +var _jsxRuntime$b = requireJsxRuntime(); var _default$b = default_1$b = LastPage.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); @@ -25608,7 +25614,7 @@ Object.defineProperty(MoreHoriz, "__esModule", { }); var default_1$a = MoreHoriz.default = void 0; var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); -var _jsxRuntime$a = jsxRuntimeExports; +var _jsxRuntime$a = requireJsxRuntime(); var _default$a = default_1$a = MoreHoriz.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); @@ -25621,7 +25627,7 @@ Object.defineProperty(MoreVert, "__esModule", { }); var default_1$9 = MoreVert.default = void 0; var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); -var _jsxRuntime$9 = jsxRuntimeExports; +var _jsxRuntime$9 = requireJsxRuntime(); var _default$9 = default_1$9 = MoreVert.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); @@ -25634,7 +25640,7 @@ Object.defineProperty(PushPin, "__esModule", { }); var default_1$8 = PushPin.default = void 0; var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); -var _jsxRuntime$8 = jsxRuntimeExports; +var _jsxRuntime$8 = requireJsxRuntime(); var _default$8 = default_1$8 = PushPin.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" @@ -25648,7 +25654,7 @@ Object.defineProperty(RestartAlt, "__esModule", { }); var default_1$7 = RestartAlt.default = void 0; var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); -var _jsxRuntime$7 = jsxRuntimeExports; +var _jsxRuntime$7 = requireJsxRuntime(); var _default$7 = default_1$7 = RestartAlt.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); @@ -25661,7 +25667,7 @@ Object.defineProperty(Save, "__esModule", { }); var default_1$6 = Save.default = void 0; var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); -var _jsxRuntime$6 = jsxRuntimeExports; +var _jsxRuntime$6 = requireJsxRuntime(); var _default$6 = default_1$6 = Save.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); @@ -25674,7 +25680,7 @@ Object.defineProperty(Search, "__esModule", { }); var default_1$5 = Search.default = void 0; var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); -var _jsxRuntime$5 = jsxRuntimeExports; +var _jsxRuntime$5 = requireJsxRuntime(); var _default$5 = default_1$5 = Search.default = (0, _createSvgIcon$5.default)(/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); @@ -25687,7 +25693,7 @@ Object.defineProperty(SearchOff, "__esModule", { }); var default_1$4 = SearchOff.default = void 0; var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); -var _jsxRuntime$4 = jsxRuntimeExports; +var _jsxRuntime$4 = requireJsxRuntime(); var _default$4 = default_1$4 = SearchOff.default = (0, _createSvgIcon$4.default)([/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { @@ -25702,7 +25708,7 @@ Object.defineProperty(Sort, "__esModule", { }); var default_1$3 = Sort.default = void 0; var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); -var _jsxRuntime$3 = jsxRuntimeExports; +var _jsxRuntime$3 = requireJsxRuntime(); var _default$3 = default_1$3 = Sort.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); @@ -25715,7 +25721,7 @@ Object.defineProperty(SyncAlt, "__esModule", { }); var default_1$2 = SyncAlt.default = void 0; var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); -var _jsxRuntime$2 = jsxRuntimeExports; +var _jsxRuntime$2 = requireJsxRuntime(); var _default$2 = default_1$2 = SyncAlt.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); @@ -25728,7 +25734,7 @@ Object.defineProperty(ViewColumn, "__esModule", { }); var default_1$1 = ViewColumn.default = void 0; var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); -var _jsxRuntime$1 = jsxRuntimeExports; +var _jsxRuntime$1 = requireJsxRuntime(); var _default$1 = default_1$1 = ViewColumn.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); @@ -25741,7 +25747,7 @@ Object.defineProperty(VisibilityOff, "__esModule", { }); var default_1 = VisibilityOff.default = void 0; var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); -var _jsxRuntime = jsxRuntimeExports; +var _jsxRuntime = requireJsxRuntime(); var _default = default_1 = VisibilityOff.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); @@ -62700,8 +62706,8 @@ const MaterialReactTable = (props) => { } return jsxRuntimeExports.jsx(MRT_TablePaper, { table }); }; -const { Open: Open$h, Child: Child$4 } = gubu_minExports.Gubu; -const Shape$2 = gubu_minExports.Gubu(Open$h({ +const { Open: Open$i, Child: Child$4 } = gubu_minExports.Gubu; +const Shape$2 = gubu_minExports.Gubu(Open$i({ name: String, prefix: String, ent: String, @@ -62746,7 +62752,7 @@ Object.assign(VxgBasicEntityListPlugin, { } }); Object.defineProperty(VxgBasicEntityListPlugin, "name", { value: "VxgBasicEntityListPlugin" }); -const CMPNAME$j = "BasicEntityList"; +const CMPNAME$k = "BasicEntityList"; function BasicEntityList(props) { const { ctx } = props; const { seneca } = ctx(); @@ -64666,79 +64672,79 @@ function useForm(props = {}) { _formControl.current.formState = getProxyFormState(formState, control); return _formControl.current; } -const CMPNAME$i = "BasicEntitySliderField"; -const { Open: Open$g } = gubu_minExports.Gubu; -const BasicEntityCheckboxFieldSpecShape = gubu_minExports.Gubu(Open$g({ - field: Open$g({ - id: String, - name: String, - kind: gubu_minExports.Skip(String), - label: gubu_minExports.Default("", String), - ux: Open$g({ - kind: gubu_minExports.Exact("Checkbox"), - edit: gubu_minExports.Default(true), - props: Open$g({}) +const CMPNAME$j = "BasicEntitySliderField"; +const { Open: Open$h } = gubu_minExports.Gubu; +const BasicEntityCheckboxFieldSpecShape = gubu_minExports.Gubu( + Open$h({ + field: Open$h({ + id: String, + name: String, + kind: gubu_minExports.Skip(String), + label: gubu_minExports.Default("", String), + ux: Open$h({ + kind: gubu_minExports.Exact("Checkbox"), + edit: gubu_minExports.Default(true), + props: Open$h({}) + }) }) - }) -}), { name: CMPNAME$i }); + }), + { name: CMPNAME$j } +); function BasicEntityCheckboxField(props) { const { spec } = props; const basicEntityCheckboxField = BasicEntityCheckboxFieldSpecShape(spec); const { control, field, getValues } = basicEntityCheckboxField; const val = getValues(field.name); - return /* @__PURE__ */ jsxRuntimeExports.jsx( - Box$2, - __spreadProps(__spreadValues({}, field.ux.props), { - children: /* @__PURE__ */ jsxRuntimeExports.jsx( - FormControlLabel$1, + return /* @__PURE__ */ jsxRuntimeExports.jsx(Box$2, __spreadProps(__spreadValues({}, field.ux.props), { children: /* @__PURE__ */ jsxRuntimeExports.jsx( + FormControlLabel$1, + { + control: /* @__PURE__ */ jsxRuntimeExports.jsx( + Controller, { - control: /* @__PURE__ */ jsxRuntimeExports.jsx( - Controller, + name: field.name, + control, + defaultValue: !!val, + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( + Checkbox$1, { - name: field.name, - control, - defaultValue: !!val, - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( - Checkbox$1, - { - id: field.id, - checked: value, - onChange, - disabled: !field.ux.edit, - required: field.ux.required || false - } - ) - }, - `${field.id}-controller` - ), - label: field.label - } - ) - }), - `${field.id}-box` - ); + id: field.id, + checked: value, + onChange, + disabled: !field.ux.edit, + required: field.ux.required || false + } + ) + }, + `${field.id}-controller` + ), + label: field.label + } + ) }), `${field.id}-box`); } -const CMPNAME$h = "BasicEntityAutocompleteField"; -const { Open: Open$f } = gubu_minExports.Gubu; -const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu(Open$f({ - field: Open$f({ - id: String, - name: String, - kind: gubu_minExports.Skip(String), - label: gubu_minExports.Default(""), - options: Open$f({ - label: { field: gubu_minExports.Default("label") }, - value: { field: gubu_minExports.Default("value") }, - multiple: gubu_minExports.Default(false), - default: Open$f({}), - ents: Open$f({}) - }), - ux: Open$f({ - kind: gubu_minExports.Exact("Autocomplete"), - edit: gubu_minExports.Default(true) +const CMPNAME$i = "BasicEntityAutocompleteField"; +const { Open: Open$g } = gubu_minExports.Gubu; +const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu( + Open$g({ + field: Open$g({ + id: String, + name: String, + kind: gubu_minExports.Skip(String), + label: gubu_minExports.Default(""), + options: Open$g({ + label: { field: gubu_minExports.Default("label") }, + value: { field: gubu_minExports.Default("value") }, + multiple: gubu_minExports.Default(false), + default: Open$g({}), + ents: Open$g({}) + }), + ux: Open$g({ + kind: gubu_minExports.Exact("Autocomplete"), + edit: gubu_minExports.Default(true) + }) }) - }) -}), { name: CMPNAME$h }); + }), + { name: CMPNAME$i } +); function BasicEntityAutocompleteField(props) { const { spec } = props; const basicEntityAutocompleteField = BasicEntityAutocompleteFieldSpecShape(spec); @@ -64783,7 +64789,10 @@ function resolveOptions$1(options) { if (multiple === false) { if (Object.keys(defaultValues).length > 0) { const firstKey = Object.keys(defaultValues)[0]; - resolvedDefault = { value: firstKey, label: defaultValues[firstKey][labelField] }; + resolvedDefault = { + value: firstKey, + label: defaultValues[firstKey][labelField] + }; } else { resolvedDefault = null; } @@ -64816,29 +64825,32 @@ function resolveValue(options, val) { return val || []; } } -const CMPNAME$g = "BasicEntitySliderField"; -const { Open: Open$e } = gubu_minExports.Gubu; -const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu(Open$e({ - field: Open$e({ - id: String, - name: String, - kind: gubu_minExports.Skip(String), - label: gubu_minExports.Default("", String), - ux: Open$e({ - kind: gubu_minExports.Exact("Slider"), - edit: gubu_minExports.Default(true), - step: gubu_minExports.Default(1), - min: gubu_minExports.Default(0), - max: gubu_minExports.Default(100), - props: { - marks: gubu_minExports.Default({}), - valueLabelDisplay: gubu_minExports.Exact("on", "auto", "off").Default("auto"), - direction: gubu_minExports.Exact("horizontal", "vertical").Default("horizontal"), - track: gubu_minExports.Exact("normal", "inverted", "disabled").Default("normal") - } +const CMPNAME$h = "BasicEntitySliderField"; +const { Open: Open$f } = gubu_minExports.Gubu; +const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu( + Open$f({ + field: Open$f({ + id: String, + name: String, + kind: gubu_minExports.Skip(String), + label: gubu_minExports.Default("", String), + ux: Open$f({ + kind: gubu_minExports.Exact("Slider"), + edit: gubu_minExports.Default(true), + step: gubu_minExports.Default(1), + min: gubu_minExports.Default(0), + max: gubu_minExports.Default(100), + props: { + marks: gubu_minExports.Default({}), + valueLabelDisplay: gubu_minExports.Exact("on", "auto", "off").Default("auto"), + direction: gubu_minExports.Exact("horizontal", "vertical").Default("horizontal"), + track: gubu_minExports.Exact("normal", "inverted", "disabled").Default("normal") + } + }) }) - }) -}), { name: CMPNAME$g }); + }), + { name: CMPNAME$h } +); function BasicEntitySliderField(props) { const { spec } = props; const basicEntityAutocompleteField = BasicEntitySliderFieldSpecShape(spec); @@ -64877,31 +64889,37 @@ function resolveMarks(marks) { return false; } if (typeof marks === "object") { - return Object.entries(marks).map(([key, value]) => ({ label: value, value: +key })); + return Object.entries(marks).map(([key, value]) => ({ + label: value, + value: +key + })); } return marks; } -const CMPNAME$f = "BasicEntitySliderField"; -const { Open: Open$d } = gubu_minExports.Gubu; -const BasicEntityRadioGroupFieldSpecShape = gubu_minExports.Gubu(Open$d({ - field: Open$d({ - id: String, - name: String, - kind: gubu_minExports.Skip(String), - label: gubu_minExports.Default("", String), - ux: Open$d({ - kind: gubu_minExports.Exact("RadioGroup"), - edit: gubu_minExports.Default(true), - direction: gubu_minExports.Exact("row", "column").Default("row") - }), - options: Open$d({ - label: { field: gubu_minExports.Default("label") }, - value: { field: gubu_minExports.Default("value") }, - default: Open$d({}), - ents: Open$d({}) +const CMPNAME$g = "BasicEntitySliderField"; +const { Open: Open$e } = gubu_minExports.Gubu; +const BasicEntityRadioGroupFieldSpecShape = gubu_minExports.Gubu( + Open$e({ + field: Open$e({ + id: String, + name: String, + kind: gubu_minExports.Skip(String), + label: gubu_minExports.Default("", String), + ux: Open$e({ + kind: gubu_minExports.Exact("RadioGroup"), + edit: gubu_minExports.Default(true), + direction: gubu_minExports.Exact("row", "column").Default("row") + }), + options: Open$e({ + label: { field: gubu_minExports.Default("label") }, + value: { field: gubu_minExports.Default("value") }, + default: Open$e({}), + ents: Open$e({}) + }) }) - }) -}), { name: CMPNAME$f }); + }), + { name: CMPNAME$g } +); function BasicEntityRadioGroupField(props) { const { spec } = props; const basicEntityRadioGroupField = BasicEntityRadioGroupFieldSpecShape(spec); @@ -64915,15 +64933,24 @@ function BasicEntityRadioGroupField(props) { name: field.name, control, defaultValue: resolvedDefault, - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx(RadioGroup, { value, onChange, row: "row" === field.ux.direction, children: resolvedOptions.map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx( - FormControlLabel$1, + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( + RadioGroup, { - value: option.value, - control: /* @__PURE__ */ jsxRuntimeExports.jsx(Radio$1, { disabled: !field.ux.edit }), - label: option.label + value, + onChange, + row: "row" === field.ux.direction, + children: resolvedOptions.map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx( + FormControlLabel$1, + { + value: option.value, + control: /* @__PURE__ */ jsxRuntimeExports.jsx(Radio$1, { disabled: !field.ux.edit }), + label: option.label + }, + `${option.value}-option` + )) }, - `${option.value}-option` - )) }, field.id) + field.id + ) }, `${field.id}-controller` ) @@ -64944,7 +64971,10 @@ function resolveOptions(options) { if (multiple === false) { if (Object.keys(defaultValues).length > 0) { const firstKey = Object.keys(defaultValues)[0]; - resolvedDefault = { value: firstKey, label: defaultValues[firstKey][labelField] }; + resolvedDefault = { + value: firstKey, + label: defaultValues[firstKey][labelField] + }; } else { resolvedDefault = null; } @@ -64959,21 +64989,24 @@ function resolveOptions(options) { resolvedDefault }; } -const CMPNAME$e = "BasicEntityTextBoxField"; -const { Open: Open$c } = gubu_minExports.Gubu; -const BasicEntityTextBoxFieldSpecShape = gubu_minExports.Gubu(Open$c({ - field: Open$c({ - id: String, - name: String, - kind: gubu_minExports.Skip(String), - label: gubu_minExports.Default("", String), - ux: Open$c({ - kind: gubu_minExports.Exact("TextBox"), - edit: gubu_minExports.Default(true), - props: Open$c({}) +const CMPNAME$f = "BasicEntityTextBoxField"; +const { Open: Open$d } = gubu_minExports.Gubu; +const BasicEntityTextBoxFieldSpecShape = gubu_minExports.Gubu( + Open$d({ + field: Open$d({ + id: String, + name: String, + kind: gubu_minExports.Skip(String), + label: gubu_minExports.Default("", String), + ux: Open$d({ + kind: gubu_minExports.Exact("TextBox"), + edit: gubu_minExports.Default(true), + props: Open$d({}) + }) }) - }) -}), { name: CMPNAME$e }); + }), + { name: CMPNAME$f } +); function BasicEntityTextBoxField(props) { const { spec } = props; const basicEntityTextBoxField = BasicEntityTextBoxFieldSpecShape(spec); @@ -64997,21 +65030,24 @@ function BasicEntityFieldError(props) { const { err } = props; return err ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-active", children: err.message }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-none" }); } -const CMPNAME$d = "BasicEntityTextField"; -const { Open: Open$b } = gubu_minExports.Gubu; -const BasicEntityTextFieldSpecShape = gubu_minExports.Gubu(Open$b({ - field: Open$b({ - id: String, - name: String, - kind: gubu_minExports.Skip(String), - label: gubu_minExports.Default("", String), - ux: Open$b({ - kind: gubu_minExports.Exact("Text"), - edit: gubu_minExports.Default(true), - props: Open$b({}) +const CMPNAME$e = "BasicEntityTextField"; +const { Open: Open$c } = gubu_minExports.Gubu; +const BasicEntityTextFieldSpecShape = gubu_minExports.Gubu( + Open$c({ + field: Open$c({ + id: String, + name: String, + kind: gubu_minExports.Skip(String), + label: gubu_minExports.Default("", String), + ux: Open$c({ + kind: gubu_minExports.Exact("Text"), + edit: gubu_minExports.Default(true), + props: Open$c({}) + }) }) - }) -}), { name: CMPNAME$d }); + }), + { name: CMPNAME$e } +); function BasicEntityTextField(props) { const { spec } = props; const basicEntityTextBoxField = BasicEntityTextFieldSpecShape(spec); @@ -65033,21 +65069,24 @@ function BasicEntityTextField(props) { /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, field.id); } -const CMPNAME$c = "BasicEntityDateField"; -const { Open: Open$a } = gubu_minExports.Gubu; -const BasicEntityDateFieldSpecShape = gubu_minExports.Gubu(Open$a({ - field: Open$a({ - id: String, - name: String, - kind: gubu_minExports.Skip(String), - label: gubu_minExports.Default("", String), - ux: Open$a({ - kind: gubu_minExports.Exact("Date"), - edit: gubu_minExports.Default(true), - props: Open$a({}) +const CMPNAME$d = "BasicEntityDateField"; +const { Open: Open$b } = gubu_minExports.Gubu; +const BasicEntityDateFieldSpecShape = gubu_minExports.Gubu( + Open$b({ + field: Open$b({ + id: String, + name: String, + kind: gubu_minExports.Skip(String), + label: gubu_minExports.Default("", String), + ux: Open$b({ + kind: gubu_minExports.Exact("Date"), + edit: gubu_minExports.Default(true), + props: Open$b({}) + }) }) - }) -}), { name: CMPNAME$c }); + }), + { name: CMPNAME$d } +); function BasicEntityDateField(props) { const { spec } = props; const basicEntityDateField = BasicEntityDateFieldSpecShape(spec); @@ -65067,21 +65106,24 @@ function BasicEntityDateField(props) { }, register(field.name)) ) }, field.id); } -const CMPNAME$b = "BasicEntityTimeField"; -const { Open: Open$9 } = gubu_minExports.Gubu; -const BasicEntityTimeFieldSpecShape = gubu_minExports.Gubu(Open$9({ - field: Open$9({ - id: String, - name: String, - kind: gubu_minExports.Skip(String), - label: gubu_minExports.Default("", String), - ux: Open$9({ - kind: gubu_minExports.Exact("Time"), - edit: gubu_minExports.Default(true), - props: Open$9({}) +const CMPNAME$c = "BasicEntityTimeField"; +const { Open: Open$a } = gubu_minExports.Gubu; +const BasicEntityTimeFieldSpecShape = gubu_minExports.Gubu( + Open$a({ + field: Open$a({ + id: String, + name: String, + kind: gubu_minExports.Skip(String), + label: gubu_minExports.Default("", String), + ux: Open$a({ + kind: gubu_minExports.Exact("Time"), + edit: gubu_minExports.Default(true), + props: Open$a({}) + }) }) - }) -}), { name: CMPNAME$b }); + }), + { name: CMPNAME$c } +); function BasicEntityTimeField(props) { const { spec } = props; const basicEntityTimeField = BasicEntityTimeFieldSpecShape(spec); @@ -65101,21 +65143,24 @@ function BasicEntityTimeField(props) { }, register(field.name)) ) }, field.id); } -const CMPNAME$a = "BasicEntityDateTimeField"; -const { Open: Open$8 } = gubu_minExports.Gubu; -const BasicEntityDateTimeFieldSpecShape = gubu_minExports.Gubu(Open$8({ - field: Open$8({ - id: String, - name: String, - kind: gubu_minExports.Skip(String), - label: gubu_minExports.Default("", String), - ux: Open$8({ - kind: gubu_minExports.Exact("DateTime"), - edit: gubu_minExports.Default(true), - props: Open$8({}) +const CMPNAME$b = "BasicEntityDateTimeField"; +const { Open: Open$9 } = gubu_minExports.Gubu; +const BasicEntityDateTimeFieldSpecShape = gubu_minExports.Gubu( + Open$9({ + field: Open$9({ + id: String, + name: String, + kind: gubu_minExports.Skip(String), + label: gubu_minExports.Default("", String), + ux: Open$9({ + kind: gubu_minExports.Exact("DateTime"), + edit: gubu_minExports.Default(true), + props: Open$9({}) + }) }) - }) -}), { name: CMPNAME$a }); + }), + { name: CMPNAME$b } +); function BasicEntityDateTimeField(props) { const { spec } = props; const basicEntityDateTimeField = BasicEntityDateTimeFieldSpecShape(spec); @@ -65135,24 +65180,24 @@ function BasicEntityDateTimeField(props) { }, register(field.name)) ) }, field.id); } -const CMPNAME$9 = "BasicEntitySliderField"; -const { Open: Open$7 } = gubu_minExports.Gubu; +const CMPNAME$a = "BasicEntitySliderField"; +const { Open: Open$8 } = gubu_minExports.Gubu; const BasicEntityRatingFieldSpecShape = gubu_minExports.Gubu( - Open$7({ - field: Open$7({ + Open$8({ + field: Open$8({ id: String, name: String, kind: gubu_minExports.Skip(String), label: gubu_minExports.Default("", String), - ux: Open$7({ + ux: Open$8({ kind: gubu_minExports.Exact("Rating"), edit: gubu_minExports.Default(true), precision: 1, - props: Open$7({}) + props: Open$8({}) }) }) }), - { name: CMPNAME$9 } + { name: CMPNAME$a } ); function BasicEntityRatingField(props) { const { spec } = props; @@ -65181,6 +65226,47 @@ function BasicEntityRatingField(props) { ) ] }, `${field.id}-div`); } +const CMPNAME$9 = "BasicEntitySliderField"; +const { Open: Open$7 } = gubu_minExports.Gubu; +const BasicEntityButtonFieldSpecShape = gubu_minExports.Gubu( + Open$7({ + field: Open$7({ + id: String, + name: String, + kind: gubu_minExports.Skip(String), + label: gubu_minExports.Default("", String), + ux: Open$7({ + kind: gubu_minExports.Exact("Button"), + edit: gubu_minExports.Default(true), + props: Open$7({}) + }) + }) + }), + { name: CMPNAME$9 } +); +function BasicEntityButtonField(props) { + const { spec } = props; + const basicEntityButtonField = BasicEntityButtonFieldSpecShape(spec); + const { control, field } = basicEntityButtonField; + return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx( + Controller, + { + name: field.name, + control, + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( + Button$1, + __spreadProps(__spreadValues({ + name: field.name, + value, + onClick: (_2) => onChange(value) + }, field.ux.props), { + children: field.label + }) + ) + }, + `${field.id}-controller` + ) }, `${field.id}-div`); +} const CMPNAME$8 = "BasicEntityField"; const { Open: Open$6 } = gubu_minExports.Gubu; const BasicEntityFieldSpecShape = gubu_minExports.Gubu( @@ -65201,7 +65287,8 @@ const BasicEntityFieldSpecShape = gubu_minExports.Gubu( "Autocomplete", "Slider", "RadioGroup", - "Rating" + "Rating", + "Button" ), edit: gubu_minExports.Default(true), rows: gubu_minExports.Default(3), @@ -65221,7 +65308,8 @@ const fieldMap = { Autocomplete: BasicEntityAutocompleteField, Slider: BasicEntitySliderField, RadioGroup: BasicEntityRadioGroupField, - Rating: BasicEntityRatingField + Rating: BasicEntityRatingField, + Button: BasicEntityButtonField }; function BasicEntityField(props) { const { ctx, spec } = props; diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index f380239..47ab27c 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -1042,15 +1042,21 @@ var __async = (__this, __arguments, generator) => { } return reactJsxRuntime_development; } - var jsxRuntime = jsxRuntime$2.exports; - "use strict"; - if (process.env.NODE_ENV === "production") { - jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); - } else { - jsxRuntime$2.exports = requireReactJsxRuntime_development(); + var jsxRuntime$1 = jsxRuntime$2.exports; + var hasRequiredJsxRuntime; + function requireJsxRuntime() { + if (hasRequiredJsxRuntime) return jsxRuntime$2.exports; + hasRequiredJsxRuntime = 1; + "use strict"; + if (process.env.NODE_ENV === "production") { + jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); + } else { + jsxRuntime$2.exports = requireReactJsxRuntime_development(); + } + return jsxRuntime$2.exports; } - var jsxRuntimeExports = jsxRuntime$2.exports; - const jsxRuntime$1 = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); + var jsxRuntimeExports = requireJsxRuntime(); + const jsxRuntime = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); var gubu_min$2 = { exports: {} }; var gubu_min = gubu_min$2.exports; (function(module2, exports3) { @@ -10594,8 +10600,8 @@ try { */ variant: PropTypes.oneOfType([PropTypes.oneOf(["dense", "regular"]), PropTypes.string]) } : void 0; - const CMPNAME$m = "BasicAccountTool"; - console.log(CMPNAME$m, "1"); + const CMPNAME$n = "BasicAccountTool"; + console.log(CMPNAME$n, "1"); const { Exact: Exact$2 } = gubu_minExports.Gubu; const BasicAccountToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10605,7 +10611,7 @@ try { attr: {}, sx: {}, style: {} - }, { name: CMPNAME$m }); + }, { name: CMPNAME$n }); function BasicAccountTool(props) { var _a; const { ctx, spec } = props; @@ -10679,8 +10685,8 @@ try { children: `${parts.join("")}` }; } - const CMPNAME$l = "BasicHeadTool"; - console.log(CMPNAME$l, "1"); + const CMPNAME$m = "BasicHeadTool"; + console.log(CMPNAME$m, "1"); const { Exact: Exact$1 } = gubu_minExports.Gubu; const BasicHeadToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10690,7 +10696,7 @@ try { attr: {}, sx: {}, style: {} - }, { name: CMPNAME$l }); + }, { name: CMPNAME$m }); function BasicHeadTool(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -10699,7 +10705,7 @@ try { const { name, kind, attr, sx, style: style2 } = basicHeadToolSpec; let tool = /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}); if ("" === kind) { - console.warn(CMPNAME$l, "empty-tool-kind", basicHeadToolSpec); + console.warn(CMPNAME$m, "empty-tool-kind", basicHeadToolSpec); } else if ("logo" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsxs( "div", @@ -10716,7 +10722,7 @@ try { { href: "/", style: style2, - className: `vxg-${CMPNAME$l}-logo`, + className: `vxg-${CMPNAME$m}-logo`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: attr.img }) } ), @@ -10748,17 +10754,17 @@ try { } else if ("account" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsx(BasicAccountTool, { ctx, spec }); } else { - console.warn(CMPNAME$l, "unknown-tool-kind", kind, basicHeadToolSpec); + console.warn(CMPNAME$m, "unknown-tool-kind", kind, basicHeadToolSpec); } return tool; } - const CMPNAME$k = "BasicHead"; - const { Child: Child$5, Exact, Open: Open$i, Required: Required$1 } = gubu_minExports.Gubu; + const CMPNAME$l = "BasicHead"; + const { Child: Child$5, Exact, Open: Open$j, Required: Required$1 } = gubu_minExports.Gubu; const BasicHeadSpecShape = gubu_minExports.Gubu({ head: { name: String, active: Boolean, - tool: Child$5(Open$i({ + tool: Child$5(Open$j({ align: Exact("left", "right") })) }, @@ -10768,7 +10774,7 @@ try { AppBar: {}, ToolBar: {} } - }, { name: CMPNAME$k }); + }, { name: CMPNAME$l }); function BasicHead(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -25317,7 +25323,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$x = ArrowDownward.default = void 0; var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); - var _jsxRuntime$x = jsxRuntimeExports; + var _jsxRuntime$x = requireJsxRuntime(); var _default$x = default_1$x = ArrowDownward.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); @@ -25330,7 +25336,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$w = ArrowRight.default = void 0; var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); - var _jsxRuntime$w = jsxRuntimeExports; + var _jsxRuntime$w = requireJsxRuntime(); var _default$w = default_1$w = ArrowRight.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); @@ -25343,7 +25349,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$v = Cancel.default = void 0; var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); - var _jsxRuntime$v = jsxRuntimeExports; + var _jsxRuntime$v = requireJsxRuntime(); var _default$v = default_1$v = Cancel.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); @@ -25356,7 +25362,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$u = ChevronLeft.default = void 0; var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); - var _jsxRuntime$u = jsxRuntimeExports; + var _jsxRuntime$u = requireJsxRuntime(); var _default$u = default_1$u = ChevronLeft.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); @@ -25369,7 +25375,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$t = ChevronRight.default = void 0; var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); - var _jsxRuntime$t = jsxRuntimeExports; + var _jsxRuntime$t = requireJsxRuntime(); var _default$t = default_1$t = ChevronRight.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); @@ -25382,7 +25388,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$s = ClearAll.default = void 0; var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); - var _jsxRuntime$s = jsxRuntimeExports; + var _jsxRuntime$s = requireJsxRuntime(); var _default$s = default_1$s = ClearAll.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); @@ -25395,7 +25401,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$r = Close.default = void 0; var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); - var _jsxRuntime$r = jsxRuntimeExports; + var _jsxRuntime$r = requireJsxRuntime(); var _default$r = default_1$r = Close.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); @@ -25408,7 +25414,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$q = ContentCopy.default = void 0; var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); - var _jsxRuntime$q = jsxRuntimeExports; + var _jsxRuntime$q = requireJsxRuntime(); var _default$q = default_1$q = ContentCopy.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); @@ -25421,7 +25427,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$p = DensityLarge.default = void 0; var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); - var _jsxRuntime$p = jsxRuntimeExports; + var _jsxRuntime$p = requireJsxRuntime(); var _default$p = default_1$p = DensityLarge.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); @@ -25434,7 +25440,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$o = DensityMedium.default = void 0; var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); - var _jsxRuntime$o = jsxRuntimeExports; + var _jsxRuntime$o = requireJsxRuntime(); var _default$o = default_1$o = DensityMedium.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); @@ -25447,7 +25453,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$n = DensitySmall.default = void 0; var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); - var _jsxRuntime$n = jsxRuntimeExports; + var _jsxRuntime$n = requireJsxRuntime(); var _default$n = default_1$n = DensitySmall.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); @@ -25460,7 +25466,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$m = DragHandle.default = void 0; var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); - var _jsxRuntime$m = jsxRuntimeExports; + var _jsxRuntime$m = requireJsxRuntime(); var _default$m = default_1$m = DragHandle.default = (0, _createSvgIcon$m.default)(/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); @@ -25473,7 +25479,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$l = DynamicFeed.default = void 0; var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); - var _jsxRuntime$l = jsxRuntimeExports; + var _jsxRuntime$l = requireJsxRuntime(); var _default$l = default_1$l = DynamicFeed.default = (0, _createSvgIcon$l.default)([/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { @@ -25488,7 +25494,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$k = Edit.default = void 0; var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); - var _jsxRuntime$k = jsxRuntimeExports; + var _jsxRuntime$k = requireJsxRuntime(); var _default$k = default_1$k = Edit.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); @@ -25501,7 +25507,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$j = ExpandMore.default = void 0; var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); - var _jsxRuntime$j = jsxRuntimeExports; + var _jsxRuntime$j = requireJsxRuntime(); var _default$j = default_1$j = ExpandMore.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); @@ -25514,7 +25520,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$i = FilterAlt.default = void 0; var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); - var _jsxRuntime$i = jsxRuntimeExports; + var _jsxRuntime$i = requireJsxRuntime(); var _default$i = default_1$i = FilterAlt.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); @@ -25527,7 +25533,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$h = FilterList.default = void 0; var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); - var _jsxRuntime$h = jsxRuntimeExports; + var _jsxRuntime$h = requireJsxRuntime(); var _default$h = default_1$h = FilterList.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); @@ -25540,7 +25546,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$g = FilterListOff.default = void 0; var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); - var _jsxRuntime$g = jsxRuntimeExports; + var _jsxRuntime$g = requireJsxRuntime(); var _default$g = default_1$g = FilterListOff.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); @@ -25553,7 +25559,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$f = FirstPage.default = void 0; var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); - var _jsxRuntime$f = jsxRuntimeExports; + var _jsxRuntime$f = requireJsxRuntime(); var _default$f = default_1$f = FirstPage.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); @@ -25566,7 +25572,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$e = Fullscreen.default = void 0; var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); - var _jsxRuntime$e = jsxRuntimeExports; + var _jsxRuntime$e = requireJsxRuntime(); var _default$e = default_1$e = Fullscreen.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); @@ -25579,7 +25585,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$d = FullscreenExit.default = void 0; var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); - var _jsxRuntime$d = jsxRuntimeExports; + var _jsxRuntime$d = requireJsxRuntime(); var _default$d = default_1$d = FullscreenExit.default = (0, _createSvgIcon$d.default)(/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); @@ -25592,7 +25598,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$c = KeyboardDoubleArrowDown.default = void 0; var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); - var _jsxRuntime$c = jsxRuntimeExports; + var _jsxRuntime$c = requireJsxRuntime(); var _default$c = default_1$c = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$c.default)([/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { @@ -25607,7 +25613,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$b = LastPage.default = void 0; var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); - var _jsxRuntime$b = jsxRuntimeExports; + var _jsxRuntime$b = requireJsxRuntime(); var _default$b = default_1$b = LastPage.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); @@ -25620,7 +25626,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$a = MoreHoriz.default = void 0; var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); - var _jsxRuntime$a = jsxRuntimeExports; + var _jsxRuntime$a = requireJsxRuntime(); var _default$a = default_1$a = MoreHoriz.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); @@ -25633,7 +25639,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$9 = MoreVert.default = void 0; var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); - var _jsxRuntime$9 = jsxRuntimeExports; + var _jsxRuntime$9 = requireJsxRuntime(); var _default$9 = default_1$9 = MoreVert.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); @@ -25646,7 +25652,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$8 = PushPin.default = void 0; var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); - var _jsxRuntime$8 = jsxRuntimeExports; + var _jsxRuntime$8 = requireJsxRuntime(); var _default$8 = default_1$8 = PushPin.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" @@ -25660,7 +25666,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$7 = RestartAlt.default = void 0; var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); - var _jsxRuntime$7 = jsxRuntimeExports; + var _jsxRuntime$7 = requireJsxRuntime(); var _default$7 = default_1$7 = RestartAlt.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); @@ -25673,7 +25679,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$6 = Save.default = void 0; var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); - var _jsxRuntime$6 = jsxRuntimeExports; + var _jsxRuntime$6 = requireJsxRuntime(); var _default$6 = default_1$6 = Save.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); @@ -25686,7 +25692,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$5 = Search.default = void 0; var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); - var _jsxRuntime$5 = jsxRuntimeExports; + var _jsxRuntime$5 = requireJsxRuntime(); var _default$5 = default_1$5 = Search.default = (0, _createSvgIcon$5.default)(/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); @@ -25699,7 +25705,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$4 = SearchOff.default = void 0; var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); - var _jsxRuntime$4 = jsxRuntimeExports; + var _jsxRuntime$4 = requireJsxRuntime(); var _default$4 = default_1$4 = SearchOff.default = (0, _createSvgIcon$4.default)([/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { @@ -25714,7 +25720,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$3 = Sort.default = void 0; var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); - var _jsxRuntime$3 = jsxRuntimeExports; + var _jsxRuntime$3 = requireJsxRuntime(); var _default$3 = default_1$3 = Sort.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); @@ -25727,7 +25733,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$2 = SyncAlt.default = void 0; var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); - var _jsxRuntime$2 = jsxRuntimeExports; + var _jsxRuntime$2 = requireJsxRuntime(); var _default$2 = default_1$2 = SyncAlt.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); @@ -25740,7 +25746,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$1 = ViewColumn.default = void 0; var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); - var _jsxRuntime$1 = jsxRuntimeExports; + var _jsxRuntime$1 = requireJsxRuntime(); var _default$1 = default_1$1 = ViewColumn.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); @@ -25753,7 +25759,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1 = VisibilityOff.default = void 0; var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); - var _jsxRuntime = jsxRuntimeExports; + var _jsxRuntime = requireJsxRuntime(); var _default = default_1 = VisibilityOff.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); @@ -62712,8 +62718,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } return jsxRuntimeExports.jsx(MRT_TablePaper, { table }); }; - const { Open: Open$h, Child: Child$4 } = gubu_minExports.Gubu; - const Shape$2 = gubu_minExports.Gubu(Open$h({ + const { Open: Open$i, Child: Child$4 } = gubu_minExports.Gubu; + const Shape$2 = gubu_minExports.Gubu(Open$i({ name: String, prefix: String, ent: String, @@ -62758,7 +62764,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } }); Object.defineProperty(VxgBasicEntityListPlugin, "name", { value: "VxgBasicEntityListPlugin" }); - const CMPNAME$j = "BasicEntityList"; + const CMPNAME$k = "BasicEntityList"; function BasicEntityList(props) { const { ctx } = props; const { seneca } = ctx(); @@ -64678,79 +64684,79 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha _formControl.current.formState = getProxyFormState(formState, control); return _formControl.current; } - const CMPNAME$i = "BasicEntitySliderField"; - const { Open: Open$g } = gubu_minExports.Gubu; - const BasicEntityCheckboxFieldSpecShape = gubu_minExports.Gubu(Open$g({ - field: Open$g({ - id: String, - name: String, - kind: gubu_minExports.Skip(String), - label: gubu_minExports.Default("", String), - ux: Open$g({ - kind: gubu_minExports.Exact("Checkbox"), - edit: gubu_minExports.Default(true), - props: Open$g({}) + const CMPNAME$j = "BasicEntitySliderField"; + const { Open: Open$h } = gubu_minExports.Gubu; + const BasicEntityCheckboxFieldSpecShape = gubu_minExports.Gubu( + Open$h({ + field: Open$h({ + id: String, + name: String, + kind: gubu_minExports.Skip(String), + label: gubu_minExports.Default("", String), + ux: Open$h({ + kind: gubu_minExports.Exact("Checkbox"), + edit: gubu_minExports.Default(true), + props: Open$h({}) + }) }) - }) - }), { name: CMPNAME$i }); + }), + { name: CMPNAME$j } + ); function BasicEntityCheckboxField(props) { const { spec } = props; const basicEntityCheckboxField = BasicEntityCheckboxFieldSpecShape(spec); const { control, field, getValues } = basicEntityCheckboxField; const val = getValues(field.name); - return /* @__PURE__ */ jsxRuntimeExports.jsx( - material.Box, - __spreadProps(__spreadValues({}, field.ux.props), { - children: /* @__PURE__ */ jsxRuntimeExports.jsx( - material.FormControlLabel, + return /* @__PURE__ */ jsxRuntimeExports.jsx(material.Box, __spreadProps(__spreadValues({}, field.ux.props), { children: /* @__PURE__ */ jsxRuntimeExports.jsx( + material.FormControlLabel, + { + control: /* @__PURE__ */ jsxRuntimeExports.jsx( + Controller, { - control: /* @__PURE__ */ jsxRuntimeExports.jsx( - Controller, + name: field.name, + control, + defaultValue: !!val, + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( + material.Checkbox, { - name: field.name, - control, - defaultValue: !!val, - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( - material.Checkbox, - { - id: field.id, - checked: value, - onChange, - disabled: !field.ux.edit, - required: field.ux.required || false - } - ) - }, - `${field.id}-controller` - ), - label: field.label - } - ) - }), - `${field.id}-box` - ); + id: field.id, + checked: value, + onChange, + disabled: !field.ux.edit, + required: field.ux.required || false + } + ) + }, + `${field.id}-controller` + ), + label: field.label + } + ) }), `${field.id}-box`); } - const CMPNAME$h = "BasicEntityAutocompleteField"; - const { Open: Open$f } = gubu_minExports.Gubu; - const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu(Open$f({ - field: Open$f({ - id: String, - name: String, - kind: gubu_minExports.Skip(String), - label: gubu_minExports.Default(""), - options: Open$f({ - label: { field: gubu_minExports.Default("label") }, - value: { field: gubu_minExports.Default("value") }, - multiple: gubu_minExports.Default(false), - default: Open$f({}), - ents: Open$f({}) - }), - ux: Open$f({ - kind: gubu_minExports.Exact("Autocomplete"), - edit: gubu_minExports.Default(true) + const CMPNAME$i = "BasicEntityAutocompleteField"; + const { Open: Open$g } = gubu_minExports.Gubu; + const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu( + Open$g({ + field: Open$g({ + id: String, + name: String, + kind: gubu_minExports.Skip(String), + label: gubu_minExports.Default(""), + options: Open$g({ + label: { field: gubu_minExports.Default("label") }, + value: { field: gubu_minExports.Default("value") }, + multiple: gubu_minExports.Default(false), + default: Open$g({}), + ents: Open$g({}) + }), + ux: Open$g({ + kind: gubu_minExports.Exact("Autocomplete"), + edit: gubu_minExports.Default(true) + }) }) - }) - }), { name: CMPNAME$h }); + }), + { name: CMPNAME$i } + ); function BasicEntityAutocompleteField(props) { const { spec } = props; const basicEntityAutocompleteField = BasicEntityAutocompleteFieldSpecShape(spec); @@ -64795,7 +64801,10 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha if (multiple === false) { if (Object.keys(defaultValues).length > 0) { const firstKey = Object.keys(defaultValues)[0]; - resolvedDefault = { value: firstKey, label: defaultValues[firstKey][labelField] }; + resolvedDefault = { + value: firstKey, + label: defaultValues[firstKey][labelField] + }; } else { resolvedDefault = null; } @@ -64828,29 +64837,32 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha return val || []; } } - const CMPNAME$g = "BasicEntitySliderField"; - const { Open: Open$e } = gubu_minExports.Gubu; - const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu(Open$e({ - field: Open$e({ - id: String, - name: String, - kind: gubu_minExports.Skip(String), - label: gubu_minExports.Default("", String), - ux: Open$e({ - kind: gubu_minExports.Exact("Slider"), - edit: gubu_minExports.Default(true), - step: gubu_minExports.Default(1), - min: gubu_minExports.Default(0), - max: gubu_minExports.Default(100), - props: { - marks: gubu_minExports.Default({}), - valueLabelDisplay: gubu_minExports.Exact("on", "auto", "off").Default("auto"), - direction: gubu_minExports.Exact("horizontal", "vertical").Default("horizontal"), - track: gubu_minExports.Exact("normal", "inverted", "disabled").Default("normal") - } + const CMPNAME$h = "BasicEntitySliderField"; + const { Open: Open$f } = gubu_minExports.Gubu; + const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu( + Open$f({ + field: Open$f({ + id: String, + name: String, + kind: gubu_minExports.Skip(String), + label: gubu_minExports.Default("", String), + ux: Open$f({ + kind: gubu_minExports.Exact("Slider"), + edit: gubu_minExports.Default(true), + step: gubu_minExports.Default(1), + min: gubu_minExports.Default(0), + max: gubu_minExports.Default(100), + props: { + marks: gubu_minExports.Default({}), + valueLabelDisplay: gubu_minExports.Exact("on", "auto", "off").Default("auto"), + direction: gubu_minExports.Exact("horizontal", "vertical").Default("horizontal"), + track: gubu_minExports.Exact("normal", "inverted", "disabled").Default("normal") + } + }) }) - }) - }), { name: CMPNAME$g }); + }), + { name: CMPNAME$h } + ); function BasicEntitySliderField(props) { const { spec } = props; const basicEntityAutocompleteField = BasicEntitySliderFieldSpecShape(spec); @@ -64889,31 +64901,37 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha return false; } if (typeof marks === "object") { - return Object.entries(marks).map(([key, value]) => ({ label: value, value: +key })); + return Object.entries(marks).map(([key, value]) => ({ + label: value, + value: +key + })); } return marks; } - const CMPNAME$f = "BasicEntitySliderField"; - const { Open: Open$d } = gubu_minExports.Gubu; - const BasicEntityRadioGroupFieldSpecShape = gubu_minExports.Gubu(Open$d({ - field: Open$d({ - id: String, - name: String, - kind: gubu_minExports.Skip(String), - label: gubu_minExports.Default("", String), - ux: Open$d({ - kind: gubu_minExports.Exact("RadioGroup"), - edit: gubu_minExports.Default(true), - direction: gubu_minExports.Exact("row", "column").Default("row") - }), - options: Open$d({ - label: { field: gubu_minExports.Default("label") }, - value: { field: gubu_minExports.Default("value") }, - default: Open$d({}), - ents: Open$d({}) + const CMPNAME$g = "BasicEntitySliderField"; + const { Open: Open$e } = gubu_minExports.Gubu; + const BasicEntityRadioGroupFieldSpecShape = gubu_minExports.Gubu( + Open$e({ + field: Open$e({ + id: String, + name: String, + kind: gubu_minExports.Skip(String), + label: gubu_minExports.Default("", String), + ux: Open$e({ + kind: gubu_minExports.Exact("RadioGroup"), + edit: gubu_minExports.Default(true), + direction: gubu_minExports.Exact("row", "column").Default("row") + }), + options: Open$e({ + label: { field: gubu_minExports.Default("label") }, + value: { field: gubu_minExports.Default("value") }, + default: Open$e({}), + ents: Open$e({}) + }) }) - }) - }), { name: CMPNAME$f }); + }), + { name: CMPNAME$g } + ); function BasicEntityRadioGroupField(props) { const { spec } = props; const basicEntityRadioGroupField = BasicEntityRadioGroupFieldSpecShape(spec); @@ -64927,15 +64945,24 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha name: field.name, control, defaultValue: resolvedDefault, - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.RadioGroup, { value, onChange, row: "row" === field.ux.direction, children: resolvedOptions.map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx( - material.FormControlLabel, + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( + material.RadioGroup, { - value: option.value, - control: /* @__PURE__ */ jsxRuntimeExports.jsx(material.Radio, { disabled: !field.ux.edit }), - label: option.label + value, + onChange, + row: "row" === field.ux.direction, + children: resolvedOptions.map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx( + material.FormControlLabel, + { + value: option.value, + control: /* @__PURE__ */ jsxRuntimeExports.jsx(material.Radio, { disabled: !field.ux.edit }), + label: option.label + }, + `${option.value}-option` + )) }, - `${option.value}-option` - )) }, field.id) + field.id + ) }, `${field.id}-controller` ) @@ -64956,7 +64983,10 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha if (multiple === false) { if (Object.keys(defaultValues).length > 0) { const firstKey = Object.keys(defaultValues)[0]; - resolvedDefault = { value: firstKey, label: defaultValues[firstKey][labelField] }; + resolvedDefault = { + value: firstKey, + label: defaultValues[firstKey][labelField] + }; } else { resolvedDefault = null; } @@ -64971,21 +65001,24 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha resolvedDefault }; } - const CMPNAME$e = "BasicEntityTextBoxField"; - const { Open: Open$c } = gubu_minExports.Gubu; - const BasicEntityTextBoxFieldSpecShape = gubu_minExports.Gubu(Open$c({ - field: Open$c({ - id: String, - name: String, - kind: gubu_minExports.Skip(String), - label: gubu_minExports.Default("", String), - ux: Open$c({ - kind: gubu_minExports.Exact("TextBox"), - edit: gubu_minExports.Default(true), - props: Open$c({}) + const CMPNAME$f = "BasicEntityTextBoxField"; + const { Open: Open$d } = gubu_minExports.Gubu; + const BasicEntityTextBoxFieldSpecShape = gubu_minExports.Gubu( + Open$d({ + field: Open$d({ + id: String, + name: String, + kind: gubu_minExports.Skip(String), + label: gubu_minExports.Default("", String), + ux: Open$d({ + kind: gubu_minExports.Exact("TextBox"), + edit: gubu_minExports.Default(true), + props: Open$d({}) + }) }) - }) - }), { name: CMPNAME$e }); + }), + { name: CMPNAME$f } + ); function BasicEntityTextBoxField(props) { const { spec } = props; const basicEntityTextBoxField = BasicEntityTextBoxFieldSpecShape(spec); @@ -65009,21 +65042,24 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const { err } = props; return err ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-active", children: err.message }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-none" }); } - const CMPNAME$d = "BasicEntityTextField"; - const { Open: Open$b } = gubu_minExports.Gubu; - const BasicEntityTextFieldSpecShape = gubu_minExports.Gubu(Open$b({ - field: Open$b({ - id: String, - name: String, - kind: gubu_minExports.Skip(String), - label: gubu_minExports.Default("", String), - ux: Open$b({ - kind: gubu_minExports.Exact("Text"), - edit: gubu_minExports.Default(true), - props: Open$b({}) + const CMPNAME$e = "BasicEntityTextField"; + const { Open: Open$c } = gubu_minExports.Gubu; + const BasicEntityTextFieldSpecShape = gubu_minExports.Gubu( + Open$c({ + field: Open$c({ + id: String, + name: String, + kind: gubu_minExports.Skip(String), + label: gubu_minExports.Default("", String), + ux: Open$c({ + kind: gubu_minExports.Exact("Text"), + edit: gubu_minExports.Default(true), + props: Open$c({}) + }) }) - }) - }), { name: CMPNAME$d }); + }), + { name: CMPNAME$e } + ); function BasicEntityTextField(props) { const { spec } = props; const basicEntityTextBoxField = BasicEntityTextFieldSpecShape(spec); @@ -65045,21 +65081,24 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, field.id); } - const CMPNAME$c = "BasicEntityDateField"; - const { Open: Open$a } = gubu_minExports.Gubu; - const BasicEntityDateFieldSpecShape = gubu_minExports.Gubu(Open$a({ - field: Open$a({ - id: String, - name: String, - kind: gubu_minExports.Skip(String), - label: gubu_minExports.Default("", String), - ux: Open$a({ - kind: gubu_minExports.Exact("Date"), - edit: gubu_minExports.Default(true), - props: Open$a({}) + const CMPNAME$d = "BasicEntityDateField"; + const { Open: Open$b } = gubu_minExports.Gubu; + const BasicEntityDateFieldSpecShape = gubu_minExports.Gubu( + Open$b({ + field: Open$b({ + id: String, + name: String, + kind: gubu_minExports.Skip(String), + label: gubu_minExports.Default("", String), + ux: Open$b({ + kind: gubu_minExports.Exact("Date"), + edit: gubu_minExports.Default(true), + props: Open$b({}) + }) }) - }) - }), { name: CMPNAME$c }); + }), + { name: CMPNAME$d } + ); function BasicEntityDateField(props) { const { spec } = props; const basicEntityDateField = BasicEntityDateFieldSpecShape(spec); @@ -65079,21 +65118,24 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }, register(field.name)) ) }, field.id); } - const CMPNAME$b = "BasicEntityTimeField"; - const { Open: Open$9 } = gubu_minExports.Gubu; - const BasicEntityTimeFieldSpecShape = gubu_minExports.Gubu(Open$9({ - field: Open$9({ - id: String, - name: String, - kind: gubu_minExports.Skip(String), - label: gubu_minExports.Default("", String), - ux: Open$9({ - kind: gubu_minExports.Exact("Time"), - edit: gubu_minExports.Default(true), - props: Open$9({}) + const CMPNAME$c = "BasicEntityTimeField"; + const { Open: Open$a } = gubu_minExports.Gubu; + const BasicEntityTimeFieldSpecShape = gubu_minExports.Gubu( + Open$a({ + field: Open$a({ + id: String, + name: String, + kind: gubu_minExports.Skip(String), + label: gubu_minExports.Default("", String), + ux: Open$a({ + kind: gubu_minExports.Exact("Time"), + edit: gubu_minExports.Default(true), + props: Open$a({}) + }) }) - }) - }), { name: CMPNAME$b }); + }), + { name: CMPNAME$c } + ); function BasicEntityTimeField(props) { const { spec } = props; const basicEntityTimeField = BasicEntityTimeFieldSpecShape(spec); @@ -65113,21 +65155,24 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }, register(field.name)) ) }, field.id); } - const CMPNAME$a = "BasicEntityDateTimeField"; - const { Open: Open$8 } = gubu_minExports.Gubu; - const BasicEntityDateTimeFieldSpecShape = gubu_minExports.Gubu(Open$8({ - field: Open$8({ - id: String, - name: String, - kind: gubu_minExports.Skip(String), - label: gubu_minExports.Default("", String), - ux: Open$8({ - kind: gubu_minExports.Exact("DateTime"), - edit: gubu_minExports.Default(true), - props: Open$8({}) + const CMPNAME$b = "BasicEntityDateTimeField"; + const { Open: Open$9 } = gubu_minExports.Gubu; + const BasicEntityDateTimeFieldSpecShape = gubu_minExports.Gubu( + Open$9({ + field: Open$9({ + id: String, + name: String, + kind: gubu_minExports.Skip(String), + label: gubu_minExports.Default("", String), + ux: Open$9({ + kind: gubu_minExports.Exact("DateTime"), + edit: gubu_minExports.Default(true), + props: Open$9({}) + }) }) - }) - }), { name: CMPNAME$a }); + }), + { name: CMPNAME$b } + ); function BasicEntityDateTimeField(props) { const { spec } = props; const basicEntityDateTimeField = BasicEntityDateTimeFieldSpecShape(spec); @@ -65147,24 +65192,24 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }, register(field.name)) ) }, field.id); } - const CMPNAME$9 = "BasicEntitySliderField"; - const { Open: Open$7 } = gubu_minExports.Gubu; + const CMPNAME$a = "BasicEntitySliderField"; + const { Open: Open$8 } = gubu_minExports.Gubu; const BasicEntityRatingFieldSpecShape = gubu_minExports.Gubu( - Open$7({ - field: Open$7({ + Open$8({ + field: Open$8({ id: String, name: String, kind: gubu_minExports.Skip(String), label: gubu_minExports.Default("", String), - ux: Open$7({ + ux: Open$8({ kind: gubu_minExports.Exact("Rating"), edit: gubu_minExports.Default(true), precision: 1, - props: Open$7({}) + props: Open$8({}) }) }) }), - { name: CMPNAME$9 } + { name: CMPNAME$a } ); function BasicEntityRatingField(props) { const { spec } = props; @@ -65193,6 +65238,47 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ) ] }, `${field.id}-div`); } + const CMPNAME$9 = "BasicEntitySliderField"; + const { Open: Open$7 } = gubu_minExports.Gubu; + const BasicEntityButtonFieldSpecShape = gubu_minExports.Gubu( + Open$7({ + field: Open$7({ + id: String, + name: String, + kind: gubu_minExports.Skip(String), + label: gubu_minExports.Default("", String), + ux: Open$7({ + kind: gubu_minExports.Exact("Button"), + edit: gubu_minExports.Default(true), + props: Open$7({}) + }) + }) + }), + { name: CMPNAME$9 } + ); + function BasicEntityButtonField(props) { + const { spec } = props; + const basicEntityButtonField = BasicEntityButtonFieldSpecShape(spec); + const { control, field } = basicEntityButtonField; + return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx( + Controller, + { + name: field.name, + control, + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( + material.Button, + __spreadProps(__spreadValues({ + name: field.name, + value, + onClick: (_2) => onChange(value) + }, field.ux.props), { + children: field.label + }) + ) + }, + `${field.id}-controller` + ) }, `${field.id}-div`); + } const CMPNAME$8 = "BasicEntityField"; const { Open: Open$6 } = gubu_minExports.Gubu; const BasicEntityFieldSpecShape = gubu_minExports.Gubu( @@ -65213,7 +65299,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha "Autocomplete", "Slider", "RadioGroup", - "Rating" + "Rating", + "Button" ), edit: gubu_minExports.Default(true), rows: gubu_minExports.Default(3), @@ -65233,7 +65320,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha Autocomplete: BasicEntityAutocompleteField, Slider: BasicEntitySliderField, RadioGroup: BasicEntityRadioGroupField, - Rating: BasicEntityRatingField + Rating: BasicEntityRatingField, + Button: BasicEntityButtonField }; function BasicEntityField(props) { const { ctx, spec } = props; diff --git a/src/lib/BasicEntityButtonField.tsx b/src/lib/BasicEntityButtonField.tsx new file mode 100644 index 0000000..a8e96cc --- /dev/null +++ b/src/lib/BasicEntityButtonField.tsx @@ -0,0 +1,57 @@ +import React from 'react' + +import { Button } from '@mui/material' +import { Controller } from 'react-hook-form' + +import type { Spec } from './basic-types' + +import { Default, Exact, Gubu, Skip } from 'gubu' +const CMPNAME = 'BasicEntitySliderField' + +const { Open } = Gubu +const BasicEntityButtonFieldSpecShape = Gubu( + Open({ + field: Open({ + id: String, + name: String, + kind: Skip(String), + label: Default('', String), + ux: Open({ + kind: Exact('Button'), + edit: Default(true), + props: Open({}), + }), + }), + }), + { name: CMPNAME } +) + +function BasicEntityButtonField(props: any) { + const { spec } = props + + const basicEntityButtonField: Spec = BasicEntityButtonFieldSpecShape(spec) + const { control, field } = basicEntityButtonField + // const val = getValues(field.name) + + return ( +
+ ( + + )} + /> +
+ ) +} + +export { BasicEntityButtonField } diff --git a/src/lib/BasicEntityField.tsx b/src/lib/BasicEntityField.tsx index 26bb0b6..a8c26bd 100644 --- a/src/lib/BasicEntityField.tsx +++ b/src/lib/BasicEntityField.tsx @@ -13,6 +13,7 @@ import { BasicEntityDateField } from './BasicEntityDateField' import { BasicEntityTimeField } from './BasicEntityTimeField' import { BasicEntityDateTimeField } from './BasicEntityDateTimeField' import { BasicEntityRatingField } from './BasicEntityRatingField' +import { BasicEntityButtonField } from './BasicEntityButtonField' const CMPNAME = 'BasicEntityField' @@ -35,7 +36,8 @@ const BasicEntityFieldSpecShape = Gubu( 'Autocomplete', 'Slider', 'RadioGroup', - 'Rating' + 'Rating', + 'Button' ), edit: Default(true), rows: Default(3), @@ -57,6 +59,7 @@ const fieldMap: any = { Slider: BasicEntitySliderField, RadioGroup: BasicEntityRadioGroupField, Rating: BasicEntityRatingField, + Button: BasicEntityButtonField, } function BasicEntityField(props: any) { diff --git a/src/lib/BasicEntityRatingField.tsx b/src/lib/BasicEntityRatingField.tsx index 2c21d76..5654658 100644 --- a/src/lib/BasicEntityRatingField.tsx +++ b/src/lib/BasicEntityRatingField.tsx @@ -1,12 +1,6 @@ -import React, { useEffect, forwardRef } from 'react' +import React from 'react' -import { - FormControlLabel, - Checkbox, - Box, - Rating, - FormLabel, -} from '@mui/material' +import { Rating, FormLabel } from '@mui/material' import { Controller } from 'react-hook-form' import type { Spec } from './basic-types' From 34cf5547de8a35d37c7bdb6202094bd5d0514c1d Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Sun, 28 Jul 2024 21:16:12 +0100 Subject: [PATCH 048/122] Add BasicEntityButtonGroupField component --- dist/BasicEntityButtonGroupField.d.ts | 2 + dist/voxgig-model-react.es.js | 3081 +++++++++++----------- dist/voxgig-model-react.umd.js | 3097 ++++++++++++----------- src/lib/BasicEntityButtonGroupField.tsx | 60 + src/lib/BasicEntityField.tsx | 5 +- 5 files changed, 3184 insertions(+), 3061 deletions(-) create mode 100644 dist/BasicEntityButtonGroupField.d.ts create mode 100644 src/lib/BasicEntityButtonGroupField.tsx diff --git a/dist/BasicEntityButtonGroupField.d.ts b/dist/BasicEntityButtonGroupField.d.ts new file mode 100644 index 0000000..5d98cfc --- /dev/null +++ b/dist/BasicEntityButtonGroupField.d.ts @@ -0,0 +1,2 @@ +declare function BasicEntityButtonGroupField(props: any): import("react/jsx-runtime").JSX.Element; +export { BasicEntityButtonGroupField }; diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index 47e533c..4fb145c 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -53,8 +53,8 @@ var __async = (__this, __arguments, generator) => { }); }; import * as React$1 from "react"; -import React__default, { isValidElement, Children, cloneElement, useMemo, useState, useReducer, useRef, useEffect, useCallback, memo as memo$2, Fragment, useLayoutEffect } from "react"; -import { Button as Button$1, Avatar, Menu as Menu$1, MenuItem as MenuItem$1, IconButton as IconButton$1, useTheme as useTheme$5, Box as Box$2, FormControlLabel as FormControlLabel$1, Checkbox as Checkbox$1, Autocomplete as Autocomplete$1, TextField as TextField$1, FormLabel as FormLabel$1, Slider as Slider$1, RadioGroup, Radio as Radio$1, Rating, Grid as Grid$1, Toolbar as Toolbar$1, Container as Container$2, Drawer as Drawer$1, List as List$1, ListItem as ListItem$1, ListItemButton as ListItemButton$1, ListItemIcon as ListItemIcon$1, ListItemText as ListItemText$1, Divider as Divider$1, Typography as Typography$1 } from "@mui/material"; +import React__default, { isValidElement, Children, cloneElement, useMemo, useState, useReducer, useRef, useEffect, useCallback, memo as memo$2, Fragment as Fragment$2, useLayoutEffect } from "react"; +import { Button as Button$1, Avatar, Menu as Menu$1, MenuItem as MenuItem$1, IconButton as IconButton$1, useTheme as useTheme$5, Box as Box$2, FormControlLabel as FormControlLabel$1, Checkbox as Checkbox$1, Autocomplete as Autocomplete$1, TextField as TextField$1, FormLabel as FormLabel$1, Slider as Slider$1, RadioGroup, Radio as Radio$1, Rating, ButtonGroup, Grid as Grid$1, Toolbar as Toolbar$1, Container as Container$2, Drawer as Drawer$1, List as List$1, ListItem as ListItem$1, ListItemButton as ListItemButton$1, ListItemIcon as ListItemIcon$1, ListItemText as ListItemText$1, Divider as Divider$1, Typography as Typography$1 } from "@mui/material"; import emStyled from "@emotion/styled"; import { CacheProvider, Global, ThemeContext as ThemeContext$1, css, keyframes } from "@emotion/react"; import { useSelector } from "react-redux"; @@ -66,31 +66,31 @@ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof win function getDefaultExportFromCjs(x) { return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x; } -function getDefaultExportFromNamespaceIfPresent(n) { - return n && Object.prototype.hasOwnProperty.call(n, "default") ? n["default"] : n; +function getDefaultExportFromNamespaceIfPresent(n2) { + return n2 && Object.prototype.hasOwnProperty.call(n2, "default") ? n2["default"] : n2; } -function getDefaultExportFromNamespaceIfNotNamed(n) { - return n && Object.prototype.hasOwnProperty.call(n, "default") && Object.keys(n).length === 1 ? n["default"] : n; +function getDefaultExportFromNamespaceIfNotNamed(n2) { + return n2 && Object.prototype.hasOwnProperty.call(n2, "default") && Object.keys(n2).length === 1 ? n2["default"] : n2; } -function getAugmentedNamespace(n) { - if (n.__esModule) return n; - var f = n.default; - if (typeof f == "function") { +function getAugmentedNamespace(n2) { + if (n2.__esModule) return n2; + var f2 = n2.default; + if (typeof f2 == "function") { var a = function a2() { if (this instanceof a2) { - return Reflect.construct(f, arguments, this.constructor); + return Reflect.construct(f2, arguments, this.constructor); } - return f.apply(this, arguments); + return f2.apply(this, arguments); }; - a.prototype = f.prototype; + a.prototype = f2.prototype; } else a = {}; Object.defineProperty(a, "__esModule", { value: true }); - Object.keys(n).forEach(function(k) { - var d = Object.getOwnPropertyDescriptor(n, k); - Object.defineProperty(a, k, d.get ? d : { + Object.keys(n2).forEach(function(k2) { + var d = Object.getOwnPropertyDescriptor(n2, k2); + Object.defineProperty(a, k2, d.get ? d : { enumerable: true, get: function() { - return n[k]; + return n2[k2]; } }); }); @@ -107,26 +107,20 @@ var reactJsxRuntime_production_min = {}; * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -var hasRequiredReactJsxRuntime_production_min; -function requireReactJsxRuntime_production_min() { - if (hasRequiredReactJsxRuntime_production_min) return reactJsxRuntime_production_min; - hasRequiredReactJsxRuntime_production_min = 1; - "use strict"; - var f = React__default, k = Symbol.for("react.element"), l = Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, n = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: true, ref: true, __self: true, __source: true }; - function q(c, a, g) { - var b, d = {}, e = null, h = null; - void 0 !== g && (e = "" + g); - void 0 !== a.key && (e = "" + a.key); - void 0 !== a.ref && (h = a.ref); - for (b in a) m.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]); - if (c && c.defaultProps) for (b in a = c.defaultProps, a) void 0 === d[b] && (d[b] = a[b]); - return { $$typeof: k, type: c, key: e, ref: h, props: d, _owner: n.current }; - } - reactJsxRuntime_production_min.Fragment = l; - reactJsxRuntime_production_min.jsx = q; - reactJsxRuntime_production_min.jsxs = q; - return reactJsxRuntime_production_min; -} +"use strict"; +var f = React__default, k = Symbol.for("react.element"), l = Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, n = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: true, ref: true, __self: true, __source: true }; +function q(c, a, g) { + var b, d = {}, e = null, h = null; + void 0 !== g && (e = "" + g); + void 0 !== a.key && (e = "" + a.key); + void 0 !== a.ref && (h = a.ref); + for (b in a) m.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]); + if (c && c.defaultProps) for (b in a = c.defaultProps, a) void 0 === d[b] && (d[b] = a[b]); + return { $$typeof: k, type: c, key: e, ref: h, props: d, _owner: n.current }; +} +var Fragment$1 = reactJsxRuntime_production_min.Fragment = l; +var jsx = reactJsxRuntime_production_min.jsx = q; +var jsxs = reactJsxRuntime_production_min.jsxs = q; var reactJsxRuntime_development = {}; /** * @license React @@ -137,914 +131,905 @@ var reactJsxRuntime_development = {}; * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -var hasRequiredReactJsxRuntime_development; -function requireReactJsxRuntime_development() { - if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development; - hasRequiredReactJsxRuntime_development = 1; - "use strict"; - if (process.env.NODE_ENV !== "production") { - (function() { - "use strict"; - var React2 = React__default; - var REACT_ELEMENT_TYPE = Symbol.for("react.element"); - var REACT_PORTAL_TYPE = Symbol.for("react.portal"); - var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); - var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"); - var REACT_PROFILER_TYPE = Symbol.for("react.profiler"); - var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); - var REACT_CONTEXT_TYPE = Symbol.for("react.context"); - var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"); - var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"); - var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"); - var REACT_MEMO_TYPE = Symbol.for("react.memo"); - var REACT_LAZY_TYPE = Symbol.for("react.lazy"); - var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"); - var MAYBE_ITERATOR_SYMBOL = Symbol.iterator; - var FAUX_ITERATOR_SYMBOL = "@@iterator"; - function getIteratorFn(maybeIterable) { - if (maybeIterable === null || typeof maybeIterable !== "object") { - return null; - } - var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; - if (typeof maybeIterator === "function") { - return maybeIterator; - } +var jsxs_1; +var jsx_1; +var Fragment; +"use strict"; +if (process.env.NODE_ENV !== "production") { + (function() { + "use strict"; + var React2 = React__default; + var REACT_ELEMENT_TYPE = Symbol.for("react.element"); + var REACT_PORTAL_TYPE = Symbol.for("react.portal"); + var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); + var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"); + var REACT_PROFILER_TYPE = Symbol.for("react.profiler"); + var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); + var REACT_CONTEXT_TYPE = Symbol.for("react.context"); + var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"); + var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"); + var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"); + var REACT_MEMO_TYPE = Symbol.for("react.memo"); + var REACT_LAZY_TYPE = Symbol.for("react.lazy"); + var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"); + var MAYBE_ITERATOR_SYMBOL = Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = "@@iterator"; + function getIteratorFn(maybeIterable) { + if (maybeIterable === null || typeof maybeIterable !== "object") { return null; } - var ReactSharedInternals = React2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; - function error(format) { - { - { - for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { - args[_key2 - 1] = arguments[_key2]; - } - printWarning("error", format, args); - } - } + var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; + if (typeof maybeIterator === "function") { + return maybeIterator; } - function printWarning(level, format, args) { + return null; + } + var ReactSharedInternals = React2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; + function error(format) { + { { - var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame2.getStackAddendum(); - if (stack !== "") { - format += "%s"; - args = args.concat([stack]); + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; } - var argsWithFormat = args.map(function(item) { - return String(item); - }); - argsWithFormat.unshift("Warning: " + format); - Function.prototype.apply.call(console[level], console, argsWithFormat); + printWarning("error", format, args); } } - var enableScopeAPI = false; - var enableCacheElement = false; - var enableTransitionTracing = false; - var enableLegacyHidden = false; - var enableDebugTracing = false; - var REACT_MODULE_REFERENCE; + } + function printWarning(level, format, args) { { - REACT_MODULE_REFERENCE = Symbol.for("react.module.reference"); - } - function isValidElementType(type) { - if (typeof type === "string" || typeof type === "function") { - return true; + var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame; + var stack = ReactDebugCurrentFrame2.getStackAddendum(); + if (stack !== "") { + format += "%s"; + args = args.concat([stack]); } - if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) { - return true; - } - if (typeof type === "object" && type !== null) { - if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object - // types supported by any Flight configuration anywhere since - // we don't know which Flight build this will end up being used - // with. - type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) { - return true; - } - } - return false; + var argsWithFormat = args.map(function(item) { + return String(item); + }); + argsWithFormat.unshift("Warning: " + format); + Function.prototype.apply.call(console[level], console, argsWithFormat); } - function getWrappedName2(outerType, innerType, wrapperName) { - var displayName = outerType.displayName; - if (displayName) { - return displayName; - } - var functionName = innerType.displayName || innerType.name || ""; - return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName; + } + var enableScopeAPI = false; + var enableCacheElement = false; + var enableTransitionTracing = false; + var enableLegacyHidden = false; + var enableDebugTracing = false; + var REACT_MODULE_REFERENCE; + { + REACT_MODULE_REFERENCE = Symbol.for("react.module.reference"); + } + function isValidElementType(type) { + if (typeof type === "string" || typeof type === "function") { + return true; } - function getContextName(type) { - return type.displayName || "Context"; + if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) { + return true; } - function getComponentNameFromType(type) { - if (type == null) { - return null; - } - { - if (typeof type.tag === "number") { - error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."); - } - } - if (typeof type === "function") { - return type.displayName || type.name || null; - } - if (typeof type === "string") { - return type; - } - switch (type) { - case REACT_FRAGMENT_TYPE: - return "Fragment"; - case REACT_PORTAL_TYPE: - return "Portal"; - case REACT_PROFILER_TYPE: - return "Profiler"; - case REACT_STRICT_MODE_TYPE: - return "StrictMode"; - case REACT_SUSPENSE_TYPE: - return "Suspense"; - case REACT_SUSPENSE_LIST_TYPE: - return "SuspenseList"; - } - if (typeof type === "object") { - switch (type.$$typeof) { - case REACT_CONTEXT_TYPE: - var context = type; - return getContextName(context) + ".Consumer"; - case REACT_PROVIDER_TYPE: - var provider = type; - return getContextName(provider._context) + ".Provider"; - case REACT_FORWARD_REF_TYPE: - return getWrappedName2(type, type.render, "ForwardRef"); - case REACT_MEMO_TYPE: - var outerName = type.displayName || null; - if (outerName !== null) { - return outerName; - } - return getComponentNameFromType(type.type) || "Memo"; - case REACT_LAZY_TYPE: { - var lazyComponent = type; - var payload = lazyComponent._payload; - var init2 = lazyComponent._init; - try { - return getComponentNameFromType(init2(payload)); - } catch (x) { - return null; - } - } - } + if (typeof type === "object" && type !== null) { + if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object + // types supported by any Flight configuration anywhere since + // we don't know which Flight build this will end up being used + // with. + type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) { + return true; } + } + return false; + } + function getWrappedName2(outerType, innerType, wrapperName) { + var displayName = outerType.displayName; + if (displayName) { + return displayName; + } + var functionName = innerType.displayName || innerType.name || ""; + return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName; + } + function getContextName(type) { + return type.displayName || "Context"; + } + function getComponentNameFromType(type) { + if (type == null) { return null; } - var assign2 = Object.assign; - var disabledDepth = 0; - var prevLog; - var prevInfo; - var prevWarn; - var prevError; - var prevGroup; - var prevGroupCollapsed; - var prevGroupEnd; - function disabledLog() { - } - disabledLog.__reactDisabledLog = true; - function disableLogs() { - { - if (disabledDepth === 0) { - prevLog = console.log; - prevInfo = console.info; - prevWarn = console.warn; - prevError = console.error; - prevGroup = console.group; - prevGroupCollapsed = console.groupCollapsed; - prevGroupEnd = console.groupEnd; - var props = { - configurable: true, - enumerable: true, - value: disabledLog, - writable: true - }; - Object.defineProperties(console, { - info: props, - log: props, - warn: props, - error: props, - group: props, - groupCollapsed: props, - groupEnd: props - }); - } - disabledDepth++; + { + if (typeof type.tag === "number") { + error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."); } } - function reenableLogs() { - { - disabledDepth--; - if (disabledDepth === 0) { - var props = { - configurable: true, - enumerable: true, - writable: true - }; - Object.defineProperties(console, { - log: assign2({}, props, { - value: prevLog - }), - info: assign2({}, props, { - value: prevInfo - }), - warn: assign2({}, props, { - value: prevWarn - }), - error: assign2({}, props, { - value: prevError - }), - group: assign2({}, props, { - value: prevGroup - }), - groupCollapsed: assign2({}, props, { - value: prevGroupCollapsed - }), - groupEnd: assign2({}, props, { - value: prevGroupEnd - }) - }); - } - if (disabledDepth < 0) { - error("disabledDepth fell below zero. This is a bug in React. Please file an issue."); - } - } + if (typeof type === "function") { + return type.displayName || type.name || null; } - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; - var prefix2; - function describeBuiltInComponentFrame(name, source, ownerFn) { - { - if (prefix2 === void 0) { + if (typeof type === "string") { + return type; + } + switch (type) { + case REACT_FRAGMENT_TYPE: + return "Fragment"; + case REACT_PORTAL_TYPE: + return "Portal"; + case REACT_PROFILER_TYPE: + return "Profiler"; + case REACT_STRICT_MODE_TYPE: + return "StrictMode"; + case REACT_SUSPENSE_TYPE: + return "Suspense"; + case REACT_SUSPENSE_LIST_TYPE: + return "SuspenseList"; + } + if (typeof type === "object") { + switch (type.$$typeof) { + case REACT_CONTEXT_TYPE: + var context = type; + return getContextName(context) + ".Consumer"; + case REACT_PROVIDER_TYPE: + var provider = type; + return getContextName(provider._context) + ".Provider"; + case REACT_FORWARD_REF_TYPE: + return getWrappedName2(type, type.render, "ForwardRef"); + case REACT_MEMO_TYPE: + var outerName = type.displayName || null; + if (outerName !== null) { + return outerName; + } + return getComponentNameFromType(type.type) || "Memo"; + case REACT_LAZY_TYPE: { + var lazyComponent = type; + var payload = lazyComponent._payload; + var init2 = lazyComponent._init; try { - throw Error(); + return getComponentNameFromType(init2(payload)); } catch (x) { - var match2 = x.stack.trim().match(/\n( *(at )?)/); - prefix2 = match2 && match2[1] || ""; + return null; } } - return "\n" + prefix2 + name; } } - var reentry = false; - var componentFrameCache; + return null; + } + var assign2 = Object.assign; + var disabledDepth = 0; + var prevLog; + var prevInfo; + var prevWarn; + var prevError; + var prevGroup; + var prevGroupCollapsed; + var prevGroupEnd; + function disabledLog() { + } + disabledLog.__reactDisabledLog = true; + function disableLogs() { { - var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map; - componentFrameCache = new PossiblyWeakMap(); + if (disabledDepth === 0) { + prevLog = console.log; + prevInfo = console.info; + prevWarn = console.warn; + prevError = console.error; + prevGroup = console.group; + prevGroupCollapsed = console.groupCollapsed; + prevGroupEnd = console.groupEnd; + var props = { + configurable: true, + enumerable: true, + value: disabledLog, + writable: true + }; + Object.defineProperties(console, { + info: props, + log: props, + warn: props, + error: props, + group: props, + groupCollapsed: props, + groupEnd: props + }); + } + disabledDepth++; } - function describeNativeComponentFrame(fn2, construct) { - if (!fn2 || reentry) { - return ""; + } + function reenableLogs() { + { + disabledDepth--; + if (disabledDepth === 0) { + var props = { + configurable: true, + enumerable: true, + writable: true + }; + Object.defineProperties(console, { + log: assign2({}, props, { + value: prevLog + }), + info: assign2({}, props, { + value: prevInfo + }), + warn: assign2({}, props, { + value: prevWarn + }), + error: assign2({}, props, { + value: prevError + }), + group: assign2({}, props, { + value: prevGroup + }), + groupCollapsed: assign2({}, props, { + value: prevGroupCollapsed + }), + groupEnd: assign2({}, props, { + value: prevGroupEnd + }) + }); } - { - var frame = componentFrameCache.get(fn2); - if (frame !== void 0) { - return frame; + if (disabledDepth < 0) { + error("disabledDepth fell below zero. This is a bug in React. Please file an issue."); + } + } + } + var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; + var prefix2; + function describeBuiltInComponentFrame(name, source, ownerFn) { + { + if (prefix2 === void 0) { + try { + throw Error(); + } catch (x) { + var match2 = x.stack.trim().match(/\n( *(at )?)/); + prefix2 = match2 && match2[1] || ""; } } - var control; - reentry = true; - var previousPrepareStackTrace = Error.prepareStackTrace; - Error.prepareStackTrace = void 0; - var previousDispatcher; - { - previousDispatcher = ReactCurrentDispatcher.current; - ReactCurrentDispatcher.current = null; - disableLogs(); + return "\n" + prefix2 + name; + } + } + var reentry = false; + var componentFrameCache; + { + var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map; + componentFrameCache = new PossiblyWeakMap(); + } + function describeNativeComponentFrame(fn2, construct) { + if (!fn2 || reentry) { + return ""; + } + { + var frame = componentFrameCache.get(fn2); + if (frame !== void 0) { + return frame; } - try { - if (construct) { - var Fake = function() { + } + var control; + reentry = true; + var previousPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + var previousDispatcher; + { + previousDispatcher = ReactCurrentDispatcher.current; + ReactCurrentDispatcher.current = null; + disableLogs(); + } + try { + if (construct) { + var Fake = function() { + throw Error(); + }; + Object.defineProperty(Fake.prototype, "props", { + set: function() { throw Error(); - }; - Object.defineProperty(Fake.prototype, "props", { - set: function() { - throw Error(); - } - }); - if (typeof Reflect === "object" && Reflect.construct) { - try { - Reflect.construct(Fake, []); - } catch (x) { - control = x; - } - Reflect.construct(fn2, [], Fake); - } else { - try { - Fake.call(); - } catch (x) { - control = x; - } - fn2.call(Fake.prototype); } + }); + if (typeof Reflect === "object" && Reflect.construct) { + try { + Reflect.construct(Fake, []); + } catch (x) { + control = x; + } + Reflect.construct(fn2, [], Fake); } else { try { - throw Error(); + Fake.call(); } catch (x) { control = x; } - fn2(); + fn2.call(Fake.prototype); } - } catch (sample) { - if (sample && control && typeof sample.stack === "string") { - var sampleLines = sample.stack.split("\n"); - var controlLines = control.stack.split("\n"); - var s = sampleLines.length - 1; - var c = controlLines.length - 1; - while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { - c--; - } - for (; s >= 1 && c >= 0; s--, c--) { - if (sampleLines[s] !== controlLines[c]) { - if (s !== 1 || c !== 1) { - do { - s--; - c--; - if (c < 0 || sampleLines[s] !== controlLines[c]) { - var _frame = "\n" + sampleLines[s].replace(" at new ", " at "); - if (fn2.displayName && _frame.includes("")) { - _frame = _frame.replace("", fn2.displayName); - } - { - if (typeof fn2 === "function") { - componentFrameCache.set(fn2, _frame); - } + } else { + try { + throw Error(); + } catch (x) { + control = x; + } + fn2(); + } + } catch (sample) { + if (sample && control && typeof sample.stack === "string") { + var sampleLines = sample.stack.split("\n"); + var controlLines = control.stack.split("\n"); + var s = sampleLines.length - 1; + var c = controlLines.length - 1; + while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { + c--; + } + for (; s >= 1 && c >= 0; s--, c--) { + if (sampleLines[s] !== controlLines[c]) { + if (s !== 1 || c !== 1) { + do { + s--; + c--; + if (c < 0 || sampleLines[s] !== controlLines[c]) { + var _frame = "\n" + sampleLines[s].replace(" at new ", " at "); + if (fn2.displayName && _frame.includes("")) { + _frame = _frame.replace("", fn2.displayName); + } + { + if (typeof fn2 === "function") { + componentFrameCache.set(fn2, _frame); } - return _frame; } - } while (s >= 1 && c >= 0); - } - break; + return _frame; + } + } while (s >= 1 && c >= 0); } + break; } } - } finally { - reentry = false; - { - ReactCurrentDispatcher.current = previousDispatcher; - reenableLogs(); - } - Error.prepareStackTrace = previousPrepareStackTrace; } - var name = fn2 ? fn2.displayName || fn2.name : ""; - var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ""; + } finally { + reentry = false; { - if (typeof fn2 === "function") { - componentFrameCache.set(fn2, syntheticFrame); - } + ReactCurrentDispatcher.current = previousDispatcher; + reenableLogs(); } - return syntheticFrame; + Error.prepareStackTrace = previousPrepareStackTrace; } - function describeFunctionComponentFrame(fn2, source, ownerFn) { - { - return describeNativeComponentFrame(fn2, false); + var name = fn2 ? fn2.displayName || fn2.name : ""; + var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ""; + { + if (typeof fn2 === "function") { + componentFrameCache.set(fn2, syntheticFrame); } } - function shouldConstruct(Component) { - var prototype = Component.prototype; - return !!(prototype && prototype.isReactComponent); + return syntheticFrame; + } + function describeFunctionComponentFrame(fn2, source, ownerFn) { + { + return describeNativeComponentFrame(fn2, false); } - function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { - if (type == null) { - return ""; - } - if (typeof type === "function") { - { - return describeNativeComponentFrame(type, shouldConstruct(type)); - } - } - if (typeof type === "string") { - return describeBuiltInComponentFrame(type); - } - switch (type) { - case REACT_SUSPENSE_TYPE: - return describeBuiltInComponentFrame("Suspense"); - case REACT_SUSPENSE_LIST_TYPE: - return describeBuiltInComponentFrame("SuspenseList"); + } + function shouldConstruct(Component) { + var prototype = Component.prototype; + return !!(prototype && prototype.isReactComponent); + } + function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { + if (type == null) { + return ""; + } + if (typeof type === "function") { + { + return describeNativeComponentFrame(type, shouldConstruct(type)); } - if (typeof type === "object") { - switch (type.$$typeof) { - case REACT_FORWARD_REF_TYPE: - return describeFunctionComponentFrame(type.render); - case REACT_MEMO_TYPE: - return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn); - case REACT_LAZY_TYPE: { - var lazyComponent = type; - var payload = lazyComponent._payload; - var init2 = lazyComponent._init; - try { - return describeUnknownElementTypeFrameInDEV(init2(payload), source, ownerFn); - } catch (x) { - } + } + if (typeof type === "string") { + return describeBuiltInComponentFrame(type); + } + switch (type) { + case REACT_SUSPENSE_TYPE: + return describeBuiltInComponentFrame("Suspense"); + case REACT_SUSPENSE_LIST_TYPE: + return describeBuiltInComponentFrame("SuspenseList"); + } + if (typeof type === "object") { + switch (type.$$typeof) { + case REACT_FORWARD_REF_TYPE: + return describeFunctionComponentFrame(type.render); + case REACT_MEMO_TYPE: + return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn); + case REACT_LAZY_TYPE: { + var lazyComponent = type; + var payload = lazyComponent._payload; + var init2 = lazyComponent._init; + try { + return describeUnknownElementTypeFrameInDEV(init2(payload), source, ownerFn); + } catch (x) { } } } - return ""; } - var hasOwnProperty = Object.prototype.hasOwnProperty; - var loggedTypeFailures = {}; - var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; - function setCurrentlyValidatingElement(element) { - { - if (element) { - var owner = element._owner; - var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); - ReactDebugCurrentFrame.setExtraStackFrame(stack); - } else { - ReactDebugCurrentFrame.setExtraStackFrame(null); - } + return ""; + } + var hasOwnProperty = Object.prototype.hasOwnProperty; + var loggedTypeFailures = {}; + var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + function setCurrentlyValidatingElement(element) { + { + if (element) { + var owner = element._owner; + var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); + ReactDebugCurrentFrame.setExtraStackFrame(stack); + } else { + ReactDebugCurrentFrame.setExtraStackFrame(null); } } - function checkPropTypes(typeSpecs, values2, location, componentName, element) { - { - var has2 = Function.call.bind(hasOwnProperty); - for (var typeSpecName in typeSpecs) { - if (has2(typeSpecs, typeSpecName)) { - var error$1 = void 0; - try { - if (typeof typeSpecs[typeSpecName] !== "function") { - var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); - err.name = "Invariant Violation"; - throw err; - } - error$1 = typeSpecs[typeSpecName](values2, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); - } catch (ex) { - error$1 = ex; - } - if (error$1 && !(error$1 instanceof Error)) { - setCurrentlyValidatingElement(element); - error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1); - setCurrentlyValidatingElement(null); - } - if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) { - loggedTypeFailures[error$1.message] = true; - setCurrentlyValidatingElement(element); - error("Failed %s type: %s", location, error$1.message); - setCurrentlyValidatingElement(null); + } + function checkPropTypes(typeSpecs, values2, location, componentName, element) { + { + var has2 = Function.call.bind(hasOwnProperty); + for (var typeSpecName in typeSpecs) { + if (has2(typeSpecs, typeSpecName)) { + var error$1 = void 0; + try { + if (typeof typeSpecs[typeSpecName] !== "function") { + var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); + err.name = "Invariant Violation"; + throw err; } + error$1 = typeSpecs[typeSpecName](values2, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); + } catch (ex) { + error$1 = ex; + } + if (error$1 && !(error$1 instanceof Error)) { + setCurrentlyValidatingElement(element); + error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1); + setCurrentlyValidatingElement(null); + } + if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) { + loggedTypeFailures[error$1.message] = true; + setCurrentlyValidatingElement(element); + error("Failed %s type: %s", location, error$1.message); + setCurrentlyValidatingElement(null); } } } } - var isArrayImpl = Array.isArray; - function isArray(a) { - return isArrayImpl(a); + } + var isArrayImpl = Array.isArray; + function isArray(a) { + return isArrayImpl(a); + } + function typeName(value) { + { + var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag; + var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object"; + return type; } - function typeName(value) { - { - var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag; - var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object"; - return type; + } + function willCoercionThrow(value) { + { + try { + testStringCoercion(value); + return false; + } catch (e) { + return true; } } - function willCoercionThrow(value) { - { - try { - testStringCoercion(value); - return false; - } catch (e) { - return true; - } + } + function testStringCoercion(value) { + return "" + value; + } + function checkKeyStringCoercion(value) { + { + if (willCoercionThrow(value)) { + error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value)); + return testStringCoercion(value); } } - function testStringCoercion(value) { - return "" + value; - } - function checkKeyStringCoercion(value) { - { - if (willCoercionThrow(value)) { - error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value)); - return testStringCoercion(value); + } + var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; + var RESERVED_PROPS = { + key: true, + ref: true, + __self: true, + __source: true + }; + var specialPropKeyWarningShown; + var specialPropRefWarningShown; + var didWarnAboutStringRefs; + { + didWarnAboutStringRefs = {}; + } + function hasValidRef(config2) { + { + if (hasOwnProperty.call(config2, "ref")) { + var getter = Object.getOwnPropertyDescriptor(config2, "ref").get; + if (getter && getter.isReactWarning) { + return false; } } } - var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; - var RESERVED_PROPS = { - key: true, - ref: true, - __self: true, - __source: true - }; - var specialPropKeyWarningShown; - var specialPropRefWarningShown; - var didWarnAboutStringRefs; + return config2.ref !== void 0; + } + function hasValidKey(config2) { { - didWarnAboutStringRefs = {}; - } - function hasValidRef(config2) { - { - if (hasOwnProperty.call(config2, "ref")) { - var getter = Object.getOwnPropertyDescriptor(config2, "ref").get; - if (getter && getter.isReactWarning) { - return false; - } + if (hasOwnProperty.call(config2, "key")) { + var getter = Object.getOwnPropertyDescriptor(config2, "key").get; + if (getter && getter.isReactWarning) { + return false; } } - return config2.ref !== void 0; } - function hasValidKey(config2) { - { - if (hasOwnProperty.call(config2, "key")) { - var getter = Object.getOwnPropertyDescriptor(config2, "key").get; - if (getter && getter.isReactWarning) { - return false; - } + return config2.key !== void 0; + } + function warnIfStringRefCannotBeAutoConverted(config2, self2) { + { + if (typeof config2.ref === "string" && ReactCurrentOwner.current && self2 && ReactCurrentOwner.current.stateNode !== self2) { + var componentName = getComponentNameFromType(ReactCurrentOwner.current.type); + if (!didWarnAboutStringRefs[componentName]) { + error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config2.ref); + didWarnAboutStringRefs[componentName] = true; } } - return config2.key !== void 0; } - function warnIfStringRefCannotBeAutoConverted(config2, self2) { - { - if (typeof config2.ref === "string" && ReactCurrentOwner.current && self2 && ReactCurrentOwner.current.stateNode !== self2) { - var componentName = getComponentNameFromType(ReactCurrentOwner.current.type); - if (!didWarnAboutStringRefs[componentName]) { - error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config2.ref); - didWarnAboutStringRefs[componentName] = true; - } + } + function defineKeyPropWarningGetter(props, displayName) { + { + var warnAboutAccessingKey = function() { + if (!specialPropKeyWarningShown) { + specialPropKeyWarningShown = true; + error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); } - } + }; + warnAboutAccessingKey.isReactWarning = true; + Object.defineProperty(props, "key", { + get: warnAboutAccessingKey, + configurable: true + }); } - function defineKeyPropWarningGetter(props, displayName) { - { - var warnAboutAccessingKey = function() { - if (!specialPropKeyWarningShown) { - specialPropKeyWarningShown = true; - error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); - } - }; - warnAboutAccessingKey.isReactWarning = true; - Object.defineProperty(props, "key", { - get: warnAboutAccessingKey, - configurable: true - }); - } + } + function defineRefPropWarningGetter(props, displayName) { + { + var warnAboutAccessingRef = function() { + if (!specialPropRefWarningShown) { + specialPropRefWarningShown = true; + error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); + } + }; + warnAboutAccessingRef.isReactWarning = true; + Object.defineProperty(props, "ref", { + get: warnAboutAccessingRef, + configurable: true + }); } - function defineRefPropWarningGetter(props, displayName) { - { - var warnAboutAccessingRef = function() { - if (!specialPropRefWarningShown) { - specialPropRefWarningShown = true; - error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); - } - }; - warnAboutAccessingRef.isReactWarning = true; - Object.defineProperty(props, "ref", { - get: warnAboutAccessingRef, - configurable: true - }); + } + var ReactElement = function(type, key, ref, self2, source, owner, props) { + var element = { + // This tag allows us to uniquely identify this as a React Element + $$typeof: REACT_ELEMENT_TYPE, + // Built-in properties that belong on the element + type, + key, + ref, + props, + // Record the component responsible for creating this element. + _owner: owner + }; + { + element._store = {}; + Object.defineProperty(element._store, "validated", { + configurable: false, + enumerable: false, + writable: true, + value: false + }); + Object.defineProperty(element, "_self", { + configurable: false, + enumerable: false, + writable: false, + value: self2 + }); + Object.defineProperty(element, "_source", { + configurable: false, + enumerable: false, + writable: false, + value: source + }); + if (Object.freeze) { + Object.freeze(element.props); + Object.freeze(element); } } - var ReactElement = function(type, key, ref, self2, source, owner, props) { - var element = { - // This tag allows us to uniquely identify this as a React Element - $$typeof: REACT_ELEMENT_TYPE, - // Built-in properties that belong on the element - type, - key, - ref, - props, - // Record the component responsible for creating this element. - _owner: owner - }; - { - element._store = {}; - Object.defineProperty(element._store, "validated", { - configurable: false, - enumerable: false, - writable: true, - value: false - }); - Object.defineProperty(element, "_self", { - configurable: false, - enumerable: false, - writable: false, - value: self2 - }); - Object.defineProperty(element, "_source", { - configurable: false, - enumerable: false, - writable: false, - value: source - }); - if (Object.freeze) { - Object.freeze(element.props); - Object.freeze(element); + return element; + }; + function jsxDEV(type, config2, maybeKey, source, self2) { + { + var propName; + var props = {}; + var key = null; + var ref = null; + if (maybeKey !== void 0) { + { + checkKeyStringCoercion(maybeKey); } + key = "" + maybeKey; } - return element; - }; - function jsxDEV(type, config2, maybeKey, source, self2) { - { - var propName; - var props = {}; - var key = null; - var ref = null; - if (maybeKey !== void 0) { - { - checkKeyStringCoercion(maybeKey); - } - key = "" + maybeKey; - } - if (hasValidKey(config2)) { - { - checkKeyStringCoercion(config2.key); - } - key = "" + config2.key; + if (hasValidKey(config2)) { + { + checkKeyStringCoercion(config2.key); } - if (hasValidRef(config2)) { - ref = config2.ref; - warnIfStringRefCannotBeAutoConverted(config2, self2); + key = "" + config2.key; + } + if (hasValidRef(config2)) { + ref = config2.ref; + warnIfStringRefCannotBeAutoConverted(config2, self2); + } + for (propName in config2) { + if (hasOwnProperty.call(config2, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + props[propName] = config2[propName]; } - for (propName in config2) { - if (hasOwnProperty.call(config2, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { - props[propName] = config2[propName]; + } + if (type && type.defaultProps) { + var defaultProps2 = type.defaultProps; + for (propName in defaultProps2) { + if (props[propName] === void 0) { + props[propName] = defaultProps2[propName]; } } - if (type && type.defaultProps) { - var defaultProps2 = type.defaultProps; - for (propName in defaultProps2) { - if (props[propName] === void 0) { - props[propName] = defaultProps2[propName]; - } - } + } + if (key || ref) { + var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type; + if (key) { + defineKeyPropWarningGetter(props, displayName); } - if (key || ref) { - var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type; - if (key) { - defineKeyPropWarningGetter(props, displayName); - } - if (ref) { - defineRefPropWarningGetter(props, displayName); - } + if (ref) { + defineRefPropWarningGetter(props, displayName); } - return ReactElement(type, key, ref, self2, source, ReactCurrentOwner.current, props); } + return ReactElement(type, key, ref, self2, source, ReactCurrentOwner.current, props); } - var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner; - var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; - function setCurrentlyValidatingElement$1(element) { - { - if (element) { - var owner = element._owner; - var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); - ReactDebugCurrentFrame$1.setExtraStackFrame(stack); - } else { - ReactDebugCurrentFrame$1.setExtraStackFrame(null); - } + } + var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner; + var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; + function setCurrentlyValidatingElement$1(element) { + { + if (element) { + var owner = element._owner; + var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); + ReactDebugCurrentFrame$1.setExtraStackFrame(stack); + } else { + ReactDebugCurrentFrame$1.setExtraStackFrame(null); } } - var propTypesMisspellWarningShown; + } + var propTypesMisspellWarningShown; + { + propTypesMisspellWarningShown = false; + } + function isValidElement2(object) { { - propTypesMisspellWarningShown = false; - } - function isValidElement2(object) { - { - return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; - } + return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; } - function getDeclarationErrorAddendum() { - { - if (ReactCurrentOwner$1.current) { - var name = getComponentNameFromType(ReactCurrentOwner$1.current.type); - if (name) { - return "\n\nCheck the render method of `" + name + "`."; - } + } + function getDeclarationErrorAddendum() { + { + if (ReactCurrentOwner$1.current) { + var name = getComponentNameFromType(ReactCurrentOwner$1.current.type); + if (name) { + return "\n\nCheck the render method of `" + name + "`."; } - return ""; } + return ""; } - function getSourceInfoErrorAddendum(source) { - { - if (source !== void 0) { - var fileName = source.fileName.replace(/^.*[\\\/]/, ""); - var lineNumber = source.lineNumber; - return "\n\nCheck your code at " + fileName + ":" + lineNumber + "."; - } - return ""; + } + function getSourceInfoErrorAddendum(source) { + { + if (source !== void 0) { + var fileName = source.fileName.replace(/^.*[\\\/]/, ""); + var lineNumber = source.lineNumber; + return "\n\nCheck your code at " + fileName + ":" + lineNumber + "."; } + return ""; } - var ownerHasKeyUseWarning = {}; - function getCurrentComponentErrorInfo(parentType) { - { - var info = getDeclarationErrorAddendum(); - if (!info) { - var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name; - if (parentName) { - info = "\n\nCheck the top-level render call using <" + parentName + ">."; - } + } + var ownerHasKeyUseWarning = {}; + function getCurrentComponentErrorInfo(parentType) { + { + var info = getDeclarationErrorAddendum(); + if (!info) { + var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name; + if (parentName) { + info = "\n\nCheck the top-level render call using <" + parentName + ">."; } - return info; } + return info; } - function validateExplicitKey(element, parentType) { - { - if (!element._store || element._store.validated || element.key != null) { - return; - } - element._store.validated = true; - var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); - if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { - return; - } - ownerHasKeyUseWarning[currentComponentErrorInfo] = true; - var childOwner = ""; - if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) { - childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + "."; - } - setCurrentlyValidatingElement$1(element); - error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner); - setCurrentlyValidatingElement$1(null); + } + function validateExplicitKey(element, parentType) { + { + if (!element._store || element._store.validated || element.key != null) { + return; } + element._store.validated = true; + var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); + if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { + return; + } + ownerHasKeyUseWarning[currentComponentErrorInfo] = true; + var childOwner = ""; + if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) { + childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + "."; + } + setCurrentlyValidatingElement$1(element); + error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner); + setCurrentlyValidatingElement$1(null); } - function validateChildKeys(node2, parentType) { - { - if (typeof node2 !== "object") { - return; - } - if (isArray(node2)) { - for (var i = 0; i < node2.length; i++) { - var child = node2[i]; - if (isValidElement2(child)) { - validateExplicitKey(child, parentType); - } - } - } else if (isValidElement2(node2)) { - if (node2._store) { - node2._store.validated = true; + } + function validateChildKeys(node2, parentType) { + { + if (typeof node2 !== "object") { + return; + } + if (isArray(node2)) { + for (var i = 0; i < node2.length; i++) { + var child = node2[i]; + if (isValidElement2(child)) { + validateExplicitKey(child, parentType); } - } else if (node2) { - var iteratorFn = getIteratorFn(node2); - if (typeof iteratorFn === "function") { - if (iteratorFn !== node2.entries) { - var iterator = iteratorFn.call(node2); - var step; - while (!(step = iterator.next()).done) { - if (isValidElement2(step.value)) { - validateExplicitKey(step.value, parentType); - } + } + } else if (isValidElement2(node2)) { + if (node2._store) { + node2._store.validated = true; + } + } else if (node2) { + var iteratorFn = getIteratorFn(node2); + if (typeof iteratorFn === "function") { + if (iteratorFn !== node2.entries) { + var iterator = iteratorFn.call(node2); + var step; + while (!(step = iterator.next()).done) { + if (isValidElement2(step.value)) { + validateExplicitKey(step.value, parentType); } } } } } } - function validatePropTypes(element) { - { - var type = element.type; - if (type === null || type === void 0 || typeof type === "string") { - return; - } - var propTypes2; - if (typeof type === "function") { - propTypes2 = type.propTypes; - } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here. - // Inner props are checked in the reconciler. - type.$$typeof === REACT_MEMO_TYPE)) { - propTypes2 = type.propTypes; - } else { - return; - } - if (propTypes2) { - var name = getComponentNameFromType(type); - checkPropTypes(propTypes2, element.props, "prop", name, element); - } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) { - propTypesMisspellWarningShown = true; - var _name = getComponentNameFromType(type); - error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown"); - } - if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) { - error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); - } + } + function validatePropTypes(element) { + { + var type = element.type; + if (type === null || type === void 0 || typeof type === "string") { + return; + } + var propTypes2; + if (typeof type === "function") { + propTypes2 = type.propTypes; + } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here. + // Inner props are checked in the reconciler. + type.$$typeof === REACT_MEMO_TYPE)) { + propTypes2 = type.propTypes; + } else { + return; + } + if (propTypes2) { + var name = getComponentNameFromType(type); + checkPropTypes(propTypes2, element.props, "prop", name, element); + } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) { + propTypesMisspellWarningShown = true; + var _name = getComponentNameFromType(type); + error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown"); + } + if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) { + error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); } } - function validateFragmentProps(fragment) { - { - var keys = Object.keys(fragment.props); - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - if (key !== "children" && key !== "key") { - setCurrentlyValidatingElement$1(fragment); - error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key); - setCurrentlyValidatingElement$1(null); - break; - } - } - if (fragment.ref !== null) { + } + function validateFragmentProps(fragment) { + { + var keys = Object.keys(fragment.props); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (key !== "children" && key !== "key") { setCurrentlyValidatingElement$1(fragment); - error("Invalid attribute `ref` supplied to `React.Fragment`."); + error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key); setCurrentlyValidatingElement$1(null); + break; } } + if (fragment.ref !== null) { + setCurrentlyValidatingElement$1(fragment); + error("Invalid attribute `ref` supplied to `React.Fragment`."); + setCurrentlyValidatingElement$1(null); + } } - var didWarnAboutKeySpread = {}; - function jsxWithValidation(type, props, key, isStaticChildren, source, self2) { - { - var validType = isValidElementType(type); - if (!validType) { - var info = ""; - if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) { - info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."; - } - var sourceInfo = getSourceInfoErrorAddendum(source); - if (sourceInfo) { - info += sourceInfo; - } else { - info += getDeclarationErrorAddendum(); - } - var typeString; - if (type === null) { - typeString = "null"; - } else if (isArray(type)) { - typeString = "array"; - } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) { - typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />"; - info = " Did you accidentally export a JSX literal instead of a component?"; - } else { - typeString = typeof type; - } - error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info); + } + var didWarnAboutKeySpread = {}; + function jsxWithValidation(type, props, key, isStaticChildren, source, self2) { + { + var validType = isValidElementType(type); + if (!validType) { + var info = ""; + if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) { + info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."; } - var element = jsxDEV(type, props, key, source, self2); - if (element == null) { - return element; + var sourceInfo = getSourceInfoErrorAddendum(source); + if (sourceInfo) { + info += sourceInfo; + } else { + info += getDeclarationErrorAddendum(); } - if (validType) { - var children2 = props.children; - if (children2 !== void 0) { - if (isStaticChildren) { - if (isArray(children2)) { - for (var i = 0; i < children2.length; i++) { - validateChildKeys(children2[i], type); - } - if (Object.freeze) { - Object.freeze(children2); - } - } else { - error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."); + var typeString; + if (type === null) { + typeString = "null"; + } else if (isArray(type)) { + typeString = "array"; + } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) { + typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />"; + info = " Did you accidentally export a JSX literal instead of a component?"; + } else { + typeString = typeof type; + } + error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info); + } + var element = jsxDEV(type, props, key, source, self2); + if (element == null) { + return element; + } + if (validType) { + var children2 = props.children; + if (children2 !== void 0) { + if (isStaticChildren) { + if (isArray(children2)) { + for (var i = 0; i < children2.length; i++) { + validateChildKeys(children2[i], type); + } + if (Object.freeze) { + Object.freeze(children2); } } else { - validateChildKeys(children2, type); + error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."); } + } else { + validateChildKeys(children2, type); } } - { - if (hasOwnProperty.call(props, "key")) { - var componentName = getComponentNameFromType(type); - var keys = Object.keys(props).filter(function(k) { - return k !== "key"; - }); - var beforeExample = keys.length > 0 ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}"; - if (!didWarnAboutKeySpread[componentName + beforeExample]) { - var afterExample = keys.length > 0 ? "{" + keys.join(": ..., ") + ": ...}" : "{}"; - error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName); - didWarnAboutKeySpread[componentName + beforeExample] = true; - } + } + { + if (hasOwnProperty.call(props, "key")) { + var componentName = getComponentNameFromType(type); + var keys = Object.keys(props).filter(function(k2) { + return k2 !== "key"; + }); + var beforeExample = keys.length > 0 ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}"; + if (!didWarnAboutKeySpread[componentName + beforeExample]) { + var afterExample = keys.length > 0 ? "{" + keys.join(": ..., ") + ": ...}" : "{}"; + error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName); + didWarnAboutKeySpread[componentName + beforeExample] = true; } } - if (type === REACT_FRAGMENT_TYPE) { - validateFragmentProps(element); - } else { - validatePropTypes(element); - } - return element; } - } - function jsxWithValidationStatic(type, props, key) { - { - return jsxWithValidation(type, props, key, true); + if (type === REACT_FRAGMENT_TYPE) { + validateFragmentProps(element); + } else { + validatePropTypes(element); } + return element; } - function jsxWithValidationDynamic(type, props, key) { - { - return jsxWithValidation(type, props, key, false); - } + } + function jsxWithValidationStatic(type, props, key) { + { + return jsxWithValidation(type, props, key, true); } - var jsx = jsxWithValidationDynamic; - var jsxs = jsxWithValidationStatic; - reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE; - reactJsxRuntime_development.jsx = jsx; - reactJsxRuntime_development.jsxs = jsxs; - })(); - } - return reactJsxRuntime_development; + } + function jsxWithValidationDynamic(type, props, key) { + { + return jsxWithValidation(type, props, key, false); + } + } + var jsx2 = jsxWithValidationDynamic; + var jsxs2 = jsxWithValidationStatic; + Fragment = reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE; + jsx_1 = reactJsxRuntime_development.jsx = jsx2; + jsxs_1 = reactJsxRuntime_development.jsxs = jsxs2; + })(); } -var jsxRuntime$1 = jsxRuntime$2.exports; -var hasRequiredJsxRuntime; -function requireJsxRuntime() { - if (hasRequiredJsxRuntime) return jsxRuntime$2.exports; - hasRequiredJsxRuntime = 1; - "use strict"; - if (process.env.NODE_ENV === "production") { - jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); - } else { - jsxRuntime$2.exports = requireReactJsxRuntime_development(); - } - return jsxRuntime$2.exports; +var jsxRuntime = jsxRuntime$2.exports; +"use strict"; +if (process.env.NODE_ENV === "production") { + jsxRuntime$2.exports = reactJsxRuntime_production_min; +} else { + jsxRuntime$2.exports = reactJsxRuntime_development; } -var jsxRuntimeExports = requireJsxRuntime(); -const jsxRuntime = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); +var jsxRuntimeExports = jsxRuntime$2.exports; +const jsxRuntime$1 = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); var gubu_min$2 = { exports: {} }; var gubu_min = gubu_min$2.exports; (function(module, exports) { @@ -1057,10 +1042,10 @@ var gubu_min = gubu_min$2.exports; }(function() { var e = {}, t = {}; Object.defineProperty(t, "__esModule", { value: true }), t.Gubu = void 0; - const n = Symbol.for("gubu$"), r2 = { gubu$: n, v$: "8.3.0" }, l = /^[A-Z]/, { toString: i } = Object.prototype, o = "gubu", s = "name", u = "nan", a = "never", c = "number", f = "required", p = "array", h = "function", v = "object", d = "string", g = "boolean", y = "undefined", m = "any", b = "list", $ = "instance", k = "null", x = "type", I = "closed", w = "shape", S = "check", j = "regexp", N = "String", O = "Number", V = "Boolean", A = "Object", R = "Array", D = "Function", E = "Value", C = "Above", G = "All", T = "Any", B = "Below", J = "Check", W = "Child", M = "Exact", F = "Max", P = "Min", z = "One", L = "Open", _2 = "Required", q = "Some", H = " for property ", U = '"$PATH"', K = '"$VALUE"', Z = { [N]: String, [O]: Number, [V]: Boolean, [A]: Object, [R]: Array, ["Symbol"]: Symbol, [D]: Function }, Q = (e2) => Object.keys(e2), X = (e2, t2, n2) => Object.defineProperty(e2, t2, n2), Y = (e2) => Array.isArray(e2), ee = (e2) => JSON.parse(e2), te = (e2, t2) => JSON.stringify(e2, t2); + const n2 = Symbol.for("gubu$"), r2 = { gubu$: n2, v$: "8.3.0" }, l2 = /^[A-Z]/, { toString: i } = Object.prototype, o = "gubu", s = "name", u = "nan", a = "never", c = "number", f2 = "required", p2 = "array", h = "function", v = "object", d = "string", g = "boolean", y = "undefined", m2 = "any", b = "list", $ = "instance", k2 = "null", x = "type", I = "closed", w = "shape", S = "check", j = "regexp", N = "String", O = "Number", V = "Boolean", A = "Object", R = "Array", D = "Function", E = "Value", C = "Above", G = "All", T = "Any", B = "Below", J = "Check", W = "Child", M = "Exact", F = "Max", P = "Min", z = "One", L = "Open", _2 = "Required", q2 = "Some", H = " for property ", U = '"$PATH"', K = '"$VALUE"', Z = { [N]: String, [O]: Number, [V]: Boolean, [A]: Object, [R]: Array, ["Symbol"]: Symbol, [D]: Function }, Q = (e2) => Object.keys(e2), X = (e2, t2, n3) => Object.defineProperty(e2, t2, n3), Y = (e2) => Array.isArray(e2), ee = (e2) => JSON.parse(e2), te = (e2, t2) => JSON.stringify(e2, t2); class ne { - constructor(e2, t2, n2, r3) { - this.match = false, this.dI = 0, this.nI = 2, this.cI = -1, this.pI = 0, this.sI = -1, this.valType = a, this.isRoot = false, this.key = "", this.type = a, this.stop = true, this.nextSibling = true, this.fromDflt = false, this.ignoreVal = void 0, this.curerr = [], this.err = [], this.parents = [], this.keys = [], this.ancestors = [], this.path = [], this.root = e2, this.vals = [e2, -1], this.node = t2, this.nodes = [t2, -1], this.ctx = n2 || {}, this.match = !!r3; + constructor(e2, t2, n3, r3) { + this.match = false, this.dI = 0, this.nI = 2, this.cI = -1, this.pI = 0, this.sI = -1, this.valType = a, this.isRoot = false, this.key = "", this.type = a, this.stop = true, this.nextSibling = true, this.fromDflt = false, this.ignoreVal = void 0, this.curerr = [], this.err = [], this.parents = [], this.keys = [], this.ancestors = [], this.path = [], this.root = e2, this.vals = [e2, -1], this.node = t2, this.nodes = [t2, -1], this.ctx = n3 || {}, this.match = !!r3; } next() { this.stop = false, this.fromDflt = false, this.ignoreVal = void 0, this.isRoot = 0 === this.pI, this.check = void 0; @@ -1073,9 +1058,9 @@ var gubu_min = gubu_min$2.exports; } } class re extends TypeError { - constructor(e2, t2, n2, r3) { - var l2; - super((t2 = null == t2 || t2.startsWith("G$") ? "" : t2 + ": ") + n2.map((e3) => e3.text).join("\n")), this.gubu = true, this.name = "GubuError", this.code = e2, this.gname = t2, this.desc = () => ({ name: "GubuError", code: e2, err: n2, ctx: r3 }), this.stack = null === (l2 = this.stack) || void 0 === l2 ? void 0 : l2.replace(/.*\/gubu\/gubu\.[tj]s.*\n/g, ""), this.props = n2.map((e3) => { + constructor(e2, t2, n3, r3) { + var l3; + super((t2 = null == t2 || t2.startsWith("G$") ? "" : t2 + ": ") + n3.map((e3) => e3.text).join("\n")), this.gubu = true, this.name = "GubuError", this.code = e2, this.gname = t2, this.desc = () => ({ name: "GubuError", code: e2, err: n3, ctx: r3 }), this.stack = null === (l3 = this.stack) || void 0 === l3 ? void 0 : l3.replace(/.*\/gubu\/gubu\.[tj]s.*\n/g, ""), this.props = n3.map((e3) => { var t3; return { path: e3.path, what: e3.why, type: null === (t3 = e3.node) || void 0 === t3 ? void 0 : t3.t, value: e3.value }; }); @@ -1086,47 +1071,47 @@ var gubu_min = gubu_min$2.exports; } const le = { Array: true, BigInt: true, Boolean: true, Function: true, Number: true, Object: true, String: true, Symbol: true }, ie = { string: "", number: 0, boolean: false, object: {}, array: [], symbol: Symbol(""), bigint: BigInt(0), null: null, regexp: /.*/ }; function oe(e2, t2, o2) { - var s2, a2, f2, g2; + var s2, a2, f3, g2; if (ue === e2) e2 = void 0; else if (null != e2 && (null === (s2 = e2.$) || void 0 === s2 ? void 0 : s2.gubu$)) { - if (n === e2.$.gubu$) return e2.d = null == t2 ? e2.d : t2, e2; + if (n2 === e2.$.gubu$) return e2.d = null == t2 ? e2.d : t2, e2; if (true === e2.$.gubu$) { let r3 = __spreadValues({}, e2); - return r3.$ = __spreadProps(__spreadValues({ v$: "8.3.0" }, r3.$), { gubu$: n }), r3.v = null != r3.v && v === typeof r3.v ? __spreadValues({}, r3.v) : r3.v, r3.t = r3.t || typeof r3.v, h === r3.t && le[r3.v.name] && (r3.t = r3.v.name.toLowerCase(), r3.v = Qe(ie[r3.t]), r3.f = r3.v), r3.r = !!r3.r, r3.p = !!r3.p, r3.d = null == t2 ? null == r3.d ? -1 : r3.d : t2, r3.b = r3.b || [], r3.a = r3.a || [], r3.u = r3.u || {}, r3.m = r3.m || o2 || {}, r3; + return r3.$ = __spreadProps(__spreadValues({ v$: "8.3.0" }, r3.$), { gubu$: n2 }), r3.v = null != r3.v && v === typeof r3.v ? __spreadValues({}, r3.v) : r3.v, r3.t = r3.t || typeof r3.v, h === r3.t && le[r3.v.name] && (r3.t = r3.v.name.toLowerCase(), r3.v = Qe(ie[r3.t]), r3.f = r3.v), r3.r = !!r3.r, r3.p = !!r3.p, r3.d = null == t2 ? null == r3.d ? -1 : r3.d : t2, r3.b = r3.b || [], r3.a = r3.a || [], r3.u = r3.u || {}, r3.m = r3.m || o2 || {}, r3; } } - let b2 = null === e2 ? k : typeof e2; - b2 = y === b2 ? m : b2; + let b2 = null === e2 ? k2 : typeof e2; + b2 = y === b2 ? m2 : b2; let x2, I2 = e2, w2 = I2, S2 = false, N2 = {}, O2 = [], V2 = []; - if (v === b2) w2 = void 0, Y(I2) ? (b2 = p, 1 === I2.length && (x2 = I2[0], I2 = [])) : null != I2 && Function !== I2.constructor && Object !== I2.constructor && null != I2.constructor ? ("[object RegExp]" === i.call(I2) ? (b2 = j, S2 = true) : (b2 = $, N2.n = I2.constructor.name, N2.i = I2.constructor), w2 = I2) : 0 === Q(I2).length && (x2 = ye()); + if (v === b2) w2 = void 0, Y(I2) ? (b2 = p2, 1 === I2.length && (x2 = I2[0], I2 = [])) : null != I2 && Function !== I2.constructor && Object !== I2.constructor && null != I2.constructor ? ("[object RegExp]" === i.call(I2) ? (b2 = j, S2 = true) : (b2 = $, N2.n = I2.constructor.name, N2.i = I2.constructor), w2 = I2) : 0 === Q(I2).length && (x2 = ye()); else if (h === b2) if (le[e2.name]) b2 = e2.name.toLowerCase(), S2 = true, I2 = Qe(ie[b2]), w2 = I2, A === e2.name && (x2 = ye()); else if (I2.gubu === r2 || true === (null === (a2 = I2.$) || void 0 === a2 ? void 0 : a2.gubu)) { let e3 = I2.node ? I2.node() : I2; b2 = e3.t, I2 = e3.v, w2 = I2, S2 = e3.r, N2 = __spreadValues({}, e3.u), O2 = [...e3.a], V2 = [...e3.b]; - } else D === I2.constructor.name && l.test(I2.name) && (b2 = $, S2 = true, N2.n = null === (g2 = null === (f2 = I2.prototype) || void 0 === f2 ? void 0 : f2.constructor) || void 0 === g2 ? void 0 : g2.name, N2.i = I2); + } else D === I2.constructor.name && l2.test(I2.name) && (b2 = $, S2 = true, N2.n = null === (g2 = null === (f3 = I2.prototype) || void 0 === f3 ? void 0 : f3.constructor) || void 0 === g2 ? void 0 : g2.name, N2.i = I2); else c === b2 && isNaN(I2) ? b2 = u : d === b2 && "" === I2 && (N2.empty = true); - let R2 = null == I2 || v !== b2 && p !== b2 ? I2 : __spreadValues({}, I2); + let R2 = null == I2 || v !== b2 && p2 !== b2 ? I2 : __spreadValues({}, I2); return { $: r2, t: b2, v: R2, f: w2, n: null != R2 && v === typeof R2 ? Q(R2).length : 0, c: x2, r: S2, p: false, d: null == t2 ? -1 : t2, k: [], e: true, u: N2, a: O2, b: V2, m: o2 || {}, [Symbol.for("nodejs.util.inspect.custom")]() { const e3 = __spreadValues({}, this); return delete e3.$, JSON.stringify(e3, (e4, t3) => "function" != typeof t3 || Ye[t3.name] ? t3 : t3.name).replace(/"/g, "").replace(/,/g, " "); } }; } function se(e2, t2) { - var n2; + var n3; const r3 = [[{}, "root", e2, t2]]; - for (let l2 = 0; l2 < r3.length; l2++) { - const e3 = r3[l2], t3 = e3[0][e3[1]] = oe(e3[2], e3[3]); - void 0 !== t3.c && ((null === (n2 = t3.c.$) || void 0 === n2 ? void 0 : n2.gubu$) || r3.push([t3, "c", t3.c, t3.d])); + for (let l3 = 0; l3 < r3.length; l3++) { + const e3 = r3[l3], t3 = e3[0][e3[1]] = oe(e3[2], e3[3]); + void 0 !== t3.c && ((null === (n3 = t3.c.$) || void 0 === n3 ? void 0 : n3.gubu$) || r3.push([t3, "c", t3.c, t3.d])); let i2 = typeof t3.v; v === i2 && null != t3.v && Object.entries(t3.v).map((e4) => { - var n3; - (null === (n3 = e4[1].$) || void 0 === n3 ? void 0 : n3.gubu$) || r3.push([t3.v, e4[0], e4[1], t3.d + 1]); + var n4; + (null === (n4 = e4[1].$) || void 0 === n4 ? void 0 : n4.gubu$) || r3.push([t3.v, e4[0], e4[1], t3.d + 1]); }); } return r3[0][0].root; } - function ue(t2, l2) { - const i2 = null == l2 ? {} : l2; + function ue(t2, l3) { + const i2 = null == l3 ? {} : l3; i2.name = null == i2.name ? "G$" + ("" + Math.random()).substring(2, 8) : "" + i2.name; let o2 = i2.meta = i2.meta || {}; o2.active = true === o2.active || false, o2.suffix = d == typeof o2.suffix ? o2.suffix : "$$"; @@ -1135,95 +1120,95 @@ var gubu_min = gubu_min$2.exports; let u2 = i2.valexpr = i2.valexpr || {}; u2.active = true === u2.active, u2.keymark = d == typeof u2.keymark ? u2.keymark : o2.suffix; let c2, h2 = oe(t2, 0), g2 = ""; - function N2(e2, t3, n2) { - var r3, l3, c3; - const g3 = null === (r3 = null == t3 ? void 0 : t3.skip) || void 0 === r3 ? void 0 : r3.depth, N3 = Array.isArray(null === (l3 = null == t3 ? void 0 : t3.skip) || void 0 === l3 ? void 0 : l3.depth) ? t3.skip.depth : null, O3 = Array.isArray(null === (c3 = null == t3 ? void 0 : t3.skip) || void 0 === c3 ? void 0 : c3.keys) ? t3.skip.keys : null, V2 = new ne(e2, h2, t3, n2); + function N2(e2, t3, n3) { + var r3, l4, c3; + const g3 = null === (r3 = null == t3 ? void 0 : t3.skip) || void 0 === r3 ? void 0 : r3.depth, N3 = Array.isArray(null === (l4 = null == t3 ? void 0 : t3.skip) || void 0 === l4 ? void 0 : l4.depth) ? t3.skip.depth : null, O3 = Array.isArray(null === (c3 = null == t3 ? void 0 : t3.skip) || void 0 === c3 ? void 0 : c3.keys) ? t3.skip.keys : null, V2 = new ne(e2, h2, t3, n3); for (; V2.next(), !V2.stop; ) { - let t4 = V2.node, n3 = false, r4 = false, l4 = !!(t4.d === g3 || N3 && N3.includes(t4.d) || O3 && 1 === t4.d && O3.includes(V2.key)) || t4.p; + let t4 = V2.node, n4 = false, r4 = false, l5 = !!(t4.d === g3 || N3 && N3.includes(t4.d) || O3 && 1 === t4.d && O3.includes(V2.key)) || t4.p; if (0 < t4.b.length) for (let e3 = 0; e3 < t4.b.length; e3++) { - let l5 = fe(t4.b[e3], V2); - t4 = V2.node, void 0 !== l5.done && (n3 = l5.done), r4 = r4 || !!l5.fatal; + let l6 = fe(t4.b[e3], V2); + t4 = V2.node, void 0 !== l6.done && (n4 = l6.done), r4 = r4 || !!l6.fatal; } - if (!n3) { - let n4 = true, r5 = void 0 === V2.val; + if (!n4) { + let n5 = true, r5 = void 0 === V2.val; if (a === V2.type) V2.curerr.push(Ue(a, V2, 1070)); else if (v === V2.type) { let e3; - if (void 0 !== t4.c && (t4.c = se(t4.c, 1 + V2.dI)), t4.r && r5 ? (V2.ignoreVal = true, V2.curerr.push(Ue(f, V2, 1010))) : r5 || null !== V2.val && v === V2.valType && !Y(V2.val) ? !l4 && r5 && void 0 !== t4.f ? (V2.updateVal(t4.f), V2.fromDflt = true, e3 = V2.val, n4 = false) : l4 && r5 || (V2.updateVal(V2.val || (V2.fromDflt = true, {})), e3 = V2.val) : (V2.curerr.push(Ue(x, V2, 1020)), e3 = Y(V2.val) ? V2.val : {}), n4 && (e3 = null == e3 && false === V2.ctx.err ? {} : e3, null != e3)) { + if (void 0 !== t4.c && (t4.c = se(t4.c, 1 + V2.dI)), t4.r && r5 ? (V2.ignoreVal = true, V2.curerr.push(Ue(f2, V2, 1010))) : r5 || null !== V2.val && v === V2.valType && !Y(V2.val) ? !l5 && r5 && void 0 !== t4.f ? (V2.updateVal(t4.f), V2.fromDflt = true, e3 = V2.val, n5 = false) : l5 && r5 || (V2.updateVal(V2.val || (V2.fromDflt = true, {})), e3 = V2.val) : (V2.curerr.push(Ue(x, V2, 1020)), e3 = Y(V2.val) ? V2.val : {}), n5 && (e3 = null == e3 && false === V2.ctx.err ? {} : e3, null != e3)) { V2.ctx.log && V2.ctx.log("so", V2); - let n5 = false, r6 = Q(t4.v), l5 = V2.nI; + let n6 = false, r6 = Q(t4.v), l6 = V2.nI; if (0 < r6.length) { - n5 = true, V2.pI = l5; - for (let n6 = 0; n6 < r6.length; n6++) { - let l6, i5 = r6[n6]; + n6 = true, V2.pI = l6; + for (let n7 = 0; n7 < r6.length; n7++) { + let l7, i5 = r6[n7]; if (o2.active && i5.endsWith(o2.suffix)) { - if (l6 = { short: "" }, d === typeof t4.v[i5] ? l6.short = t4.v[i5] : l6 = __spreadValues(__spreadValues({}, l6), t4.v[i5]), delete t4.v[i5], n6++, r6.length <= n6) break; - if (r6[n6] !== i5.substring(0, i5.length - o2.suffix.length)) throw new Error("Invalid meta key: " + i5); - i5 = r6[n6]; + if (l7 = { short: "" }, d === typeof t4.v[i5] ? l7.short = t4.v[i5] : l7 = __spreadValues(__spreadValues({}, l7), t4.v[i5]), delete t4.v[i5], n7++, r6.length <= n7) break; + if (r6[n7] !== i5.substring(0, i5.length - o2.suffix.length)) throw new Error("Invalid meta key: " + i5); + i5 = r6[n7]; } let a2 = i5, c4 = t4.v[i5]; if (s2.active) { let e4 = /^\s*("(\\.|[^"\\])*"|[^\s]+):\s*(.*?)\s*$/.exec(i5); - e4 && (a2 = e4[1], c4 = ae({ src: e4[3], d: 1 + V2.dI, meta: l6 }, c4), delete t4.v[i5]); + e4 && (a2 = e4[1], c4 = ae({ src: e4[3], d: 1 + V2.dI, meta: l7 }, c4), delete t4.v[i5]); } if (u2.active && i5.startsWith(u2.keymark)) { if (i5 === u2.keymark) { - let e4 = ae({ src: c4, d: 1 + V2.dI, meta: l6, ancestors: V2.ancestors, node: t4 }, t4); + let e4 = ae({ src: c4, d: 1 + V2.dI, meta: l7, ancestors: V2.ancestors, node: t4 }, t4); Object.assign(t4, e4); } else t4.m.$$ = t4.m.$$ || {}, t4.m.$$[i5.substring(u2.keymark.length)] = t4.v[i5]; delete t4.v[i5]; continue; } - let f2 = oe(c4, 1 + V2.dI, l6); - t4.v[a2] = f2, t4.k.includes(a2) || t4.k.push(a2), V2.nodes[V2.nI] = f2, V2.vals[V2.nI] = e3[a2], V2.parents[V2.nI] = e3, V2.keys[V2.nI] = a2, V2.nI++; + let f3 = oe(c4, 1 + V2.dI, l7); + t4.v[a2] = f3, t4.k.includes(a2) || t4.k.push(a2), V2.nodes[V2.nI] = f3, V2.vals[V2.nI] = e3[a2], V2.parents[V2.nI] = e3, V2.keys[V2.nI] = a2, V2.nI++; } } let i4 = Q(e3).filter((e4) => void 0 === t4.v[e4]); if (0 < i4.length) if (void 0 === t4.c) V2.ignoreVal = true, V2.curerr.push(Ue(I, V2, 1100, void 0, { k: i4 })); else { - n5 = true, V2.pI = l5; - for (let n6 of i4) { + n6 = true, V2.pI = l6; + for (let n7 of i4) { let r7 = t4.c = oe(t4.c, 1 + V2.dI); - V2.nodes[V2.nI] = r7, V2.vals[V2.nI] = e3[n6], V2.parents[V2.nI] = e3, V2.keys[V2.nI] = n6, V2.nI++; + V2.nodes[V2.nI] = r7, V2.vals[V2.nI] = e3[n7], V2.parents[V2.nI] = e3, V2.keys[V2.nI] = n7, V2.nI++; } } - n5 ? (V2.dI++, V2.nodes[V2.nI] = V2.sI, V2.parents[V2.nI] = e3, V2.nextSibling = false, V2.nI++) : V2.ctx.log && V2.ctx.log("eo", V2); + n6 ? (V2.dI++, V2.nodes[V2.nI] = V2.sI, V2.parents[V2.nI] = e3, V2.nextSibling = false, V2.nI++) : V2.ctx.log && V2.ctx.log("eo", V2); } - } else if (p === V2.type) if (t4.r && r5) V2.ignoreVal = true, V2.curerr.push(Ue(f, V2, 1030)); + } else if (p2 === V2.type) if (t4.r && r5) V2.ignoreVal = true, V2.curerr.push(Ue(f2, V2, 1030)); else if (r5 || Y(V2.val)) { - if (!l4 && r5 && void 0 !== t4.f) V2.updateVal(t4.f), V2.fromDflt = true; - else if (!l4 || null != V2.val) { + if (!l5 && r5 && void 0 !== t4.f) V2.updateVal(t4.f), V2.fromDflt = true; + else if (!l5 || null != V2.val) { V2.updateVal(V2.val || (V2.fromDflt = true, [])); - let n5 = void 0 !== t4.c, r6 = 0 < V2.val.length, l5 = Q(t4.v).filter((e3) => !isNaN(+e3)), i4 = 0 < l5.length; - if (n5 && (t4.c = se(t4.c, 1 + V2.dI)), V2.ctx.log && V2.ctx.log("sa", V2), r6 || i4) { + let n6 = void 0 !== t4.c, r6 = 0 < V2.val.length, l6 = Q(t4.v).filter((e3) => !isNaN(+e3)), i4 = 0 < l6.length; + if (n6 && (t4.c = se(t4.c, 1 + V2.dI)), V2.ctx.log && V2.ctx.log("sa", V2), r6 || i4) { V2.pI = V2.nI; let e3 = 0; - if (i4) if (l5.length < V2.val.length && !n5) V2.ignoreVal = true, V2.curerr.push(Ue(I, V2, 1090, void 0, { k: l5.length })); - else for (; e3 < l5.length; e3++) { - let n6 = t4.v[e3] = oe(t4.v[e3], 1 + V2.dI); - V2.nodes[V2.nI] = n6, V2.vals[V2.nI] = V2.val[e3], V2.parents[V2.nI] = V2.val, V2.keys[V2.nI] = "" + e3, V2.nI++; + if (i4) if (l6.length < V2.val.length && !n6) V2.ignoreVal = true, V2.curerr.push(Ue(I, V2, 1090, void 0, { k: l6.length })); + else for (; e3 < l6.length; e3++) { + let n7 = t4.v[e3] = oe(t4.v[e3], 1 + V2.dI); + V2.nodes[V2.nI] = n7, V2.vals[V2.nI] = V2.val[e3], V2.parents[V2.nI] = V2.val, V2.keys[V2.nI] = "" + e3, V2.nI++; } - if (n5 && r6) { - let n6 = t4.c; - for (; e3 < V2.val.length; e3++) V2.nodes[V2.nI] = n6, V2.vals[V2.nI] = V2.val[e3], V2.parents[V2.nI] = V2.val, V2.keys[V2.nI] = "" + e3, V2.nI++; + if (n6 && r6) { + let n7 = t4.c; + for (; e3 < V2.val.length; e3++) V2.nodes[V2.nI] = n7, V2.vals[V2.nI] = V2.val[e3], V2.parents[V2.nI] = V2.val, V2.keys[V2.nI] = "" + e3, V2.nI++; } V2.ignoreVal || (V2.dI++, V2.nodes[V2.nI] = V2.sI, V2.parents[V2.nI] = V2.val, V2.nextSibling = false, V2.nI++); - } else V2.ctx.log && n5 && null == e2 && V2.ctx.log("kv", __spreadProps(__spreadValues({}, V2), { key: 0, val: t4.c })), V2.ctx.log && V2.ctx.log("ea", V2); + } else V2.ctx.log && n6 && null == e2 && V2.ctx.log("kv", __spreadProps(__spreadValues({}, V2), { key: 0, val: t4.c })), V2.ctx.log && V2.ctx.log("ea", V2); } } else V2.curerr.push(Ue(x, V2, 1040)); else if (j === V2.type) r5 && !t4.r ? V2.ignoreVal = true : d !== V2.valType ? (V2.ignoreVal = true, V2.curerr.push(Ue(x, V2, 1045))) : V2.val.match(t4.v) || (V2.ignoreVal = true, V2.curerr.push(Ue(j, V2, 1045))); - else if (m === V2.type || b === V2.type || S === V2.type || void 0 === V2.val || V2.type === V2.valType || $ === V2.type && t4.u.i && V2.val instanceof t4.u.i || k === V2.type && null === V2.val) if (void 0 === V2.val) { + else if (m2 === V2.type || b === V2.type || S === V2.type || void 0 === V2.val || V2.type === V2.valType || $ === V2.type && t4.u.i && V2.val instanceof t4.u.i || k2 === V2.type && null === V2.val) if (void 0 === V2.val) { let e3 = V2.path[V2.dI]; - l4 || !t4.r || y === V2.type && V2.parent.hasOwnProperty(e3) ? void 0 !== t4.f && !l4 || y === V2.type ? (V2.updateVal(t4.f), V2.fromDflt = true) : m === V2.type && (V2.ignoreVal = void 0 === V2.ignoreVal || V2.ignoreVal) : (V2.ignoreVal = true, V2.curerr.push(Ue(f, V2, 1060))), V2.ctx.log && V2.ctx.log("kv", V2); - } else d !== V2.type || "" !== V2.val || t4.u.empty || V2.curerr.push(Ue(f, V2, 1080)), V2.ctx.log && V2.ctx.log("kv", V2); + l5 || !t4.r || y === V2.type && V2.parent.hasOwnProperty(e3) ? void 0 !== t4.f && !l5 || y === V2.type ? (V2.updateVal(t4.f), V2.fromDflt = true) : m2 === V2.type && (V2.ignoreVal = void 0 === V2.ignoreVal || V2.ignoreVal) : (V2.ignoreVal = true, V2.curerr.push(Ue(f2, V2, 1060))), V2.ctx.log && V2.ctx.log("kv", V2); + } else d !== V2.type || "" !== V2.val || t4.u.empty || V2.curerr.push(Ue(f2, V2, 1080)), V2.ctx.log && V2.ctx.log("kv", V2); else V2.curerr.push(Ue(x, V2, 1050)); } if (0 < t4.a.length) for (let e3 = 0; e3 < t4.a.length; e3++) { - let l5 = fe(t4.a[e3], V2); - t4 = V2.node, void 0 !== l5.done && (n3 = l5.done), r4 = r4 || !!l5.fatal; + let l6 = fe(t4.a[e3], V2); + t4 = V2.node, void 0 !== l6.done && (n4 = l6.done), r4 = r4 || !!l6.fatal; } - let i3 = l4 ? false !== V2.ignoreVal : !!V2.ignoreVal; - !V2.match && null != V2.parent && !n3 && !i3 && (V2.parent[V2.key] = V2.val), V2.nextSibling && (V2.pI = V2.sI), (V2.node.e || r4) && V2.err.push(...V2.curerr); + let i3 = l5 ? false !== V2.ignoreVal : !!V2.ignoreVal; + !V2.match && null != V2.parent && !n4 && !i3 && (V2.parent[V2.key] = V2.val), V2.nextSibling && (V2.pI = V2.sI), (V2.node.e || r4) && V2.err.push(...V2.curerr); } if (0 < V2.err.length) { if (Y(V2.ctx.err)) V2.ctx.err.push(...V2.err); @@ -1235,38 +1220,38 @@ var gubu_min = gubu_min$2.exports; return N2(e2, t3, false); } return O2.valid = function(e2, t3) { - let n2 = t3 || {}; - return n2.err = n2.err || [], N2(e2, n2, false), 0 === n2.err.length; + let n3 = t3 || {}; + return n3.err = n3.err || [], N2(e2, n3, false), 0 === n3.err.length; }, O2.match = (e2, t3) => N2(e2, t3 = t3 || {}, true), O2.error = (e2, t3) => { - let n2 = t3 || {}; - return n2.err = n2.err || [], N2(e2, n2, false), n2.err; + let n3 = t3 || {}; + return n3.err = n3.err || [], N2(e2, n3, false), n3.err; }, O2.spec = () => { O2(void 0, { err: false }); - const e2 = Ze(h2, (e3, t3) => n === t3 || t3, false, true); + const e2 = Ze(h2, (e3, t3) => n2 === t3 || t3, false, true); return ee(e2); }, O2.node = () => (O2.spec(), h2), O2.stringify = (...e2) => { const t3 = O2.jsonify(); return "" === g2 ? g2 = "string" == typeof t3 ? t3.replace(/^"(.*)"$/, "$1") : JSON.stringify(t3, ...e2) : g2; - }, O2.jsonify = () => null == c2 ? c2 = Ke(O2.node()) : c2, O2.toString = () => (g2 = he("" === g2 ? Ze(null == h2 || !h2.$ || n !== h2.$.gubu$ && true !== h2.$.gubu$ ? h2 : h2.v, null, true) : g2), `[Gubu ${i2.name} ${g2}]`), e.inspect && e.inspect.custom && (O2[e.inspect.custom] = O2.toString), O2.gubu = r2, O2.spec(), O2; + }, O2.jsonify = () => null == c2 ? c2 = Ke(O2.node()) : c2, O2.toString = () => (g2 = he("" === g2 ? Ze(null == h2 || !h2.$ || n2 !== h2.$.gubu$ && true !== h2.$.gubu$ ? h2 : h2.v, null, true) : g2), `[Gubu ${i2.name} ${g2}]`), e.inspect && e.inspect.custom && (O2[e.inspect.custom] = O2.toString), O2.gubu = r2, O2.spec(), O2; } function ae(e2, t2) { - var n2, r3; - let l2, i2 = false; + var n3, r3; + let l3, i2 = false; "string" == typeof e2 && (e2 = { src: e2 }), e2.keymark = e2.keymark || "$$"; - const o2 = null === (n2 = null == t2 ? void 0 : t2.$) || void 0 === n2 ? void 0 : n2.gubu$; + const o2 = null === (n3 = null == t2 ? void 0 : t2.$) || void 0 === n3 ? void 0 : n3.gubu$; if (e2.i = e2.i || 0, null == e2.tokens) { - l2 = null != e2.val ? oe(e2.val, (e2.d || 0) + 1, e2.meta) : void 0, i2 = true, e2.tokens = []; - let n3 = /\s*,?\s*([)(\.]|"(\\.|[^"\\])*"|\/(\\.|[^\/\\])*\/[a-z]?|[^)(,.\s]+)\s*/g, r4 = null; - for (; r4 = n3.exec(e2.src); ) e2.tokens.push(r4[1]); + l3 = null != e2.val ? oe(e2.val, (e2.d || 0) + 1, e2.meta) : void 0, i2 = true, e2.tokens = []; + let n4 = /\s*,?\s*([)(\.]|"(\\.|[^"\\])*"|\/(\\.|[^\/\\])*\/[a-z]?|[^)(,.\s]+)\s*/g, r4 = null; + for (; r4 = n4.exec(e2.src); ) e2.tokens.push(r4[1]); if (!o2) { - let n4 = 0, r5 = false; - for (; n4 < e2.tokens.length; n4++) if (")" == e2.tokens[n4]) { + let n5 = 0, r5 = false; + for (; n5 < e2.tokens.length; n5++) if (")" == e2.tokens[n5]) { r5 = true; break; } - if ((r5 || n4 === e2.tokens.length) && void 0 !== t2) { - let l3 = "token_" + e2.d + "_" + e2.i; - e2.refs = e2.refs || {}, e2.refs[l3] = t2, r5 ? e2.tokens.splice(n4, 0, e2.keymark + l3) : e2.tokens.push("(", e2.keymark + l3, ")"); + if ((r5 || n5 === e2.tokens.length) && void 0 !== t2) { + let l4 = "token_" + e2.d + "_" + e2.i; + e2.refs = e2.refs || {}, e2.refs[l4] = t2, r5 ? e2.tokens.splice(n5, 0, e2.keymark + l4) : e2.tokens.push("(", e2.keymark + l4, ")"); } } } @@ -1300,49 +1285,49 @@ var gubu_min = gubu_min$2.exports; } e2.i++; } - return l2 = o2 ? u2.call(t2, ...a2) : u2.call(void 0, ...a2), "." === e2.tokens[e2.i] ? (e2.i++, l2 = ae(e2, l2)) : i2 && e2.i < e2.tokens.length && (l2 = ae(e2, l2)), l2; + return l3 = o2 ? u2.call(t2, ...a2) : u2.call(void 0, ...a2), "." === e2.tokens[e2.i] ? (e2.i++, l3 = ae(e2, l3)) : i2 && e2.i < e2.tokens.length && (l3 = ae(e2, l3)), l3; } - function ce(e2, t2 = {}, n2 = true) { + function ce(e2, t2 = {}, n3 = true) { let r3; - const l2 = Array.isArray(e2) ? "array" : null === e2 ? "null" : typeof e2; - return "string" === l2 ? r3 = ae(e2) : "number" === l2 || "boolean" === l2 ? r3 = e2 : v === l2 ? r3 = Object.entries(e2).reduce((e3, n3) => { + const l3 = Array.isArray(e2) ? "array" : null === e2 ? "null" : typeof e2; + return "string" === l3 ? r3 = ae(e2) : "number" === l3 || "boolean" === l3 ? r3 = e2 : v === l3 ? r3 = Object.entries(e2).reduce((e3, n4) => { var r4; - return e3[n3[0]] = ((null === (r4 = t2.valexpr) || void 0 === r4 ? void 0 : r4.keymark) || "$$") === n3[0] ? n3[1] : ce(n3[1], t2, false), e3; - }, {}) : p === l2 && (r3 = e2.map((e3) => ce(e3, t2, false))), n2 ? (t2.valexpr = t2.valexpr || {}, t2.valexpr.active = true, et(r3, t2)) : r3; + return e3[n4[0]] = ((null === (r4 = t2.valexpr) || void 0 === r4 ? void 0 : r4.keymark) || "$$") === n4[0] ? n4[1] : ce(n4[1], t2, false), e3; + }, {}) : p2 === l3 && (r3 = e2.map((e3) => ce(e3, t2, false))), n3 ? (t2.valexpr = t2.valexpr || {}, t2.valexpr.active = true, et(r3, t2)) : r3; } function fe(e2, t2) { - var n2; - let r3, l2 = {}, i2 = false; + var n3; + let r3, l3 = {}, i2 = false; try { - i2 = !(void 0 !== t2.val || !(null === (n2 = e2.gubu$) || void 0 === n2 ? void 0 : n2.Check)) || (t2.check = e2, e2(t2.val, l2, t2)); + i2 = !(void 0 !== t2.val || !(null === (n3 = e2.gubu$) || void 0 === n3 ? void 0 : n3.Check)) || (t2.check = e2, e2(t2.val, l3, t2)); } catch (s2) { r3 = s2; } - let o2 = Y(l2.err) ? 0 < l2.err.length : null != l2.err; + let o2 = Y(l3.err) ? 0 < l3.err.length : null != l3.err; if (!i2 || o2) { - if (void 0 === t2.val && (t2.node.p || !t2.node.r) && true !== l2.done) return delete l2.err, l2; - let n3 = l2.why || S, i3 = pe(t2); - if (d === typeof l2.err) t2.curerr.push(He(t2, l2.err)); - else if (v === typeof l2.err) t2.curerr.push(...[l2.err].flat().filter((e3) => null != e3).map((e3) => (e3.path = null == e3.path ? i3 : e3.path, e3.mark = null == e3.mark ? 2010 : e3.mark, e3))); + if (void 0 === t2.val && (t2.node.p || !t2.node.r) && true !== l3.done) return delete l3.err, l3; + let n4 = l3.why || S, i3 = pe(t2); + if (d === typeof l3.err) t2.curerr.push(He(t2, l3.err)); + else if (v === typeof l3.err) t2.curerr.push(...[l3.err].flat().filter((e3) => null != e3).map((e3) => (e3.path = null == e3.path ? i3 : e3.path, e3.mark = null == e3.mark ? 2010 : e3.mark, e3))); else { - let l3 = e2.name; - null != l3 && "" != l3 || (l3 = he(e2.toString().replace(/[ \t\r\n]+/g, " "))), t2.curerr.push(Ue(n3, t2, 1045, void 0, { thrown: r3 }, l3)); + let l4 = e2.name; + null != l4 && "" != l4 || (l4 = he(e2.toString().replace(/[ \t\r\n]+/g, " "))), t2.curerr.push(Ue(n4, t2, 1045, void 0, { thrown: r3 }, l4)); } - l2.done = null == l2.done || l2.done; + l3.done = null == l3.done || l3.done; } - return l2.hasOwnProperty("uval") ? (t2.updateVal(l2.uval), t2.ignoreVal = false) : void 0 === l2.val || Number.isNaN(l2.val) || (t2.updateVal(l2.val), t2.ignoreVal = false), void 0 !== l2.node && (t2.node = l2.node), void 0 !== l2.type && (t2.type = l2.type), l2; + return l3.hasOwnProperty("uval") ? (t2.updateVal(l3.uval), t2.ignoreVal = false) : void 0 === l3.val || Number.isNaN(l3.val) || (t2.updateVal(l3.val), t2.ignoreVal = false), void 0 !== l3.node && (t2.node = l3.node), void 0 !== l3.type && (t2.type = l3.type), l3; } function pe(e2) { return e2.path.slice(1, e2.dI + 1).filter((e3) => null != e3).join("."); } function he(e2, t2) { - let n2 = String(e2), r3 = null == t2 || isNaN(t2) ? 30 : t2 < 0 ? 0 : ~~t2, l2 = null == e2 ? 0 : n2.length, i2 = null == e2 ? "" : n2.substring(0, l2); - return i2 = r3 < l2 ? i2.substring(0, r3 - 3) + "..." : i2, i2.substring(0, r3); + let n3 = String(e2), r3 = null == t2 || isNaN(t2) ? 30 : t2 < 0 ? 0 : ~~t2, l3 = null == e2 ? 0 : n3.length, i2 = null == e2 ? "" : n3.substring(0, l3); + return i2 = r3 < l3 ? i2.substring(0, r3 - 3) + "..." : i2, i2.substring(0, r3); } const ve = function(e2) { var t2; - let n2 = qe(this, e2); - return n2.r = true, n2.p = false, void 0 === e2 ? (n2.f = void 0, 1 === arguments.length && (n2.t = y, n2.v = void 0)) : (null === (t2 = null == this ? void 0 : this.$) || void 0 === t2 ? void 0 : t2.gubu$) && (n2.f = void 0), n2; + let n3 = qe(this, e2); + return n3.r = true, n3.p = false, void 0 === e2 ? (n3.f = void 0, 1 === arguments.length && (n3.t = y, n3.v = void 0)) : (null === (t2 = null == this ? void 0 : this.$) || void 0 === t2 ? void 0 : t2.gubu$) && (n3.f = void 0), n3; }, de = function(e2) { let t2 = qe(this, e2); return t2.c = ye(), t2; @@ -1351,30 +1336,30 @@ var gubu_min = gubu_min$2.exports; return t2.r = false, void 0 === e2 && 1 === arguments.length && (t2.t = y, t2.v = void 0), t2; }, ye = function(e2) { let t2 = qe(this, e2); - return t2.t = m, void 0 !== e2 && (t2.v = e2, t2.f = e2), t2; + return t2.t = m2, void 0 !== e2 && (t2.v = e2, t2.f = e2), t2; }, me = function(e2, t2) { - let n2 = qe(this, t2); - return n2.z = e2, n2; + let n3 = qe(this, t2); + return n3.z = e2, n3; }, be = function(e2) { let t2 = qe(this, e2); return t2.r = false, t2.p = true, t2; }, $e = function(e2) { let t2 = qe(this, e2); - return t2.r = false, t2.p = true, t2.e = false, t2.a.push(function(e3, t3, n2) { - return 0 < n2.curerr.length && (t3.uval = void 0, t3.done = false), true; + return t2.r = false, t2.p = true, t2.e = false, t2.a.push(function(e3, t3, n3) { + return 0 < n3.curerr.length && (t3.uval = void 0, t3.done = false), true; }), t2; }, ke = function(e2) { let t2 = qe(this); return t2.t = h, t2.v = e2, t2.f = e2, t2; }, xe = function(e2, t2) { - let n2 = qe(this, e2); - if (void 0 !== t2 && (n2 = qe(n2, t2)), n2.r = false, n2.f = e2, void 0 === t2) { - h === typeof e2 && le[e2.name] && (n2.t = e2.name.toLowerCase(), n2.f = Qe(ie[n2.t])); + let n3 = qe(this, e2); + if (void 0 !== t2 && (n3 = qe(n3, t2)), n3.r = false, n3.f = e2, void 0 === t2) { + h === typeof e2 && le[e2.name] && (n3.t = e2.name.toLowerCase(), n3.f = Qe(ie[n3.t])); } else { const e3 = oe(t2); - n2.t = e3.t; + n3.t = e3.t; } - return n2.p = false, n2; + return n3.p = false, n3; }, Ie = function(e2) { let t2 = qe(this, e2); return t2.u.empty = true, t2; @@ -1382,259 +1367,259 @@ var gubu_min = gubu_min$2.exports; let t2 = qe(this, e2); return t2.t = a, t2; }, Se = function(e2, t2) { - let n2 = qe(this), r3 = c === typeof e2; - n2.t = d, r3 && null == t2 && (n2 = oe([])); - let l2 = null; - return h === typeof e2 && (l2 = e2, n2 = ye()), n2.b.push(function(n3, i2, o2) { - if (l2) i2.val = l2(o2.path, o2); + let n3 = qe(this), r3 = c === typeof e2; + n3.t = d, r3 && null == t2 && (n3 = oe([])); + let l3 = null; + return h === typeof e2 && (l3 = e2, n3 = ye()), n3.b.push(function(n4, i2, o2) { + if (l3) i2.val = l3(o2.path, o2); else if (r3) { - let n4 = e2; - i2.val = o2.path.slice(o2.path.length - 1 - (0 <= n4 ? n4 : 0), o2.path.length - 1 + (0 <= n4 ? 0 : 1)), d === typeof t2 && (i2.val = i2.val.join(t2)); + let n5 = e2; + i2.val = o2.path.slice(o2.path.length - 1 - (0 <= n5 ? n5 : 0), o2.path.length - 1 + (0 <= n5 ? 0 : 1)), d === typeof t2 && (i2.val = i2.val.join(t2)); } else null == e2 && (i2.val = o2.path[o2.path.length - 2]); return true; - }), n2; + }), n3; }, je = function(...e2) { const t2 = qe(this); t2.t = b, t2.r = true; - const n2 = e2.map((e3) => et(e3)); - t2.u.list = n2.map((e3) => e3.node()); - const r3 = function(t3, r4, l2) { + const n3 = e2.map((e3) => et(e3)); + t2.u.list = n3.map((e3) => e3.node()); + const r3 = function(t3, r4, l3) { let i2 = true; - for (let e3 of n2) { - let n3 = __spreadProps(__spreadValues({}, l2.ctx), { err: [] }); - e3(t3, n3), 0 < n3.err.length && (i2 = false); + for (let e3 of n3) { + let n4 = __spreadProps(__spreadValues({}, l3.ctx), { err: [] }); + e3(t3, n4), 0 < n4.err.length && (i2 = false); } - return i2 || (r4.why = G, r4.err = [He(l2, E + " " + K + H + U + " does not satisfy all of: " + e2.map((e3) => Ze(e3, null, true)).join(", "))]), i2; + return i2 || (r4.why = G, r4.err = [He(l3, E + " " + K + H + U + " does not satisfy all of: " + e2.map((e3) => Ze(e3, null, true)).join(", "))]), i2; }; return r3.n = G, r3.a = e2, t2.b.push(r3), t2; }, Ne = function(...e2) { let t2 = qe(this); t2.t = b, t2.r = true; - let n2 = e2.map((e3) => et(e3)); - t2.u.list = n2.map((e3) => e3.node()); - const r3 = function(t3, r4, l2) { + let n3 = e2.map((e3) => et(e3)); + t2.u.list = n3.map((e3) => e3.node()); + const r3 = function(t3, r4, l3) { let i2 = false; - for (let e3 of n2) { - let n3 = __spreadProps(__spreadValues({}, l2.ctx), { err: [] }), o2 = e3.match(t3, n3); - o2 && (r4.val = e3(t3, n3)), i2 || (i2 = o2); + for (let e3 of n3) { + let n4 = __spreadProps(__spreadValues({}, l3.ctx), { err: [] }), o2 = e3.match(t3, n4); + o2 && (r4.val = e3(t3, n4)), i2 || (i2 = o2); } - return i2 || (r4.why = q, r4.err = [He(l2, E + " " + K + H + U + " does not satisfy any of: " + e2.map((e3) => Ze(e3, null, true)).join(", "))]), i2; + return i2 || (r4.why = q2, r4.err = [He(l3, E + " " + K + H + U + " does not satisfy any of: " + e2.map((e3) => Ze(e3, null, true)).join(", "))]), i2; }; - return r3.n = q, r3.a = e2, t2.b.push(r3), t2; + return r3.n = q2, r3.a = e2, t2.b.push(r3), t2; }, Oe = function(...e2) { let t2 = qe(this); t2.t = b, t2.r = true; - let n2 = e2.map((e3) => et(e3)); - t2.u.list = n2.map((e3) => e3.node()); - const r3 = function(t3, r4, l2) { + let n3 = e2.map((e3) => et(e3)); + t2.u.list = n3.map((e3) => e3.node()); + const r3 = function(t3, r4, l3) { let i2 = 0; - for (let e3 of n2) { - let n3 = __spreadProps(__spreadValues({}, l2.ctx), { err: [] }); - if (e3.match(t3, n3)) { - i2++, r4.val = e3(t3, n3); + for (let e3 of n3) { + let n4 = __spreadProps(__spreadValues({}, l3.ctx), { err: [] }); + if (e3.match(t3, n4)) { + i2++, r4.val = e3(t3, n4); break; } } - return 1 !== i2 && (r4.why = z, r4.err = [He(l2, E + " " + K + H + U + " does not satisfy one of: " + e2.map((e3) => Ze(e3, null, true)).join(", "))]), true; + return 1 !== i2 && (r4.why = z, r4.err = [He(l3, E + " " + K + H + U + " does not satisfy one of: " + e2.map((e3) => Ze(e3, null, true)).join(", "))]), true; }; return r3.n = z, r3.a = e2, t2.b.push(r3), t2; }, Ve = function(...e2) { - const t2 = qe(this), n2 = function(t3, n3, r3) { - for (let l2 = 0; l2 < e2.length; l2++) if (t3 === e2[l2]) return true; + const t2 = qe(this), n3 = function(t3, n4, r3) { + for (let l3 = 0; l3 < e2.length; l3++) if (t3 === e2[l3]) return true; if (r3.node.hasOwnProperty("f") && void 0 === t3) { const t4 = r3.node.f; - for (let n4 = 0; n4 < e2.length; n4++) if (t4 === e2[n4]) return true; + for (let n5 = 0; n5 < e2.length; n5++) if (t4 === e2[n5]) return true; } - return n3.err = He(r3, E + " " + K + H + U + " must be exactly one of: " + e2.map((e3) => Ze(e3, null, true)).join(", ")), n3.done = true, false; + return n4.err = He(r3, E + " " + K + H + U + " must be exactly one of: " + e2.map((e3) => Ze(e3, null, true)).join(", ")), n4.done = true, false; }; - return n2.n = M, n2.a = e2, n2.s = () => M + "(" + e2.map((e3) => Ze(e3, null, true)).join(",") + ")", t2.b.push(n2), t2; + return n3.n = M, n3.a = e2, n3.s = () => M + "(" + e2.map((e3) => Ze(e3, null, true)).join(",") + ")", t2.b.push(n3), t2; }, Ae = function(e2, t2) { - let n2 = qe(this, t2); - return n2.b.push(e2), n2; + let n3 = qe(this, t2); + return n3.b.push(e2), n3; }, Re = function(e2, t2) { - let n2 = qe(this, t2); - return n2.a.push(e2), n2; + let n3 = qe(this, t2); + return n3.a.push(e2), n3; }, De = function(e2, t2) { - let n2 = qe(this, t2); - if (n2.r = true, h === typeof e2) { + let n3 = qe(this, t2); + if (n3.r = true, h === typeof e2) { let t3 = e2; - t3.gubu$ = t3.gubu$ || {}, t3.gubu$.Check = true, t3.s = () => J + "(" + Ze(e2, null, true) + ")", n2.b.push(e2), n2.t = S; + t3.gubu$ = t3.gubu$ || {}, t3.gubu$.Check = true, t3.s = () => J + "(" + Ze(e2, null, true) + ")", n3.b.push(e2), n3.t = S; } else if (v === typeof e2) { if (Object.prototype.toString.call(e2).includes("RegExp")) { let t3 = (t4) => null != t4 && !Number.isNaN(t4) && !!String(t4).match(e2); - X(t3, s, { value: String(e2) }), X(t3, "gubu$", { value: { Check: true } }), t3.s = () => J + "(" + Ze(e2, null, true) + ")", n2.b.push(t3), n2.t = S; + X(t3, s, { value: String(e2) }), X(t3, "gubu$", { value: { Check: true } }), t3.s = () => J + "(" + Ze(e2, null, true) + ")", n3.b.push(t3), n3.t = S; } - } else d === typeof e2 && (n2.t = e2); + } else d === typeof e2 && (n3.t = e2); if (void 0 !== t2) { const e3 = oe(t2); - n2.t = e3.t; + n3.t = e3.t; } - return n2; + return n3; }, Ee = function(e2) { let t2 = qe(this, e2); - return p === t2.t && void 0 !== t2.c && 0 === t2.n && (t2.v = [t2.c]), t2.c = void 0, t2; + return p2 === t2.t && void 0 !== t2.c && 0 === t2.n && (t2.v = [t2.c]), t2.c = void 0, t2; }, Ce = function(e2, t2) { - let n2 = qe(this, t2), r3 = d === typeof e2 ? e2 : (v === typeof e2 && e2 || {}).name; - return null != r3 && "" != r3 && n2.b.push(function(e3, t3, n3) { - return (n3.ctx.ref = n3.ctx.ref || {})[r3] = n3.node, true; - }), n2; + let n3 = qe(this, t2), r3 = d === typeof e2 ? e2 : (v === typeof e2 && e2 || {}).name; + return null != r3 && "" != r3 && n3.b.push(function(e3, t3, n4) { + return (n4.ctx.ref = n4.ctx.ref || {})[r3] = n4.node, true; + }), n3; }, Ge = function(e2, t2) { - let n2 = qe(this, t2), r3 = v === typeof e2 && e2 || {}, l2 = d === typeof e2 ? e2 : r3.name, i2 = !!r3.fill; - return null != l2 && "" != l2 && n2.b.push(function(e3, t3, n3) { + let n3 = qe(this, t2), r3 = v === typeof e2 && e2 || {}, l3 = d === typeof e2 ? e2 : r3.name, i2 = !!r3.fill; + return null != l3 && "" != l3 && n3.b.push(function(e3, t3, n4) { if (void 0 !== e3 || i2) { - let e4 = n3.ctx.ref = n3.ctx.ref || {}; - if (void 0 !== e4[l2]) { - let n4 = __spreadValues({}, e4[l2]); - n4.t = n4.t || a, t3.node = n4, t3.type = n4.t; + let e4 = n4.ctx.ref = n4.ctx.ref || {}; + if (void 0 !== e4[l3]) { + let n5 = __spreadValues({}, e4[l3]); + n5.t = n5.t || a, t3.node = n5, t3.type = n5.t; } } return true; - }), n2; + }), n3; }, Te = function(e2, t2) { - let n2 = qe(this, t2), r3 = v === typeof e2 && e2 || {}, l2 = d === typeof e2 ? e2 : r3.name, i2 = g === typeof r3.keep ? r3.keep : void 0, o2 = Y(r3.claim) ? r3.claim : []; - if (null != l2 && "" != l2) { - let e3 = (e4, t4, n3) => { + let n3 = qe(this, t2), r3 = v === typeof e2 && e2 || {}, l3 = d === typeof e2 ? e2 : r3.name, i2 = g === typeof r3.keep ? r3.keep : void 0, o2 = Y(r3.claim) ? r3.claim : []; + if (null != l3 && "" != l3) { + let e3 = (e4, t4, n4) => { if (void 0 === e4 && 0 < o2.length) { - n3.ctx.Rename = n3.ctx.Rename || {}, n3.ctx.Rename.fromDflt = n3.ctx.Rename.fromDflt || {}; + n4.ctx.Rename = n4.ctx.Rename || {}, n4.ctx.Rename.fromDflt = n4.ctx.Rename.fromDflt || {}; for (let e5 of o2) { - let r4 = n3.ctx.Rename.fromDflt[e5] || {}; - if (void 0 !== n3.parent[e5] && !r4.yes) { - t4.val = n3.parent[e5], n3.match || (n3.parent[l2] = t4.val), t4.node = r4.node; - for (let e6 = 0; e6 < n3.err.length; e6++) n3.err[e6].k === r4.key && (n3.err.splice(e6, 1), e6--); + let r4 = n4.ctx.Rename.fromDflt[e5] || {}; + if (void 0 !== n4.parent[e5] && !r4.yes) { + t4.val = n4.parent[e5], n4.match || (n4.parent[l3] = t4.val), t4.node = r4.node; + for (let e6 = 0; e6 < n4.err.length; e6++) n4.err[e6].k === r4.key && (n4.err.splice(e6, 1), e6--); if (i2) { - let t5 = n3.cI + 1; - n3.nodes.splice(t5, 0, oe(r4.dval)), n3.vals.splice(t5, 0, void 0), n3.parents.splice(t5, 0, n3.parent), n3.keys.splice(t5, 0, e5), n3.nI++, n3.pI++; - } else delete n3.parent[e5]; + let t5 = n4.cI + 1; + n4.nodes.splice(t5, 0, oe(r4.dval)), n4.vals.splice(t5, 0, void 0), n4.parents.splice(t5, 0, n4.parent), n4.keys.splice(t5, 0, e5), n4.nI++, n4.pI++; + } else delete n4.parent[e5]; break; } } - void 0 === t4.val && (t4.val = n3.node.v); + void 0 === t4.val && (t4.val = n4.node.v); } return true; }; - X(e3, s, { value: "Rename:" + l2 }), n2.b.push(e3); - let t3 = (e4, t4, n3) => (n3.parent[l2] = e4, n3.match || i2 || n3.key === l2 || Y(n3.parent) && false !== i2 || (delete n3.parent[n3.key], t4.done = true), n3.ctx.Rename = n3.ctx.Rename || {}, n3.ctx.Rename.fromDflt = n3.ctx.Rename.fromDflt || {}, n3.ctx.Rename.fromDflt[l2] = { yes: n3.fromDflt, key: n3.key, dval: n3.node.v, node: n3.node }, true); - X(t3, s, { value: "Rename:" + l2 }), n2.a.push(t3); + X(e3, s, { value: "Rename:" + l3 }), n3.b.push(e3); + let t3 = (e4, t4, n4) => (n4.parent[l3] = e4, n4.match || i2 || n4.key === l3 || Y(n4.parent) && false !== i2 || (delete n4.parent[n4.key], t4.done = true), n4.ctx.Rename = n4.ctx.Rename || {}, n4.ctx.Rename.fromDflt = n4.ctx.Rename.fromDflt || {}, n4.ctx.Rename.fromDflt[l3] = { yes: n4.fromDflt, key: n4.key, dval: n4.node.v, node: n4.node }, true); + X(t3, s, { value: "Rename:" + l3 }), n3.a.push(t3); } - return n2; + return n3; }, Be = function(e2, t2) { - let n2 = qe(this, t2); - return n2.c = oe(e2), void 0 === n2.v && (n2.t = "object", n2.v = {}, n2.f = {}), n2; + let n3 = qe(this, t2); + return n3.c = oe(e2), void 0 === n3.v && (n3.t = "object", n3.v = {}, n3.f = {}), n3; }, Je = function(e2, t2) { - let n2 = qe(this, t2 || []); - return n2.t = "array", n2.c = oe(e2), n2.m = n2.m || {}, n2.m.rest = true, n2; + let n3 = qe(this, t2 || []); + return n3.t = "array", n3.c = oe(e2), n3.m = n3.m || {}, n3.m.rest = true, n3; }, We = function(e2, t2) { - let n2 = oe(Z[e2]), r3 = qe(this, t2); - return r3 !== n2 && (r3.t = n2.t, r3.r = n2.r, r3.p = n2.p, r3.v = n2.v), r3; + let n3 = oe(Z[e2]), r3 = qe(this, t2); + return r3 !== n3 && (r3.t = n3.t, r3.r = n3.r, r3.p = n3.p, r3.v = n3.v), r3; }; - function Me(e2, t2, n2, r3, l2) { - let i2 = qe(e2, n2); + function Me(e2, t2, n3, r3, l3) { + let i2 = qe(e2, n3); t2 = +t2; - let o2 = function(e3, n3, r4) { - return l2(function(e4) { + let o2 = function(e3, n4, r4) { + return l3(function(e4) { return c === typeof e4 ? e4 : c === typeof (null == e4 ? void 0 : e4.length) ? e4.length : null != e4 && v === typeof e4 ? Q(e4).length : NaN; - }(e3), t2, e3, n3, r4); + }(e3), t2, e3, n4, r4); }; return Object.defineProperty(o2, s, { value: r3 }), o2.n = r3, o2.a = [t2], o2.s = () => r3 + "(" + t2 + ")", o2[Symbol.for("nodejs.util.inspect.custom")] = o2.s(), o2.toJSON = () => o2.s(), i2.b.push(o2), i2; } const Fe = function(e2, t2) { - return Me(this, e2, t2, P, (e3, t3, n2, r3, l2) => { + return Me(this, e2, t2, P, (e3, t3, n3, r3, l3) => { if (t3 <= e3) return true; - l2.checkargs = { min: 1 }; - let i2 = c === typeof n2 ? "" : "length "; - return r3.err = He(l2, E + " " + K + H + U + ` must be a minimum ${i2}of ${t3} (was ${e3}).`), false; + l3.checkargs = { min: 1 }; + let i2 = c === typeof n3 ? "" : "length "; + return r3.err = He(l3, E + " " + K + H + U + ` must be a minimum ${i2}of ${t3} (was ${e3}).`), false; }); }, Pe = function(e2, t2) { - return Me(this, e2, t2, F, (e3, t3, n2, r3, l2) => { + return Me(this, e2, t2, F, (e3, t3, n3, r3, l3) => { if (e3 <= t3) return true; - let i2 = c === typeof n2 ? "" : "length "; - return r3.err = He(l2, E + " " + K + H + U + ` must be a maximum ${i2}of ${t3} (was ${e3}).`), false; + let i2 = c === typeof n3 ? "" : "length "; + return r3.err = He(l3, E + " " + K + H + U + ` must be a maximum ${i2}of ${t3} (was ${e3}).`), false; }); }, ze = function(e2, t2) { - return Me(this, e2, t2, C, (e3, t3, n2, r3, l2) => { + return Me(this, e2, t2, C, (e3, t3, n3, r3, l3) => { if (t3 < e3) return true; - let i2 = c === typeof n2 ? "be" : "have length"; - return r3.err = He(l2, E + " " + K + H + U + ` must ${i2} above ${t3} (was ${e3}).`), false; + let i2 = c === typeof n3 ? "be" : "have length"; + return r3.err = He(l3, E + " " + K + H + U + ` must ${i2} above ${t3} (was ${e3}).`), false; }); }, Le = function(e2, t2) { - return Me(this, e2, t2, B, (e3, t3, n2, r3, l2) => { + return Me(this, e2, t2, B, (e3, t3, n3, r3, l3) => { if (e3 < t3) return true; - let i2 = c === typeof n2 ? "be" : "have length"; - return r3.err = He(l2, E + " " + K + H + U + ` must ${i2} below ${t3} (was ${e3}).`), false; + let i2 = c === typeof n3 ? "be" : "have length"; + return r3.err = He(l3, E + " " + K + H + U + ` must ${i2} below ${t3} (was ${e3}).`), false; }); }, _e = function(e2, t2) { - return Me(this, e2, t2, B, (e3, t3, n2, r3, l2) => { + return Me(this, e2, t2, B, (e3, t3, n3, r3, l3) => { if (t3 === e3) return true; - let i2 = c === typeof n2 ? "" : " in length"; - return r3.err = He(l2, E + " " + K + H + U + ` must be exactly ${t3}${i2} (was ${e3}).`), false; + let i2 = c === typeof n3 ? "" : " in length"; + return r3.err = He(l3, E + " " + K + H + U + ` must be exactly ${t3}${i2} (was ${e3}).`), false; }); }; function qe(e2, t2) { - let n2, r3 = null != e2 && (e2.window === e2 || e2.global === e2); - if (void 0 !== e2 && !r3 || void 0 === t2) if (void 0 === e2 || r3) n2 = oe(void 0); + let n3, r3 = null != e2 && (e2.window === e2 || e2.global === e2); + if (void 0 !== e2 && !r3 || void 0 === t2) if (void 0 === e2 || r3) n3 = oe(void 0); else if (void 0 !== t2) { - n2 = oe(t2); + n3 = oe(t2); let r4 = oe(e2); - void 0 === n2.v && "list" !== n2.t && (n2.v = r4.v, n2.t = r4.t), ["f", "r", "p", "c", "e", "z"].map((e3) => n2[e3] = void 0 !== r4[e3] ? r4[e3] : n2[e3]), n2.u = Object.assign(__spreadValues({}, r4.u), n2.u), n2.m = Object.assign(__spreadValues({}, r4.m), n2.m), n2.a = r4.a.concat(n2.a), n2.b = r4.b.concat(n2.b); - } else n2 = oe(e2); - else n2 = oe(t2); - return n2.Above ? n2 : Object.assign(n2, { Above: ze, After: Re, Any: ye, Before: Ae, Below: Le, Check: De, Child: Be, Closed: Ee, Default: xe, Define: Ce, Empty: Ie, Exact: Ve, Fault: me, Ignore: $e, Len: _e, Max: Pe, Min: Fe, Never: we, Open: de, Refer: Ge, Rename: Te, Required: ve, Rest: Je, Skip: be, Type: We }); + void 0 === n3.v && "list" !== n3.t && (n3.v = r4.v, n3.t = r4.t), ["f", "r", "p", "c", "e", "z"].map((e3) => n3[e3] = void 0 !== r4[e3] ? r4[e3] : n3[e3]), n3.u = Object.assign(__spreadValues({}, r4.u), n3.u), n3.m = Object.assign(__spreadValues({}, r4.m), n3.m), n3.a = r4.a.concat(n3.a), n3.b = r4.b.concat(n3.b); + } else n3 = oe(e2); + else n3 = oe(t2); + return n3.Above ? n3 : Object.assign(n3, { Above: ze, After: Re, Any: ye, Before: Ae, Below: Le, Check: De, Child: Be, Closed: Ee, Default: xe, Define: Ce, Empty: Ie, Exact: Ve, Fault: me, Ignore: $e, Len: _e, Max: Pe, Min: Fe, Never: we, Open: de, Refer: Ge, Rename: Te, Required: ve, Rest: Je, Skip: be, Type: We }); } - function He(e2, t2, n2, r3) { - return Ue(n2 || S, e2, 4e3, t2, r3); + function He(e2, t2, n3, r3) { + return Ue(n3 || S, e2, 4e3, t2, r3); } - function Ue(e2, t2, n2, r3, l2, i2) { + function Ue(e2, t2, n3, r3, l3, i2) { var o2; - let s2 = { key: t2.key, type: t2.node.t, node: t2.node, value: t2.val, path: pe(t2), why: e2, check: (null === (o2 = t2.check) || void 0 === o2 ? void 0 : o2.name) || "none", args: t2.checkargs || {}, mark: n2, text: "", use: l2 || {} }, u2 = he((void 0 === t2.val ? y : Ze(t2.val)).replace(/"/g, "")); + let s2 = { key: t2.key, type: t2.node.t, node: t2.node, value: t2.val, path: pe(t2), why: e2, check: (null === (o2 = t2.check) || void 0 === o2 ? void 0 : o2.name) || "none", args: t2.checkargs || {}, mark: n3, text: "", use: l3 || {} }, u2 = he((void 0 === t2.val ? y : Ze(t2.val)).replace(/"/g, "")); if (null == (r3 = r3 || t2.node.z) || "" === r3) { - let n3 = u2.startsWith("[") ? p : u2.startsWith("{") ? v : null == t2.val || c === typeof t2.val && isNaN(t2.val) ? "value" : typeof t2.val, r4 = u2.startsWith("[") || Y(t2.parents[t2.pI]) ? "index" : "property", o3 = "is", h2 = null == l2 ? void 0 : l2.k; - h2 = Y(h2) ? (r4 = 1 < h2.length ? (o3 = "are", "properties") : r4, h2.join(", ")) : h2, s2.text = "Validation failed for " + (0 < s2.path.length ? `${r4} "${s2.path}" with ` : "") + `${n3} "${u2}" because ` + (x === e2 ? $ === t2.node.t ? `the ${n3} is not an instance of ${t2.node.u.n}` : `the ${n3} is not of type ${j === t2.node.t ? d : t2.node.t}` : f === e2 ? "" === t2.val ? "an empty string is not allowed" : `the ${n3} is required` : "closed" === e2 ? `the ${r4} "${h2}" ${o3} not allowed` : j === e2 ? "the string did not match " + t2.node.v : a === e2 ? "no value is allowed" : `check "${null == i2 ? e2 : i2}" failed`) + (s2.use.thrown ? " (threw: " + s2.use.thrown.message + ")" : "."); + let n4 = u2.startsWith("[") ? p2 : u2.startsWith("{") ? v : null == t2.val || c === typeof t2.val && isNaN(t2.val) ? "value" : typeof t2.val, r4 = u2.startsWith("[") || Y(t2.parents[t2.pI]) ? "index" : "property", o3 = "is", h2 = null == l3 ? void 0 : l3.k; + h2 = Y(h2) ? (r4 = 1 < h2.length ? (o3 = "are", "properties") : r4, h2.join(", ")) : h2, s2.text = "Validation failed for " + (0 < s2.path.length ? `${r4} "${s2.path}" with ` : "") + `${n4} "${u2}" because ` + (x === e2 ? $ === t2.node.t ? `the ${n4} is not an instance of ${t2.node.u.n}` : `the ${n4} is not of type ${j === t2.node.t ? d : t2.node.t}` : f2 === e2 ? "" === t2.val ? "an empty string is not allowed" : `the ${n4} is required` : "closed" === e2 ? `the ${r4} "${h2}" ${o3} not allowed` : j === e2 ? "the string did not match " + t2.node.v : a === e2 ? "no value is allowed" : `check "${null == i2 ? e2 : i2}" failed`) + (s2.use.thrown ? " (threw: " + s2.use.thrown.message + ")" : "."); } else s2.text = r3.replace(/\$VALUE/g, u2).replace(/\$PATH/g, s2.path); return s2; } function Ke(e2) { var t2; - let n2 = e2.t; + let n3 = e2.t; const r3 = { number: O, string: N, boolean: V }; - if (r3[n2]) { + if (r3[n3]) { let t3 = ""; - return e2.r && (t3 += r3[n2]), "" === t3 && (t3 = JSON.stringify(e2.v)), t3 += e2.b.map((t4) => t4.s ? "." + t4.s(e2) : "").join(""), t3; + return e2.r && (t3 += r3[n3]), "" === t3 && (t3 = JSON.stringify(e2.v)), t3 += e2.b.map((t4) => t4.s ? "." + t4.s(e2) : "").join(""), t3; } - if (m === n2) { - let n3 = ""; - return e2.r && (n3 += _2), m == (null === (t2 = e2.c) || void 0 === t2 ? void 0 : t2.t) && (n3 += ("" === n3 ? "" : ".") + L), n3 += e2.b.map((t3) => t3.s ? "." + t3.s(e2) : "").join(""), n3.startsWith(".") && (n3 = n3.slice(1)), "" === n3 && (n3 = T), n3; + if (m2 === n3) { + let n4 = ""; + return e2.r && (n4 += _2), m2 == (null === (t2 = e2.c) || void 0 === t2 ? void 0 : t2.t) && (n4 += ("" === n4 ? "" : ".") + L), n4 += e2.b.map((t3) => t3.s ? "." + t3.s(e2) : "").join(""), n4.startsWith(".") && (n4 = n4.slice(1)), "" === n4 && (n4 = T), n4; } - if (S === n2) { + if (S === n3) { let t3 = ""; return t3 += e2.b.map((t4) => t4.s ? "." + t4.s(e2) : "").join(""), t3.startsWith(".") && (t3 = t3.slice(1)), t3; } - if (v === n2) { + if (v === n3) { let t3 = {}; - for (let n3 in e2.v) t3[n3] = Ke(e2.v[n3]); + for (let n4 in e2.v) t3[n4] = Ke(e2.v[n4]); return void 0 !== e2.c && (r3[e2.c.t] ? t3.$$ = W + "(" + r3[e2.c.t] + ")" : "any" === e2.c.t ? t3.$$ = L : (t3.$$ = W + "($$child)", t3.$$child = Ke(e2.c))), 0 < e2.b.length && (void 0 === t3.$$ && (t3.$$ = ""), t3.$$ += e2.b.map((t4) => t4.s ? "." + t4.s(e2) : "").join(""), t3.$$.startsWith(".") && (t3.$$ = t3.$$.slice(1))), t3.$$ && 1 === Object.keys(t3).length && t3.$$.startsWith(W) ? t3.$$ : t3; } - if (b === n2) { - let t3 = {}, n3 = 0, r4 = e2.u.list.map((e3) => Ke(e3)).map((e3, r5) => v === typeof e3 ? (t3[r5 = "$$ref" + n3++] = e3, r5) : e3), l2 = (e2.b[0].n || e2.b[0].name) + "(" + r4.join(",") + ")"; - return 0 === n3 ? l2 : __spreadValues({ $$: l2 }, t3); + if (b === n3) { + let t3 = {}, n4 = 0, r4 = e2.u.list.map((e3) => Ke(e3)).map((e3, r5) => v === typeof e3 ? (t3[r5 = "$$ref" + n4++] = e3, r5) : e3), l3 = (e2.b[0].n || e2.b[0].name) + "(" + r4.join(",") + ")"; + return 0 === n4 ? l3 : __spreadValues({ $$: l3 }, t3); } - if (p === n2) { + if (p2 === n3) { let t3 = []; - return void 0 !== e2.c ? t3[0] = Ke(e2.c) : t3 = Object.keys(e2.v).reduce((t4, n3) => (t4[+n3] = e2.v[n3], t4), []).map((e3) => Ke(e3)), t3; + return void 0 !== e2.c ? t3[0] = Ke(e2.c) : t3 = Object.keys(e2.v).reduce((t4, n4) => (t4[+n4] = e2.v[n4], t4), []).map((e3) => Ke(e3)), t3; } - if (j === n2) return e2.v.toString(); + if (j === n3) return e2.v.toString(); } - function Ze(e2, t2, r3, l2) { + function Ze(e2, t2, r3, l3) { let o2; - if (!l2 && e2 && e2.$ && (n === e2.$.gubu$ || true === e2.$.gubu$)) return e2 = JSON.stringify(Ke(e2)), r3 && (e2 = "string" == typeof e2 ? e2.replace(/\\/g, "").replace(/"/g, "") : ""), e2; + if (!l3 && e2 && e2.$ && (n2 === e2.$.gubu$ || true === e2.$.gubu$)) return e2 = JSON.stringify(Ke(e2)), r3 && (e2 = "string" == typeof e2 ? e2.replace(/\\/g, "").replace(/"/g, "") : ""), e2; try { o2 = te(e2, (e3, o3) => { var s2, u2, a2; if (t2 && (o3 = t2(e3, o3)), null != o3 && v === typeof o3 && o3.constructor && A !== o3.constructor.name && R !== o3.constructor.name) o3 = "[object RegExp]" === i.call(o3) || h === typeof o3.toString ? o3.toString() : o3.constructor.name; - else if (l2 || n !== (null === (s2 = null == o3 ? void 0 : o3.$) || void 0 === s2 ? void 0 : s2.gubu$)) if (h === typeof o3) o3 = h === typeof ue[o3.name] && isNaN(+e3) ? void 0 : null != o3.name && "" !== o3.name ? o3.name : he(o3.toString().replace(/[ \t\r\n]+/g, " ")); + else if (l3 || n2 !== (null === (s2 = null == o3 ? void 0 : o3.$) || void 0 === s2 ? void 0 : s2.gubu$)) if (h === typeof o3) o3 = h === typeof ue[o3.name] && isNaN(+e3) ? void 0 : null != o3.name && "" !== o3.name ? o3.name : he(o3.toString().replace(/[ \t\r\n]+/g, " ")); else if ("bigint" == typeof o3) o3 = String(o3.toString()); else { if (Number.isNaN(o3)) return "NaN"; - true === l2 || true !== (null === (u2 = null == o3 ? void 0 : o3.$) || void 0 === u2 ? void 0 : u2.gubu$) && n !== (null === (a2 = null == o3 ? void 0 : o3.$) || void 0 === a2 ? void 0 : a2.gubu$) || (o3 = JSON.stringify(Ke(o3))); + true === l3 || true !== (null === (u2 = null == o3 ? void 0 : o3.$) || void 0 === u2 ? void 0 : u2.gubu$) && n2 !== (null === (a2 = null == o3 ? void 0 : o3.$) || void 0 === a2 ? void 0 : a2.gubu$) || (o3 = JSON.stringify(Ke(o3))); } else "number" === o3.t || "string" === o3.t || "boolean" === o3.t ? o3 = o3.v : (o3 = Ke(o3), o3 = JSON.stringify(o3), r3 && (o3 = "string" == typeof o3 ? o3.replace(/\\/g, "").replace(/"/g, "") : "")); return o3; @@ -1653,34 +1638,34 @@ var gubu_min = gubu_min$2.exports; const et = ue; t.Gubu = et; function tt(e2) { - return function(t2, n2, r3) { - let l2 = false; - d === typeof t2 && (l2 = true, r3 = n2, n2 = t2); - const i2 = et(r3 = r3 || n2, { name: e2 + (n2 = d === typeof n2 ? " (" + n2 + ")" : "") }), o2 = i2.node(), s2 = o2.k; - let u2 = t2, a2 = {}, c2 = 0, f2 = 0; + return function(t2, n3, r3) { + let l3 = false; + d === typeof t2 && (l3 = true, r3 = n3, n3 = t2); + const i2 = et(r3 = r3 || n3, { name: e2 + (n3 = d === typeof n3 ? " (" + n3 + ")" : "") }), o2 = i2.node(), s2 = o2.k; + let u2 = t2, a2 = {}, c2 = 0, f3 = 0; for (; c2 < s2.length; c2++) { let e3 = o2.v[s2[c2]]; - e3.p && (e3 = o2.v[s2[c2]] = ((t3) => Re(function(e4, n3, r4) { + e3.p && (e3 = o2.v[s2[c2]] = ((t3) => Re(function(e4, n4, r4) { if (0 < r4.curerr.length) { - f2++; + f3++; for (let e5 = s2.length - 1; e5 > t3; e5--) o2.v[s2[e5]].m.rest ? a2[s2[e5]].splice(o2.v[s2[e5]].m.rest_pos + t3 - e5, 0, a2[s2[e5 - 1]]) : (r4.vals[r4.pI + e5 - t3] = r4.vals[r4.pI + e5 - t3 - 1], a2[s2[e5]] = a2[s2[e5 - 1]]); - n3.uval = void 0, n3.done = false; + n4.uval = void 0, n4.done = false; } return true; - }, e3))(c2), e3.e = false), c2 !== s2.length - 1 || o2.v[s2[c2]].m.rest || (o2.v[s2[c2]] = Re(function(e4, t3, n3) { - return !(s2.length - f2 < u2.length && (0 === n3.curerr.length && (t3.err = `Too many arguments for type signature (was ${u2.length}, expected ${s2.length - f2})`), t3.fatal = true, 1)); + }, e3))(c2), e3.e = false), c2 !== s2.length - 1 || o2.v[s2[c2]].m.rest || (o2.v[s2[c2]] = Re(function(e4, t3, n4) { + return !(s2.length - f3 < u2.length && (0 === n4.curerr.length && (t3.err = `Too many arguments for type signature (was ${u2.length}, expected ${s2.length - f3})`), t3.fatal = true, 1)); }, o2.v[s2[c2]])); } - function p2(e3) { + function p3(e3) { for (let t3 = 0; t3 < s2.length; t3++) { - let n3 = o2.v[s2[t3]]; - n3.m.rest ? (a2[s2[t3]] = [...e3].slice(t3), n3.m.rest_pos = a2[s2[t3]].length) : a2[s2[t3]] = e3[t3]; + let n4 = o2.v[s2[t3]]; + n4.m.rest ? (a2[s2[t3]] = [...e3].slice(t3), n4.m.rest_pos = a2[s2[t3]].length) : a2[s2[t3]] = e3[t3]; } return a2; } - return l2 ? function(e3) { - return u2 = e3, a2 = {}, c2 = 0, f2 = 0, i2(p2(e3)); - } : i2(p2(t2)); + return l3 ? function(e3) { + return u2 = e3, a2 = {}, c2 = 0, f3 = 0, i2(p3(e3)); + } : i2(p3(t2)); }; } const { Gubu: nt } = t; @@ -1689,31 +1674,31 @@ var gubu_min = gubu_min$2.exports; })(gubu_min$2, gubu_min$2.exports); var gubu_minExports = gubu_min$2.exports; const gubu_min$1 = /* @__PURE__ */ getDefaultExportFromCjs(gubu_minExports); -function cmap(o, p) { - return Object.entries(o).reduce((r2, n, _2) => (_2 = Object.entries(p).reduce((s, m) => cmap.FILTER === s ? s : (s[m[0]] = // transfom(val,key,current,parentkey,parent) - "function" === typeof m[1] ? m[1](n[1][m[0]], { - skey: m[0], - self: n[1], - key: n[0], +function cmap(o, p2) { + return Object.entries(o).reduce((r2, n2, _2) => (_2 = Object.entries(p2).reduce((s, m2) => cmap.FILTER === s ? s : (s[m2[0]] = // transfom(val,key,current,parentkey,parent) + "function" === typeof m2[1] ? m2[1](n2[1][m2[0]], { + skey: m2[0], + self: n2[1], + key: n2[0], parent: o - }) : m[1], cmap.FILTER === s[m[0]] ? cmap.FILTER : s), {}), cmap.FILTER === _2 ? 0 : r2[n[0]] = _2, r2), {}); + }) : m2[1], cmap.FILTER === s[m2[0]] ? cmap.FILTER : s), {}), cmap.FILTER === _2 ? 0 : r2[n2[0]] = _2, r2), {}); } cmap.COPY = (x) => x; -cmap.FILTER = (x) => "function" === typeof x ? (y, p, _2) => (_2 = x(y, p), Array.isArray(_2) ? !_2[0] ? _2[1] : cmap.FILTER : _2) : x ? x : cmap.FILTER; -cmap.KEY = (_2, p) => p.key; -function vmap(o, p) { - return Object.entries(o).reduce((r2, n, _2) => (_2 = Object.entries(p).reduce((s, m) => vmap.FILTER === s ? s : (s[m[0]] = // transfom(val,key,current,parentkey,parent) +cmap.FILTER = (x) => "function" === typeof x ? (y, p2, _2) => (_2 = x(y, p2), Array.isArray(_2) ? !_2[0] ? _2[1] : cmap.FILTER : _2) : x ? x : cmap.FILTER; +cmap.KEY = (_2, p2) => p2.key; +function vmap(o, p2) { + return Object.entries(o).reduce((r2, n2, _2) => (_2 = Object.entries(p2).reduce((s, m2) => vmap.FILTER === s ? s : (s[m2[0]] = // transfom(val,key,current,parentkey,parent) // 'function' === typeof m[1] ? m[1](n[1][m[0]], m[0], n[1], n[0], o) : m[1] - "function" === typeof m[1] ? m[1](n[1][m[0]], { - skey: m[0], - self: n[1], - key: n[0], + "function" === typeof m2[1] ? m2[1](n2[1][m2[0]], { + skey: m2[0], + self: n2[1], + key: n2[0], parent: o - }) : m[1], vmap.FILTER === s[m[0]] ? vmap.FILTER : s), {}), vmap.FILTER === _2 ? 0 : r2.push(_2), r2), []); + }) : m2[1], vmap.FILTER === s[m2[0]] ? vmap.FILTER : s), {}), vmap.FILTER === _2 ? 0 : r2.push(_2), r2), []); } vmap.COPY = (x) => x; -vmap.FILTER = (x) => "function" === typeof x ? (y, p, _2) => (_2 = x(y, p), Array.isArray(_2) ? !_2[0] ? _2[1] : vmap.FILTER : _2) : x ? x : vmap.FILTER; -vmap.KEY = (_2, p) => p.key; +vmap.FILTER = (x) => "function" === typeof x ? (y, p2, _2) => (_2 = x(y, p2), Array.isArray(_2) ? !_2[0] ? _2[1] : vmap.FILTER : _2) : x ? x : vmap.FILTER; +vmap.KEY = (_2, p2) => p2.key; function searchParamsToObject(searchParams) { let params = /* @__PURE__ */ Object.create(null); for (let [key, value] of searchParams.entries()) { @@ -1745,8 +1730,8 @@ function VxgBasicAdminPlugin() { }); function setPath(msg, meta) { return __async(this, null, function* () { - const q = Object.entries(msg.query).reduce((s, n) => s + ("" === s ? "?" : "") + (encodeURIComponent(n[0]) + "=" + encodeURIComponent(n[1])), ""); - const path = "/view/" + msg.view + q; + const q2 = Object.entries(msg.query).reduce((s, n2) => s + ("" === s ? "?" : "") + (encodeURIComponent(n2[0]) + "=" + encodeURIComponent(n2[1])), ""); + const path = "/view/" + msg.view + q2; msg.navigate(path); }); } @@ -1799,19 +1784,19 @@ function VxgBasicAdminPlugin() { function _objectWithoutPropertiesLoose(r2, e) { if (null == r2) return {}; var t = {}; - for (var n in r2) if ({}.hasOwnProperty.call(r2, n)) { - if (e.includes(n)) continue; - t[n] = r2[n]; + for (var n2 in r2) if ({}.hasOwnProperty.call(r2, n2)) { + if (e.includes(n2)) continue; + t[n2] = r2[n2]; } return t; } function _extends$1() { - return _extends$1 = Object.assign ? Object.assign.bind() : function(n) { + return _extends$1 = Object.assign ? Object.assign.bind() : function(n2) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; - for (var r2 in t) ({}).hasOwnProperty.call(t, r2) && (n[r2] = t[r2]); + for (var r2 in t) ({}).hasOwnProperty.call(t, r2) && (n2[r2] = t[r2]); } - return n; + return n2; }, _extends$1.apply(null, arguments); } var propTypes$1 = { exports: {} }; @@ -1830,24 +1815,24 @@ function requireReactIs_production_min$1() { if (hasRequiredReactIs_production_min$1) return reactIs_production_min$1; hasRequiredReactIs_production_min$1 = 1; "use strict"; - var b = "function" === typeof Symbol && Symbol.for, c = b ? Symbol.for("react.element") : 60103, d = b ? Symbol.for("react.portal") : 60106, e = b ? Symbol.for("react.fragment") : 60107, f = b ? Symbol.for("react.strict_mode") : 60108, g = b ? Symbol.for("react.profiler") : 60114, h = b ? Symbol.for("react.provider") : 60109, k = b ? Symbol.for("react.context") : 60110, l = b ? Symbol.for("react.async_mode") : 60111, m = b ? Symbol.for("react.concurrent_mode") : 60111, n = b ? Symbol.for("react.forward_ref") : 60112, p = b ? Symbol.for("react.suspense") : 60113, q = b ? Symbol.for("react.suspense_list") : 60120, r2 = b ? Symbol.for("react.memo") : 60115, t = b ? Symbol.for("react.lazy") : 60116, v = b ? Symbol.for("react.block") : 60121, w = b ? Symbol.for("react.fundamental") : 60117, x = b ? Symbol.for("react.responder") : 60118, y = b ? Symbol.for("react.scope") : 60119; + var b = "function" === typeof Symbol && Symbol.for, c = b ? Symbol.for("react.element") : 60103, d = b ? Symbol.for("react.portal") : 60106, e = b ? Symbol.for("react.fragment") : 60107, f2 = b ? Symbol.for("react.strict_mode") : 60108, g = b ? Symbol.for("react.profiler") : 60114, h = b ? Symbol.for("react.provider") : 60109, k2 = b ? Symbol.for("react.context") : 60110, l2 = b ? Symbol.for("react.async_mode") : 60111, m2 = b ? Symbol.for("react.concurrent_mode") : 60111, n2 = b ? Symbol.for("react.forward_ref") : 60112, p2 = b ? Symbol.for("react.suspense") : 60113, q2 = b ? Symbol.for("react.suspense_list") : 60120, r2 = b ? Symbol.for("react.memo") : 60115, t = b ? Symbol.for("react.lazy") : 60116, v = b ? Symbol.for("react.block") : 60121, w = b ? Symbol.for("react.fundamental") : 60117, x = b ? Symbol.for("react.responder") : 60118, y = b ? Symbol.for("react.scope") : 60119; function z(a) { if ("object" === typeof a && null !== a) { var u = a.$$typeof; switch (u) { case c: switch (a = a.type, a) { - case l: - case m: + case l2: + case m2: case e: case g: - case f: - case p: + case f2: + case p2: return a; default: switch (a = a && a.$$typeof, a) { - case k: - case n: + case k2: + case n2: case t: case r2: case h: @@ -1862,27 +1847,27 @@ function requireReactIs_production_min$1() { } } function A(a) { - return z(a) === m; + return z(a) === m2; } - reactIs_production_min$1.AsyncMode = l; - reactIs_production_min$1.ConcurrentMode = m; - reactIs_production_min$1.ContextConsumer = k; + reactIs_production_min$1.AsyncMode = l2; + reactIs_production_min$1.ConcurrentMode = m2; + reactIs_production_min$1.ContextConsumer = k2; reactIs_production_min$1.ContextProvider = h; reactIs_production_min$1.Element = c; - reactIs_production_min$1.ForwardRef = n; + reactIs_production_min$1.ForwardRef = n2; reactIs_production_min$1.Fragment = e; reactIs_production_min$1.Lazy = t; reactIs_production_min$1.Memo = r2; reactIs_production_min$1.Portal = d; reactIs_production_min$1.Profiler = g; - reactIs_production_min$1.StrictMode = f; - reactIs_production_min$1.Suspense = p; + reactIs_production_min$1.StrictMode = f2; + reactIs_production_min$1.Suspense = p2; reactIs_production_min$1.isAsyncMode = function(a) { - return A(a) || z(a) === l; + return A(a) || z(a) === l2; }; reactIs_production_min$1.isConcurrentMode = A; reactIs_production_min$1.isContextConsumer = function(a) { - return z(a) === k; + return z(a) === k2; }; reactIs_production_min$1.isContextProvider = function(a) { return z(a) === h; @@ -1891,7 +1876,7 @@ function requireReactIs_production_min$1() { return "object" === typeof a && null !== a && a.$$typeof === c; }; reactIs_production_min$1.isForwardRef = function(a) { - return z(a) === n; + return z(a) === n2; }; reactIs_production_min$1.isFragment = function(a) { return z(a) === e; @@ -1909,13 +1894,13 @@ function requireReactIs_production_min$1() { return z(a) === g; }; reactIs_production_min$1.isStrictMode = function(a) { - return z(a) === f; + return z(a) === f2; }; reactIs_production_min$1.isSuspense = function(a) { - return z(a) === p; + return z(a) === p2; }; reactIs_production_min$1.isValidElementType = function(a) { - return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r2 || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v); + return "string" === typeof a || "function" === typeof a || a === e || a === m2 || a === g || a === f2 || a === p2 || a === q2 || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r2 || a.$$typeof === h || a.$$typeof === k2 || a.$$typeof === n2 || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v); }; reactIs_production_min$1.typeOf = z; return reactIs_production_min$1; @@ -2131,8 +2116,8 @@ function requireObjectAssign() { for (var i = 0; i < 10; i++) { test2["_" + String.fromCharCode(i)] = i; } - var order2 = Object.getOwnPropertyNames(test2).map(function(n) { - return test2[n]; + var order2 = Object.getOwnPropertyNames(test2).map(function(n2) { + return test2[n2]; }); if (order2.join("") !== "0123456789") { return false; @@ -2767,17 +2752,17 @@ if (process.env.NODE_ENV !== "production") { var propTypesExports = propTypes$1.exports; const PropTypes = /* @__PURE__ */ getDefaultExportFromCjs(propTypesExports); function r(e) { - var t, f, n = ""; - if ("string" == typeof e || "number" == typeof e) n += e; + var t, f2, n2 = ""; + if ("string" == typeof e || "number" == typeof e) n2 += e; else if ("object" == typeof e) if (Array.isArray(e)) { var o = e.length; - for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f); - } else for (f in e) e[f] && (n && (n += " "), n += f); - return n; + for (t = 0; t < o; t++) e[t] && (f2 = r(e[t])) && (n2 && (n2 += " "), n2 += f2); + } else for (f2 in e) e[f2] && (n2 && (n2 += " "), n2 += f2); + return n2; } function clsx() { - for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t); - return n; + for (var e, t, f2 = 0, n2 = "", o = arguments.length; f2 < o; f2++) (e = arguments[f2]) && (t = r(e)) && (n2 && (n2 += " "), n2 += t); + return n2; } function composeClasses(slots, getUtilityClass, classes = void 0) { const output = {}; @@ -2822,12 +2807,12 @@ function require_extends() { hasRequired_extends = 1; (function(module) { function _extends3() { - return module.exports = _extends3 = Object.assign ? Object.assign.bind() : function(n) { + return module.exports = _extends3 = Object.assign ? Object.assign.bind() : function(n2) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; - for (var r2 in t) ({}).hasOwnProperty.call(t, r2) && (n[r2] = t[r2]); + for (var r2 in t) ({}).hasOwnProperty.call(t, r2) && (n2[r2] = t[r2]); } - return n; + return n2; }, module.exports.__esModule = true, module.exports["default"] = module.exports, _extends3.apply(null, arguments); } module.exports = _extends3, module.exports.__esModule = true, module.exports["default"] = module.exports; @@ -2844,9 +2829,9 @@ function requireObjectWithoutPropertiesLoose() { function _objectWithoutPropertiesLoose3(r2, e) { if (null == r2) return {}; var t = {}; - for (var n in r2) if ({}.hasOwnProperty.call(r2, n)) { - if (e.includes(n)) continue; - t[n] = r2[n]; + for (var n2 in r2) if ({}.hasOwnProperty.call(r2, n2)) { + if (e.includes(n2)) continue; + t[n2] = r2[n2]; } return t; } @@ -3249,10 +3234,10 @@ function ruleset(value, root, parent, index2, offset2, rules2, points, type, pro var post = offset2 - 1; var rule = offset2 === 0 ? rules2 : [""]; var size = sizeof(rule); - for (var i = 0, j = 0, k = 0; i < index2; ++i) + for (var i = 0, j = 0, k2 = 0; i < index2; ++i) for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x) if (z = trim(j > 0 ? rule[x] + " " + y : replace(y, /&\f/g, rule[x]))) - props[k++] = z; + props[k2++] = z; return node(value, root, parent, offset2 === 0 ? RULESET : type, props, children2, length2); } function comment(value, root, parent) { @@ -3384,8 +3369,8 @@ function prefix$1(value, length2, children2) { break; case 5152: case 5920: - return replace(value, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(_2, a, b, c, d, e, f) { - return MS + a + ":" + b + f + (c ? MS + a + "-span:" + (d ? e : +e - +b) + f : "") + value; + return replace(value, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(_2, a, b, c, d, e, f2) { + return MS + a + ":" + b + f2 + (c ? MS + a + "-span:" + (d ? e : +e - +b) + f2 : "") + value; }); case 4949: if (charat(value, length2 + 6) === 121) @@ -3597,9 +3582,9 @@ var compat = function compat2(element) { var points = []; var rules2 = getRules(value, points); var parentRules = parent.props; - for (var i = 0, k = 0; i < rules2.length; i++) { - for (var j = 0; j < parentRules.length; j++, k++) { - element.props[k] = points[i] ? rules2[i].replace(/&\f/g, parentRules[j]) : parentRules[j] + " " + rules2[i]; + for (var i = 0, k2 = 0; i < rules2.length; i++) { + for (var j = 0; j < parentRules.length; j++, k2++) { + element.props[k2] = points[i] ? rules2[i].replace(/&\f/g, parentRules[j]) : parentRules[j] + " " + rules2[i]; } } }; @@ -3997,7 +3982,7 @@ function requireReactIs_production_min() { if (hasRequiredReactIs_production_min) return reactIs_production_min; hasRequiredReactIs_production_min = 1; "use strict"; - var b = Symbol.for("react.element"), c = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), e = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), g = Symbol.for("react.provider"), h = Symbol.for("react.context"), k = Symbol.for("react.server_context"), l = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), n = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), q = Symbol.for("react.lazy"), t = Symbol.for("react.offscreen"), u; + var b = Symbol.for("react.element"), c = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), e = Symbol.for("react.strict_mode"), f2 = Symbol.for("react.profiler"), g = Symbol.for("react.provider"), h = Symbol.for("react.context"), k2 = Symbol.for("react.server_context"), l2 = Symbol.for("react.forward_ref"), m2 = Symbol.for("react.suspense"), n2 = Symbol.for("react.suspense_list"), p2 = Symbol.for("react.memo"), q2 = Symbol.for("react.lazy"), t = Symbol.for("react.offscreen"), u; u = Symbol.for("react.module.reference"); function v(a) { if ("object" === typeof a && null !== a) { @@ -4006,18 +3991,18 @@ function requireReactIs_production_min() { case b: switch (a = a.type, a) { case d: - case f: + case f2: case e: - case m: - case n: + case m2: + case n2: return a; default: switch (a = a && a.$$typeof, a) { - case k: + case k2: case h: - case l: - case q: - case p: + case l2: + case q2: + case p2: case g: return a; default: @@ -4032,15 +4017,15 @@ function requireReactIs_production_min() { reactIs_production_min.ContextConsumer = h; reactIs_production_min.ContextProvider = g; reactIs_production_min.Element = b; - reactIs_production_min.ForwardRef = l; + reactIs_production_min.ForwardRef = l2; reactIs_production_min.Fragment = d; - reactIs_production_min.Lazy = q; - reactIs_production_min.Memo = p; + reactIs_production_min.Lazy = q2; + reactIs_production_min.Memo = p2; reactIs_production_min.Portal = c; - reactIs_production_min.Profiler = f; + reactIs_production_min.Profiler = f2; reactIs_production_min.StrictMode = e; - reactIs_production_min.Suspense = m; - reactIs_production_min.SuspenseList = n; + reactIs_production_min.Suspense = m2; + reactIs_production_min.SuspenseList = n2; reactIs_production_min.isAsyncMode = function() { return false; }; @@ -4057,34 +4042,34 @@ function requireReactIs_production_min() { return "object" === typeof a && null !== a && a.$$typeof === b; }; reactIs_production_min.isForwardRef = function(a) { - return v(a) === l; + return v(a) === l2; }; reactIs_production_min.isFragment = function(a) { return v(a) === d; }; reactIs_production_min.isLazy = function(a) { - return v(a) === q; + return v(a) === q2; }; reactIs_production_min.isMemo = function(a) { - return v(a) === p; + return v(a) === p2; }; reactIs_production_min.isPortal = function(a) { return v(a) === c; }; reactIs_production_min.isProfiler = function(a) { - return v(a) === f; + return v(a) === f2; }; reactIs_production_min.isStrictMode = function(a) { return v(a) === e; }; reactIs_production_min.isSuspense = function(a) { - return v(a) === m; + return v(a) === m2; }; reactIs_production_min.isSuspenseList = function(a) { - return v(a) === n; + return v(a) === n2; }; reactIs_production_min.isValidElementType = function(a) { - return "string" === typeof a || "function" === typeof a || a === d || a === f || a === e || a === m || a === n || a === t || "object" === typeof a && null !== a && (a.$$typeof === q || a.$$typeof === p || a.$$typeof === g || a.$$typeof === h || a.$$typeof === l || a.$$typeof === u || void 0 !== a.getModuleId) ? true : false; + return "string" === typeof a || "function" === typeof a || a === d || a === f2 || a === e || a === m2 || a === n2 || a === t || "object" === typeof a && null !== a && (a.$$typeof === q2 || a.$$typeof === p2 || a.$$typeof === g || a.$$typeof === h || a.$$typeof === l2 || a.$$typeof === u || void 0 !== a.getModuleId) ? true : false; }; reactIs_production_min.typeOf = v; return reactIs_production_min; @@ -5524,12 +5509,12 @@ function _interopRequireWildcard$1(e, r2) { if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache$1(r2); if (t && t.has(e)) return t.get(e); - var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; + var n2 = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; - i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; + i && (i.get || i.set) ? Object.defineProperty(n2, u, i) : n2[u] = e[u]; } - return n.default = e, t && t.set(e, n), n; + return n2.default = e, t && t.set(e, n2), n2; } function isEmpty$3(obj) { return Object.keys(obj).length === 0; @@ -5837,10 +5822,10 @@ function hexToRgb$1(color2) { const re = new RegExp(`.{1,${color2.length >= 6 ? 2 : 1}}`, "g"); let colors = color2.match(re); if (colors && colors[0].length === 1) { - colors = colors.map((n) => n + n); + colors = colors.map((n2) => n2 + n2); } - return colors ? `rgb${colors.length === 4 ? "a" : ""}(${colors.map((n, index2) => { - return index2 < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1e3) / 1e3; + return colors ? `rgb${colors.length === 4 ? "a" : ""}(${colors.map((n2, index2) => { + return index2 < 3 ? parseInt(n2, 16) : Math.round(parseInt(n2, 16) / 255 * 1e3) / 1e3; }).join(", ")})` : ""; } function intToHex$1(int) { @@ -5907,7 +5892,7 @@ function recomposeColor$1(color2) { values: values2 } = color2; if (type.indexOf("rgb") !== -1) { - values2 = values2.map((n, i) => i < 3 ? parseInt(n, 10) : n); + values2 = values2.map((n2, i) => i < 3 ? parseInt(n2, 10) : n2); } else if (type.indexOf("hsl") !== -1) { values2[1] = `${values2[1]}%`; values2[2] = `${values2[2]}%`; @@ -5926,7 +5911,7 @@ function rgbToHex$1(color2) { const { values: values2 } = decomposeColor$1(color2); - return `#${values2.map((n, i) => intToHex$1(i === 3 ? Math.round(255 * n) : n)).join("")}`; + return `#${values2.map((n2, i) => intToHex$1(i === 3 ? Math.round(255 * n2) : n2)).join("")}`; } function hslToRgb$1(color2) { color2 = decomposeColor$1(color2); @@ -5935,11 +5920,11 @@ function hslToRgb$1(color2) { } = color2; const h = values2[0]; const s = values2[1] / 100; - const l = values2[2] / 100; - const a = s * Math.min(l, 1 - l); - const f = (n, k = (n + h / 30) % 12) => l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1); + const l2 = values2[2] / 100; + const a = s * Math.min(l2, 1 - l2); + const f2 = (n2, k2 = (n2 + h / 30) % 12) => l2 - a * Math.max(Math.min(k2 - 3, 9 - k2, 1), -1); let type = "rgb"; - const rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)]; + const rgb = [Math.round(f2(0) * 255), Math.round(f2(8) * 255), Math.round(f2(4) * 255)]; if (color2.type === "hsla") { type += "a"; rgb.push(values2[3]); @@ -7498,10 +7483,10 @@ function hexToRgb(color2) { const re = new RegExp(`.{1,${color2.length >= 6 ? 2 : 1}}`, "g"); let colors = color2.match(re); if (colors && colors[0].length === 1) { - colors = colors.map((n) => n + n); + colors = colors.map((n2) => n2 + n2); } - return colors ? `rgb${colors.length === 4 ? "a" : ""}(${colors.map((n, index2) => { - return index2 < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1e3) / 1e3; + return colors ? `rgb${colors.length === 4 ? "a" : ""}(${colors.map((n2, index2) => { + return index2 < 3 ? parseInt(n2, 16) : Math.round(parseInt(n2, 16) / 255 * 1e3) / 1e3; }).join(", ")})` : ""; } function intToHex(int) { @@ -7566,7 +7551,7 @@ function recomposeColor(color2) { values: values2 } = color2; if (type.indexOf("rgb") !== -1) { - values2 = values2.map((n, i) => i < 3 ? parseInt(n, 10) : n); + values2 = values2.map((n2, i) => i < 3 ? parseInt(n2, 10) : n2); } else if (type.indexOf("hsl") !== -1) { values2[1] = `${values2[1]}%`; values2[2] = `${values2[2]}%`; @@ -7585,7 +7570,7 @@ function rgbToHex(color2) { const { values: values2 } = decomposeColor(color2); - return `#${values2.map((n, i) => intToHex(i === 3 ? Math.round(255 * n) : n)).join("")}`; + return `#${values2.map((n2, i) => intToHex(i === 3 ? Math.round(255 * n2) : n2)).join("")}`; } function hslToRgb(color2) { color2 = decomposeColor(color2); @@ -7594,11 +7579,11 @@ function hslToRgb(color2) { } = color2; const h = values2[0]; const s = values2[1] / 100; - const l = values2[2] / 100; - const a = s * Math.min(l, 1 - l); - const f = (n, k = (n + h / 30) % 12) => l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1); + const l2 = values2[2] / 100; + const a = s * Math.min(l2, 1 - l2); + const f2 = (n2, k2 = (n2 + h / 30) % 12) => l2 - a * Math.max(Math.min(k2 - 3, 9 - k2, 1), -1); let type = "rgb"; - const rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)]; + const rgb = [Math.round(f2(0) * 255), Math.round(f2(8) * 255), Math.round(f2(4) * 255)]; if (color2.type === "hsla") { type += "a"; rgb.push(values2[3]); @@ -9034,18 +9019,18 @@ function createGetCssVar$1(prefix2 = "") { } const assignNestedKeys = (obj, keys, value, arrayKeys = []) => { let temp = obj; - keys.forEach((k, index2) => { + keys.forEach((k2, index2) => { if (index2 === keys.length - 1) { if (Array.isArray(temp)) { - temp[Number(k)] = value; + temp[Number(k2)] = value; } else if (temp && typeof temp === "object") { - temp[k] = value; + temp[k2] = value; } } else if (temp && typeof temp === "object") { - if (!temp[k]) { - temp[k] = arrayKeys.includes(k) ? [] : {}; + if (!temp[k2]) { + temp[k2] = arrayKeys.includes(k2) ? [] : {}; } - temp = temp[k]; + temp = temp[k2]; } }); }; @@ -10588,8 +10573,8 @@ process.env.NODE_ENV !== "production" ? Toolbar.propTypes = { */ variant: PropTypes.oneOfType([PropTypes.oneOf(["dense", "regular"]), PropTypes.string]) } : void 0; -const CMPNAME$n = "BasicAccountTool"; -console.log(CMPNAME$n, "1"); +const CMPNAME$o = "BasicAccountTool"; +console.log(CMPNAME$o, "1"); const { Exact: Exact$2 } = gubu_minExports.Gubu; const BasicAccountToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10599,7 +10584,7 @@ const BasicAccountToolSpecShape = gubu_minExports.Gubu({ attr: {}, sx: {}, style: {} -}, { name: CMPNAME$n }); +}, { name: CMPNAME$o }); function BasicAccountTool(props) { var _a; const { ctx, spec } = props; @@ -10673,8 +10658,8 @@ function stringAvatar(s) { children: `${parts.join("")}` }; } -const CMPNAME$m = "BasicHeadTool"; -console.log(CMPNAME$m, "1"); +const CMPNAME$n = "BasicHeadTool"; +console.log(CMPNAME$n, "1"); const { Exact: Exact$1 } = gubu_minExports.Gubu; const BasicHeadToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10684,7 +10669,7 @@ const BasicHeadToolSpecShape = gubu_minExports.Gubu({ attr: {}, sx: {}, style: {} -}, { name: CMPNAME$m }); +}, { name: CMPNAME$n }); function BasicHeadTool(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -10693,7 +10678,7 @@ function BasicHeadTool(props) { const { name, kind, attr, sx, style: style2 } = basicHeadToolSpec; let tool = /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}); if ("" === kind) { - console.warn(CMPNAME$m, "empty-tool-kind", basicHeadToolSpec); + console.warn(CMPNAME$n, "empty-tool-kind", basicHeadToolSpec); } else if ("logo" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsxs( "div", @@ -10710,7 +10695,7 @@ function BasicHeadTool(props) { { href: "/", style: style2, - className: `vxg-${CMPNAME$m}-logo`, + className: `vxg-${CMPNAME$n}-logo`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: attr.img }) } ), @@ -10742,17 +10727,17 @@ function BasicHeadTool(props) { } else if ("account" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsx(BasicAccountTool, { ctx, spec }); } else { - console.warn(CMPNAME$m, "unknown-tool-kind", kind, basicHeadToolSpec); + console.warn(CMPNAME$n, "unknown-tool-kind", kind, basicHeadToolSpec); } return tool; } -const CMPNAME$l = "BasicHead"; -const { Child: Child$5, Exact, Open: Open$j, Required: Required$1 } = gubu_minExports.Gubu; +const CMPNAME$m = "BasicHead"; +const { Child: Child$5, Exact, Open: Open$k, Required: Required$1 } = gubu_minExports.Gubu; const BasicHeadSpecShape = gubu_minExports.Gubu({ head: { name: String, active: Boolean, - tool: Child$5(Open$j({ + tool: Child$5(Open$k({ align: Exact("left", "right") })) }, @@ -10762,7 +10747,7 @@ const BasicHeadSpecShape = gubu_minExports.Gubu({ AppBar: {}, ToolBar: {} } -}, { name: CMPNAME$l }); +}, { name: CMPNAME$m }); function BasicHead(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -10771,9 +10756,9 @@ function BasicHead(props) { const { head } = basicHeadSpec; const tools = vmap2(head.tool, { active: vmap2.FILTER, - name: vmap2.FILTER((_2, p) => { + name: vmap2.FILTER((_2, p2) => { var _a; - return [(_a = basicHeadSpec.tool[p.key]) == null ? void 0 : _a.active, p.key]; + return [(_a = basicHeadSpec.tool[p2.key]) == null ? void 0 : _a.active, p2.key]; }), align: vmap2.COPY }).map((t) => __spreadValues(__spreadValues({}, basicHeadSpec.tool[t.name]), t)); @@ -15346,8 +15331,8 @@ function getNextChildMapping(nextProps, prevChildMapping, onExited) { return children2; } var values = Object.values || function(obj) { - return Object.keys(obj).map(function(k) { - return obj[k]; + return Object.keys(obj).map(function(k2) { + return obj[k2]; }); }; var defaultProps = { @@ -16988,9 +16973,9 @@ const defaultDarkOverlays = [...Array(25)].map((_2, index2) => { return `linear-gradient(rgba(255 255 255 / ${overlay}), rgba(255 255 255 / ${overlay}))`; }); function assignNode(obj, keys) { - keys.forEach((k) => { - if (!obj[k]) { - obj[k] = {}; + keys.forEach((k2) => { + if (!obj[k2]) { + obj[k2] = {}; } }); } @@ -17568,12 +17553,12 @@ function _interopRequireWildcard(e, r2) { if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r2); if (t && t.has(e)) return t.get(e); - var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; + var n2 = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; - i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; + i && (i.get || i.set) ? Object.defineProperty(n2, u, i) : n2[u] = e[u]; } - return n.default = e, t && t.set(e, n), n; + return n2.default = e, t && t.set(e, n2), n2; } function isObjectEmpty(obj) { return Object.keys(obj).length === 0; @@ -18837,8 +18822,8 @@ function popperGenerator(generatorOptions) { popper: listScrollParents(popper2) }; var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers2, state.options.modifiers))); - state.orderedModifiers = orderedModifiers.filter(function(m) { - return m.enabled; + state.orderedModifiers = orderedModifiers.filter(function(m2) { + return m2.enabled; }); runModifierEffects(); return instance.update(); @@ -22607,7 +22592,7 @@ function getOffsetLeft(rect, horizontal) { return offset2; } function getTransformOriginValue(transformOrigin) { - return [transformOrigin.horizontal, transformOrigin.vertical].map((n) => typeof n === "number" ? `${n}px` : n).join(" "); + return [transformOrigin.horizontal, transformOrigin.vertical].map((n2) => typeof n2 === "number" ? `${n2}px` : n2).join(" "); } function resolveAnchorEl(anchorEl) { return typeof anchorEl === "function" ? anchorEl() : anchorEl; @@ -25311,7 +25296,7 @@ Object.defineProperty(ArrowDownward, "__esModule", { }); var default_1$x = ArrowDownward.default = void 0; var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); -var _jsxRuntime$x = requireJsxRuntime(); +var _jsxRuntime$x = jsxRuntimeExports; var _default$x = default_1$x = ArrowDownward.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); @@ -25324,7 +25309,7 @@ Object.defineProperty(ArrowRight, "__esModule", { }); var default_1$w = ArrowRight.default = void 0; var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); -var _jsxRuntime$w = requireJsxRuntime(); +var _jsxRuntime$w = jsxRuntimeExports; var _default$w = default_1$w = ArrowRight.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); @@ -25337,7 +25322,7 @@ Object.defineProperty(Cancel, "__esModule", { }); var default_1$v = Cancel.default = void 0; var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); -var _jsxRuntime$v = requireJsxRuntime(); +var _jsxRuntime$v = jsxRuntimeExports; var _default$v = default_1$v = Cancel.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); @@ -25350,7 +25335,7 @@ Object.defineProperty(ChevronLeft, "__esModule", { }); var default_1$u = ChevronLeft.default = void 0; var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); -var _jsxRuntime$u = requireJsxRuntime(); +var _jsxRuntime$u = jsxRuntimeExports; var _default$u = default_1$u = ChevronLeft.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); @@ -25363,7 +25348,7 @@ Object.defineProperty(ChevronRight, "__esModule", { }); var default_1$t = ChevronRight.default = void 0; var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); -var _jsxRuntime$t = requireJsxRuntime(); +var _jsxRuntime$t = jsxRuntimeExports; var _default$t = default_1$t = ChevronRight.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); @@ -25376,7 +25361,7 @@ Object.defineProperty(ClearAll, "__esModule", { }); var default_1$s = ClearAll.default = void 0; var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); -var _jsxRuntime$s = requireJsxRuntime(); +var _jsxRuntime$s = jsxRuntimeExports; var _default$s = default_1$s = ClearAll.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); @@ -25389,7 +25374,7 @@ Object.defineProperty(Close, "__esModule", { }); var default_1$r = Close.default = void 0; var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); -var _jsxRuntime$r = requireJsxRuntime(); +var _jsxRuntime$r = jsxRuntimeExports; var _default$r = default_1$r = Close.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); @@ -25402,7 +25387,7 @@ Object.defineProperty(ContentCopy, "__esModule", { }); var default_1$q = ContentCopy.default = void 0; var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); -var _jsxRuntime$q = requireJsxRuntime(); +var _jsxRuntime$q = jsxRuntimeExports; var _default$q = default_1$q = ContentCopy.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); @@ -25415,7 +25400,7 @@ Object.defineProperty(DensityLarge, "__esModule", { }); var default_1$p = DensityLarge.default = void 0; var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); -var _jsxRuntime$p = requireJsxRuntime(); +var _jsxRuntime$p = jsxRuntimeExports; var _default$p = default_1$p = DensityLarge.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); @@ -25428,7 +25413,7 @@ Object.defineProperty(DensityMedium, "__esModule", { }); var default_1$o = DensityMedium.default = void 0; var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); -var _jsxRuntime$o = requireJsxRuntime(); +var _jsxRuntime$o = jsxRuntimeExports; var _default$o = default_1$o = DensityMedium.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); @@ -25441,7 +25426,7 @@ Object.defineProperty(DensitySmall, "__esModule", { }); var default_1$n = DensitySmall.default = void 0; var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); -var _jsxRuntime$n = requireJsxRuntime(); +var _jsxRuntime$n = jsxRuntimeExports; var _default$n = default_1$n = DensitySmall.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); @@ -25454,7 +25439,7 @@ Object.defineProperty(DragHandle, "__esModule", { }); var default_1$m = DragHandle.default = void 0; var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); -var _jsxRuntime$m = requireJsxRuntime(); +var _jsxRuntime$m = jsxRuntimeExports; var _default$m = default_1$m = DragHandle.default = (0, _createSvgIcon$m.default)(/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); @@ -25467,7 +25452,7 @@ Object.defineProperty(DynamicFeed, "__esModule", { }); var default_1$l = DynamicFeed.default = void 0; var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); -var _jsxRuntime$l = requireJsxRuntime(); +var _jsxRuntime$l = jsxRuntimeExports; var _default$l = default_1$l = DynamicFeed.default = (0, _createSvgIcon$l.default)([/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { @@ -25482,7 +25467,7 @@ Object.defineProperty(Edit, "__esModule", { }); var default_1$k = Edit.default = void 0; var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); -var _jsxRuntime$k = requireJsxRuntime(); +var _jsxRuntime$k = jsxRuntimeExports; var _default$k = default_1$k = Edit.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); @@ -25495,7 +25480,7 @@ Object.defineProperty(ExpandMore, "__esModule", { }); var default_1$j = ExpandMore.default = void 0; var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); -var _jsxRuntime$j = requireJsxRuntime(); +var _jsxRuntime$j = jsxRuntimeExports; var _default$j = default_1$j = ExpandMore.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); @@ -25508,7 +25493,7 @@ Object.defineProperty(FilterAlt, "__esModule", { }); var default_1$i = FilterAlt.default = void 0; var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); -var _jsxRuntime$i = requireJsxRuntime(); +var _jsxRuntime$i = jsxRuntimeExports; var _default$i = default_1$i = FilterAlt.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); @@ -25521,7 +25506,7 @@ Object.defineProperty(FilterList, "__esModule", { }); var default_1$h = FilterList.default = void 0; var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); -var _jsxRuntime$h = requireJsxRuntime(); +var _jsxRuntime$h = jsxRuntimeExports; var _default$h = default_1$h = FilterList.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); @@ -25534,7 +25519,7 @@ Object.defineProperty(FilterListOff, "__esModule", { }); var default_1$g = FilterListOff.default = void 0; var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); -var _jsxRuntime$g = requireJsxRuntime(); +var _jsxRuntime$g = jsxRuntimeExports; var _default$g = default_1$g = FilterListOff.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); @@ -25547,7 +25532,7 @@ Object.defineProperty(FirstPage, "__esModule", { }); var default_1$f = FirstPage.default = void 0; var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); -var _jsxRuntime$f = requireJsxRuntime(); +var _jsxRuntime$f = jsxRuntimeExports; var _default$f = default_1$f = FirstPage.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); @@ -25560,7 +25545,7 @@ Object.defineProperty(Fullscreen, "__esModule", { }); var default_1$e = Fullscreen.default = void 0; var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); -var _jsxRuntime$e = requireJsxRuntime(); +var _jsxRuntime$e = jsxRuntimeExports; var _default$e = default_1$e = Fullscreen.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); @@ -25573,7 +25558,7 @@ Object.defineProperty(FullscreenExit, "__esModule", { }); var default_1$d = FullscreenExit.default = void 0; var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); -var _jsxRuntime$d = requireJsxRuntime(); +var _jsxRuntime$d = jsxRuntimeExports; var _default$d = default_1$d = FullscreenExit.default = (0, _createSvgIcon$d.default)(/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); @@ -25586,7 +25571,7 @@ Object.defineProperty(KeyboardDoubleArrowDown, "__esModule", { }); var default_1$c = KeyboardDoubleArrowDown.default = void 0; var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); -var _jsxRuntime$c = requireJsxRuntime(); +var _jsxRuntime$c = jsxRuntimeExports; var _default$c = default_1$c = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$c.default)([/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { @@ -25601,7 +25586,7 @@ Object.defineProperty(LastPage, "__esModule", { }); var default_1$b = LastPage.default = void 0; var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); -var _jsxRuntime$b = requireJsxRuntime(); +var _jsxRuntime$b = jsxRuntimeExports; var _default$b = default_1$b = LastPage.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); @@ -25614,7 +25599,7 @@ Object.defineProperty(MoreHoriz, "__esModule", { }); var default_1$a = MoreHoriz.default = void 0; var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); -var _jsxRuntime$a = requireJsxRuntime(); +var _jsxRuntime$a = jsxRuntimeExports; var _default$a = default_1$a = MoreHoriz.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); @@ -25627,7 +25612,7 @@ Object.defineProperty(MoreVert, "__esModule", { }); var default_1$9 = MoreVert.default = void 0; var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); -var _jsxRuntime$9 = requireJsxRuntime(); +var _jsxRuntime$9 = jsxRuntimeExports; var _default$9 = default_1$9 = MoreVert.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); @@ -25640,7 +25625,7 @@ Object.defineProperty(PushPin, "__esModule", { }); var default_1$8 = PushPin.default = void 0; var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); -var _jsxRuntime$8 = requireJsxRuntime(); +var _jsxRuntime$8 = jsxRuntimeExports; var _default$8 = default_1$8 = PushPin.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" @@ -25654,7 +25639,7 @@ Object.defineProperty(RestartAlt, "__esModule", { }); var default_1$7 = RestartAlt.default = void 0; var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); -var _jsxRuntime$7 = requireJsxRuntime(); +var _jsxRuntime$7 = jsxRuntimeExports; var _default$7 = default_1$7 = RestartAlt.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); @@ -25667,7 +25652,7 @@ Object.defineProperty(Save, "__esModule", { }); var default_1$6 = Save.default = void 0; var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); -var _jsxRuntime$6 = requireJsxRuntime(); +var _jsxRuntime$6 = jsxRuntimeExports; var _default$6 = default_1$6 = Save.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); @@ -25680,7 +25665,7 @@ Object.defineProperty(Search, "__esModule", { }); var default_1$5 = Search.default = void 0; var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); -var _jsxRuntime$5 = requireJsxRuntime(); +var _jsxRuntime$5 = jsxRuntimeExports; var _default$5 = default_1$5 = Search.default = (0, _createSvgIcon$5.default)(/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); @@ -25693,7 +25678,7 @@ Object.defineProperty(SearchOff, "__esModule", { }); var default_1$4 = SearchOff.default = void 0; var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); -var _jsxRuntime$4 = requireJsxRuntime(); +var _jsxRuntime$4 = jsxRuntimeExports; var _default$4 = default_1$4 = SearchOff.default = (0, _createSvgIcon$4.default)([/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { @@ -25708,7 +25693,7 @@ Object.defineProperty(Sort, "__esModule", { }); var default_1$3 = Sort.default = void 0; var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); -var _jsxRuntime$3 = requireJsxRuntime(); +var _jsxRuntime$3 = jsxRuntimeExports; var _default$3 = default_1$3 = Sort.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); @@ -25721,7 +25706,7 @@ Object.defineProperty(SyncAlt, "__esModule", { }); var default_1$2 = SyncAlt.default = void 0; var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); -var _jsxRuntime$2 = requireJsxRuntime(); +var _jsxRuntime$2 = jsxRuntimeExports; var _default$2 = default_1$2 = SyncAlt.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); @@ -25734,7 +25719,7 @@ Object.defineProperty(ViewColumn, "__esModule", { }); var default_1$1 = ViewColumn.default = void 0; var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); -var _jsxRuntime$1 = requireJsxRuntime(); +var _jsxRuntime$1 = jsxRuntimeExports; var _default$1 = default_1$1 = ViewColumn.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); @@ -25747,7 +25732,7 @@ Object.defineProperty(VisibilityOff, "__esModule", { }); var default_1 = VisibilityOff.default = void 0; var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); -var _jsxRuntime = requireJsxRuntime(); +var _jsxRuntime = jsxRuntimeExports; var _default = default_1 = VisibilityOff.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); @@ -26104,8 +26089,8 @@ class Virtualizer { this.getFurthestMeasurement = (measurements, index2) => { const furthestMeasurementsFound = /* @__PURE__ */ new Map(); const furthestMeasurements = /* @__PURE__ */ new Map(); - for (let m = index2 - 1; m >= 0; m--) { - const measurement = measurements[m]; + for (let m2 = index2 - 1; m2 >= 0; m2--) { + const measurement = measurements[m2]; if (furthestMeasurementsFound.has(measurement.lane)) { continue; } @@ -26253,8 +26238,8 @@ class Virtualizer { () => [this.getIndexes(), this.getMeasurements()], (indexes, measurements) => { const virtualItems = []; - for (let k = 0, len = indexes.length; k < len; k++) { - const i = indexes[k]; + for (let k2 = 0, len = indexes.length; k2 < len; k2++) { + const i = indexes[k2]; const measurement = measurements[i]; virtualItems.push(measurement); } @@ -26381,7 +26366,7 @@ class Virtualizer { end2 = this.options.paddingStart; } else { end2 = this.options.lanes === 1 ? (_a2 = (_a = measurements[measurements.length - 1]) == null ? void 0 : _a.end) != null ? _a2 : 0 : Math.max( - ...measurements.slice(-this.options.lanes).map((m) => m.end) + ...measurements.slice(-this.options.lanes).map((m2) => m2.end) ); } return end2 - this.options.scrollMargin + this.options.paddingEnd; @@ -50660,8 +50645,8 @@ const getMinutesNumbers = ({ getClockNumberText, selectedId }) => { - const f = utils2.formatNumber; - return [[5, f("05")], [10, f("10")], [15, f("15")], [20, f("20")], [25, f("25")], [30, f("30")], [35, f("35")], [40, f("40")], [45, f("45")], [50, f("50")], [55, f("55")], [0, f("00")]].map(([numberValue, label], index2) => { + const f2 = utils2.formatNumber; + return [[5, f2("05")], [10, f2("10")], [15, f2("15")], [20, f2("20")], [25, f2("25")], [30, f2("30")], [35, f2("35")], [40, f2("40")], [45, f2("45")], [50, f2("50")], [55, f2("55")], [0, f2("00")]].map(([numberValue, label], index2) => { const selected = numberValue === value; return /* @__PURE__ */ jsxRuntimeExports.jsx(ClockNumber, { label, @@ -59825,12 +59810,12 @@ const MRT_FilterFns = Object.assign(Object.assign({}, filterFns), { }); function __rest(s, e) { var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; + for (var p2 in s) if (Object.prototype.hasOwnProperty.call(s, p2) && e.indexOf(p2) < 0) + t[p2] = s[p2]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; + for (var i = 0, p2 = Object.getOwnPropertySymbols(s); i < p2.length; i++) { + if (e.indexOf(p2[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p2[i])) + t[p2[i]] = s[p2[i]]; } return t; } @@ -62123,7 +62108,7 @@ const MRT_ToolbarAlertBanner = (_a) => { const totalRowCount = rowCount !== null && rowCount !== void 0 ? rowCount : getPrePaginationRowModel().flatRows.length; const selectedRowCount = useMemo(() => manualPagination ? Object.values(rowSelection).filter(Boolean).length : getFilteredSelectedRowModel().rows.length, [rowSelection, totalRowCount, manualPagination]); const selectedAlert = selectedRowCount > 0 ? jsxRuntimeExports.jsxs(Stack, { alignItems: "center", direction: "row", gap: "16px", children: [(_c = (_b = localization.selectedCountOfRowCountRowsSelected) === null || _b === void 0 ? void 0 : _b.replace("{selectedCount}", selectedRowCount.toLocaleString())) === null || _c === void 0 ? void 0 : _c.replace("{rowCount}", totalRowCount.toString()), jsxRuntimeExports.jsx(Button, { onClick: (event) => getMRT_SelectAllHandler({ table })(event, false, true), size: "small", sx: { p: "2px" }, children: localization.clearSelection })] }) : null; - const groupedAlert = grouping.length > 0 ? jsxRuntimeExports.jsxs("span", { children: [localization.groupedBy, " ", grouping.map((columnId, index2) => jsxRuntimeExports.jsxs(Fragment, { children: [index2 > 0 ? localization.thenBy : "", jsxRuntimeExports.jsx(Chip, Object.assign({ label: table.getColumn(columnId).columnDef.header, onDelete: () => table.getColumn(columnId).toggleGrouping() }, chipProps))] }, `${index2}-${columnId}`))] }) : null; + const groupedAlert = grouping.length > 0 ? jsxRuntimeExports.jsxs("span", { children: [localization.groupedBy, " ", grouping.map((columnId, index2) => jsxRuntimeExports.jsxs(Fragment$2, { children: [index2 > 0 ? localization.thenBy : "", jsxRuntimeExports.jsx(Chip, Object.assign({ label: table.getColumn(columnId).columnDef.header, onDelete: () => table.getColumn(columnId).toggleGrouping() }, chipProps))] }, `${index2}-${columnId}`))] }) : null; return jsxRuntimeExports.jsx(Collapse, { in: showAlertBanner || !!selectedAlert || !!groupedAlert, timeout: stackAlertBanner ? 200 : 0, children: jsxRuntimeExports.jsx(Alert, Object.assign({ color: "info", icon: false }, alertProps, { sx: (theme) => { var _a2, _b2; return Object.assign({ "& .MuiAlert-message": { @@ -62706,8 +62691,8 @@ const MaterialReactTable = (props) => { } return jsxRuntimeExports.jsx(MRT_TablePaper, { table }); }; -const { Open: Open$i, Child: Child$4 } = gubu_minExports.Gubu; -const Shape$2 = gubu_minExports.Gubu(Open$i({ +const { Open: Open$j, Child: Child$4 } = gubu_minExports.Gubu; +const Shape$2 = gubu_minExports.Gubu(Open$j({ name: String, prefix: String, ent: String, @@ -62740,8 +62725,8 @@ function VxgBasicEntityListPlugin(options) { }; } function buildFilter(query) { - const filter = Object.entries(query).reduce((a, n) => (n[0].startsWith("f_") ? a[n[0].substring(2)] = n[1] : null, a), {}); - const filterDesc = Object.entries(filter).reduce((a, n) => a + "~" + n[0] + "=" + n[1], ""); + const filter = Object.entries(query).reduce((a, n2) => (n2[0].startsWith("f_") ? a[n2[0].substring(2)] = n2[1] : null, a), {}); + const filterDesc = Object.entries(filter).reduce((a, n2) => a + "~" + n2[0] + "=" + n2[1], ""); return { filter, filterDesc }; } Object.assign(VxgBasicEntityListPlugin, { @@ -62752,7 +62737,7 @@ Object.assign(VxgBasicEntityListPlugin, { } }); Object.defineProperty(VxgBasicEntityListPlugin, "name", { value: "VxgBasicEntityListPlugin" }); -const CMPNAME$k = "BasicEntityList"; +const CMPNAME$l = "BasicEntityList"; function BasicEntityList(props) { const { ctx } = props; const { seneca } = ctx(); @@ -64672,23 +64657,23 @@ function useForm(props = {}) { _formControl.current.formState = getProxyFormState(formState, control); return _formControl.current; } -const CMPNAME$j = "BasicEntitySliderField"; -const { Open: Open$h } = gubu_minExports.Gubu; +const CMPNAME$k = "BasicEntitySliderField"; +const { Open: Open$i } = gubu_minExports.Gubu; const BasicEntityCheckboxFieldSpecShape = gubu_minExports.Gubu( - Open$h({ - field: Open$h({ + Open$i({ + field: Open$i({ id: String, name: String, - kind: gubu_minExports.Skip(String), + kind: "", label: gubu_minExports.Default("", String), - ux: Open$h({ + ux: Open$i({ kind: gubu_minExports.Exact("Checkbox"), edit: gubu_minExports.Default(true), - props: Open$h({}) + props: Open$i({}) }) }) }), - { name: CMPNAME$j } + { name: CMPNAME$k } ); function BasicEntityCheckboxField(props) { const { spec } = props; @@ -64721,29 +64706,29 @@ function BasicEntityCheckboxField(props) { } ) }), `${field.id}-box`); } -const CMPNAME$i = "BasicEntityAutocompleteField"; -const { Open: Open$g } = gubu_minExports.Gubu; +const CMPNAME$j = "BasicEntityAutocompleteField"; +const { Open: Open$h } = gubu_minExports.Gubu; const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu( - Open$g({ - field: Open$g({ + Open$h({ + field: Open$h({ id: String, name: String, - kind: gubu_minExports.Skip(String), + kind: "", label: gubu_minExports.Default(""), - options: Open$g({ + options: Open$h({ label: { field: gubu_minExports.Default("label") }, value: { field: gubu_minExports.Default("value") }, multiple: gubu_minExports.Default(false), - default: Open$g({}), - ents: Open$g({}) + default: Open$h({}), + ents: Open$h({}) }), - ux: Open$g({ + ux: Open$h({ kind: gubu_minExports.Exact("Autocomplete"), edit: gubu_minExports.Default(true) }) }) }), - { name: CMPNAME$i } + { name: CMPNAME$j } ); function BasicEntityAutocompleteField(props) { const { spec } = props; @@ -64825,16 +64810,16 @@ function resolveValue(options, val) { return val || []; } } -const CMPNAME$h = "BasicEntitySliderField"; -const { Open: Open$f } = gubu_minExports.Gubu; +const CMPNAME$i = "BasicEntitySliderField"; +const { Open: Open$g } = gubu_minExports.Gubu; const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu( - Open$f({ - field: Open$f({ + Open$g({ + field: Open$g({ id: String, name: String, - kind: gubu_minExports.Skip(String), + kind: "", label: gubu_minExports.Default("", String), - ux: Open$f({ + ux: Open$g({ kind: gubu_minExports.Exact("Slider"), edit: gubu_minExports.Default(true), step: gubu_minExports.Default(1), @@ -64849,7 +64834,7 @@ const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu( }) }) }), - { name: CMPNAME$h } + { name: CMPNAME$i } ); function BasicEntitySliderField(props) { const { spec } = props; @@ -64896,29 +64881,29 @@ function resolveMarks(marks) { } return marks; } -const CMPNAME$g = "BasicEntitySliderField"; -const { Open: Open$e } = gubu_minExports.Gubu; +const CMPNAME$h = "BasicEntitySliderField"; +const { Open: Open$f } = gubu_minExports.Gubu; const BasicEntityRadioGroupFieldSpecShape = gubu_minExports.Gubu( - Open$e({ - field: Open$e({ + Open$f({ + field: Open$f({ id: String, name: String, - kind: gubu_minExports.Skip(String), + kind: "", label: gubu_minExports.Default("", String), - ux: Open$e({ + ux: Open$f({ kind: gubu_minExports.Exact("RadioGroup"), edit: gubu_minExports.Default(true), direction: gubu_minExports.Exact("row", "column").Default("row") }), - options: Open$e({ + options: Open$f({ label: { field: gubu_minExports.Default("label") }, value: { field: gubu_minExports.Default("value") }, - default: Open$e({}), - ents: Open$e({}) + default: Open$f({}), + ents: Open$f({}) }) }) }), - { name: CMPNAME$g } + { name: CMPNAME$h } ); function BasicEntityRadioGroupField(props) { const { spec } = props; @@ -64989,23 +64974,23 @@ function resolveOptions(options) { resolvedDefault }; } -const CMPNAME$f = "BasicEntityTextBoxField"; -const { Open: Open$d } = gubu_minExports.Gubu; +const CMPNAME$g = "BasicEntityTextBoxField"; +const { Open: Open$e } = gubu_minExports.Gubu; const BasicEntityTextBoxFieldSpecShape = gubu_minExports.Gubu( - Open$d({ - field: Open$d({ + Open$e({ + field: Open$e({ id: String, name: String, - kind: gubu_minExports.Skip(String), + kind: "", label: gubu_minExports.Default("", String), - ux: Open$d({ + ux: Open$e({ kind: gubu_minExports.Exact("TextBox"), edit: gubu_minExports.Default(true), - props: Open$d({}) + props: Open$e({}) }) }) }), - { name: CMPNAME$f } + { name: CMPNAME$g } ); function BasicEntityTextBoxField(props) { const { spec } = props; @@ -65030,23 +65015,23 @@ function BasicEntityFieldError(props) { const { err } = props; return err ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-active", children: err.message }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-none" }); } -const CMPNAME$e = "BasicEntityTextField"; -const { Open: Open$c } = gubu_minExports.Gubu; +const CMPNAME$f = "BasicEntityTextField"; +const { Open: Open$d } = gubu_minExports.Gubu; const BasicEntityTextFieldSpecShape = gubu_minExports.Gubu( - Open$c({ - field: Open$c({ + Open$d({ + field: Open$d({ id: String, name: String, - kind: gubu_minExports.Skip(String), + kind: "", label: gubu_minExports.Default("", String), - ux: Open$c({ + ux: Open$d({ kind: gubu_minExports.Exact("Text"), edit: gubu_minExports.Default(true), - props: Open$c({}) + props: Open$d({}) }) }) }), - { name: CMPNAME$e } + { name: CMPNAME$f } ); function BasicEntityTextField(props) { const { spec } = props; @@ -65069,23 +65054,23 @@ function BasicEntityTextField(props) { /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, field.id); } -const CMPNAME$d = "BasicEntityDateField"; -const { Open: Open$b } = gubu_minExports.Gubu; +const CMPNAME$e = "BasicEntityDateField"; +const { Open: Open$c } = gubu_minExports.Gubu; const BasicEntityDateFieldSpecShape = gubu_minExports.Gubu( - Open$b({ - field: Open$b({ + Open$c({ + field: Open$c({ id: String, name: String, - kind: gubu_minExports.Skip(String), + kind: "", label: gubu_minExports.Default("", String), - ux: Open$b({ + ux: Open$c({ kind: gubu_minExports.Exact("Date"), edit: gubu_minExports.Default(true), - props: Open$b({}) + props: Open$c({}) }) }) }), - { name: CMPNAME$d } + { name: CMPNAME$e } ); function BasicEntityDateField(props) { const { spec } = props; @@ -65106,23 +65091,23 @@ function BasicEntityDateField(props) { }, register(field.name)) ) }, field.id); } -const CMPNAME$c = "BasicEntityTimeField"; -const { Open: Open$a } = gubu_minExports.Gubu; +const CMPNAME$d = "BasicEntityTimeField"; +const { Open: Open$b } = gubu_minExports.Gubu; const BasicEntityTimeFieldSpecShape = gubu_minExports.Gubu( - Open$a({ - field: Open$a({ + Open$b({ + field: Open$b({ id: String, name: String, - kind: gubu_minExports.Skip(String), + kind: "", label: gubu_minExports.Default("", String), - ux: Open$a({ + ux: Open$b({ kind: gubu_minExports.Exact("Time"), edit: gubu_minExports.Default(true), - props: Open$a({}) + props: Open$b({}) }) }) }), - { name: CMPNAME$c } + { name: CMPNAME$d } ); function BasicEntityTimeField(props) { const { spec } = props; @@ -65143,23 +65128,23 @@ function BasicEntityTimeField(props) { }, register(field.name)) ) }, field.id); } -const CMPNAME$b = "BasicEntityDateTimeField"; -const { Open: Open$9 } = gubu_minExports.Gubu; +const CMPNAME$c = "BasicEntityDateTimeField"; +const { Open: Open$a } = gubu_minExports.Gubu; const BasicEntityDateTimeFieldSpecShape = gubu_minExports.Gubu( - Open$9({ - field: Open$9({ + Open$a({ + field: Open$a({ id: String, name: String, - kind: gubu_minExports.Skip(String), + kind: "", label: gubu_minExports.Default("", String), - ux: Open$9({ + ux: Open$a({ kind: gubu_minExports.Exact("DateTime"), edit: gubu_minExports.Default(true), - props: Open$9({}) + props: Open$a({}) }) }) }), - { name: CMPNAME$b } + { name: CMPNAME$c } ); function BasicEntityDateTimeField(props) { const { spec } = props; @@ -65180,24 +65165,24 @@ function BasicEntityDateTimeField(props) { }, register(field.name)) ) }, field.id); } -const CMPNAME$a = "BasicEntitySliderField"; -const { Open: Open$8 } = gubu_minExports.Gubu; +const CMPNAME$b = "BasicEntitySliderField"; +const { Open: Open$9 } = gubu_minExports.Gubu; const BasicEntityRatingFieldSpecShape = gubu_minExports.Gubu( - Open$8({ - field: Open$8({ + Open$9({ + field: Open$9({ id: String, name: String, - kind: gubu_minExports.Skip(String), + kind: "", label: gubu_minExports.Default("", String), - ux: Open$8({ + ux: Open$9({ kind: gubu_minExports.Exact("Rating"), edit: gubu_minExports.Default(true), precision: 1, - props: Open$8({}) + props: Open$9({}) }) }) }), - { name: CMPNAME$a } + { name: CMPNAME$b } ); function BasicEntityRatingField(props) { const { spec } = props; @@ -65226,23 +65211,23 @@ function BasicEntityRatingField(props) { ) ] }, `${field.id}-div`); } -const CMPNAME$9 = "BasicEntitySliderField"; -const { Open: Open$7 } = gubu_minExports.Gubu; +const CMPNAME$a = "BasicEntitySliderField"; +const { Open: Open$8 } = gubu_minExports.Gubu; const BasicEntityButtonFieldSpecShape = gubu_minExports.Gubu( - Open$7({ - field: Open$7({ + Open$8({ + field: Open$8({ id: String, name: String, - kind: gubu_minExports.Skip(String), - label: gubu_minExports.Default("", String), - ux: Open$7({ + kind: "", + label: "", + ux: Open$8({ kind: gubu_minExports.Exact("Button"), edit: gubu_minExports.Default(true), - props: Open$7({}) + props: Open$8({}) }) }) }), - { name: CMPNAME$9 } + { name: CMPNAME$a } ); function BasicEntityButtonField(props) { const { spec } = props; @@ -65267,6 +65252,48 @@ function BasicEntityButtonField(props) { `${field.id}-controller` ) }, `${field.id}-div`); } +const CMPNAME$9 = "BasicEntitySliderField"; +const { Open: Open$7 } = gubu_minExports.Gubu; +const BasicEntityButtonGroupFieldSpecShape = gubu_minExports.Gubu( + Open$7({ + field: Open$7({ + id: String, + name: String, + kind: "", + label: String, + ux: Open$7({ + kind: gubu_minExports.Exact("ButtonGroup"), + edit: gubu_minExports.Default(true), + props: Open$7({}) + }) + }) + }), + { name: CMPNAME$9 } +); +function BasicEntityButtonGroupField(props) { + const { spec } = props; + const basicEntityButtonGroupField = BasicEntityButtonGroupFieldSpecShape(spec); + const { control, field } = basicEntityButtonGroupField; + return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx( + Controller, + { + name: field.name, + control, + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx(ButtonGroup, __spreadProps(__spreadValues({}, field.ux.props), { children: Object.entries(field.options.ents).map(([key, value2]) => { + var _a, _b; + return /* @__PURE__ */ jsxRuntimeExports.jsx( + Button$1, + { + onClick: () => onChange(value2), + children: (_b = (_a = field.options.ents) == null ? void 0 : _a[key]) == null ? void 0 : _b[field.options.label.field] + }, + `${field.id}-${key}` + ); + }) })) + }, + `${field.id}-controller` + ) }, `${field.id}-div`); +} const CMPNAME$8 = "BasicEntityField"; const { Open: Open$6 } = gubu_minExports.Gubu; const BasicEntityFieldSpecShape = gubu_minExports.Gubu( @@ -65274,7 +65301,7 @@ const BasicEntityFieldSpecShape = gubu_minExports.Gubu( field: Open$6({ id: String, name: String, - kind: gubu_minExports.Skip(String), + kind: String, label: gubu_minExports.Default("", String), ux: Open$6({ kind: gubu_minExports.Exact( @@ -65288,7 +65315,8 @@ const BasicEntityFieldSpecShape = gubu_minExports.Gubu( "Slider", "RadioGroup", "Rating", - "Button" + "Button", + "ButtonGroup" ), edit: gubu_minExports.Default(true), rows: gubu_minExports.Default(3), @@ -65309,7 +65337,8 @@ const fieldMap = { Slider: BasicEntitySliderField, RadioGroup: BasicEntityRadioGroupField, Rating: BasicEntityRatingField, - Button: BasicEntityButtonField + Button: BasicEntityButtonField, + ButtonGroup: BasicEntityButtonGroupField }; function BasicEntityField(props) { const { ctx, spec } = props; @@ -65668,7 +65697,7 @@ function VxgBasicLedPlugin(options) { "aim:app,on:BasicLed,save:item", function(msg) { return __async(this, null, function* () { - const data = Object.entries(spec.def.edit.field).filter((n) => false !== n[1].ux.edit).reduce((a, n) => (a[n[0]] = msg.data[n[0]], a), {}); + const data = Object.entries(spec.def.edit.field).filter((n2) => false !== n2[1].ux.edit).reduce((a, n2) => (a[n2[0]] = msg.data[n2[0]], a), {}); const item = yield seneca.entity(entCanon).save$(data); navigate("/view/" + name + "/edit/" + item.id); }); @@ -65852,13 +65881,13 @@ function BasicSide(props) { const sections = vmap(nav.section, { active: vmap.FILTER, name: vmap.COPY, - items: (_2, p) => vmap(p.self.item, { + items: (_2, p2) => vmap(p2.self.item, { active: vmap.FILTER, name: vmap.COPY, view: vmap.COPY, - title: vmap.FILTER((_22, p2) => { + title: vmap.FILTER((_22, p22) => { var _a; - return (_a = viewMap[p2.self.view]) == null ? void 0 : _a.title; + return (_a = viewMap[p22.self.view]) == null ? void 0 : _a.title; }) }) }); @@ -65879,7 +65908,7 @@ function BasicSide(props) { }) }, spec.mui.Drawer), { children: sections.map( - (section) => /* @__PURE__ */ jsxRuntimeExports.jsxs(Fragment, { children: [ + (section) => /* @__PURE__ */ jsxRuntimeExports.jsxs(Fragment$2, { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx( List$1, { @@ -66022,8 +66051,8 @@ var patrun_min = patrun_min$1.exports; var e = { exports: {} }; (function(t2) { (function() { - !function(n2) { - "object" == typeof e.exports ? e.exports = n2() : ("undefined" != typeof window ? window : void 0 !== t2 ? t2 : "undefined" != typeof self ? self : this).Gex = n2(); + !function(n3) { + "object" == typeof e.exports ? e.exports = n3() : ("undefined" != typeof window ? window : void 0 !== t2 ? t2 : "undefined" != typeof self ? self : this).Gex = n3(); }(function() { var e2 = { exports: {} }; Object.defineProperty(e2.exports, "__esModule", { value: true }), e2.exports.Gex = void 0; @@ -66042,8 +66071,8 @@ var patrun_min = patrun_min$1.exports; } match(e3) { e3 = "" + e3; - let t4 = false, n3 = Object.keys(this.gexmap); - for (let r3 = 0; r3 < n3.length && !t4; r3++) t4 = !!this.gexmap[n3[r3]].exec(e3); + let t4 = false, n4 = Object.keys(this.gexmap); + for (let r3 = 0; r3 < n4.length && !t4; r3++) t4 = !!this.gexmap[n4[r3]].exec(e3); return t4; } on(e3) { @@ -66052,12 +66081,12 @@ var patrun_min = patrun_min$1.exports; if ("string" === t4 || "number" === t4 || "boolean" === t4 || e3 instanceof Date || e3 instanceof RegExp) return this.match(e3) ? e3 : null; if (Array.isArray(e3)) { let t5 = []; - for (let n3 = 0; n3 < e3.length; n3++) !this.dodgy(e3[n3]) && this.match(e3[n3]) && t5.push(e3[n3]); + for (let n4 = 0; n4 < e3.length; n4++) !this.dodgy(e3[n4]) && this.match(e3[n4]) && t5.push(e3[n4]); return t5; } { let t5 = {}; - for (let n3 in e3) Object.prototype.hasOwnProperty.call(e3, n3) && this.match(n3) && (t5[n3] = e3[n3]); + for (let n4 in e3) Object.prototype.hasOwnProperty.call(e3, n4) && this.match(n4) && (t5[n4] = e3[n4]); return t5; } } @@ -66083,41 +66112,41 @@ var patrun_min = patrun_min$1.exports; return this.toString(); } } - function n2(e3) { + function n3(e3) { return new t3(e3); } - return e2.exports.Gex = n2, e2.exports = n2, e2.exports.Gex = n2, e2.exports.default = n2, e2.exports; + return e2.exports.Gex = n3, e2.exports = n3, e2.exports.Gex = n3, e2.exports.default = n3, e2.exports; }); }).call(this); }).call(this, "undefined" != typeof commonjsGlobal ? commonjsGlobal : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}), e = e.exports; - var t, n, r2, s, i, o, l, u, a, f = {}, p = this && this.__classPrivateFieldGet || function(e2, t2, n2, r3) { - if ("a" === n2 && !r3) throw new TypeError("Private accessor was defined without a getter"); + var t, n2, r2, s, i, o, l2, u, a, f2 = {}, p2 = this && this.__classPrivateFieldGet || function(e2, t2, n3, r3) { + if ("a" === n3 && !r3) throw new TypeError("Private accessor was defined without a getter"); if ("function" == typeof t2 ? e2 !== t2 || !r3 : !t2.has(e2)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return "m" === n2 ? r3 : "a" === n2 ? r3.call(e2) : r3 ? r3.value : t2.get(e2); + return "m" === n3 ? r3 : "a" === n3 ? r3.call(e2) : r3 ? r3.value : t2.get(e2); }; - Object.defineProperty(f, "__esModule", { value: true }), f.IntervalMatcher = f.GexMatcher = void 0, f.GexMatcher = class { + Object.defineProperty(f2, "__esModule", { value: true }), f2.IntervalMatcher = f2.GexMatcher = void 0, f2.GexMatcher = class { constructor() { } - make(t2, n2) { - if ("string" == typeof n2 && n2.match(/[*?]/)) { - let t3 = (0, e.Gex)(n2); - return { kind: "gex", match: (e2) => null != t3.on(e2), fix: n2, meta: {}, same(e2) { + make(t2, n3) { + if ("string" == typeof n3 && n3.match(/[*?]/)) { + let t3 = (0, e.Gex)(n3); + return { kind: "gex", match: (e2) => null != t3.on(e2), fix: n3, meta: {}, same(e2) { return null != e2 && e2.kind === this.kind && e2.fix === this.fix; } }; } } scan(e2, t2) { - let n2 = e2.filter((e3) => "*" === e3.fix).length > 0; - return { complete: n2, sound: n2, gaps: [], overs: [], why: "no-star" }; + let n3 = e2.filter((e3) => "*" === e3.fix).length > 0; + return { complete: n3, sound: n3, gaps: [], overs: [], why: "no-star" }; } }; const h = new RegExp(["^/s*", "(=*[<>/(/[]?=*)?/s*([-+0-9a-fA-FeEoOxX]+(/.([0-9a-fA-FeEoOxX]+))?)([/)/]]?)(/s*(,|&+|/|+|/./.)/s*(=*[<>]?=*)/s*([-+.0-9a-fA-FeEoOxX]+)/s*([/)/]]?))?/s*$"].join("").replace(/\//g, "\\")); class c { constructor() { - this.kind = "interval", t.set(this, (e2, t2) => function(n2) { - return e2(n2) && t2(n2); - }), n.set(this, (e2, t2) => function(n2) { - return e2(n2) || t2(n2); + this.kind = "interval", t.set(this, (e2, t2) => function(n3) { + return e2(n3) && t2(n3); + }), n2.set(this, (e2, t2) => function(n3) { + return e2(n3) || t2(n3); }), r2.set(this, (e2) => function(e3) { return false; }), s.set(this, (e2) => function(e3) { @@ -66126,7 +66155,7 @@ var patrun_min = patrun_min$1.exports; return t2 > e2; }), o.set(this, (e2) => function(t2) { return t2 >= e2; - }), l.set(this, (e2) => function(t2) { + }), l2.set(this, (e2) => function(t2) { return t2 < e2; }), u.set(this, (e2) => function(t2) { return t2 <= e2; @@ -66134,183 +66163,183 @@ var patrun_min = patrun_min$1.exports; return t2 === e2; }); } - make(e2, f2) { - if ("string" == typeof f2 && f2.match(/[=<>.[()\]]/)) { - let e3 = f2.match(h), d2 = { jo: "and", o0: "err", n0: NaN, o1: "err", n1: NaN }, g2 = (e4) => false; + make(e2, f3) { + if ("string" == typeof f3 && f3.match(/[=<>.[()\]]/)) { + let e3 = f3.match(h), d2 = { jo: "and", o0: "err", n0: NaN, o1: "err", n1: NaN }, g2 = (e4) => false; if (null != e3) { - let h2 = c.normop(e3[1]) || c.normop(e3[5]), m2 = c.normop(e3[8]) || c.normop(e3[10]), v = p(this, "=" === h2 ? a : "<" === h2 || ")" === h2 ? l : "<=" === h2 || "]" === h2 ? u : ">" === h2 || "(" === h2 ? i : ">=" === h2 || "[" === h2 ? o : s, "f"), x = Number(e3[2]), k = null == e3[9] ? NaN : Number(e3[9]), y = e3[7], w = null == y ? p(this, n, "f") : "&" === y.substring(0, 1) || "," === y.substring(0, 1) ? p(this, t, "f") : p(this, n, "f"); - ".." === y && (w = p(this, t, "f"), v = p(this, s, "f") === v ? p(this, o, "f") : v, m2 = "" === m2 ? "<=" : m2); - let N = p(this, null == m2 ? r2 : "=" === m2 ? a : "<" === m2 || ")" === m2 ? l : "<=" === m2 || "]" === m2 ? u : ">" === m2 ? i : ">=" === m2 ? o : s, "f"); - if (x === k && ("=" === h2 && null != m2 ? (k = NaN, N = p(this, r2, "f"), v = m2.includes("<") ? p(this, u, "f") : m2.includes(">") ? p(this, o, "f") : m2.includes("=") ? p(this, a, "f") : p(this, s, "f")) : "=" === m2 && null != h2 && (k = NaN, N = p(this, r2, "f"), v = h2.includes("<") ? p(this, u, "f") : h2.includes(">") ? p(this, o, "f") : p(this, s, "f"))), p(this, s, "f") !== v && p(this, r2, "f") === N && (p(this, l, "f") === v || p(this, u, "f") === v ? (N = v, k = x, v = p(this, o, "f"), x = Number.NEGATIVE_INFINITY, w = p(this, t, "f")) : p(this, i, "f") !== v && p(this, o, "f") !== v || (N = p(this, u, "f"), k = Number.POSITIVE_INFINITY, w = p(this, t, "f"))), !isNaN(k) && k < x) { - let e4 = N, t2 = k; - k = x, x = t2, ".." !== y && (N = v, v = e4); + let h2 = c.normop(e3[1]) || c.normop(e3[5]), m3 = c.normop(e3[8]) || c.normop(e3[10]), v = p2(this, "=" === h2 ? a : "<" === h2 || ")" === h2 ? l2 : "<=" === h2 || "]" === h2 ? u : ">" === h2 || "(" === h2 ? i : ">=" === h2 || "[" === h2 ? o : s, "f"), x = Number(e3[2]), k2 = null == e3[9] ? NaN : Number(e3[9]), y = e3[7], w = null == y ? p2(this, n2, "f") : "&" === y.substring(0, 1) || "," === y.substring(0, 1) ? p2(this, t, "f") : p2(this, n2, "f"); + ".." === y && (w = p2(this, t, "f"), v = p2(this, s, "f") === v ? p2(this, o, "f") : v, m3 = "" === m3 ? "<=" : m3); + let N = p2(this, null == m3 ? r2 : "=" === m3 ? a : "<" === m3 || ")" === m3 ? l2 : "<=" === m3 || "]" === m3 ? u : ">" === m3 ? i : ">=" === m3 ? o : s, "f"); + if (x === k2 && ("=" === h2 && null != m3 ? (k2 = NaN, N = p2(this, r2, "f"), v = m3.includes("<") ? p2(this, u, "f") : m3.includes(">") ? p2(this, o, "f") : m3.includes("=") ? p2(this, a, "f") : p2(this, s, "f")) : "=" === m3 && null != h2 && (k2 = NaN, N = p2(this, r2, "f"), v = h2.includes("<") ? p2(this, u, "f") : h2.includes(">") ? p2(this, o, "f") : p2(this, s, "f"))), p2(this, s, "f") !== v && p2(this, r2, "f") === N && (p2(this, l2, "f") === v || p2(this, u, "f") === v ? (N = v, k2 = x, v = p2(this, o, "f"), x = Number.NEGATIVE_INFINITY, w = p2(this, t, "f")) : p2(this, i, "f") !== v && p2(this, o, "f") !== v || (N = p2(this, u, "f"), k2 = Number.POSITIVE_INFINITY, w = p2(this, t, "f"))), !isNaN(k2) && k2 < x) { + let e4 = N, t2 = k2; + k2 = x, x = t2, ".." !== y && (N = v, v = e4); } - let b = v(x), O = N(k), j = w(b, O); - return d2 = { jo: j.name, o0: b.name, n0: x, o1: O.name, n1: k }, g2 = (e4) => { - let t2 = false, n2 = parseFloat(e4); - return isNaN(n2) || (t2 = j(n2)), t2; - }, { kind: "interval", fix: f2, meta: d2, match: g2, same(e4) { + let b = v(x), O = N(k2), j = w(b, O); + return d2 = { jo: j.name, o0: b.name, n0: x, o1: O.name, n1: k2 }, g2 = (e4) => { + let t2 = false, n3 = parseFloat(e4); + return isNaN(n3) || (t2 = j(n3)), t2; + }, { kind: "interval", fix: f3, meta: d2, match: g2, same(e4) { return null != e4 && e4.kind === this.kind && e4.meta.jo === this.meta.jo && e4.meta.o0 === this.meta.o0 && e4.meta.n0 === this.meta.n0 && e4.meta.o1 === this.meta.o1 && e4.meta.n1 === this.meta.n1; } }; } } } scan(e2, t2) { - let n2 = { complete: false, sound: false, gaps: [], overs: [], lower: null, upper: null }, r3 = Number.NEGATIVE_INFINITY, s2 = Number.POSITIVE_INFINITY, i2 = this.half_intervals(e2); + let n3 = { complete: false, sound: false, gaps: [], overs: [], lower: null, upper: null }, r3 = Number.NEGATIVE_INFINITY, s2 = Number.POSITIVE_INFINITY, i2 = this.half_intervals(e2); i2.reduce((e3, t3) => { - let n3 = "eq" === t3.o, s3 = "lt" === t3.o, i3 = "lte" === t3.o, o3 = "gt" === t3.o, l2 = "gte" === t3.o, u2 = t3.n; + let n4 = "eq" === t3.o, s3 = "lt" === t3.o, i3 = "lte" === t3.o, o3 = "gt" === t3.o, l3 = "gte" === t3.o, u2 = t3.n; if (null == e3.lower) { let s4 = { n: r3, o: "gte" }; - e3.lower = s4, e3.upper = t3, r3 == u2 && l2 || (o3 || l2 ? e3.gaps.push([s4, { n: u2, o: o3 ? "lte" : "lt", m: 0 }]) : n3 && e3.gaps.push([s4, { n: u2, o: "lte", m: 1 }])); + e3.lower = s4, e3.upper = t3, r3 == u2 && l3 || (o3 || l3 ? e3.gaps.push([s4, { n: u2, o: o3 ? "lte" : "lt", m: 0 }]) : n4 && e3.gaps.push([s4, { n: u2, o: "lte", m: 1 }])); } else { - let r4 = "eq" === e3.upper.o, a2 = "lt" === e3.upper.o, f2 = "lte" === e3.upper.o, p2 = (e3.upper.o, e3.upper.o, e3.upper.n), h2 = e3.upper; - u2 === p2 ? a2 && (l2 || n3) || (f2 || r4) && o3 || (r4 || a2 || f2) && e3.gaps.push([{ n: p2, o: r4 || f2 ? "gt" : "gte", m: 2, d: { u: h2, h: t3 } }, { n: u2, o: n3 || l2 ? "lt" : "lte", m: 3 }]) : p2 < u2 ? s3 || i3 || (r4 || a2 || f2) && e3.gaps.push([{ n: p2, o: r4 || f2 ? "gt" : "gte", m: 4 }, { n: u2, o: n3 || l2 ? "lt" : "lte", m: 5 }]) : e3.overs.push([{ n: u2, o: n3 || l2 ? "gte" : "gt", m: 10 }, { n: p2, o: r4 || f2 ? "lte" : "lt", m: 11 }]), e3.upper = t3; + let r4 = "eq" === e3.upper.o, a2 = "lt" === e3.upper.o, f3 = "lte" === e3.upper.o, p3 = (e3.upper.o, e3.upper.o, e3.upper.n), h2 = e3.upper; + u2 === p3 ? a2 && (l3 || n4) || (f3 || r4) && o3 || (r4 || a2 || f3) && e3.gaps.push([{ n: p3, o: r4 || f3 ? "gt" : "gte", m: 2, d: { u: h2, h: t3 } }, { n: u2, o: n4 || l3 ? "lt" : "lte", m: 3 }]) : p3 < u2 ? s3 || i3 || (r4 || a2 || f3) && e3.gaps.push([{ n: p3, o: r4 || f3 ? "gt" : "gte", m: 4 }, { n: u2, o: n4 || l3 ? "lt" : "lte", m: 5 }]) : e3.overs.push([{ n: u2, o: n4 || l3 ? "gte" : "gt", m: 10 }, { n: p3, o: r4 || f3 ? "lte" : "lt", m: 11 }]), e3.upper = t3; } return e3; - }, n2); + }, n3); let o2 = 0 < i2.length && i2[i2.length - 1]; - return o2 && s2 !== o2.n && "gt" !== o2.o && "gte" !== o2.o && n2.gaps.push([{ n: o2.n, o: "eq" === o2.o || "lte" === o2.o ? "gt" : "gte", m: 6 }, { n: s2, o: "lte", m: 7 }]), n2.complete = 0 === n2.gaps.length, n2.sound = 0 === n2.overs.length, n2; + return o2 && s2 !== o2.n && "gt" !== o2.o && "gte" !== o2.o && n3.gaps.push([{ n: o2.n, o: "eq" === o2.o || "lte" === o2.o ? "gt" : "gte", m: 6 }, { n: s2, o: "lte", m: 7 }]), n3.complete = 0 === n3.gaps.length, n3.sound = 0 === n3.overs.length, n3; } half_intervals(e2) { let t2 = []; for (let r3 of e2) t2.push([{ n: r3.meta.n0, o: r3.meta.o0 }, { n: r3.meta.n1, o: r3.meta.o1 }]); - var n2 = ["lt", "lte", "eq", "gte", "gt"]; + var n3 = ["lt", "lte", "eq", "gte", "gt"]; return t2.map((e3) => [isNaN(e3[0].n) || null == e3[0].n ? null : e3[0], isNaN(e3[1].n) || null == e3[1].n ? null : e3[1]].filter((e4) => null != e4)).sort((e3, t3) => { if (e3[0].n < t3[0].n) return -1; if (t3[0].n < e3[0].n) return 1; - var r3 = n2.indexOf(e3[0].o), s2 = n2.indexOf(t3[0].o); + var r3 = n3.indexOf(e3[0].o), s2 = n3.indexOf(t3[0].o); if (r3 < s2) return -1; if (s2 < r3) return 1; if (e3[1].n < t3[1].n) return -1; if (t3[1].n < e3[1].n) return 1; - var i2 = n2.indexOf(e3[1].o), o2 = n2.indexOf(t3[1].o); + var i2 = n3.indexOf(e3[1].o), o2 = n3.indexOf(t3[1].o); return i2 < o2 ? -1 : o2 < i2 ? 1 : 0; }).reduce((e3, t3) => e3.concat(...t3), []); } } - f.IntervalMatcher = c, t = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap(), r2 = /* @__PURE__ */ new WeakMap(), s = /* @__PURE__ */ new WeakMap(), i = /* @__PURE__ */ new WeakMap(), o = /* @__PURE__ */ new WeakMap(), l = /* @__PURE__ */ new WeakMap(), u = /* @__PURE__ */ new WeakMap(), a = /* @__PURE__ */ new WeakMap(), c.normop = (e2) => null == e2 ? null : ((e2.match(/([<>\(\)\[\]])/) || [])[1] || "") + ((e2.match(/(=)/) || [])[1] || ""); + f2.IntervalMatcher = c, t = /* @__PURE__ */ new WeakMap(), n2 = /* @__PURE__ */ new WeakMap(), r2 = /* @__PURE__ */ new WeakMap(), s = /* @__PURE__ */ new WeakMap(), i = /* @__PURE__ */ new WeakMap(), o = /* @__PURE__ */ new WeakMap(), l2 = /* @__PURE__ */ new WeakMap(), u = /* @__PURE__ */ new WeakMap(), a = /* @__PURE__ */ new WeakMap(), c.normop = (e2) => null == e2 ? null : ((e2.match(/([<>\(\)\[\]])/) || [])[1] || "") + ((e2.match(/(=)/) || [])[1] || ""); var d = { exports: {} }; function g(t2) { - var n2 = {}, r3 = {}; + var n3 = {}, r3 = {}; let s2 = []; - return (t2 = t2 || {}).gex && s2.push(new f.GexMatcher()), t2.interval && s2.push(new f.IntervalMatcher()), n2.top = function() { + return (t2 = t2 || {}).gex && s2.push(new f2.GexMatcher()), t2.interval && s2.push(new f2.IntervalMatcher()), n3.top = function() { return r3; - }, n2.add = function(e2, i2) { + }, n3.add = function(e2, i2) { e2 = __spreadValues({}, e2); - var o2 = "function" == typeof t2 ? t2.call(n2, e2, i2) : null, l2 = Object.keys(e2).filter((t3) => null != e2[t3]).sort(); - l2.forEach(function(t3) { + var o2 = "function" == typeof t2 ? t2.call(n3, e2, i2) : null, l3 = Object.keys(e2).filter((t3) => null != e2[t3]).sort(); + l3.forEach(function(t3) { e2[t3] = String(e2[t3]); }); - for (var u2, a2 = r3, f2 = 0; f2 < l2.length; f2++) { - var p2 = l2[f2], h2 = e2[p2]; - let t3 = s2.reduce((e3, t4) => e3 || t4.make(p2, h2), void 0); - if ((u2 = a2.v) && p2 == a2.k) if (t3) { - var c2 = (g2 = a2.g = a2.g || {})[p2] = g2[p2] || []; + for (var u2, a2 = r3, f3 = 0; f3 < l3.length; f3++) { + var p3 = l3[f3], h2 = e2[p3]; + let t3 = s2.reduce((e3, t4) => e3 || t4.make(p3, h2), void 0); + if ((u2 = a2.v) && p3 == a2.k) if (t3) { + var c2 = (g2 = a2.g = a2.g || {})[p3] = g2[p3] || []; t3 = c2.find((e3) => e3.same(t3)) || (c2.push(t3), t3), a2 = t3.keymap || (t3.keymap = {}); } else a2 = u2[h2] || (u2[h2] = {}); - else if (a2.k) if (p2 < a2.k) { + else if (a2.k) if (p3 < a2.k) { var d2 = a2.s; - g2 = a2.g, a2.s = { k: a2.k, v: a2.v }, d2 && (a2.s.s = d2), g2 && (a2.s.g = g2), a2.g && (a2.g = {}), a2.k = p2, a2.v = {}, t3 ? (c2 = (g2 = a2.g = a2.g || {})[p2] = g2[p2] || [], t3 = c2.find((e3) => e3.same(t3)) || (c2.push(t3), t3), a2 = t3.keymap || (t3.keymap = {})) : a2 = a2.v[h2] = {}; - } else a2 = a2.s || (a2.s = {}), f2--; - else if (a2.k = p2, a2.v = {}, t3) { + g2 = a2.g, a2.s = { k: a2.k, v: a2.v }, d2 && (a2.s.s = d2), g2 && (a2.s.g = g2), a2.g && (a2.g = {}), a2.k = p3, a2.v = {}, t3 ? (c2 = (g2 = a2.g = a2.g || {})[p3] = g2[p3] || [], t3 = c2.find((e3) => e3.same(t3)) || (c2.push(t3), t3), a2 = t3.keymap || (t3.keymap = {})) : a2 = a2.v[h2] = {}; + } else a2 = a2.s || (a2.s = {}), f3--; + else if (a2.k = p3, a2.v = {}, t3) { var g2; - c2 = (g2 = a2.g = a2.g || {})[p2] = g2[p2] || []; + c2 = (g2 = a2.g = a2.g || {})[p3] = g2[p3] || []; t3 = c2.find((e3) => e3.same(t3)) || (c2.push(t3), t3), a2 = t3.keymap || (t3.keymap = {}); } else a2 = a2.v[h2] = {}; } - return void 0 !== i2 && a2 && (a2.d = i2, o2 && (a2.f = "function" == typeof o2 ? o2 : o2.find, a2.r = "function" == typeof o2.remove ? o2.remove : void 0)), n2; - }, n2.findexact = function(e2) { - return n2.find(e2, true); - }, n2.find = function(e2, t3, s3) { + return void 0 !== i2 && a2 && (a2.d = i2, o2 && (a2.f = "function" == typeof o2 ? o2 : o2.find, a2.r = "function" == typeof o2.remove ? o2.remove : void 0)), n3; + }, n3.findexact = function(e2) { + return n3.find(e2, true); + }, n3.find = function(e2, t3, s3) { if (null == e2) return null; - var i2 = r3, o2 = void 0 === r3.d ? null : r3.d, l2 = r3.f, u2 = null, a2 = [], f2 = {}, p2 = Object.keys(e2).length, h2 = []; + var i2 = r3, o2 = void 0 === r3.d ? null : r3.d, l3 = r3.f, u2 = null, a2 = [], f3 = {}, p3 = Object.keys(e2).length, h2 = []; void 0 !== r3.d && h2.push(r3.d); do { if (u2 = i2.k, i2.v) { var c2 = e2[u2], d2 = i2.v[c2]; if (!d2 && i2.g && i2.g[u2]) { - for (var g2 = i2.g[u2], m2 = 0; m2 < g2.length; m2++) if (g2[m2].match(c2)) { - d2 = g2[m2].keymap; + for (var g2 = i2.g[u2], m3 = 0; m3 < g2.length; m3++) if (g2[m3].match(c2)) { + d2 = g2[m3].keymap; break; } } - d2 ? (f2[u2] = true, i2.s && a2.push(i2.s), o2 = void 0 === d2.d ? t3 ? null : o2 : d2.d, s3 && void 0 !== d2.d && h2.push(d2.d), l2 = d2.f, i2 = d2) : i2 = i2.s; + d2 ? (f3[u2] = true, i2.s && a2.push(i2.s), o2 = void 0 === d2.d ? t3 ? null : o2 : d2.d, s3 && void 0 !== d2.d && h2.push(d2.d), l3 = d2.f, i2 = d2) : i2 = i2.s; } else i2 = null; null == i2 && 0 < a2.length && (null == o2 || s3 && !t3) && (i2 = a2.pop()); } while (i2); - return t3 ? Object.keys(f2).length !== p2 && (o2 = null) : null == o2 && void 0 !== r3.d && (o2 = r3.d), l2 && (o2 = l2.call(n2, e2, o2)), s3 ? h2 : o2; - }, n2.remove = function(e2) { - var t3, n3 = r3, s3 = null, i2 = []; + return t3 ? Object.keys(f3).length !== p3 && (o2 = null) : null == o2 && void 0 !== r3.d && (o2 = r3.d), l3 && (o2 = l3.call(n3, e2, o2)), s3 ? h2 : o2; + }, n3.remove = function(e2) { + var t3, n4 = r3, s3 = null, i2 = []; do { - if (t3 = n3.k, n3.v || n3.g) { - if (n3.v) { - var o2 = n3.v[e2[t3]]; - o2 && i2.push({ km: n3, v: e2[t3] }); + if (t3 = n4.k, n4.v || n4.g) { + if (n4.v) { + var o2 = n4.v[e2[t3]]; + o2 && i2.push({ km: n4, v: e2[t3] }); } - if (null == o2 && n3.g) { - let r4 = n3.g[t3] || []; + if (null == o2 && n4.g) { + let r4 = n4.g[t3] || []; for (let s4 = 0; s4 < r4.length; s4++) if (r4[s4].fix === e2[t3]) { - i2.push({ km: n3, v: e2[t3], mv: r4[s4] }), o2 = r4[s4].keymap; + i2.push({ km: n4, v: e2[t3], mv: r4[s4] }), o2 = r4[s4].keymap; break; } } - o2 ? (s3 = o2.d, n3 = o2) : n3 = n3.s; - } else n3 = null; - } while (n3); + o2 ? (s3 = o2.d, n4 = o2) : n4 = n4.s; + } else n4 = null; + } while (n4); if (void 0 !== s3) { - var l2 = i2[i2.length - 1]; - if (l2 && l2.km && l2.km.v) { - var u2 = l2.km.v[l2.v] || l2.mv && l2.mv.keymap; + var l3 = i2[i2.length - 1]; + if (l3 && l3.km && l3.km.v) { + var u2 = l3.km.v[l3.v] || l3.mv && l3.mv.keymap; !u2 || u2.r && !u2.r(e2, u2.d) || delete u2.d; } } - }, n2.list = function(t3, n3) { + }, n3.list = function(t3, n4) { t3 = t3 || {}; var s3 = []; - return r3.d && s3.push({ match: {}, data: r3.d, find: r3.f }), function r4(s4, i2, o2, l2) { + return r3.d && s3.push({ match: {}, data: r3.d, find: r3.f }), function r4(s4, i2, o2, l3) { if (s4.v) { - var u2, a2 = s4.k, f2 = (0, e.Gex)(t3 ? null == t3[a2] ? n3 ? null : "*" : t3[a2] : "*"), p2 = __spreadValues({}, i2), h2 = __spreadValues({}, o2); - for (var c2 in s4.v) if (c2 === t3[a2] || !n3 && null == t3[a2] || f2.on(c2)) { - var d2 = __spreadValues({}, p2); + var u2, a2 = s4.k, f3 = (0, e.Gex)(t3 ? null == t3[a2] ? n4 ? null : "*" : t3[a2] : "*"), p3 = __spreadValues({}, i2), h2 = __spreadValues({}, o2); + for (var c2 in s4.v) if (c2 === t3[a2] || !n4 && null == t3[a2] || f3.on(c2)) { + var d2 = __spreadValues({}, p3); d2[a2] = c2; var g2 = __spreadValues({}, h2); - delete g2[a2], u2 = s4.v[c2], 0 === Object.keys(g2).length && u2 && u2.d && l2.push({ match: d2, data: u2.d, find: u2.f }), u2 && null != u2.v && r4(u2, __spreadValues({}, d2), __spreadValues({}, g2), l2); + delete g2[a2], u2 = s4.v[c2], 0 === Object.keys(g2).length && u2 && u2.d && l3.push({ match: d2, data: u2.d, find: u2.f }), u2 && null != u2.v && r4(u2, __spreadValues({}, d2), __spreadValues({}, g2), l3); } - (u2 = s4.s) && r4(u2, __spreadValues({}, p2), __spreadValues({}, h2), l2); + (u2 = s4.s) && r4(u2, __spreadValues({}, p3), __spreadValues({}, h2), l3); } }(r3, {}, __spreadValues({}, t3), s3), s3; - }, n2.toString = function(e2, t3) { - var n3 = true === e2 || !!t3, s3 = "function" == typeof e2 ? e2 : function(e3) { + }, n3.toString = function(e2, t3) { + var n4 = true === e2 || !!t3, s3 = "function" == typeof e2 ? e2 : function(e3) { return "function" == typeof e3 ? "<" + e3.name + ">" : "<" + e3 + ">"; }; function i2(e3, t4) { - for (var n4 = 0; n4 < t4; n4++) e3.push(" "); + for (var n5 = 0; n5 < t4; n5++) e3.push(" "); } - var o2 = [], l2 = []; - return function e3(t4, n4, r4, l3) { + var o2 = [], l3 = []; + return function e3(t4, n5, r4, l4) { var u2; - if (void 0 !== t4.d && (n4.push(" " + s3(t4.d)), o2.push(l3.join(", ") + " -> " + s3(t4.d))), t4.k && (n4.push("\n"), i2(n4, r4), n4.push(t4.k + ":")), (t4.v || t4.s || t4.g) && r4++, t4.v) for (var a2 = Object.keys(t4.v).sort(), f2 = 0; f2 < a2.length; f2++) { - var p2 = a2[f2]; - n4.push("\n"), i2(n4, r4), n4.push(p2 + " ->"), (u2 = l3.slice()).push(t4.k + "=" + p2), e3(t4.v[p2], n4, r4 + 1, u2); + if (void 0 !== t4.d && (n5.push(" " + s3(t4.d)), o2.push(l4.join(", ") + " -> " + s3(t4.d))), t4.k && (n5.push("\n"), i2(n5, r4), n5.push(t4.k + ":")), (t4.v || t4.s || t4.g) && r4++, t4.v) for (var a2 = Object.keys(t4.v).sort(), f3 = 0; f3 < a2.length; f3++) { + var p3 = a2[f3]; + n5.push("\n"), i2(n5, r4), n5.push(p3 + " ->"), (u2 = l4.slice()).push(t4.k + "=" + p3), e3(t4.v[p3], n5, r4 + 1, u2); } - if (t4.g) for (a2 = Object.keys(t4.g).sort(), f2 = 0; f2 < a2.length; f2++) for (var h2 = t4.g[a2[f2]], c2 = 0; c2 < h2.length; c2++) { + if (t4.g) for (a2 = Object.keys(t4.g).sort(), f3 = 0; f3 < a2.length; f3++) for (var h2 = t4.g[a2[f3]], c2 = 0; c2 < h2.length; c2++) { var d2 = h2[c2]; - n4.push("\n"), i2(n4, r4), n4.push(d2.fix + " ~>"), (u2 = l3.slice()).push(t4.k + "~" + d2.fix), e3(d2.keymap, n4, r4 + 1, u2); + n5.push("\n"), i2(n5, r4), n5.push(d2.fix + " ~>"), (u2 = l4.slice()).push(t4.k + "~" + d2.fix), e3(d2.keymap, n5, r4 + 1, u2); } - t4.s && (n4.push("\n"), i2(n4, r4), n4.push("|"), u2 = l3.slice(), e3(t4.s, n4, r4 + 1, u2)); - }(r3, l2, 0, []), n3 ? l2.join("") : o2.join("\n"); - }, n2.inspect = n2.toString, n2.toJSON = function(e2) { + t4.s && (n5.push("\n"), i2(n5, r4), n5.push("|"), u2 = l4.slice(), e3(t4.s, n5, r4 + 1, u2)); + }(r3, l3, 0, []), n4 ? l3.join("") : o2.join("\n"); + }, n3.inspect = n3.toString, n3.toJSON = function(e2) { return JSON.stringify(r3, function(e3, t3) { return "function" == typeof t3 ? "[Function]" : t3; }, e2); - }, n2; + }, n3; } - function m(e2) { + function m2(e2) { return new g(e2); } return Object.defineProperty(d.exports, "__esModule", { value: true }), d.exports.Gex = void 0, d.exports.Patrun = g, Object.defineProperty(d.exports, "Gex", { enumerable: true, get: function() { return e.Gex; - } }), d.exports = m, d.exports.Patrun = g, d.exports.Gex = e.Gex, d.exports.default = m, d = d.exports; + } }), d.exports = m2, d.exports.Patrun = g, d.exports.Gex = e.Gex, d.exports.default = m2, d = d.exports; }); })(patrun_min$1, patrun_min$1.exports); var patrun_minExports = patrun_min$1.exports; @@ -66423,9 +66452,9 @@ function requireLexer() { } let pnt = lex.pnt; let fwd = lex.src.substring(pnt.sI); - let m = fwd.match(fixed); - if (m) { - let msrc = m[1]; + let m2 = fwd.match(fixed); + if (m2) { + let msrc = m2[1]; let mlen = msrc.length; if (0 < mlen) { let tkn = void 0; @@ -66462,13 +66491,13 @@ function requireLexer() { let oc = "o" === rule.state ? 0 : 1; for (let valueMatcher of valueMatchers) { if (valueMatcher.match instanceof RegExp) { - let m = fwd.match(valueMatcher.match); - if (m) { - let msrc = m[0]; + let m2 = fwd.match(valueMatcher.match); + if (m2) { + let msrc = m2[0]; let mlen = msrc.length; if (0 < mlen) { let tkn = void 0; - let val = valueMatcher.val ? valueMatcher.val(m) : msrc; + let val = valueMatcher.val ? valueMatcher.val(m2) : msrc; tkn = lex.token("#VL", val, msrc, pnt); pnt.sI += mlen; pnt.cI += mlen; @@ -66487,9 +66516,9 @@ function requireLexer() { continue; } if (tokenMatcher instanceof RegExp) { - let m = fwd.match(tokenMatcher); - if (m) { - let msrc = m[0]; + let m2 = fwd.match(tokenMatcher); + if (m2) { + let msrc = m2[0]; let mlen = msrc.length; if (0 < mlen) { let tkn = void 0; @@ -66623,10 +66652,10 @@ function requireLexer() { let fwd = lex.src.substring(pnt.sI); let def = cfg.value.def; let defre = cfg.value.defre; - let m = fwd.match(ender); - if (m) { - let msrc = m[1]; - let tsrc = m[2]; + let m2 = fwd.match(ender); + if (m2) { + let msrc = m2[1]; + let tsrc = m2[2]; let out = void 0; if (null != msrc) { let mlen = msrc.length; @@ -66706,10 +66735,10 @@ function requireLexer() { let pnt = lex.pnt; let fwd = lex.src.substring(pnt.sI); let valdef = cfg.value.def; - let m = fwd.match(ender); - if (m) { - let msrc = m[1]; - let tsrc = m[9]; + let m2 = fwd.match(ender); + if (m2) { + let msrc = m2[1]; + let tsrc = m2[9]; let out = void 0; let included = true; if (null != msrc && (included = !cfg.number.exclude || !msrc.match(cfg.number.exclude))) { @@ -66778,10 +66807,10 @@ function requireLexer() { let { sI, rI, cI } = pnt; let srclen = src.length; if (quoteMap[src[sI]]) { - const q = src[sI]; + const q2 = src[sI]; const qI = sI; const qrI = rI; - const isMultiLine = multiChars[q]; + const isMultiLine = multiChars[q2]; ++sI; ++cI; let s = []; @@ -66790,7 +66819,7 @@ function requireLexer() { cI++; let c = src[sI]; rs = void 0; - if (q === c) { + if (q2 === c) { sI++; break; } else if (escChar === c) { @@ -66850,7 +66879,7 @@ function requireLexer() { cI++; } else { let bI = sI; - let qc = q.charCodeAt(0); + let qc = q2.charCodeAt(0); let cc = src.charCodeAt(sI); while ((!hasReplace || void 0 === (rs = replaceCodeMap[cc])) && sI < srclen && 32 <= cc && qc !== cc && escCharCode !== cc) { cc = src.charCodeAt(++sI); @@ -66878,7 +66907,7 @@ function requireLexer() { } } } - if (src[sI - 1] !== q || pnt.sI === sI - 1) { + if (src[sI - 1] !== q2 || pnt.sI === sI - 1) { if (mcfg.abandon) { return void 0; } @@ -67073,9 +67102,9 @@ function requireUtility() { utility.isarr = isarr; const defprop = Object.defineProperty; utility.defprop = defprop; - const omap = (o, f) => { + const omap = (o, f2) => { return Object.entries(o || {}).reduce((o2, e) => { - let me = f ? f(e) : e; + let me = f2 ? f2(e) : e; if (void 0 === me[0]) { delete o2[e[0]]; } else { @@ -67202,7 +67231,7 @@ function requireUtility() { tin, (matcher.tin$ = +tin, matcher) ]); - const tokenSet = opts.tokenSet ? Object.keys(opts.tokenSet).reduce((a, n) => (a[n] = opts.tokenSet[n].filter((x) => null != x).map((n2) => t(n2)), a), {}) : {}; + const tokenSet = opts.tokenSet ? Object.keys(opts.tokenSet).reduce((a, n2) => (a[n2] = opts.tokenSet[n2].filter((x) => null != x).map((n3) => t(n3)), a), {}) : {}; cfg.tokenSet = cfg.tokenSet || {}; entries(tokenSet).map((entry) => { let name = entry[0]; @@ -67230,7 +67259,7 @@ function requireUtility() { }; cfg.text = { lex: !!((_q = opts.text) === null || _q === void 0 ? void 0 : _q.lex), - modify: (((_r = cfg.text) === null || _r === void 0 ? void 0 : _r.modify) || []).concat([(_s = opts.text) === null || _s === void 0 ? void 0 : _s.modify].flat()).filter((m) => null != m), + modify: (((_r = cfg.text) === null || _r === void 0 ? void 0 : _r.modify) || []).concat([(_s = opts.text) === null || _s === void 0 ? void 0 : _s.modify].flat()).filter((m2) => null != m2), check: (_t7 = opts.text) === null || _t7 === void 0 ? void 0 : _t7.check }; cfg.number = { @@ -67310,7 +67339,7 @@ function requireUtility() { list.push(matcher); } return list; - }, []).filter((m) => null != m && false !== m && -1 < +m.order).sort((a, b) => a.order - b.order) : [] + }, []).filter((m2) => null != m2 && false !== m2 && -1 < +m2.order).sort((a, b) => a.order - b.order) : [] }; cfg.parse = { prepare: values2((_19 = opts.parse) === null || _19 === void 0 ? void 0 : _19.prepare) @@ -67370,10 +67399,10 @@ function requireUtility() { } utility.mesc = mesc; function regexp(flags, ...parts) { - return new RegExp(parts.map((p) => p.esc ? ( + return new RegExp(parts.map((p2) => p2.esc ? ( //p.replace(/[-\\|\]{}()[^$+*?.!=]/g, '\\$&') - escre(p.toString()) - ) : p).join(types_12.EMPTY), null == flags ? "" : flags); + escre(p2.toString()) + ) : p2).join(types_12.EMPTY), null == flags ? "" : flags); } utility.regexp = regexp; function escre(s) { @@ -67388,8 +67417,8 @@ function requireUtility() { let over_iso = null != over && (S.object === typeof over || over_isf); let over_ctor; if (base_iso && over_iso && !over_isf && Array.isArray(base) === Array.isArray(over)) { - for (let k in over) { - base[k] = deep(base[k], over[k]); + for (let k2 in over) { + base[k2] = deep(base[k2], over[k2]); } } else { base = void 0 === over ? base : over_isf ? over : over_iso ? S.function === typeof (over_ctor = over.constructor) && S.Object !== over_ctor.name && S.Array !== over_ctor.name ? over : deep(Array.isArray(over) ? [] : {}, over) : over; @@ -67455,7 +67484,7 @@ function requireUtility() { errinject((cfg.hint[code] || ((_c = (_b = details.use) === null || _b === void 0 ? void 0 : _b.err) === null || _c === void 0 ? void 0 : _c.message) || cfg.hint.unknown || "").trim().split("\n").map((s) => " " + s).join("\n"), code, details, token2, rule, ctx), "", " \x1B[2mhttps://jsonic.senecajs.org\x1B[0m", - " \x1B[2m--internal: rule=" + rule.name + "~" + rule.state + "; token=" + tokenize2(token2.tin, ctx.cfg) + (null == token2.why ? "" : "~" + token2.why) + "; plugins=" + ctx.plgn().map((p) => p.name).join(",") + "--\x1B[0m\n" + " \x1B[2m--internal: rule=" + rule.name + "~" + rule.state + "; token=" + tokenize2(token2.tin, ctx.cfg) + (null == token2.why ? "" : "~" + token2.why) + "; plugins=" + ctx.plgn().map((p2) => p2.name).join(",") + "--\x1B[0m\n" ].join("\n"); let desc = { internal: { @@ -67550,13 +67579,13 @@ function requireUtility() { } utility.clone = clone; function charset(...parts) { - return null == parts ? {} : parts.filter((p) => false !== p).map((p) => "object" === typeof p ? keys(p).join(types_12.EMPTY) : p).join(types_12.EMPTY).split(types_12.EMPTY).reduce((a, c) => (a[c] = c.charCodeAt(0), a), {}); + return null == parts ? {} : parts.filter((p2) => false !== p2).map((p2) => "object" === typeof p2 ? keys(p2).join(types_12.EMPTY) : p2).join(types_12.EMPTY).split(types_12.EMPTY).reduce((a, c) => (a[c] = c.charCodeAt(0), a), {}); } utility.charset = charset; function clean(o) { - for (let p in o) { - if (null == o[p]) { - delete o[p]; + for (let p2 in o) { + if (null == o[p2]) { + delete o[p2]; } } return o; @@ -67942,8 +67971,8 @@ const defaults = { } }; defaults_2 = defaults$1.defaults = defaults; -function make_hint(d = (t, r2 = "replace") => t[r2](/[A-Z]/g, (m) => " " + m.toLowerCase())[r2](/[~%][a-z]/g, (m) => ("~" == m[0] ? " " : "") + m[1].toUpperCase()), s = "~sinceTheErrorIsUnknown,ThisIsProbablyABugInsideJsonic\nitself,OrAPlugin.~pleaseConsiderPostingAGithubIssue -Thanks!\n\n~code: $code,~details: \n$details|~theCharacter(s) $srcWereNotExpectedAtThisPointAsTheyDoNot\nmatchTheExpectedSyntax,EvenUnderTheRelaxedJsonicRules.~ifIt\nisNotObviouslyWrong,TheActualSyntaxErrorMayBeElsewhere.~try\ncommentingOutLargerAreasAroundThisPointUntilYouGetNoErrors,\nthenRemoveTheCommentsInSmallSectionsUntilYouFindThe\noffendingSyntax.~n%o%t%e:~alsoCheckIfAnyPluginsYouAreUsing\nexpectDifferentSyntaxInThisCase.|~theEscapeSequence $srcDoesNotEncodeAValidUnicodeCodePoint\nnumber.~youMayNeedToValidateYourStringDataManuallyUsingTest\ncodeToSeeHow~javaScriptWillInterpretIt.~alsoConsiderThatYour\ndataMayHaveBecomeCorrupted,OrTheEscapeSequenceHasNotBeen\ngeneratedCorrectly.|~theEscapeSequence $srcDoesNotEncodeAValid~a%s%c%i%iCharacter.~you\nmayNeedToValidateYourStringDataManuallyUsingTestCodeToSee\nhow~javaScriptWillInterpretIt.~alsoConsiderThatYourDataMay\nhaveBecomeCorrupted,OrTheEscapeSequenceHasNotBeenGenerated\ncorrectly.|~stringValuesCannotContainUnprintableCharacters (characterCodes\nbelow 32).~theCharacter $srcIsUnprintable.~youMayNeedToRemove\ntheseCharactersFromYourSourceData.~alsoCheckThatItHasNot\nbecomeCorrupted.|~thisStringHasNoEndQuote.|~thisCommentIsNeverClosed.|~noRuleNamed $rulenameIsDefined.~thisIsProbablyAnErrorInThe\ngrammarOfAPlugin.".split("|")) { - return "unknown|unexpected|invalid_unicode|invalid_ascii|unprintable|unterminated_string|unterminated_comment|unknown_rule".split("|").reduce((a, n, i) => (a[n] = d(s[i]), a), {}); +function make_hint(d = (t, r2 = "replace") => t[r2](/[A-Z]/g, (m2) => " " + m2.toLowerCase())[r2](/[~%][a-z]/g, (m2) => ("~" == m2[0] ? " " : "") + m2[1].toUpperCase()), s = "~sinceTheErrorIsUnknown,ThisIsProbablyABugInsideJsonic\nitself,OrAPlugin.~pleaseConsiderPostingAGithubIssue -Thanks!\n\n~code: $code,~details: \n$details|~theCharacter(s) $srcWereNotExpectedAtThisPointAsTheyDoNot\nmatchTheExpectedSyntax,EvenUnderTheRelaxedJsonicRules.~ifIt\nisNotObviouslyWrong,TheActualSyntaxErrorMayBeElsewhere.~try\ncommentingOutLargerAreasAroundThisPointUntilYouGetNoErrors,\nthenRemoveTheCommentsInSmallSectionsUntilYouFindThe\noffendingSyntax.~n%o%t%e:~alsoCheckIfAnyPluginsYouAreUsing\nexpectDifferentSyntaxInThisCase.|~theEscapeSequence $srcDoesNotEncodeAValidUnicodeCodePoint\nnumber.~youMayNeedToValidateYourStringDataManuallyUsingTest\ncodeToSeeHow~javaScriptWillInterpretIt.~alsoConsiderThatYour\ndataMayHaveBecomeCorrupted,OrTheEscapeSequenceHasNotBeen\ngeneratedCorrectly.|~theEscapeSequence $srcDoesNotEncodeAValid~a%s%c%i%iCharacter.~you\nmayNeedToValidateYourStringDataManuallyUsingTestCodeToSee\nhow~javaScriptWillInterpretIt.~alsoConsiderThatYourDataMay\nhaveBecomeCorrupted,OrTheEscapeSequenceHasNotBeenGenerated\ncorrectly.|~stringValuesCannotContainUnprintableCharacters (characterCodes\nbelow 32).~theCharacter $srcIsUnprintable.~youMayNeedToRemove\ntheseCharactersFromYourSourceData.~alsoCheckThatItHasNot\nbecomeCorrupted.|~thisStringHasNoEndQuote.|~thisCommentIsNeverClosed.|~noRuleNamed $rulenameIsDefined.~thisIsProbablyAnErrorInThe\ngrammarOfAPlugin.".split("|")) { + return "unknown|unexpected|invalid_unicode|invalid_ascii|unprintable|unterminated_string|unterminated_comment|unknown_rule".split("|").reduce((a, n2, i) => (a[n2] = d(s[i]), a), {}); } var parser$1 = {}; var rules = {}; @@ -68821,7 +68850,7 @@ function grammar(jsonic2) { } ], { append: true, delete: [0, 1] }); }); - jsonic2.rule("elem", (rs, p) => { + jsonic2.rule("elem", (rs, p2) => { rs.open([ // Empty commas insert null elements. // Note that close consumes a comma, so b:2 works. @@ -68840,7 +68869,7 @@ function grammar(jsonic2) { }, { s: [KEY, CL], - e: p.cfg.list.property ? void 0 : (_r, ctx) => ctx.t0, + e: p2.cfg.list.property ? void 0 : (_r, ctx) => ctx.t0, p: "val", n: { pk: 1, dmap: 1 }, u: { done: true, pair: true, list: true }, @@ -69100,9 +69129,9 @@ var jsonic = jsonic$1.exports; } (0, utility_12.defprop)(jsonic2, "internal", { value: () => internal }); if (parent) { - for (let k in parent) { - if (void 0 === jsonic2[k]) { - jsonic2[k] = parent[k]; + for (let k2 in parent) { + if (void 0 === jsonic2[k2]) { + jsonic2[k2] = parent[k2]; } } jsonic2.parent = parent; @@ -69185,8 +69214,8 @@ class Vxg { const mm = Jsonic(match2); const ms = Array.isArray(match2) ? match2 : Object.keys(mm).map((x) => mm[x]); let found = null; - for (const m of ms) { - const pat = this.config.allow.modify(__spreadValues({}, m || {})); + for (const m2 of ms) { + const pat = this.config.allow.modify(__spreadValues({}, m2 || {})); found = this.match.allow.find(pat); if (found) { break; diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index 47ab27c..5aec71b 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -57,20 +57,20 @@ var __async = (__this, __arguments, generator) => { }; function _interopNamespaceDefault(e) { - const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } }); + const n2 = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } }); if (e) { - for (const k in e) { - if (k !== "default") { - const d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { + for (const k2 in e) { + if (k2 !== "default") { + const d = Object.getOwnPropertyDescriptor(e, k2); + Object.defineProperty(n2, k2, d.get ? d : { enumerable: true, - get: () => e[k] + get: () => e[k2] }); } } } - n.default = e; - return Object.freeze(n); + n2.default = e; + return Object.freeze(n2); } const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React$1); const ReactDOM__namespace = /* @__PURE__ */ _interopNamespaceDefault(ReactDOM); @@ -78,31 +78,31 @@ var __async = (__this, __arguments, generator) => { function getDefaultExportFromCjs(x) { return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x; } - function getDefaultExportFromNamespaceIfPresent(n) { - return n && Object.prototype.hasOwnProperty.call(n, "default") ? n["default"] : n; + function getDefaultExportFromNamespaceIfPresent(n2) { + return n2 && Object.prototype.hasOwnProperty.call(n2, "default") ? n2["default"] : n2; } - function getDefaultExportFromNamespaceIfNotNamed(n) { - return n && Object.prototype.hasOwnProperty.call(n, "default") && Object.keys(n).length === 1 ? n["default"] : n; + function getDefaultExportFromNamespaceIfNotNamed(n2) { + return n2 && Object.prototype.hasOwnProperty.call(n2, "default") && Object.keys(n2).length === 1 ? n2["default"] : n2; } - function getAugmentedNamespace(n) { - if (n.__esModule) return n; - var f = n.default; - if (typeof f == "function") { + function getAugmentedNamespace(n2) { + if (n2.__esModule) return n2; + var f2 = n2.default; + if (typeof f2 == "function") { var a = function a2() { if (this instanceof a2) { - return Reflect.construct(f, arguments, this.constructor); + return Reflect.construct(f2, arguments, this.constructor); } - return f.apply(this, arguments); + return f2.apply(this, arguments); }; - a.prototype = f.prototype; + a.prototype = f2.prototype; } else a = {}; Object.defineProperty(a, "__esModule", { value: true }); - Object.keys(n).forEach(function(k) { - var d = Object.getOwnPropertyDescriptor(n, k); - Object.defineProperty(a, k, d.get ? d : { + Object.keys(n2).forEach(function(k2) { + var d = Object.getOwnPropertyDescriptor(n2, k2); + Object.defineProperty(a, k2, d.get ? d : { enumerable: true, get: function() { - return n[k]; + return n2[k2]; } }); }); @@ -119,26 +119,20 @@ var __async = (__this, __arguments, generator) => { * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ - var hasRequiredReactJsxRuntime_production_min; - function requireReactJsxRuntime_production_min() { - if (hasRequiredReactJsxRuntime_production_min) return reactJsxRuntime_production_min; - hasRequiredReactJsxRuntime_production_min = 1; - "use strict"; - var f = React$1, k = Symbol.for("react.element"), l = Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, n = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: true, ref: true, __self: true, __source: true }; - function q(c, a, g) { - var b, d = {}, e = null, h = null; - void 0 !== g && (e = "" + g); - void 0 !== a.key && (e = "" + a.key); - void 0 !== a.ref && (h = a.ref); - for (b in a) m.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]); - if (c && c.defaultProps) for (b in a = c.defaultProps, a) void 0 === d[b] && (d[b] = a[b]); - return { $$typeof: k, type: c, key: e, ref: h, props: d, _owner: n.current }; - } - reactJsxRuntime_production_min.Fragment = l; - reactJsxRuntime_production_min.jsx = q; - reactJsxRuntime_production_min.jsxs = q; - return reactJsxRuntime_production_min; - } + "use strict"; + var f = React$1, k = Symbol.for("react.element"), l = Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, n = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: true, ref: true, __self: true, __source: true }; + function q(c, a, g) { + var b, d = {}, e = null, h = null; + void 0 !== g && (e = "" + g); + void 0 !== a.key && (e = "" + a.key); + void 0 !== a.ref && (h = a.ref); + for (b in a) m.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]); + if (c && c.defaultProps) for (b in a = c.defaultProps, a) void 0 === d[b] && (d[b] = a[b]); + return { $$typeof: k, type: c, key: e, ref: h, props: d, _owner: n.current }; + } + var Fragment$1 = reactJsxRuntime_production_min.Fragment = l; + var jsx = reactJsxRuntime_production_min.jsx = q; + var jsxs = reactJsxRuntime_production_min.jsxs = q; var reactJsxRuntime_development = {}; /** * @license React @@ -149,914 +143,905 @@ var __async = (__this, __arguments, generator) => { * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ - var hasRequiredReactJsxRuntime_development; - function requireReactJsxRuntime_development() { - if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development; - hasRequiredReactJsxRuntime_development = 1; - "use strict"; - if (process.env.NODE_ENV !== "production") { - (function() { - "use strict"; - var React2 = React$1; - var REACT_ELEMENT_TYPE = Symbol.for("react.element"); - var REACT_PORTAL_TYPE = Symbol.for("react.portal"); - var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); - var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"); - var REACT_PROFILER_TYPE = Symbol.for("react.profiler"); - var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); - var REACT_CONTEXT_TYPE = Symbol.for("react.context"); - var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"); - var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"); - var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"); - var REACT_MEMO_TYPE = Symbol.for("react.memo"); - var REACT_LAZY_TYPE = Symbol.for("react.lazy"); - var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"); - var MAYBE_ITERATOR_SYMBOL = Symbol.iterator; - var FAUX_ITERATOR_SYMBOL = "@@iterator"; - function getIteratorFn(maybeIterable) { - if (maybeIterable === null || typeof maybeIterable !== "object") { - return null; - } - var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; - if (typeof maybeIterator === "function") { - return maybeIterator; - } + var jsxs_1; + var jsx_1; + var Fragment; + "use strict"; + if (process.env.NODE_ENV !== "production") { + (function() { + "use strict"; + var React2 = React$1; + var REACT_ELEMENT_TYPE = Symbol.for("react.element"); + var REACT_PORTAL_TYPE = Symbol.for("react.portal"); + var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); + var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"); + var REACT_PROFILER_TYPE = Symbol.for("react.profiler"); + var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); + var REACT_CONTEXT_TYPE = Symbol.for("react.context"); + var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"); + var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"); + var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"); + var REACT_MEMO_TYPE = Symbol.for("react.memo"); + var REACT_LAZY_TYPE = Symbol.for("react.lazy"); + var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"); + var MAYBE_ITERATOR_SYMBOL = Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = "@@iterator"; + function getIteratorFn(maybeIterable) { + if (maybeIterable === null || typeof maybeIterable !== "object") { return null; } - var ReactSharedInternals = React2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; - function error(format) { - { - { - for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { - args[_key2 - 1] = arguments[_key2]; - } - printWarning("error", format, args); - } - } + var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; + if (typeof maybeIterator === "function") { + return maybeIterator; } - function printWarning(level, format, args) { + return null; + } + var ReactSharedInternals = React2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; + function error(format) { + { { - var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame2.getStackAddendum(); - if (stack !== "") { - format += "%s"; - args = args.concat([stack]); + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; } - var argsWithFormat = args.map(function(item) { - return String(item); - }); - argsWithFormat.unshift("Warning: " + format); - Function.prototype.apply.call(console[level], console, argsWithFormat); + printWarning("error", format, args); } } - var enableScopeAPI = false; - var enableCacheElement = false; - var enableTransitionTracing = false; - var enableLegacyHidden = false; - var enableDebugTracing = false; - var REACT_MODULE_REFERENCE; + } + function printWarning(level, format, args) { { - REACT_MODULE_REFERENCE = Symbol.for("react.module.reference"); - } - function isValidElementType(type) { - if (typeof type === "string" || typeof type === "function") { - return true; + var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame; + var stack = ReactDebugCurrentFrame2.getStackAddendum(); + if (stack !== "") { + format += "%s"; + args = args.concat([stack]); } - if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) { - return true; - } - if (typeof type === "object" && type !== null) { - if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object - // types supported by any Flight configuration anywhere since - // we don't know which Flight build this will end up being used - // with. - type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) { - return true; - } - } - return false; + var argsWithFormat = args.map(function(item) { + return String(item); + }); + argsWithFormat.unshift("Warning: " + format); + Function.prototype.apply.call(console[level], console, argsWithFormat); } - function getWrappedName2(outerType, innerType, wrapperName) { - var displayName = outerType.displayName; - if (displayName) { - return displayName; - } - var functionName = innerType.displayName || innerType.name || ""; - return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName; + } + var enableScopeAPI = false; + var enableCacheElement = false; + var enableTransitionTracing = false; + var enableLegacyHidden = false; + var enableDebugTracing = false; + var REACT_MODULE_REFERENCE; + { + REACT_MODULE_REFERENCE = Symbol.for("react.module.reference"); + } + function isValidElementType(type) { + if (typeof type === "string" || typeof type === "function") { + return true; } - function getContextName(type) { - return type.displayName || "Context"; + if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) { + return true; } - function getComponentNameFromType(type) { - if (type == null) { - return null; - } - { - if (typeof type.tag === "number") { - error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."); - } - } - if (typeof type === "function") { - return type.displayName || type.name || null; - } - if (typeof type === "string") { - return type; - } - switch (type) { - case REACT_FRAGMENT_TYPE: - return "Fragment"; - case REACT_PORTAL_TYPE: - return "Portal"; - case REACT_PROFILER_TYPE: - return "Profiler"; - case REACT_STRICT_MODE_TYPE: - return "StrictMode"; - case REACT_SUSPENSE_TYPE: - return "Suspense"; - case REACT_SUSPENSE_LIST_TYPE: - return "SuspenseList"; - } - if (typeof type === "object") { - switch (type.$$typeof) { - case REACT_CONTEXT_TYPE: - var context = type; - return getContextName(context) + ".Consumer"; - case REACT_PROVIDER_TYPE: - var provider = type; - return getContextName(provider._context) + ".Provider"; - case REACT_FORWARD_REF_TYPE: - return getWrappedName2(type, type.render, "ForwardRef"); - case REACT_MEMO_TYPE: - var outerName = type.displayName || null; - if (outerName !== null) { - return outerName; - } - return getComponentNameFromType(type.type) || "Memo"; - case REACT_LAZY_TYPE: { - var lazyComponent = type; - var payload = lazyComponent._payload; - var init2 = lazyComponent._init; - try { - return getComponentNameFromType(init2(payload)); - } catch (x) { - return null; - } - } - } + if (typeof type === "object" && type !== null) { + if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object + // types supported by any Flight configuration anywhere since + // we don't know which Flight build this will end up being used + // with. + type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) { + return true; } + } + return false; + } + function getWrappedName2(outerType, innerType, wrapperName) { + var displayName = outerType.displayName; + if (displayName) { + return displayName; + } + var functionName = innerType.displayName || innerType.name || ""; + return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName; + } + function getContextName(type) { + return type.displayName || "Context"; + } + function getComponentNameFromType(type) { + if (type == null) { return null; } - var assign2 = Object.assign; - var disabledDepth = 0; - var prevLog; - var prevInfo; - var prevWarn; - var prevError; - var prevGroup; - var prevGroupCollapsed; - var prevGroupEnd; - function disabledLog() { - } - disabledLog.__reactDisabledLog = true; - function disableLogs() { - { - if (disabledDepth === 0) { - prevLog = console.log; - prevInfo = console.info; - prevWarn = console.warn; - prevError = console.error; - prevGroup = console.group; - prevGroupCollapsed = console.groupCollapsed; - prevGroupEnd = console.groupEnd; - var props = { - configurable: true, - enumerable: true, - value: disabledLog, - writable: true - }; - Object.defineProperties(console, { - info: props, - log: props, - warn: props, - error: props, - group: props, - groupCollapsed: props, - groupEnd: props - }); - } - disabledDepth++; + { + if (typeof type.tag === "number") { + error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."); } } - function reenableLogs() { - { - disabledDepth--; - if (disabledDepth === 0) { - var props = { - configurable: true, - enumerable: true, - writable: true - }; - Object.defineProperties(console, { - log: assign2({}, props, { - value: prevLog - }), - info: assign2({}, props, { - value: prevInfo - }), - warn: assign2({}, props, { - value: prevWarn - }), - error: assign2({}, props, { - value: prevError - }), - group: assign2({}, props, { - value: prevGroup - }), - groupCollapsed: assign2({}, props, { - value: prevGroupCollapsed - }), - groupEnd: assign2({}, props, { - value: prevGroupEnd - }) - }); - } - if (disabledDepth < 0) { - error("disabledDepth fell below zero. This is a bug in React. Please file an issue."); - } - } + if (typeof type === "function") { + return type.displayName || type.name || null; } - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; - var prefix2; - function describeBuiltInComponentFrame(name, source, ownerFn) { - { - if (prefix2 === void 0) { + if (typeof type === "string") { + return type; + } + switch (type) { + case REACT_FRAGMENT_TYPE: + return "Fragment"; + case REACT_PORTAL_TYPE: + return "Portal"; + case REACT_PROFILER_TYPE: + return "Profiler"; + case REACT_STRICT_MODE_TYPE: + return "StrictMode"; + case REACT_SUSPENSE_TYPE: + return "Suspense"; + case REACT_SUSPENSE_LIST_TYPE: + return "SuspenseList"; + } + if (typeof type === "object") { + switch (type.$$typeof) { + case REACT_CONTEXT_TYPE: + var context = type; + return getContextName(context) + ".Consumer"; + case REACT_PROVIDER_TYPE: + var provider = type; + return getContextName(provider._context) + ".Provider"; + case REACT_FORWARD_REF_TYPE: + return getWrappedName2(type, type.render, "ForwardRef"); + case REACT_MEMO_TYPE: + var outerName = type.displayName || null; + if (outerName !== null) { + return outerName; + } + return getComponentNameFromType(type.type) || "Memo"; + case REACT_LAZY_TYPE: { + var lazyComponent = type; + var payload = lazyComponent._payload; + var init2 = lazyComponent._init; try { - throw Error(); + return getComponentNameFromType(init2(payload)); } catch (x) { - var match2 = x.stack.trim().match(/\n( *(at )?)/); - prefix2 = match2 && match2[1] || ""; + return null; } } - return "\n" + prefix2 + name; } } - var reentry = false; - var componentFrameCache; + return null; + } + var assign2 = Object.assign; + var disabledDepth = 0; + var prevLog; + var prevInfo; + var prevWarn; + var prevError; + var prevGroup; + var prevGroupCollapsed; + var prevGroupEnd; + function disabledLog() { + } + disabledLog.__reactDisabledLog = true; + function disableLogs() { { - var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map; - componentFrameCache = new PossiblyWeakMap(); + if (disabledDepth === 0) { + prevLog = console.log; + prevInfo = console.info; + prevWarn = console.warn; + prevError = console.error; + prevGroup = console.group; + prevGroupCollapsed = console.groupCollapsed; + prevGroupEnd = console.groupEnd; + var props = { + configurable: true, + enumerable: true, + value: disabledLog, + writable: true + }; + Object.defineProperties(console, { + info: props, + log: props, + warn: props, + error: props, + group: props, + groupCollapsed: props, + groupEnd: props + }); + } + disabledDepth++; } - function describeNativeComponentFrame(fn, construct) { - if (!fn || reentry) { - return ""; + } + function reenableLogs() { + { + disabledDepth--; + if (disabledDepth === 0) { + var props = { + configurable: true, + enumerable: true, + writable: true + }; + Object.defineProperties(console, { + log: assign2({}, props, { + value: prevLog + }), + info: assign2({}, props, { + value: prevInfo + }), + warn: assign2({}, props, { + value: prevWarn + }), + error: assign2({}, props, { + value: prevError + }), + group: assign2({}, props, { + value: prevGroup + }), + groupCollapsed: assign2({}, props, { + value: prevGroupCollapsed + }), + groupEnd: assign2({}, props, { + value: prevGroupEnd + }) + }); } - { - var frame = componentFrameCache.get(fn); - if (frame !== void 0) { - return frame; + if (disabledDepth < 0) { + error("disabledDepth fell below zero. This is a bug in React. Please file an issue."); + } + } + } + var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; + var prefix2; + function describeBuiltInComponentFrame(name, source, ownerFn) { + { + if (prefix2 === void 0) { + try { + throw Error(); + } catch (x) { + var match2 = x.stack.trim().match(/\n( *(at )?)/); + prefix2 = match2 && match2[1] || ""; } } - var control; - reentry = true; - var previousPrepareStackTrace = Error.prepareStackTrace; - Error.prepareStackTrace = void 0; - var previousDispatcher; - { - previousDispatcher = ReactCurrentDispatcher.current; - ReactCurrentDispatcher.current = null; - disableLogs(); + return "\n" + prefix2 + name; + } + } + var reentry = false; + var componentFrameCache; + { + var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map; + componentFrameCache = new PossiblyWeakMap(); + } + function describeNativeComponentFrame(fn, construct) { + if (!fn || reentry) { + return ""; + } + { + var frame = componentFrameCache.get(fn); + if (frame !== void 0) { + return frame; } - try { - if (construct) { - var Fake = function() { + } + var control; + reentry = true; + var previousPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + var previousDispatcher; + { + previousDispatcher = ReactCurrentDispatcher.current; + ReactCurrentDispatcher.current = null; + disableLogs(); + } + try { + if (construct) { + var Fake = function() { + throw Error(); + }; + Object.defineProperty(Fake.prototype, "props", { + set: function() { throw Error(); - }; - Object.defineProperty(Fake.prototype, "props", { - set: function() { - throw Error(); - } - }); - if (typeof Reflect === "object" && Reflect.construct) { - try { - Reflect.construct(Fake, []); - } catch (x) { - control = x; - } - Reflect.construct(fn, [], Fake); - } else { - try { - Fake.call(); - } catch (x) { - control = x; - } - fn.call(Fake.prototype); } + }); + if (typeof Reflect === "object" && Reflect.construct) { + try { + Reflect.construct(Fake, []); + } catch (x) { + control = x; + } + Reflect.construct(fn, [], Fake); } else { try { - throw Error(); + Fake.call(); } catch (x) { control = x; } - fn(); + fn.call(Fake.prototype); } - } catch (sample) { - if (sample && control && typeof sample.stack === "string") { - var sampleLines = sample.stack.split("\n"); - var controlLines = control.stack.split("\n"); - var s = sampleLines.length - 1; - var c = controlLines.length - 1; - while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { - c--; - } - for (; s >= 1 && c >= 0; s--, c--) { - if (sampleLines[s] !== controlLines[c]) { - if (s !== 1 || c !== 1) { - do { - s--; - c--; - if (c < 0 || sampleLines[s] !== controlLines[c]) { - var _frame = "\n" + sampleLines[s].replace(" at new ", " at "); - if (fn.displayName && _frame.includes("")) { - _frame = _frame.replace("", fn.displayName); - } - { - if (typeof fn === "function") { - componentFrameCache.set(fn, _frame); - } + } else { + try { + throw Error(); + } catch (x) { + control = x; + } + fn(); + } + } catch (sample) { + if (sample && control && typeof sample.stack === "string") { + var sampleLines = sample.stack.split("\n"); + var controlLines = control.stack.split("\n"); + var s = sampleLines.length - 1; + var c = controlLines.length - 1; + while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { + c--; + } + for (; s >= 1 && c >= 0; s--, c--) { + if (sampleLines[s] !== controlLines[c]) { + if (s !== 1 || c !== 1) { + do { + s--; + c--; + if (c < 0 || sampleLines[s] !== controlLines[c]) { + var _frame = "\n" + sampleLines[s].replace(" at new ", " at "); + if (fn.displayName && _frame.includes("")) { + _frame = _frame.replace("", fn.displayName); + } + { + if (typeof fn === "function") { + componentFrameCache.set(fn, _frame); } - return _frame; } - } while (s >= 1 && c >= 0); - } - break; + return _frame; + } + } while (s >= 1 && c >= 0); } + break; } } - } finally { - reentry = false; - { - ReactCurrentDispatcher.current = previousDispatcher; - reenableLogs(); - } - Error.prepareStackTrace = previousPrepareStackTrace; } - var name = fn ? fn.displayName || fn.name : ""; - var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ""; + } finally { + reentry = false; { - if (typeof fn === "function") { - componentFrameCache.set(fn, syntheticFrame); - } + ReactCurrentDispatcher.current = previousDispatcher; + reenableLogs(); } - return syntheticFrame; + Error.prepareStackTrace = previousPrepareStackTrace; } - function describeFunctionComponentFrame(fn, source, ownerFn) { - { - return describeNativeComponentFrame(fn, false); + var name = fn ? fn.displayName || fn.name : ""; + var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ""; + { + if (typeof fn === "function") { + componentFrameCache.set(fn, syntheticFrame); } } - function shouldConstruct(Component) { - var prototype = Component.prototype; - return !!(prototype && prototype.isReactComponent); + return syntheticFrame; + } + function describeFunctionComponentFrame(fn, source, ownerFn) { + { + return describeNativeComponentFrame(fn, false); } - function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { - if (type == null) { - return ""; - } - if (typeof type === "function") { - { - return describeNativeComponentFrame(type, shouldConstruct(type)); - } - } - if (typeof type === "string") { - return describeBuiltInComponentFrame(type); - } - switch (type) { - case REACT_SUSPENSE_TYPE: - return describeBuiltInComponentFrame("Suspense"); - case REACT_SUSPENSE_LIST_TYPE: - return describeBuiltInComponentFrame("SuspenseList"); + } + function shouldConstruct(Component) { + var prototype = Component.prototype; + return !!(prototype && prototype.isReactComponent); + } + function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { + if (type == null) { + return ""; + } + if (typeof type === "function") { + { + return describeNativeComponentFrame(type, shouldConstruct(type)); } - if (typeof type === "object") { - switch (type.$$typeof) { - case REACT_FORWARD_REF_TYPE: - return describeFunctionComponentFrame(type.render); - case REACT_MEMO_TYPE: - return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn); - case REACT_LAZY_TYPE: { - var lazyComponent = type; - var payload = lazyComponent._payload; - var init2 = lazyComponent._init; - try { - return describeUnknownElementTypeFrameInDEV(init2(payload), source, ownerFn); - } catch (x) { - } + } + if (typeof type === "string") { + return describeBuiltInComponentFrame(type); + } + switch (type) { + case REACT_SUSPENSE_TYPE: + return describeBuiltInComponentFrame("Suspense"); + case REACT_SUSPENSE_LIST_TYPE: + return describeBuiltInComponentFrame("SuspenseList"); + } + if (typeof type === "object") { + switch (type.$$typeof) { + case REACT_FORWARD_REF_TYPE: + return describeFunctionComponentFrame(type.render); + case REACT_MEMO_TYPE: + return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn); + case REACT_LAZY_TYPE: { + var lazyComponent = type; + var payload = lazyComponent._payload; + var init2 = lazyComponent._init; + try { + return describeUnknownElementTypeFrameInDEV(init2(payload), source, ownerFn); + } catch (x) { } } } - return ""; } - var hasOwnProperty = Object.prototype.hasOwnProperty; - var loggedTypeFailures = {}; - var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; - function setCurrentlyValidatingElement(element) { - { - if (element) { - var owner = element._owner; - var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); - ReactDebugCurrentFrame.setExtraStackFrame(stack); - } else { - ReactDebugCurrentFrame.setExtraStackFrame(null); - } + return ""; + } + var hasOwnProperty = Object.prototype.hasOwnProperty; + var loggedTypeFailures = {}; + var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + function setCurrentlyValidatingElement(element) { + { + if (element) { + var owner = element._owner; + var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); + ReactDebugCurrentFrame.setExtraStackFrame(stack); + } else { + ReactDebugCurrentFrame.setExtraStackFrame(null); } } - function checkPropTypes(typeSpecs, values2, location, componentName, element) { - { - var has2 = Function.call.bind(hasOwnProperty); - for (var typeSpecName in typeSpecs) { - if (has2(typeSpecs, typeSpecName)) { - var error$1 = void 0; - try { - if (typeof typeSpecs[typeSpecName] !== "function") { - var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); - err.name = "Invariant Violation"; - throw err; - } - error$1 = typeSpecs[typeSpecName](values2, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); - } catch (ex) { - error$1 = ex; - } - if (error$1 && !(error$1 instanceof Error)) { - setCurrentlyValidatingElement(element); - error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1); - setCurrentlyValidatingElement(null); - } - if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) { - loggedTypeFailures[error$1.message] = true; - setCurrentlyValidatingElement(element); - error("Failed %s type: %s", location, error$1.message); - setCurrentlyValidatingElement(null); + } + function checkPropTypes(typeSpecs, values2, location, componentName, element) { + { + var has2 = Function.call.bind(hasOwnProperty); + for (var typeSpecName in typeSpecs) { + if (has2(typeSpecs, typeSpecName)) { + var error$1 = void 0; + try { + if (typeof typeSpecs[typeSpecName] !== "function") { + var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); + err.name = "Invariant Violation"; + throw err; } + error$1 = typeSpecs[typeSpecName](values2, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); + } catch (ex) { + error$1 = ex; + } + if (error$1 && !(error$1 instanceof Error)) { + setCurrentlyValidatingElement(element); + error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1); + setCurrentlyValidatingElement(null); + } + if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) { + loggedTypeFailures[error$1.message] = true; + setCurrentlyValidatingElement(element); + error("Failed %s type: %s", location, error$1.message); + setCurrentlyValidatingElement(null); } } } } - var isArrayImpl = Array.isArray; - function isArray(a) { - return isArrayImpl(a); + } + var isArrayImpl = Array.isArray; + function isArray(a) { + return isArrayImpl(a); + } + function typeName(value) { + { + var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag; + var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object"; + return type; } - function typeName(value) { - { - var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag; - var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object"; - return type; + } + function willCoercionThrow(value) { + { + try { + testStringCoercion(value); + return false; + } catch (e) { + return true; } } - function willCoercionThrow(value) { - { - try { - testStringCoercion(value); - return false; - } catch (e) { - return true; - } + } + function testStringCoercion(value) { + return "" + value; + } + function checkKeyStringCoercion(value) { + { + if (willCoercionThrow(value)) { + error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value)); + return testStringCoercion(value); } } - function testStringCoercion(value) { - return "" + value; - } - function checkKeyStringCoercion(value) { - { - if (willCoercionThrow(value)) { - error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value)); - return testStringCoercion(value); + } + var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; + var RESERVED_PROPS = { + key: true, + ref: true, + __self: true, + __source: true + }; + var specialPropKeyWarningShown; + var specialPropRefWarningShown; + var didWarnAboutStringRefs; + { + didWarnAboutStringRefs = {}; + } + function hasValidRef(config2) { + { + if (hasOwnProperty.call(config2, "ref")) { + var getter = Object.getOwnPropertyDescriptor(config2, "ref").get; + if (getter && getter.isReactWarning) { + return false; } } } - var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; - var RESERVED_PROPS = { - key: true, - ref: true, - __self: true, - __source: true - }; - var specialPropKeyWarningShown; - var specialPropRefWarningShown; - var didWarnAboutStringRefs; + return config2.ref !== void 0; + } + function hasValidKey(config2) { { - didWarnAboutStringRefs = {}; - } - function hasValidRef(config2) { - { - if (hasOwnProperty.call(config2, "ref")) { - var getter = Object.getOwnPropertyDescriptor(config2, "ref").get; - if (getter && getter.isReactWarning) { - return false; - } + if (hasOwnProperty.call(config2, "key")) { + var getter = Object.getOwnPropertyDescriptor(config2, "key").get; + if (getter && getter.isReactWarning) { + return false; } } - return config2.ref !== void 0; } - function hasValidKey(config2) { - { - if (hasOwnProperty.call(config2, "key")) { - var getter = Object.getOwnPropertyDescriptor(config2, "key").get; - if (getter && getter.isReactWarning) { - return false; - } + return config2.key !== void 0; + } + function warnIfStringRefCannotBeAutoConverted(config2, self2) { + { + if (typeof config2.ref === "string" && ReactCurrentOwner.current && self2 && ReactCurrentOwner.current.stateNode !== self2) { + var componentName = getComponentNameFromType(ReactCurrentOwner.current.type); + if (!didWarnAboutStringRefs[componentName]) { + error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config2.ref); + didWarnAboutStringRefs[componentName] = true; } } - return config2.key !== void 0; } - function warnIfStringRefCannotBeAutoConverted(config2, self2) { - { - if (typeof config2.ref === "string" && ReactCurrentOwner.current && self2 && ReactCurrentOwner.current.stateNode !== self2) { - var componentName = getComponentNameFromType(ReactCurrentOwner.current.type); - if (!didWarnAboutStringRefs[componentName]) { - error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config2.ref); - didWarnAboutStringRefs[componentName] = true; - } + } + function defineKeyPropWarningGetter(props, displayName) { + { + var warnAboutAccessingKey = function() { + if (!specialPropKeyWarningShown) { + specialPropKeyWarningShown = true; + error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); } - } + }; + warnAboutAccessingKey.isReactWarning = true; + Object.defineProperty(props, "key", { + get: warnAboutAccessingKey, + configurable: true + }); } - function defineKeyPropWarningGetter(props, displayName) { - { - var warnAboutAccessingKey = function() { - if (!specialPropKeyWarningShown) { - specialPropKeyWarningShown = true; - error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); - } - }; - warnAboutAccessingKey.isReactWarning = true; - Object.defineProperty(props, "key", { - get: warnAboutAccessingKey, - configurable: true - }); - } + } + function defineRefPropWarningGetter(props, displayName) { + { + var warnAboutAccessingRef = function() { + if (!specialPropRefWarningShown) { + specialPropRefWarningShown = true; + error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); + } + }; + warnAboutAccessingRef.isReactWarning = true; + Object.defineProperty(props, "ref", { + get: warnAboutAccessingRef, + configurable: true + }); } - function defineRefPropWarningGetter(props, displayName) { - { - var warnAboutAccessingRef = function() { - if (!specialPropRefWarningShown) { - specialPropRefWarningShown = true; - error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); - } - }; - warnAboutAccessingRef.isReactWarning = true; - Object.defineProperty(props, "ref", { - get: warnAboutAccessingRef, - configurable: true - }); + } + var ReactElement = function(type, key, ref, self2, source, owner, props) { + var element = { + // This tag allows us to uniquely identify this as a React Element + $$typeof: REACT_ELEMENT_TYPE, + // Built-in properties that belong on the element + type, + key, + ref, + props, + // Record the component responsible for creating this element. + _owner: owner + }; + { + element._store = {}; + Object.defineProperty(element._store, "validated", { + configurable: false, + enumerable: false, + writable: true, + value: false + }); + Object.defineProperty(element, "_self", { + configurable: false, + enumerable: false, + writable: false, + value: self2 + }); + Object.defineProperty(element, "_source", { + configurable: false, + enumerable: false, + writable: false, + value: source + }); + if (Object.freeze) { + Object.freeze(element.props); + Object.freeze(element); } } - var ReactElement = function(type, key, ref, self2, source, owner, props) { - var element = { - // This tag allows us to uniquely identify this as a React Element - $$typeof: REACT_ELEMENT_TYPE, - // Built-in properties that belong on the element - type, - key, - ref, - props, - // Record the component responsible for creating this element. - _owner: owner - }; - { - element._store = {}; - Object.defineProperty(element._store, "validated", { - configurable: false, - enumerable: false, - writable: true, - value: false - }); - Object.defineProperty(element, "_self", { - configurable: false, - enumerable: false, - writable: false, - value: self2 - }); - Object.defineProperty(element, "_source", { - configurable: false, - enumerable: false, - writable: false, - value: source - }); - if (Object.freeze) { - Object.freeze(element.props); - Object.freeze(element); + return element; + }; + function jsxDEV(type, config2, maybeKey, source, self2) { + { + var propName; + var props = {}; + var key = null; + var ref = null; + if (maybeKey !== void 0) { + { + checkKeyStringCoercion(maybeKey); } + key = "" + maybeKey; } - return element; - }; - function jsxDEV(type, config2, maybeKey, source, self2) { - { - var propName; - var props = {}; - var key = null; - var ref = null; - if (maybeKey !== void 0) { - { - checkKeyStringCoercion(maybeKey); - } - key = "" + maybeKey; - } - if (hasValidKey(config2)) { - { - checkKeyStringCoercion(config2.key); - } - key = "" + config2.key; + if (hasValidKey(config2)) { + { + checkKeyStringCoercion(config2.key); } - if (hasValidRef(config2)) { - ref = config2.ref; - warnIfStringRefCannotBeAutoConverted(config2, self2); + key = "" + config2.key; + } + if (hasValidRef(config2)) { + ref = config2.ref; + warnIfStringRefCannotBeAutoConverted(config2, self2); + } + for (propName in config2) { + if (hasOwnProperty.call(config2, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + props[propName] = config2[propName]; } - for (propName in config2) { - if (hasOwnProperty.call(config2, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { - props[propName] = config2[propName]; + } + if (type && type.defaultProps) { + var defaultProps2 = type.defaultProps; + for (propName in defaultProps2) { + if (props[propName] === void 0) { + props[propName] = defaultProps2[propName]; } } - if (type && type.defaultProps) { - var defaultProps2 = type.defaultProps; - for (propName in defaultProps2) { - if (props[propName] === void 0) { - props[propName] = defaultProps2[propName]; - } - } + } + if (key || ref) { + var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type; + if (key) { + defineKeyPropWarningGetter(props, displayName); } - if (key || ref) { - var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type; - if (key) { - defineKeyPropWarningGetter(props, displayName); - } - if (ref) { - defineRefPropWarningGetter(props, displayName); - } + if (ref) { + defineRefPropWarningGetter(props, displayName); } - return ReactElement(type, key, ref, self2, source, ReactCurrentOwner.current, props); } + return ReactElement(type, key, ref, self2, source, ReactCurrentOwner.current, props); } - var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner; - var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; - function setCurrentlyValidatingElement$1(element) { - { - if (element) { - var owner = element._owner; - var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); - ReactDebugCurrentFrame$1.setExtraStackFrame(stack); - } else { - ReactDebugCurrentFrame$1.setExtraStackFrame(null); - } + } + var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner; + var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; + function setCurrentlyValidatingElement$1(element) { + { + if (element) { + var owner = element._owner; + var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); + ReactDebugCurrentFrame$1.setExtraStackFrame(stack); + } else { + ReactDebugCurrentFrame$1.setExtraStackFrame(null); } } - var propTypesMisspellWarningShown; + } + var propTypesMisspellWarningShown; + { + propTypesMisspellWarningShown = false; + } + function isValidElement(object) { { - propTypesMisspellWarningShown = false; - } - function isValidElement(object) { - { - return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; - } + return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; } - function getDeclarationErrorAddendum() { - { - if (ReactCurrentOwner$1.current) { - var name = getComponentNameFromType(ReactCurrentOwner$1.current.type); - if (name) { - return "\n\nCheck the render method of `" + name + "`."; - } + } + function getDeclarationErrorAddendum() { + { + if (ReactCurrentOwner$1.current) { + var name = getComponentNameFromType(ReactCurrentOwner$1.current.type); + if (name) { + return "\n\nCheck the render method of `" + name + "`."; } - return ""; } + return ""; } - function getSourceInfoErrorAddendum(source) { - { - if (source !== void 0) { - var fileName = source.fileName.replace(/^.*[\\\/]/, ""); - var lineNumber = source.lineNumber; - return "\n\nCheck your code at " + fileName + ":" + lineNumber + "."; - } - return ""; + } + function getSourceInfoErrorAddendum(source) { + { + if (source !== void 0) { + var fileName = source.fileName.replace(/^.*[\\\/]/, ""); + var lineNumber = source.lineNumber; + return "\n\nCheck your code at " + fileName + ":" + lineNumber + "."; } + return ""; } - var ownerHasKeyUseWarning = {}; - function getCurrentComponentErrorInfo(parentType) { - { - var info = getDeclarationErrorAddendum(); - if (!info) { - var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name; - if (parentName) { - info = "\n\nCheck the top-level render call using <" + parentName + ">."; - } + } + var ownerHasKeyUseWarning = {}; + function getCurrentComponentErrorInfo(parentType) { + { + var info = getDeclarationErrorAddendum(); + if (!info) { + var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name; + if (parentName) { + info = "\n\nCheck the top-level render call using <" + parentName + ">."; } - return info; } + return info; } - function validateExplicitKey(element, parentType) { - { - if (!element._store || element._store.validated || element.key != null) { - return; - } - element._store.validated = true; - var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); - if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { - return; - } - ownerHasKeyUseWarning[currentComponentErrorInfo] = true; - var childOwner = ""; - if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) { - childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + "."; - } - setCurrentlyValidatingElement$1(element); - error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner); - setCurrentlyValidatingElement$1(null); + } + function validateExplicitKey(element, parentType) { + { + if (!element._store || element._store.validated || element.key != null) { + return; } + element._store.validated = true; + var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); + if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { + return; + } + ownerHasKeyUseWarning[currentComponentErrorInfo] = true; + var childOwner = ""; + if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) { + childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + "."; + } + setCurrentlyValidatingElement$1(element); + error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner); + setCurrentlyValidatingElement$1(null); } - function validateChildKeys(node2, parentType) { - { - if (typeof node2 !== "object") { - return; - } - if (isArray(node2)) { - for (var i = 0; i < node2.length; i++) { - var child = node2[i]; - if (isValidElement(child)) { - validateExplicitKey(child, parentType); - } - } - } else if (isValidElement(node2)) { - if (node2._store) { - node2._store.validated = true; + } + function validateChildKeys(node2, parentType) { + { + if (typeof node2 !== "object") { + return; + } + if (isArray(node2)) { + for (var i = 0; i < node2.length; i++) { + var child = node2[i]; + if (isValidElement(child)) { + validateExplicitKey(child, parentType); } - } else if (node2) { - var iteratorFn = getIteratorFn(node2); - if (typeof iteratorFn === "function") { - if (iteratorFn !== node2.entries) { - var iterator = iteratorFn.call(node2); - var step; - while (!(step = iterator.next()).done) { - if (isValidElement(step.value)) { - validateExplicitKey(step.value, parentType); - } + } + } else if (isValidElement(node2)) { + if (node2._store) { + node2._store.validated = true; + } + } else if (node2) { + var iteratorFn = getIteratorFn(node2); + if (typeof iteratorFn === "function") { + if (iteratorFn !== node2.entries) { + var iterator = iteratorFn.call(node2); + var step; + while (!(step = iterator.next()).done) { + if (isValidElement(step.value)) { + validateExplicitKey(step.value, parentType); } } } } } } - function validatePropTypes(element) { - { - var type = element.type; - if (type === null || type === void 0 || typeof type === "string") { - return; - } - var propTypes2; - if (typeof type === "function") { - propTypes2 = type.propTypes; - } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here. - // Inner props are checked in the reconciler. - type.$$typeof === REACT_MEMO_TYPE)) { - propTypes2 = type.propTypes; - } else { - return; - } - if (propTypes2) { - var name = getComponentNameFromType(type); - checkPropTypes(propTypes2, element.props, "prop", name, element); - } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) { - propTypesMisspellWarningShown = true; - var _name = getComponentNameFromType(type); - error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown"); - } - if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) { - error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); - } + } + function validatePropTypes(element) { + { + var type = element.type; + if (type === null || type === void 0 || typeof type === "string") { + return; + } + var propTypes2; + if (typeof type === "function") { + propTypes2 = type.propTypes; + } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here. + // Inner props are checked in the reconciler. + type.$$typeof === REACT_MEMO_TYPE)) { + propTypes2 = type.propTypes; + } else { + return; + } + if (propTypes2) { + var name = getComponentNameFromType(type); + checkPropTypes(propTypes2, element.props, "prop", name, element); + } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) { + propTypesMisspellWarningShown = true; + var _name = getComponentNameFromType(type); + error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown"); + } + if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) { + error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); } } - function validateFragmentProps(fragment) { - { - var keys = Object.keys(fragment.props); - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - if (key !== "children" && key !== "key") { - setCurrentlyValidatingElement$1(fragment); - error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key); - setCurrentlyValidatingElement$1(null); - break; - } - } - if (fragment.ref !== null) { + } + function validateFragmentProps(fragment) { + { + var keys = Object.keys(fragment.props); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (key !== "children" && key !== "key") { setCurrentlyValidatingElement$1(fragment); - error("Invalid attribute `ref` supplied to `React.Fragment`."); + error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key); setCurrentlyValidatingElement$1(null); + break; } } + if (fragment.ref !== null) { + setCurrentlyValidatingElement$1(fragment); + error("Invalid attribute `ref` supplied to `React.Fragment`."); + setCurrentlyValidatingElement$1(null); + } } - var didWarnAboutKeySpread = {}; - function jsxWithValidation(type, props, key, isStaticChildren, source, self2) { - { - var validType = isValidElementType(type); - if (!validType) { - var info = ""; - if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) { - info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."; - } - var sourceInfo = getSourceInfoErrorAddendum(source); - if (sourceInfo) { - info += sourceInfo; - } else { - info += getDeclarationErrorAddendum(); - } - var typeString; - if (type === null) { - typeString = "null"; - } else if (isArray(type)) { - typeString = "array"; - } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) { - typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />"; - info = " Did you accidentally export a JSX literal instead of a component?"; - } else { - typeString = typeof type; - } - error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info); + } + var didWarnAboutKeySpread = {}; + function jsxWithValidation(type, props, key, isStaticChildren, source, self2) { + { + var validType = isValidElementType(type); + if (!validType) { + var info = ""; + if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) { + info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."; } - var element = jsxDEV(type, props, key, source, self2); - if (element == null) { - return element; + var sourceInfo = getSourceInfoErrorAddendum(source); + if (sourceInfo) { + info += sourceInfo; + } else { + info += getDeclarationErrorAddendum(); } - if (validType) { - var children = props.children; - if (children !== void 0) { - if (isStaticChildren) { - if (isArray(children)) { - for (var i = 0; i < children.length; i++) { - validateChildKeys(children[i], type); - } - if (Object.freeze) { - Object.freeze(children); - } - } else { - error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."); + var typeString; + if (type === null) { + typeString = "null"; + } else if (isArray(type)) { + typeString = "array"; + } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) { + typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />"; + info = " Did you accidentally export a JSX literal instead of a component?"; + } else { + typeString = typeof type; + } + error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info); + } + var element = jsxDEV(type, props, key, source, self2); + if (element == null) { + return element; + } + if (validType) { + var children = props.children; + if (children !== void 0) { + if (isStaticChildren) { + if (isArray(children)) { + for (var i = 0; i < children.length; i++) { + validateChildKeys(children[i], type); + } + if (Object.freeze) { + Object.freeze(children); } } else { - validateChildKeys(children, type); + error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."); } + } else { + validateChildKeys(children, type); } } - { - if (hasOwnProperty.call(props, "key")) { - var componentName = getComponentNameFromType(type); - var keys = Object.keys(props).filter(function(k) { - return k !== "key"; - }); - var beforeExample = keys.length > 0 ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}"; - if (!didWarnAboutKeySpread[componentName + beforeExample]) { - var afterExample = keys.length > 0 ? "{" + keys.join(": ..., ") + ": ...}" : "{}"; - error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName); - didWarnAboutKeySpread[componentName + beforeExample] = true; - } + } + { + if (hasOwnProperty.call(props, "key")) { + var componentName = getComponentNameFromType(type); + var keys = Object.keys(props).filter(function(k2) { + return k2 !== "key"; + }); + var beforeExample = keys.length > 0 ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}"; + if (!didWarnAboutKeySpread[componentName + beforeExample]) { + var afterExample = keys.length > 0 ? "{" + keys.join(": ..., ") + ": ...}" : "{}"; + error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName); + didWarnAboutKeySpread[componentName + beforeExample] = true; } } - if (type === REACT_FRAGMENT_TYPE) { - validateFragmentProps(element); - } else { - validatePropTypes(element); - } - return element; } - } - function jsxWithValidationStatic(type, props, key) { - { - return jsxWithValidation(type, props, key, true); + if (type === REACT_FRAGMENT_TYPE) { + validateFragmentProps(element); + } else { + validatePropTypes(element); } + return element; } - function jsxWithValidationDynamic(type, props, key) { - { - return jsxWithValidation(type, props, key, false); - } + } + function jsxWithValidationStatic(type, props, key) { + { + return jsxWithValidation(type, props, key, true); } - var jsx = jsxWithValidationDynamic; - var jsxs = jsxWithValidationStatic; - reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE; - reactJsxRuntime_development.jsx = jsx; - reactJsxRuntime_development.jsxs = jsxs; - })(); - } - return reactJsxRuntime_development; + } + function jsxWithValidationDynamic(type, props, key) { + { + return jsxWithValidation(type, props, key, false); + } + } + var jsx2 = jsxWithValidationDynamic; + var jsxs2 = jsxWithValidationStatic; + Fragment = reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE; + jsx_1 = reactJsxRuntime_development.jsx = jsx2; + jsxs_1 = reactJsxRuntime_development.jsxs = jsxs2; + })(); } - var jsxRuntime$1 = jsxRuntime$2.exports; - var hasRequiredJsxRuntime; - function requireJsxRuntime() { - if (hasRequiredJsxRuntime) return jsxRuntime$2.exports; - hasRequiredJsxRuntime = 1; - "use strict"; - if (process.env.NODE_ENV === "production") { - jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); - } else { - jsxRuntime$2.exports = requireReactJsxRuntime_development(); - } - return jsxRuntime$2.exports; + var jsxRuntime = jsxRuntime$2.exports; + "use strict"; + if (process.env.NODE_ENV === "production") { + jsxRuntime$2.exports = reactJsxRuntime_production_min; + } else { + jsxRuntime$2.exports = reactJsxRuntime_development; } - var jsxRuntimeExports = requireJsxRuntime(); - const jsxRuntime = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); + var jsxRuntimeExports = jsxRuntime$2.exports; + const jsxRuntime$1 = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); var gubu_min$2 = { exports: {} }; var gubu_min = gubu_min$2.exports; (function(module2, exports3) { @@ -1069,10 +1054,10 @@ var __async = (__this, __arguments, generator) => { }(function() { var e = {}, t = {}; Object.defineProperty(t, "__esModule", { value: true }), t.Gubu = void 0; - const n = Symbol.for("gubu$"), r2 = { gubu$: n, v$: "8.3.0" }, l = /^[A-Z]/, { toString: i } = Object.prototype, o = "gubu", s = "name", u = "nan", a = "never", c = "number", f = "required", p = "array", h = "function", v = "object", d = "string", g = "boolean", y = "undefined", m = "any", b = "list", $ = "instance", k = "null", x = "type", I = "closed", w = "shape", S = "check", j = "regexp", N = "String", O = "Number", V = "Boolean", A = "Object", R = "Array", D = "Function", E = "Value", C = "Above", G = "All", T = "Any", B = "Below", J = "Check", W = "Child", M = "Exact", F = "Max", P = "Min", z = "One", L = "Open", _2 = "Required", q = "Some", H = " for property ", U = '"$PATH"', K = '"$VALUE"', Z = { [N]: String, [O]: Number, [V]: Boolean, [A]: Object, [R]: Array, ["Symbol"]: Symbol, [D]: Function }, Q = (e2) => Object.keys(e2), X = (e2, t2, n2) => Object.defineProperty(e2, t2, n2), Y = (e2) => Array.isArray(e2), ee = (e2) => JSON.parse(e2), te = (e2, t2) => JSON.stringify(e2, t2); + const n2 = Symbol.for("gubu$"), r2 = { gubu$: n2, v$: "8.3.0" }, l2 = /^[A-Z]/, { toString: i } = Object.prototype, o = "gubu", s = "name", u = "nan", a = "never", c = "number", f2 = "required", p2 = "array", h = "function", v = "object", d = "string", g = "boolean", y = "undefined", m2 = "any", b = "list", $ = "instance", k2 = "null", x = "type", I = "closed", w = "shape", S = "check", j = "regexp", N = "String", O = "Number", V = "Boolean", A = "Object", R = "Array", D = "Function", E = "Value", C = "Above", G = "All", T = "Any", B = "Below", J = "Check", W = "Child", M = "Exact", F = "Max", P = "Min", z = "One", L = "Open", _2 = "Required", q2 = "Some", H = " for property ", U = '"$PATH"', K = '"$VALUE"', Z = { [N]: String, [O]: Number, [V]: Boolean, [A]: Object, [R]: Array, ["Symbol"]: Symbol, [D]: Function }, Q = (e2) => Object.keys(e2), X = (e2, t2, n3) => Object.defineProperty(e2, t2, n3), Y = (e2) => Array.isArray(e2), ee = (e2) => JSON.parse(e2), te = (e2, t2) => JSON.stringify(e2, t2); class ne { - constructor(e2, t2, n2, r3) { - this.match = false, this.dI = 0, this.nI = 2, this.cI = -1, this.pI = 0, this.sI = -1, this.valType = a, this.isRoot = false, this.key = "", this.type = a, this.stop = true, this.nextSibling = true, this.fromDflt = false, this.ignoreVal = void 0, this.curerr = [], this.err = [], this.parents = [], this.keys = [], this.ancestors = [], this.path = [], this.root = e2, this.vals = [e2, -1], this.node = t2, this.nodes = [t2, -1], this.ctx = n2 || {}, this.match = !!r3; + constructor(e2, t2, n3, r3) { + this.match = false, this.dI = 0, this.nI = 2, this.cI = -1, this.pI = 0, this.sI = -1, this.valType = a, this.isRoot = false, this.key = "", this.type = a, this.stop = true, this.nextSibling = true, this.fromDflt = false, this.ignoreVal = void 0, this.curerr = [], this.err = [], this.parents = [], this.keys = [], this.ancestors = [], this.path = [], this.root = e2, this.vals = [e2, -1], this.node = t2, this.nodes = [t2, -1], this.ctx = n3 || {}, this.match = !!r3; } next() { this.stop = false, this.fromDflt = false, this.ignoreVal = void 0, this.isRoot = 0 === this.pI, this.check = void 0; @@ -1085,9 +1070,9 @@ var __async = (__this, __arguments, generator) => { } } class re extends TypeError { - constructor(e2, t2, n2, r3) { - var l2; - super((t2 = null == t2 || t2.startsWith("G$") ? "" : t2 + ": ") + n2.map((e3) => e3.text).join("\n")), this.gubu = true, this.name = "GubuError", this.code = e2, this.gname = t2, this.desc = () => ({ name: "GubuError", code: e2, err: n2, ctx: r3 }), this.stack = null === (l2 = this.stack) || void 0 === l2 ? void 0 : l2.replace(/.*\/gubu\/gubu\.[tj]s.*\n/g, ""), this.props = n2.map((e3) => { + constructor(e2, t2, n3, r3) { + var l3; + super((t2 = null == t2 || t2.startsWith("G$") ? "" : t2 + ": ") + n3.map((e3) => e3.text).join("\n")), this.gubu = true, this.name = "GubuError", this.code = e2, this.gname = t2, this.desc = () => ({ name: "GubuError", code: e2, err: n3, ctx: r3 }), this.stack = null === (l3 = this.stack) || void 0 === l3 ? void 0 : l3.replace(/.*\/gubu\/gubu\.[tj]s.*\n/g, ""), this.props = n3.map((e3) => { var t3; return { path: e3.path, what: e3.why, type: null === (t3 = e3.node) || void 0 === t3 ? void 0 : t3.t, value: e3.value }; }); @@ -1098,47 +1083,47 @@ var __async = (__this, __arguments, generator) => { } const le = { Array: true, BigInt: true, Boolean: true, Function: true, Number: true, Object: true, String: true, Symbol: true }, ie = { string: "", number: 0, boolean: false, object: {}, array: [], symbol: Symbol(""), bigint: BigInt(0), null: null, regexp: /.*/ }; function oe(e2, t2, o2) { - var s2, a2, f2, g2; + var s2, a2, f3, g2; if (ue === e2) e2 = void 0; else if (null != e2 && (null === (s2 = e2.$) || void 0 === s2 ? void 0 : s2.gubu$)) { - if (n === e2.$.gubu$) return e2.d = null == t2 ? e2.d : t2, e2; + if (n2 === e2.$.gubu$) return e2.d = null == t2 ? e2.d : t2, e2; if (true === e2.$.gubu$) { let r3 = __spreadValues({}, e2); - return r3.$ = __spreadProps(__spreadValues({ v$: "8.3.0" }, r3.$), { gubu$: n }), r3.v = null != r3.v && v === typeof r3.v ? __spreadValues({}, r3.v) : r3.v, r3.t = r3.t || typeof r3.v, h === r3.t && le[r3.v.name] && (r3.t = r3.v.name.toLowerCase(), r3.v = Qe(ie[r3.t]), r3.f = r3.v), r3.r = !!r3.r, r3.p = !!r3.p, r3.d = null == t2 ? null == r3.d ? -1 : r3.d : t2, r3.b = r3.b || [], r3.a = r3.a || [], r3.u = r3.u || {}, r3.m = r3.m || o2 || {}, r3; + return r3.$ = __spreadProps(__spreadValues({ v$: "8.3.0" }, r3.$), { gubu$: n2 }), r3.v = null != r3.v && v === typeof r3.v ? __spreadValues({}, r3.v) : r3.v, r3.t = r3.t || typeof r3.v, h === r3.t && le[r3.v.name] && (r3.t = r3.v.name.toLowerCase(), r3.v = Qe(ie[r3.t]), r3.f = r3.v), r3.r = !!r3.r, r3.p = !!r3.p, r3.d = null == t2 ? null == r3.d ? -1 : r3.d : t2, r3.b = r3.b || [], r3.a = r3.a || [], r3.u = r3.u || {}, r3.m = r3.m || o2 || {}, r3; } } - let b2 = null === e2 ? k : typeof e2; - b2 = y === b2 ? m : b2; + let b2 = null === e2 ? k2 : typeof e2; + b2 = y === b2 ? m2 : b2; let x2, I2 = e2, w2 = I2, S2 = false, N2 = {}, O2 = [], V2 = []; - if (v === b2) w2 = void 0, Y(I2) ? (b2 = p, 1 === I2.length && (x2 = I2[0], I2 = [])) : null != I2 && Function !== I2.constructor && Object !== I2.constructor && null != I2.constructor ? ("[object RegExp]" === i.call(I2) ? (b2 = j, S2 = true) : (b2 = $, N2.n = I2.constructor.name, N2.i = I2.constructor), w2 = I2) : 0 === Q(I2).length && (x2 = ye()); + if (v === b2) w2 = void 0, Y(I2) ? (b2 = p2, 1 === I2.length && (x2 = I2[0], I2 = [])) : null != I2 && Function !== I2.constructor && Object !== I2.constructor && null != I2.constructor ? ("[object RegExp]" === i.call(I2) ? (b2 = j, S2 = true) : (b2 = $, N2.n = I2.constructor.name, N2.i = I2.constructor), w2 = I2) : 0 === Q(I2).length && (x2 = ye()); else if (h === b2) if (le[e2.name]) b2 = e2.name.toLowerCase(), S2 = true, I2 = Qe(ie[b2]), w2 = I2, A === e2.name && (x2 = ye()); else if (I2.gubu === r2 || true === (null === (a2 = I2.$) || void 0 === a2 ? void 0 : a2.gubu)) { let e3 = I2.node ? I2.node() : I2; b2 = e3.t, I2 = e3.v, w2 = I2, S2 = e3.r, N2 = __spreadValues({}, e3.u), O2 = [...e3.a], V2 = [...e3.b]; - } else D === I2.constructor.name && l.test(I2.name) && (b2 = $, S2 = true, N2.n = null === (g2 = null === (f2 = I2.prototype) || void 0 === f2 ? void 0 : f2.constructor) || void 0 === g2 ? void 0 : g2.name, N2.i = I2); + } else D === I2.constructor.name && l2.test(I2.name) && (b2 = $, S2 = true, N2.n = null === (g2 = null === (f3 = I2.prototype) || void 0 === f3 ? void 0 : f3.constructor) || void 0 === g2 ? void 0 : g2.name, N2.i = I2); else c === b2 && isNaN(I2) ? b2 = u : d === b2 && "" === I2 && (N2.empty = true); - let R2 = null == I2 || v !== b2 && p !== b2 ? I2 : __spreadValues({}, I2); + let R2 = null == I2 || v !== b2 && p2 !== b2 ? I2 : __spreadValues({}, I2); return { $: r2, t: b2, v: R2, f: w2, n: null != R2 && v === typeof R2 ? Q(R2).length : 0, c: x2, r: S2, p: false, d: null == t2 ? -1 : t2, k: [], e: true, u: N2, a: O2, b: V2, m: o2 || {}, [Symbol.for("nodejs.util.inspect.custom")]() { const e3 = __spreadValues({}, this); return delete e3.$, JSON.stringify(e3, (e4, t3) => "function" != typeof t3 || Ye[t3.name] ? t3 : t3.name).replace(/"/g, "").replace(/,/g, " "); } }; } function se(e2, t2) { - var n2; + var n3; const r3 = [[{}, "root", e2, t2]]; - for (let l2 = 0; l2 < r3.length; l2++) { - const e3 = r3[l2], t3 = e3[0][e3[1]] = oe(e3[2], e3[3]); - void 0 !== t3.c && ((null === (n2 = t3.c.$) || void 0 === n2 ? void 0 : n2.gubu$) || r3.push([t3, "c", t3.c, t3.d])); + for (let l3 = 0; l3 < r3.length; l3++) { + const e3 = r3[l3], t3 = e3[0][e3[1]] = oe(e3[2], e3[3]); + void 0 !== t3.c && ((null === (n3 = t3.c.$) || void 0 === n3 ? void 0 : n3.gubu$) || r3.push([t3, "c", t3.c, t3.d])); let i2 = typeof t3.v; v === i2 && null != t3.v && Object.entries(t3.v).map((e4) => { - var n3; - (null === (n3 = e4[1].$) || void 0 === n3 ? void 0 : n3.gubu$) || r3.push([t3.v, e4[0], e4[1], t3.d + 1]); + var n4; + (null === (n4 = e4[1].$) || void 0 === n4 ? void 0 : n4.gubu$) || r3.push([t3.v, e4[0], e4[1], t3.d + 1]); }); } return r3[0][0].root; } - function ue(t2, l2) { - const i2 = null == l2 ? {} : l2; + function ue(t2, l3) { + const i2 = null == l3 ? {} : l3; i2.name = null == i2.name ? "G$" + ("" + Math.random()).substring(2, 8) : "" + i2.name; let o2 = i2.meta = i2.meta || {}; o2.active = true === o2.active || false, o2.suffix = d == typeof o2.suffix ? o2.suffix : "$$"; @@ -1147,95 +1132,95 @@ var __async = (__this, __arguments, generator) => { let u2 = i2.valexpr = i2.valexpr || {}; u2.active = true === u2.active, u2.keymark = d == typeof u2.keymark ? u2.keymark : o2.suffix; let c2, h2 = oe(t2, 0), g2 = ""; - function N2(e2, t3, n2) { - var r3, l3, c3; - const g3 = null === (r3 = null == t3 ? void 0 : t3.skip) || void 0 === r3 ? void 0 : r3.depth, N3 = Array.isArray(null === (l3 = null == t3 ? void 0 : t3.skip) || void 0 === l3 ? void 0 : l3.depth) ? t3.skip.depth : null, O3 = Array.isArray(null === (c3 = null == t3 ? void 0 : t3.skip) || void 0 === c3 ? void 0 : c3.keys) ? t3.skip.keys : null, V2 = new ne(e2, h2, t3, n2); + function N2(e2, t3, n3) { + var r3, l4, c3; + const g3 = null === (r3 = null == t3 ? void 0 : t3.skip) || void 0 === r3 ? void 0 : r3.depth, N3 = Array.isArray(null === (l4 = null == t3 ? void 0 : t3.skip) || void 0 === l4 ? void 0 : l4.depth) ? t3.skip.depth : null, O3 = Array.isArray(null === (c3 = null == t3 ? void 0 : t3.skip) || void 0 === c3 ? void 0 : c3.keys) ? t3.skip.keys : null, V2 = new ne(e2, h2, t3, n3); for (; V2.next(), !V2.stop; ) { - let t4 = V2.node, n3 = false, r4 = false, l4 = !!(t4.d === g3 || N3 && N3.includes(t4.d) || O3 && 1 === t4.d && O3.includes(V2.key)) || t4.p; + let t4 = V2.node, n4 = false, r4 = false, l5 = !!(t4.d === g3 || N3 && N3.includes(t4.d) || O3 && 1 === t4.d && O3.includes(V2.key)) || t4.p; if (0 < t4.b.length) for (let e3 = 0; e3 < t4.b.length; e3++) { - let l5 = fe(t4.b[e3], V2); - t4 = V2.node, void 0 !== l5.done && (n3 = l5.done), r4 = r4 || !!l5.fatal; + let l6 = fe(t4.b[e3], V2); + t4 = V2.node, void 0 !== l6.done && (n4 = l6.done), r4 = r4 || !!l6.fatal; } - if (!n3) { - let n4 = true, r5 = void 0 === V2.val; + if (!n4) { + let n5 = true, r5 = void 0 === V2.val; if (a === V2.type) V2.curerr.push(Ue(a, V2, 1070)); else if (v === V2.type) { let e3; - if (void 0 !== t4.c && (t4.c = se(t4.c, 1 + V2.dI)), t4.r && r5 ? (V2.ignoreVal = true, V2.curerr.push(Ue(f, V2, 1010))) : r5 || null !== V2.val && v === V2.valType && !Y(V2.val) ? !l4 && r5 && void 0 !== t4.f ? (V2.updateVal(t4.f), V2.fromDflt = true, e3 = V2.val, n4 = false) : l4 && r5 || (V2.updateVal(V2.val || (V2.fromDflt = true, {})), e3 = V2.val) : (V2.curerr.push(Ue(x, V2, 1020)), e3 = Y(V2.val) ? V2.val : {}), n4 && (e3 = null == e3 && false === V2.ctx.err ? {} : e3, null != e3)) { + if (void 0 !== t4.c && (t4.c = se(t4.c, 1 + V2.dI)), t4.r && r5 ? (V2.ignoreVal = true, V2.curerr.push(Ue(f2, V2, 1010))) : r5 || null !== V2.val && v === V2.valType && !Y(V2.val) ? !l5 && r5 && void 0 !== t4.f ? (V2.updateVal(t4.f), V2.fromDflt = true, e3 = V2.val, n5 = false) : l5 && r5 || (V2.updateVal(V2.val || (V2.fromDflt = true, {})), e3 = V2.val) : (V2.curerr.push(Ue(x, V2, 1020)), e3 = Y(V2.val) ? V2.val : {}), n5 && (e3 = null == e3 && false === V2.ctx.err ? {} : e3, null != e3)) { V2.ctx.log && V2.ctx.log("so", V2); - let n5 = false, r6 = Q(t4.v), l5 = V2.nI; + let n6 = false, r6 = Q(t4.v), l6 = V2.nI; if (0 < r6.length) { - n5 = true, V2.pI = l5; - for (let n6 = 0; n6 < r6.length; n6++) { - let l6, i5 = r6[n6]; + n6 = true, V2.pI = l6; + for (let n7 = 0; n7 < r6.length; n7++) { + let l7, i5 = r6[n7]; if (o2.active && i5.endsWith(o2.suffix)) { - if (l6 = { short: "" }, d === typeof t4.v[i5] ? l6.short = t4.v[i5] : l6 = __spreadValues(__spreadValues({}, l6), t4.v[i5]), delete t4.v[i5], n6++, r6.length <= n6) break; - if (r6[n6] !== i5.substring(0, i5.length - o2.suffix.length)) throw new Error("Invalid meta key: " + i5); - i5 = r6[n6]; + if (l7 = { short: "" }, d === typeof t4.v[i5] ? l7.short = t4.v[i5] : l7 = __spreadValues(__spreadValues({}, l7), t4.v[i5]), delete t4.v[i5], n7++, r6.length <= n7) break; + if (r6[n7] !== i5.substring(0, i5.length - o2.suffix.length)) throw new Error("Invalid meta key: " + i5); + i5 = r6[n7]; } let a2 = i5, c4 = t4.v[i5]; if (s2.active) { let e4 = /^\s*("(\\.|[^"\\])*"|[^\s]+):\s*(.*?)\s*$/.exec(i5); - e4 && (a2 = e4[1], c4 = ae({ src: e4[3], d: 1 + V2.dI, meta: l6 }, c4), delete t4.v[i5]); + e4 && (a2 = e4[1], c4 = ae({ src: e4[3], d: 1 + V2.dI, meta: l7 }, c4), delete t4.v[i5]); } if (u2.active && i5.startsWith(u2.keymark)) { if (i5 === u2.keymark) { - let e4 = ae({ src: c4, d: 1 + V2.dI, meta: l6, ancestors: V2.ancestors, node: t4 }, t4); + let e4 = ae({ src: c4, d: 1 + V2.dI, meta: l7, ancestors: V2.ancestors, node: t4 }, t4); Object.assign(t4, e4); } else t4.m.$$ = t4.m.$$ || {}, t4.m.$$[i5.substring(u2.keymark.length)] = t4.v[i5]; delete t4.v[i5]; continue; } - let f2 = oe(c4, 1 + V2.dI, l6); - t4.v[a2] = f2, t4.k.includes(a2) || t4.k.push(a2), V2.nodes[V2.nI] = f2, V2.vals[V2.nI] = e3[a2], V2.parents[V2.nI] = e3, V2.keys[V2.nI] = a2, V2.nI++; + let f3 = oe(c4, 1 + V2.dI, l7); + t4.v[a2] = f3, t4.k.includes(a2) || t4.k.push(a2), V2.nodes[V2.nI] = f3, V2.vals[V2.nI] = e3[a2], V2.parents[V2.nI] = e3, V2.keys[V2.nI] = a2, V2.nI++; } } let i4 = Q(e3).filter((e4) => void 0 === t4.v[e4]); if (0 < i4.length) if (void 0 === t4.c) V2.ignoreVal = true, V2.curerr.push(Ue(I, V2, 1100, void 0, { k: i4 })); else { - n5 = true, V2.pI = l5; - for (let n6 of i4) { + n6 = true, V2.pI = l6; + for (let n7 of i4) { let r7 = t4.c = oe(t4.c, 1 + V2.dI); - V2.nodes[V2.nI] = r7, V2.vals[V2.nI] = e3[n6], V2.parents[V2.nI] = e3, V2.keys[V2.nI] = n6, V2.nI++; + V2.nodes[V2.nI] = r7, V2.vals[V2.nI] = e3[n7], V2.parents[V2.nI] = e3, V2.keys[V2.nI] = n7, V2.nI++; } } - n5 ? (V2.dI++, V2.nodes[V2.nI] = V2.sI, V2.parents[V2.nI] = e3, V2.nextSibling = false, V2.nI++) : V2.ctx.log && V2.ctx.log("eo", V2); + n6 ? (V2.dI++, V2.nodes[V2.nI] = V2.sI, V2.parents[V2.nI] = e3, V2.nextSibling = false, V2.nI++) : V2.ctx.log && V2.ctx.log("eo", V2); } - } else if (p === V2.type) if (t4.r && r5) V2.ignoreVal = true, V2.curerr.push(Ue(f, V2, 1030)); + } else if (p2 === V2.type) if (t4.r && r5) V2.ignoreVal = true, V2.curerr.push(Ue(f2, V2, 1030)); else if (r5 || Y(V2.val)) { - if (!l4 && r5 && void 0 !== t4.f) V2.updateVal(t4.f), V2.fromDflt = true; - else if (!l4 || null != V2.val) { + if (!l5 && r5 && void 0 !== t4.f) V2.updateVal(t4.f), V2.fromDflt = true; + else if (!l5 || null != V2.val) { V2.updateVal(V2.val || (V2.fromDflt = true, [])); - let n5 = void 0 !== t4.c, r6 = 0 < V2.val.length, l5 = Q(t4.v).filter((e3) => !isNaN(+e3)), i4 = 0 < l5.length; - if (n5 && (t4.c = se(t4.c, 1 + V2.dI)), V2.ctx.log && V2.ctx.log("sa", V2), r6 || i4) { + let n6 = void 0 !== t4.c, r6 = 0 < V2.val.length, l6 = Q(t4.v).filter((e3) => !isNaN(+e3)), i4 = 0 < l6.length; + if (n6 && (t4.c = se(t4.c, 1 + V2.dI)), V2.ctx.log && V2.ctx.log("sa", V2), r6 || i4) { V2.pI = V2.nI; let e3 = 0; - if (i4) if (l5.length < V2.val.length && !n5) V2.ignoreVal = true, V2.curerr.push(Ue(I, V2, 1090, void 0, { k: l5.length })); - else for (; e3 < l5.length; e3++) { - let n6 = t4.v[e3] = oe(t4.v[e3], 1 + V2.dI); - V2.nodes[V2.nI] = n6, V2.vals[V2.nI] = V2.val[e3], V2.parents[V2.nI] = V2.val, V2.keys[V2.nI] = "" + e3, V2.nI++; + if (i4) if (l6.length < V2.val.length && !n6) V2.ignoreVal = true, V2.curerr.push(Ue(I, V2, 1090, void 0, { k: l6.length })); + else for (; e3 < l6.length; e3++) { + let n7 = t4.v[e3] = oe(t4.v[e3], 1 + V2.dI); + V2.nodes[V2.nI] = n7, V2.vals[V2.nI] = V2.val[e3], V2.parents[V2.nI] = V2.val, V2.keys[V2.nI] = "" + e3, V2.nI++; } - if (n5 && r6) { - let n6 = t4.c; - for (; e3 < V2.val.length; e3++) V2.nodes[V2.nI] = n6, V2.vals[V2.nI] = V2.val[e3], V2.parents[V2.nI] = V2.val, V2.keys[V2.nI] = "" + e3, V2.nI++; + if (n6 && r6) { + let n7 = t4.c; + for (; e3 < V2.val.length; e3++) V2.nodes[V2.nI] = n7, V2.vals[V2.nI] = V2.val[e3], V2.parents[V2.nI] = V2.val, V2.keys[V2.nI] = "" + e3, V2.nI++; } V2.ignoreVal || (V2.dI++, V2.nodes[V2.nI] = V2.sI, V2.parents[V2.nI] = V2.val, V2.nextSibling = false, V2.nI++); - } else V2.ctx.log && n5 && null == e2 && V2.ctx.log("kv", __spreadProps(__spreadValues({}, V2), { key: 0, val: t4.c })), V2.ctx.log && V2.ctx.log("ea", V2); + } else V2.ctx.log && n6 && null == e2 && V2.ctx.log("kv", __spreadProps(__spreadValues({}, V2), { key: 0, val: t4.c })), V2.ctx.log && V2.ctx.log("ea", V2); } } else V2.curerr.push(Ue(x, V2, 1040)); else if (j === V2.type) r5 && !t4.r ? V2.ignoreVal = true : d !== V2.valType ? (V2.ignoreVal = true, V2.curerr.push(Ue(x, V2, 1045))) : V2.val.match(t4.v) || (V2.ignoreVal = true, V2.curerr.push(Ue(j, V2, 1045))); - else if (m === V2.type || b === V2.type || S === V2.type || void 0 === V2.val || V2.type === V2.valType || $ === V2.type && t4.u.i && V2.val instanceof t4.u.i || k === V2.type && null === V2.val) if (void 0 === V2.val) { + else if (m2 === V2.type || b === V2.type || S === V2.type || void 0 === V2.val || V2.type === V2.valType || $ === V2.type && t4.u.i && V2.val instanceof t4.u.i || k2 === V2.type && null === V2.val) if (void 0 === V2.val) { let e3 = V2.path[V2.dI]; - l4 || !t4.r || y === V2.type && V2.parent.hasOwnProperty(e3) ? void 0 !== t4.f && !l4 || y === V2.type ? (V2.updateVal(t4.f), V2.fromDflt = true) : m === V2.type && (V2.ignoreVal = void 0 === V2.ignoreVal || V2.ignoreVal) : (V2.ignoreVal = true, V2.curerr.push(Ue(f, V2, 1060))), V2.ctx.log && V2.ctx.log("kv", V2); - } else d !== V2.type || "" !== V2.val || t4.u.empty || V2.curerr.push(Ue(f, V2, 1080)), V2.ctx.log && V2.ctx.log("kv", V2); + l5 || !t4.r || y === V2.type && V2.parent.hasOwnProperty(e3) ? void 0 !== t4.f && !l5 || y === V2.type ? (V2.updateVal(t4.f), V2.fromDflt = true) : m2 === V2.type && (V2.ignoreVal = void 0 === V2.ignoreVal || V2.ignoreVal) : (V2.ignoreVal = true, V2.curerr.push(Ue(f2, V2, 1060))), V2.ctx.log && V2.ctx.log("kv", V2); + } else d !== V2.type || "" !== V2.val || t4.u.empty || V2.curerr.push(Ue(f2, V2, 1080)), V2.ctx.log && V2.ctx.log("kv", V2); else V2.curerr.push(Ue(x, V2, 1050)); } if (0 < t4.a.length) for (let e3 = 0; e3 < t4.a.length; e3++) { - let l5 = fe(t4.a[e3], V2); - t4 = V2.node, void 0 !== l5.done && (n3 = l5.done), r4 = r4 || !!l5.fatal; + let l6 = fe(t4.a[e3], V2); + t4 = V2.node, void 0 !== l6.done && (n4 = l6.done), r4 = r4 || !!l6.fatal; } - let i3 = l4 ? false !== V2.ignoreVal : !!V2.ignoreVal; - !V2.match && null != V2.parent && !n3 && !i3 && (V2.parent[V2.key] = V2.val), V2.nextSibling && (V2.pI = V2.sI), (V2.node.e || r4) && V2.err.push(...V2.curerr); + let i3 = l5 ? false !== V2.ignoreVal : !!V2.ignoreVal; + !V2.match && null != V2.parent && !n4 && !i3 && (V2.parent[V2.key] = V2.val), V2.nextSibling && (V2.pI = V2.sI), (V2.node.e || r4) && V2.err.push(...V2.curerr); } if (0 < V2.err.length) { if (Y(V2.ctx.err)) V2.ctx.err.push(...V2.err); @@ -1247,38 +1232,38 @@ var __async = (__this, __arguments, generator) => { return N2(e2, t3, false); } return O2.valid = function(e2, t3) { - let n2 = t3 || {}; - return n2.err = n2.err || [], N2(e2, n2, false), 0 === n2.err.length; + let n3 = t3 || {}; + return n3.err = n3.err || [], N2(e2, n3, false), 0 === n3.err.length; }, O2.match = (e2, t3) => N2(e2, t3 = t3 || {}, true), O2.error = (e2, t3) => { - let n2 = t3 || {}; - return n2.err = n2.err || [], N2(e2, n2, false), n2.err; + let n3 = t3 || {}; + return n3.err = n3.err || [], N2(e2, n3, false), n3.err; }, O2.spec = () => { O2(void 0, { err: false }); - const e2 = Ze(h2, (e3, t3) => n === t3 || t3, false, true); + const e2 = Ze(h2, (e3, t3) => n2 === t3 || t3, false, true); return ee(e2); }, O2.node = () => (O2.spec(), h2), O2.stringify = (...e2) => { const t3 = O2.jsonify(); return "" === g2 ? g2 = "string" == typeof t3 ? t3.replace(/^"(.*)"$/, "$1") : JSON.stringify(t3, ...e2) : g2; - }, O2.jsonify = () => null == c2 ? c2 = Ke(O2.node()) : c2, O2.toString = () => (g2 = he("" === g2 ? Ze(null == h2 || !h2.$ || n !== h2.$.gubu$ && true !== h2.$.gubu$ ? h2 : h2.v, null, true) : g2), `[Gubu ${i2.name} ${g2}]`), e.inspect && e.inspect.custom && (O2[e.inspect.custom] = O2.toString), O2.gubu = r2, O2.spec(), O2; + }, O2.jsonify = () => null == c2 ? c2 = Ke(O2.node()) : c2, O2.toString = () => (g2 = he("" === g2 ? Ze(null == h2 || !h2.$ || n2 !== h2.$.gubu$ && true !== h2.$.gubu$ ? h2 : h2.v, null, true) : g2), `[Gubu ${i2.name} ${g2}]`), e.inspect && e.inspect.custom && (O2[e.inspect.custom] = O2.toString), O2.gubu = r2, O2.spec(), O2; } function ae(e2, t2) { - var n2, r3; - let l2, i2 = false; + var n3, r3; + let l3, i2 = false; "string" == typeof e2 && (e2 = { src: e2 }), e2.keymark = e2.keymark || "$$"; - const o2 = null === (n2 = null == t2 ? void 0 : t2.$) || void 0 === n2 ? void 0 : n2.gubu$; + const o2 = null === (n3 = null == t2 ? void 0 : t2.$) || void 0 === n3 ? void 0 : n3.gubu$; if (e2.i = e2.i || 0, null == e2.tokens) { - l2 = null != e2.val ? oe(e2.val, (e2.d || 0) + 1, e2.meta) : void 0, i2 = true, e2.tokens = []; - let n3 = /\s*,?\s*([)(\.]|"(\\.|[^"\\])*"|\/(\\.|[^\/\\])*\/[a-z]?|[^)(,.\s]+)\s*/g, r4 = null; - for (; r4 = n3.exec(e2.src); ) e2.tokens.push(r4[1]); + l3 = null != e2.val ? oe(e2.val, (e2.d || 0) + 1, e2.meta) : void 0, i2 = true, e2.tokens = []; + let n4 = /\s*,?\s*([)(\.]|"(\\.|[^"\\])*"|\/(\\.|[^\/\\])*\/[a-z]?|[^)(,.\s]+)\s*/g, r4 = null; + for (; r4 = n4.exec(e2.src); ) e2.tokens.push(r4[1]); if (!o2) { - let n4 = 0, r5 = false; - for (; n4 < e2.tokens.length; n4++) if (")" == e2.tokens[n4]) { + let n5 = 0, r5 = false; + for (; n5 < e2.tokens.length; n5++) if (")" == e2.tokens[n5]) { r5 = true; break; } - if ((r5 || n4 === e2.tokens.length) && void 0 !== t2) { - let l3 = "token_" + e2.d + "_" + e2.i; - e2.refs = e2.refs || {}, e2.refs[l3] = t2, r5 ? e2.tokens.splice(n4, 0, e2.keymark + l3) : e2.tokens.push("(", e2.keymark + l3, ")"); + if ((r5 || n5 === e2.tokens.length) && void 0 !== t2) { + let l4 = "token_" + e2.d + "_" + e2.i; + e2.refs = e2.refs || {}, e2.refs[l4] = t2, r5 ? e2.tokens.splice(n5, 0, e2.keymark + l4) : e2.tokens.push("(", e2.keymark + l4, ")"); } } } @@ -1312,49 +1297,49 @@ var __async = (__this, __arguments, generator) => { } e2.i++; } - return l2 = o2 ? u2.call(t2, ...a2) : u2.call(void 0, ...a2), "." === e2.tokens[e2.i] ? (e2.i++, l2 = ae(e2, l2)) : i2 && e2.i < e2.tokens.length && (l2 = ae(e2, l2)), l2; + return l3 = o2 ? u2.call(t2, ...a2) : u2.call(void 0, ...a2), "." === e2.tokens[e2.i] ? (e2.i++, l3 = ae(e2, l3)) : i2 && e2.i < e2.tokens.length && (l3 = ae(e2, l3)), l3; } - function ce(e2, t2 = {}, n2 = true) { + function ce(e2, t2 = {}, n3 = true) { let r3; - const l2 = Array.isArray(e2) ? "array" : null === e2 ? "null" : typeof e2; - return "string" === l2 ? r3 = ae(e2) : "number" === l2 || "boolean" === l2 ? r3 = e2 : v === l2 ? r3 = Object.entries(e2).reduce((e3, n3) => { + const l3 = Array.isArray(e2) ? "array" : null === e2 ? "null" : typeof e2; + return "string" === l3 ? r3 = ae(e2) : "number" === l3 || "boolean" === l3 ? r3 = e2 : v === l3 ? r3 = Object.entries(e2).reduce((e3, n4) => { var r4; - return e3[n3[0]] = ((null === (r4 = t2.valexpr) || void 0 === r4 ? void 0 : r4.keymark) || "$$") === n3[0] ? n3[1] : ce(n3[1], t2, false), e3; - }, {}) : p === l2 && (r3 = e2.map((e3) => ce(e3, t2, false))), n2 ? (t2.valexpr = t2.valexpr || {}, t2.valexpr.active = true, et(r3, t2)) : r3; + return e3[n4[0]] = ((null === (r4 = t2.valexpr) || void 0 === r4 ? void 0 : r4.keymark) || "$$") === n4[0] ? n4[1] : ce(n4[1], t2, false), e3; + }, {}) : p2 === l3 && (r3 = e2.map((e3) => ce(e3, t2, false))), n3 ? (t2.valexpr = t2.valexpr || {}, t2.valexpr.active = true, et(r3, t2)) : r3; } function fe(e2, t2) { - var n2; - let r3, l2 = {}, i2 = false; + var n3; + let r3, l3 = {}, i2 = false; try { - i2 = !(void 0 !== t2.val || !(null === (n2 = e2.gubu$) || void 0 === n2 ? void 0 : n2.Check)) || (t2.check = e2, e2(t2.val, l2, t2)); + i2 = !(void 0 !== t2.val || !(null === (n3 = e2.gubu$) || void 0 === n3 ? void 0 : n3.Check)) || (t2.check = e2, e2(t2.val, l3, t2)); } catch (s2) { r3 = s2; } - let o2 = Y(l2.err) ? 0 < l2.err.length : null != l2.err; + let o2 = Y(l3.err) ? 0 < l3.err.length : null != l3.err; if (!i2 || o2) { - if (void 0 === t2.val && (t2.node.p || !t2.node.r) && true !== l2.done) return delete l2.err, l2; - let n3 = l2.why || S, i3 = pe(t2); - if (d === typeof l2.err) t2.curerr.push(He(t2, l2.err)); - else if (v === typeof l2.err) t2.curerr.push(...[l2.err].flat().filter((e3) => null != e3).map((e3) => (e3.path = null == e3.path ? i3 : e3.path, e3.mark = null == e3.mark ? 2010 : e3.mark, e3))); + if (void 0 === t2.val && (t2.node.p || !t2.node.r) && true !== l3.done) return delete l3.err, l3; + let n4 = l3.why || S, i3 = pe(t2); + if (d === typeof l3.err) t2.curerr.push(He(t2, l3.err)); + else if (v === typeof l3.err) t2.curerr.push(...[l3.err].flat().filter((e3) => null != e3).map((e3) => (e3.path = null == e3.path ? i3 : e3.path, e3.mark = null == e3.mark ? 2010 : e3.mark, e3))); else { - let l3 = e2.name; - null != l3 && "" != l3 || (l3 = he(e2.toString().replace(/[ \t\r\n]+/g, " "))), t2.curerr.push(Ue(n3, t2, 1045, void 0, { thrown: r3 }, l3)); + let l4 = e2.name; + null != l4 && "" != l4 || (l4 = he(e2.toString().replace(/[ \t\r\n]+/g, " "))), t2.curerr.push(Ue(n4, t2, 1045, void 0, { thrown: r3 }, l4)); } - l2.done = null == l2.done || l2.done; + l3.done = null == l3.done || l3.done; } - return l2.hasOwnProperty("uval") ? (t2.updateVal(l2.uval), t2.ignoreVal = false) : void 0 === l2.val || Number.isNaN(l2.val) || (t2.updateVal(l2.val), t2.ignoreVal = false), void 0 !== l2.node && (t2.node = l2.node), void 0 !== l2.type && (t2.type = l2.type), l2; + return l3.hasOwnProperty("uval") ? (t2.updateVal(l3.uval), t2.ignoreVal = false) : void 0 === l3.val || Number.isNaN(l3.val) || (t2.updateVal(l3.val), t2.ignoreVal = false), void 0 !== l3.node && (t2.node = l3.node), void 0 !== l3.type && (t2.type = l3.type), l3; } function pe(e2) { return e2.path.slice(1, e2.dI + 1).filter((e3) => null != e3).join("."); } function he(e2, t2) { - let n2 = String(e2), r3 = null == t2 || isNaN(t2) ? 30 : t2 < 0 ? 0 : ~~t2, l2 = null == e2 ? 0 : n2.length, i2 = null == e2 ? "" : n2.substring(0, l2); - return i2 = r3 < l2 ? i2.substring(0, r3 - 3) + "..." : i2, i2.substring(0, r3); + let n3 = String(e2), r3 = null == t2 || isNaN(t2) ? 30 : t2 < 0 ? 0 : ~~t2, l3 = null == e2 ? 0 : n3.length, i2 = null == e2 ? "" : n3.substring(0, l3); + return i2 = r3 < l3 ? i2.substring(0, r3 - 3) + "..." : i2, i2.substring(0, r3); } const ve = function(e2) { var t2; - let n2 = qe(this, e2); - return n2.r = true, n2.p = false, void 0 === e2 ? (n2.f = void 0, 1 === arguments.length && (n2.t = y, n2.v = void 0)) : (null === (t2 = null == this ? void 0 : this.$) || void 0 === t2 ? void 0 : t2.gubu$) && (n2.f = void 0), n2; + let n3 = qe(this, e2); + return n3.r = true, n3.p = false, void 0 === e2 ? (n3.f = void 0, 1 === arguments.length && (n3.t = y, n3.v = void 0)) : (null === (t2 = null == this ? void 0 : this.$) || void 0 === t2 ? void 0 : t2.gubu$) && (n3.f = void 0), n3; }, de = function(e2) { let t2 = qe(this, e2); return t2.c = ye(), t2; @@ -1363,30 +1348,30 @@ var __async = (__this, __arguments, generator) => { return t2.r = false, void 0 === e2 && 1 === arguments.length && (t2.t = y, t2.v = void 0), t2; }, ye = function(e2) { let t2 = qe(this, e2); - return t2.t = m, void 0 !== e2 && (t2.v = e2, t2.f = e2), t2; + return t2.t = m2, void 0 !== e2 && (t2.v = e2, t2.f = e2), t2; }, me = function(e2, t2) { - let n2 = qe(this, t2); - return n2.z = e2, n2; + let n3 = qe(this, t2); + return n3.z = e2, n3; }, be = function(e2) { let t2 = qe(this, e2); return t2.r = false, t2.p = true, t2; }, $e = function(e2) { let t2 = qe(this, e2); - return t2.r = false, t2.p = true, t2.e = false, t2.a.push(function(e3, t3, n2) { - return 0 < n2.curerr.length && (t3.uval = void 0, t3.done = false), true; + return t2.r = false, t2.p = true, t2.e = false, t2.a.push(function(e3, t3, n3) { + return 0 < n3.curerr.length && (t3.uval = void 0, t3.done = false), true; }), t2; }, ke = function(e2) { let t2 = qe(this); return t2.t = h, t2.v = e2, t2.f = e2, t2; }, xe = function(e2, t2) { - let n2 = qe(this, e2); - if (void 0 !== t2 && (n2 = qe(n2, t2)), n2.r = false, n2.f = e2, void 0 === t2) { - h === typeof e2 && le[e2.name] && (n2.t = e2.name.toLowerCase(), n2.f = Qe(ie[n2.t])); + let n3 = qe(this, e2); + if (void 0 !== t2 && (n3 = qe(n3, t2)), n3.r = false, n3.f = e2, void 0 === t2) { + h === typeof e2 && le[e2.name] && (n3.t = e2.name.toLowerCase(), n3.f = Qe(ie[n3.t])); } else { const e3 = oe(t2); - n2.t = e3.t; + n3.t = e3.t; } - return n2.p = false, n2; + return n3.p = false, n3; }, Ie = function(e2) { let t2 = qe(this, e2); return t2.u.empty = true, t2; @@ -1394,259 +1379,259 @@ var __async = (__this, __arguments, generator) => { let t2 = qe(this, e2); return t2.t = a, t2; }, Se = function(e2, t2) { - let n2 = qe(this), r3 = c === typeof e2; - n2.t = d, r3 && null == t2 && (n2 = oe([])); - let l2 = null; - return h === typeof e2 && (l2 = e2, n2 = ye()), n2.b.push(function(n3, i2, o2) { - if (l2) i2.val = l2(o2.path, o2); + let n3 = qe(this), r3 = c === typeof e2; + n3.t = d, r3 && null == t2 && (n3 = oe([])); + let l3 = null; + return h === typeof e2 && (l3 = e2, n3 = ye()), n3.b.push(function(n4, i2, o2) { + if (l3) i2.val = l3(o2.path, o2); else if (r3) { - let n4 = e2; - i2.val = o2.path.slice(o2.path.length - 1 - (0 <= n4 ? n4 : 0), o2.path.length - 1 + (0 <= n4 ? 0 : 1)), d === typeof t2 && (i2.val = i2.val.join(t2)); + let n5 = e2; + i2.val = o2.path.slice(o2.path.length - 1 - (0 <= n5 ? n5 : 0), o2.path.length - 1 + (0 <= n5 ? 0 : 1)), d === typeof t2 && (i2.val = i2.val.join(t2)); } else null == e2 && (i2.val = o2.path[o2.path.length - 2]); return true; - }), n2; + }), n3; }, je = function(...e2) { const t2 = qe(this); t2.t = b, t2.r = true; - const n2 = e2.map((e3) => et(e3)); - t2.u.list = n2.map((e3) => e3.node()); - const r3 = function(t3, r4, l2) { + const n3 = e2.map((e3) => et(e3)); + t2.u.list = n3.map((e3) => e3.node()); + const r3 = function(t3, r4, l3) { let i2 = true; - for (let e3 of n2) { - let n3 = __spreadProps(__spreadValues({}, l2.ctx), { err: [] }); - e3(t3, n3), 0 < n3.err.length && (i2 = false); + for (let e3 of n3) { + let n4 = __spreadProps(__spreadValues({}, l3.ctx), { err: [] }); + e3(t3, n4), 0 < n4.err.length && (i2 = false); } - return i2 || (r4.why = G, r4.err = [He(l2, E + " " + K + H + U + " does not satisfy all of: " + e2.map((e3) => Ze(e3, null, true)).join(", "))]), i2; + return i2 || (r4.why = G, r4.err = [He(l3, E + " " + K + H + U + " does not satisfy all of: " + e2.map((e3) => Ze(e3, null, true)).join(", "))]), i2; }; return r3.n = G, r3.a = e2, t2.b.push(r3), t2; }, Ne = function(...e2) { let t2 = qe(this); t2.t = b, t2.r = true; - let n2 = e2.map((e3) => et(e3)); - t2.u.list = n2.map((e3) => e3.node()); - const r3 = function(t3, r4, l2) { + let n3 = e2.map((e3) => et(e3)); + t2.u.list = n3.map((e3) => e3.node()); + const r3 = function(t3, r4, l3) { let i2 = false; - for (let e3 of n2) { - let n3 = __spreadProps(__spreadValues({}, l2.ctx), { err: [] }), o2 = e3.match(t3, n3); - o2 && (r4.val = e3(t3, n3)), i2 || (i2 = o2); + for (let e3 of n3) { + let n4 = __spreadProps(__spreadValues({}, l3.ctx), { err: [] }), o2 = e3.match(t3, n4); + o2 && (r4.val = e3(t3, n4)), i2 || (i2 = o2); } - return i2 || (r4.why = q, r4.err = [He(l2, E + " " + K + H + U + " does not satisfy any of: " + e2.map((e3) => Ze(e3, null, true)).join(", "))]), i2; + return i2 || (r4.why = q2, r4.err = [He(l3, E + " " + K + H + U + " does not satisfy any of: " + e2.map((e3) => Ze(e3, null, true)).join(", "))]), i2; }; - return r3.n = q, r3.a = e2, t2.b.push(r3), t2; + return r3.n = q2, r3.a = e2, t2.b.push(r3), t2; }, Oe = function(...e2) { let t2 = qe(this); t2.t = b, t2.r = true; - let n2 = e2.map((e3) => et(e3)); - t2.u.list = n2.map((e3) => e3.node()); - const r3 = function(t3, r4, l2) { + let n3 = e2.map((e3) => et(e3)); + t2.u.list = n3.map((e3) => e3.node()); + const r3 = function(t3, r4, l3) { let i2 = 0; - for (let e3 of n2) { - let n3 = __spreadProps(__spreadValues({}, l2.ctx), { err: [] }); - if (e3.match(t3, n3)) { - i2++, r4.val = e3(t3, n3); + for (let e3 of n3) { + let n4 = __spreadProps(__spreadValues({}, l3.ctx), { err: [] }); + if (e3.match(t3, n4)) { + i2++, r4.val = e3(t3, n4); break; } } - return 1 !== i2 && (r4.why = z, r4.err = [He(l2, E + " " + K + H + U + " does not satisfy one of: " + e2.map((e3) => Ze(e3, null, true)).join(", "))]), true; + return 1 !== i2 && (r4.why = z, r4.err = [He(l3, E + " " + K + H + U + " does not satisfy one of: " + e2.map((e3) => Ze(e3, null, true)).join(", "))]), true; }; return r3.n = z, r3.a = e2, t2.b.push(r3), t2; }, Ve = function(...e2) { - const t2 = qe(this), n2 = function(t3, n3, r3) { - for (let l2 = 0; l2 < e2.length; l2++) if (t3 === e2[l2]) return true; + const t2 = qe(this), n3 = function(t3, n4, r3) { + for (let l3 = 0; l3 < e2.length; l3++) if (t3 === e2[l3]) return true; if (r3.node.hasOwnProperty("f") && void 0 === t3) { const t4 = r3.node.f; - for (let n4 = 0; n4 < e2.length; n4++) if (t4 === e2[n4]) return true; + for (let n5 = 0; n5 < e2.length; n5++) if (t4 === e2[n5]) return true; } - return n3.err = He(r3, E + " " + K + H + U + " must be exactly one of: " + e2.map((e3) => Ze(e3, null, true)).join(", ")), n3.done = true, false; + return n4.err = He(r3, E + " " + K + H + U + " must be exactly one of: " + e2.map((e3) => Ze(e3, null, true)).join(", ")), n4.done = true, false; }; - return n2.n = M, n2.a = e2, n2.s = () => M + "(" + e2.map((e3) => Ze(e3, null, true)).join(",") + ")", t2.b.push(n2), t2; + return n3.n = M, n3.a = e2, n3.s = () => M + "(" + e2.map((e3) => Ze(e3, null, true)).join(",") + ")", t2.b.push(n3), t2; }, Ae = function(e2, t2) { - let n2 = qe(this, t2); - return n2.b.push(e2), n2; + let n3 = qe(this, t2); + return n3.b.push(e2), n3; }, Re = function(e2, t2) { - let n2 = qe(this, t2); - return n2.a.push(e2), n2; + let n3 = qe(this, t2); + return n3.a.push(e2), n3; }, De = function(e2, t2) { - let n2 = qe(this, t2); - if (n2.r = true, h === typeof e2) { + let n3 = qe(this, t2); + if (n3.r = true, h === typeof e2) { let t3 = e2; - t3.gubu$ = t3.gubu$ || {}, t3.gubu$.Check = true, t3.s = () => J + "(" + Ze(e2, null, true) + ")", n2.b.push(e2), n2.t = S; + t3.gubu$ = t3.gubu$ || {}, t3.gubu$.Check = true, t3.s = () => J + "(" + Ze(e2, null, true) + ")", n3.b.push(e2), n3.t = S; } else if (v === typeof e2) { if (Object.prototype.toString.call(e2).includes("RegExp")) { let t3 = (t4) => null != t4 && !Number.isNaN(t4) && !!String(t4).match(e2); - X(t3, s, { value: String(e2) }), X(t3, "gubu$", { value: { Check: true } }), t3.s = () => J + "(" + Ze(e2, null, true) + ")", n2.b.push(t3), n2.t = S; + X(t3, s, { value: String(e2) }), X(t3, "gubu$", { value: { Check: true } }), t3.s = () => J + "(" + Ze(e2, null, true) + ")", n3.b.push(t3), n3.t = S; } - } else d === typeof e2 && (n2.t = e2); + } else d === typeof e2 && (n3.t = e2); if (void 0 !== t2) { const e3 = oe(t2); - n2.t = e3.t; + n3.t = e3.t; } - return n2; + return n3; }, Ee = function(e2) { let t2 = qe(this, e2); - return p === t2.t && void 0 !== t2.c && 0 === t2.n && (t2.v = [t2.c]), t2.c = void 0, t2; + return p2 === t2.t && void 0 !== t2.c && 0 === t2.n && (t2.v = [t2.c]), t2.c = void 0, t2; }, Ce = function(e2, t2) { - let n2 = qe(this, t2), r3 = d === typeof e2 ? e2 : (v === typeof e2 && e2 || {}).name; - return null != r3 && "" != r3 && n2.b.push(function(e3, t3, n3) { - return (n3.ctx.ref = n3.ctx.ref || {})[r3] = n3.node, true; - }), n2; + let n3 = qe(this, t2), r3 = d === typeof e2 ? e2 : (v === typeof e2 && e2 || {}).name; + return null != r3 && "" != r3 && n3.b.push(function(e3, t3, n4) { + return (n4.ctx.ref = n4.ctx.ref || {})[r3] = n4.node, true; + }), n3; }, Ge = function(e2, t2) { - let n2 = qe(this, t2), r3 = v === typeof e2 && e2 || {}, l2 = d === typeof e2 ? e2 : r3.name, i2 = !!r3.fill; - return null != l2 && "" != l2 && n2.b.push(function(e3, t3, n3) { + let n3 = qe(this, t2), r3 = v === typeof e2 && e2 || {}, l3 = d === typeof e2 ? e2 : r3.name, i2 = !!r3.fill; + return null != l3 && "" != l3 && n3.b.push(function(e3, t3, n4) { if (void 0 !== e3 || i2) { - let e4 = n3.ctx.ref = n3.ctx.ref || {}; - if (void 0 !== e4[l2]) { - let n4 = __spreadValues({}, e4[l2]); - n4.t = n4.t || a, t3.node = n4, t3.type = n4.t; + let e4 = n4.ctx.ref = n4.ctx.ref || {}; + if (void 0 !== e4[l3]) { + let n5 = __spreadValues({}, e4[l3]); + n5.t = n5.t || a, t3.node = n5, t3.type = n5.t; } } return true; - }), n2; + }), n3; }, Te = function(e2, t2) { - let n2 = qe(this, t2), r3 = v === typeof e2 && e2 || {}, l2 = d === typeof e2 ? e2 : r3.name, i2 = g === typeof r3.keep ? r3.keep : void 0, o2 = Y(r3.claim) ? r3.claim : []; - if (null != l2 && "" != l2) { - let e3 = (e4, t4, n3) => { + let n3 = qe(this, t2), r3 = v === typeof e2 && e2 || {}, l3 = d === typeof e2 ? e2 : r3.name, i2 = g === typeof r3.keep ? r3.keep : void 0, o2 = Y(r3.claim) ? r3.claim : []; + if (null != l3 && "" != l3) { + let e3 = (e4, t4, n4) => { if (void 0 === e4 && 0 < o2.length) { - n3.ctx.Rename = n3.ctx.Rename || {}, n3.ctx.Rename.fromDflt = n3.ctx.Rename.fromDflt || {}; + n4.ctx.Rename = n4.ctx.Rename || {}, n4.ctx.Rename.fromDflt = n4.ctx.Rename.fromDflt || {}; for (let e5 of o2) { - let r4 = n3.ctx.Rename.fromDflt[e5] || {}; - if (void 0 !== n3.parent[e5] && !r4.yes) { - t4.val = n3.parent[e5], n3.match || (n3.parent[l2] = t4.val), t4.node = r4.node; - for (let e6 = 0; e6 < n3.err.length; e6++) n3.err[e6].k === r4.key && (n3.err.splice(e6, 1), e6--); + let r4 = n4.ctx.Rename.fromDflt[e5] || {}; + if (void 0 !== n4.parent[e5] && !r4.yes) { + t4.val = n4.parent[e5], n4.match || (n4.parent[l3] = t4.val), t4.node = r4.node; + for (let e6 = 0; e6 < n4.err.length; e6++) n4.err[e6].k === r4.key && (n4.err.splice(e6, 1), e6--); if (i2) { - let t5 = n3.cI + 1; - n3.nodes.splice(t5, 0, oe(r4.dval)), n3.vals.splice(t5, 0, void 0), n3.parents.splice(t5, 0, n3.parent), n3.keys.splice(t5, 0, e5), n3.nI++, n3.pI++; - } else delete n3.parent[e5]; + let t5 = n4.cI + 1; + n4.nodes.splice(t5, 0, oe(r4.dval)), n4.vals.splice(t5, 0, void 0), n4.parents.splice(t5, 0, n4.parent), n4.keys.splice(t5, 0, e5), n4.nI++, n4.pI++; + } else delete n4.parent[e5]; break; } } - void 0 === t4.val && (t4.val = n3.node.v); + void 0 === t4.val && (t4.val = n4.node.v); } return true; }; - X(e3, s, { value: "Rename:" + l2 }), n2.b.push(e3); - let t3 = (e4, t4, n3) => (n3.parent[l2] = e4, n3.match || i2 || n3.key === l2 || Y(n3.parent) && false !== i2 || (delete n3.parent[n3.key], t4.done = true), n3.ctx.Rename = n3.ctx.Rename || {}, n3.ctx.Rename.fromDflt = n3.ctx.Rename.fromDflt || {}, n3.ctx.Rename.fromDflt[l2] = { yes: n3.fromDflt, key: n3.key, dval: n3.node.v, node: n3.node }, true); - X(t3, s, { value: "Rename:" + l2 }), n2.a.push(t3); + X(e3, s, { value: "Rename:" + l3 }), n3.b.push(e3); + let t3 = (e4, t4, n4) => (n4.parent[l3] = e4, n4.match || i2 || n4.key === l3 || Y(n4.parent) && false !== i2 || (delete n4.parent[n4.key], t4.done = true), n4.ctx.Rename = n4.ctx.Rename || {}, n4.ctx.Rename.fromDflt = n4.ctx.Rename.fromDflt || {}, n4.ctx.Rename.fromDflt[l3] = { yes: n4.fromDflt, key: n4.key, dval: n4.node.v, node: n4.node }, true); + X(t3, s, { value: "Rename:" + l3 }), n3.a.push(t3); } - return n2; + return n3; }, Be = function(e2, t2) { - let n2 = qe(this, t2); - return n2.c = oe(e2), void 0 === n2.v && (n2.t = "object", n2.v = {}, n2.f = {}), n2; + let n3 = qe(this, t2); + return n3.c = oe(e2), void 0 === n3.v && (n3.t = "object", n3.v = {}, n3.f = {}), n3; }, Je = function(e2, t2) { - let n2 = qe(this, t2 || []); - return n2.t = "array", n2.c = oe(e2), n2.m = n2.m || {}, n2.m.rest = true, n2; + let n3 = qe(this, t2 || []); + return n3.t = "array", n3.c = oe(e2), n3.m = n3.m || {}, n3.m.rest = true, n3; }, We = function(e2, t2) { - let n2 = oe(Z[e2]), r3 = qe(this, t2); - return r3 !== n2 && (r3.t = n2.t, r3.r = n2.r, r3.p = n2.p, r3.v = n2.v), r3; + let n3 = oe(Z[e2]), r3 = qe(this, t2); + return r3 !== n3 && (r3.t = n3.t, r3.r = n3.r, r3.p = n3.p, r3.v = n3.v), r3; }; - function Me(e2, t2, n2, r3, l2) { - let i2 = qe(e2, n2); + function Me(e2, t2, n3, r3, l3) { + let i2 = qe(e2, n3); t2 = +t2; - let o2 = function(e3, n3, r4) { - return l2(function(e4) { + let o2 = function(e3, n4, r4) { + return l3(function(e4) { return c === typeof e4 ? e4 : c === typeof (null == e4 ? void 0 : e4.length) ? e4.length : null != e4 && v === typeof e4 ? Q(e4).length : NaN; - }(e3), t2, e3, n3, r4); + }(e3), t2, e3, n4, r4); }; return Object.defineProperty(o2, s, { value: r3 }), o2.n = r3, o2.a = [t2], o2.s = () => r3 + "(" + t2 + ")", o2[Symbol.for("nodejs.util.inspect.custom")] = o2.s(), o2.toJSON = () => o2.s(), i2.b.push(o2), i2; } const Fe = function(e2, t2) { - return Me(this, e2, t2, P, (e3, t3, n2, r3, l2) => { + return Me(this, e2, t2, P, (e3, t3, n3, r3, l3) => { if (t3 <= e3) return true; - l2.checkargs = { min: 1 }; - let i2 = c === typeof n2 ? "" : "length "; - return r3.err = He(l2, E + " " + K + H + U + ` must be a minimum ${i2}of ${t3} (was ${e3}).`), false; + l3.checkargs = { min: 1 }; + let i2 = c === typeof n3 ? "" : "length "; + return r3.err = He(l3, E + " " + K + H + U + ` must be a minimum ${i2}of ${t3} (was ${e3}).`), false; }); }, Pe = function(e2, t2) { - return Me(this, e2, t2, F, (e3, t3, n2, r3, l2) => { + return Me(this, e2, t2, F, (e3, t3, n3, r3, l3) => { if (e3 <= t3) return true; - let i2 = c === typeof n2 ? "" : "length "; - return r3.err = He(l2, E + " " + K + H + U + ` must be a maximum ${i2}of ${t3} (was ${e3}).`), false; + let i2 = c === typeof n3 ? "" : "length "; + return r3.err = He(l3, E + " " + K + H + U + ` must be a maximum ${i2}of ${t3} (was ${e3}).`), false; }); }, ze = function(e2, t2) { - return Me(this, e2, t2, C, (e3, t3, n2, r3, l2) => { + return Me(this, e2, t2, C, (e3, t3, n3, r3, l3) => { if (t3 < e3) return true; - let i2 = c === typeof n2 ? "be" : "have length"; - return r3.err = He(l2, E + " " + K + H + U + ` must ${i2} above ${t3} (was ${e3}).`), false; + let i2 = c === typeof n3 ? "be" : "have length"; + return r3.err = He(l3, E + " " + K + H + U + ` must ${i2} above ${t3} (was ${e3}).`), false; }); }, Le = function(e2, t2) { - return Me(this, e2, t2, B, (e3, t3, n2, r3, l2) => { + return Me(this, e2, t2, B, (e3, t3, n3, r3, l3) => { if (e3 < t3) return true; - let i2 = c === typeof n2 ? "be" : "have length"; - return r3.err = He(l2, E + " " + K + H + U + ` must ${i2} below ${t3} (was ${e3}).`), false; + let i2 = c === typeof n3 ? "be" : "have length"; + return r3.err = He(l3, E + " " + K + H + U + ` must ${i2} below ${t3} (was ${e3}).`), false; }); }, _e = function(e2, t2) { - return Me(this, e2, t2, B, (e3, t3, n2, r3, l2) => { + return Me(this, e2, t2, B, (e3, t3, n3, r3, l3) => { if (t3 === e3) return true; - let i2 = c === typeof n2 ? "" : " in length"; - return r3.err = He(l2, E + " " + K + H + U + ` must be exactly ${t3}${i2} (was ${e3}).`), false; + let i2 = c === typeof n3 ? "" : " in length"; + return r3.err = He(l3, E + " " + K + H + U + ` must be exactly ${t3}${i2} (was ${e3}).`), false; }); }; function qe(e2, t2) { - let n2, r3 = null != e2 && (e2.window === e2 || e2.global === e2); - if (void 0 !== e2 && !r3 || void 0 === t2) if (void 0 === e2 || r3) n2 = oe(void 0); + let n3, r3 = null != e2 && (e2.window === e2 || e2.global === e2); + if (void 0 !== e2 && !r3 || void 0 === t2) if (void 0 === e2 || r3) n3 = oe(void 0); else if (void 0 !== t2) { - n2 = oe(t2); + n3 = oe(t2); let r4 = oe(e2); - void 0 === n2.v && "list" !== n2.t && (n2.v = r4.v, n2.t = r4.t), ["f", "r", "p", "c", "e", "z"].map((e3) => n2[e3] = void 0 !== r4[e3] ? r4[e3] : n2[e3]), n2.u = Object.assign(__spreadValues({}, r4.u), n2.u), n2.m = Object.assign(__spreadValues({}, r4.m), n2.m), n2.a = r4.a.concat(n2.a), n2.b = r4.b.concat(n2.b); - } else n2 = oe(e2); - else n2 = oe(t2); - return n2.Above ? n2 : Object.assign(n2, { Above: ze, After: Re, Any: ye, Before: Ae, Below: Le, Check: De, Child: Be, Closed: Ee, Default: xe, Define: Ce, Empty: Ie, Exact: Ve, Fault: me, Ignore: $e, Len: _e, Max: Pe, Min: Fe, Never: we, Open: de, Refer: Ge, Rename: Te, Required: ve, Rest: Je, Skip: be, Type: We }); + void 0 === n3.v && "list" !== n3.t && (n3.v = r4.v, n3.t = r4.t), ["f", "r", "p", "c", "e", "z"].map((e3) => n3[e3] = void 0 !== r4[e3] ? r4[e3] : n3[e3]), n3.u = Object.assign(__spreadValues({}, r4.u), n3.u), n3.m = Object.assign(__spreadValues({}, r4.m), n3.m), n3.a = r4.a.concat(n3.a), n3.b = r4.b.concat(n3.b); + } else n3 = oe(e2); + else n3 = oe(t2); + return n3.Above ? n3 : Object.assign(n3, { Above: ze, After: Re, Any: ye, Before: Ae, Below: Le, Check: De, Child: Be, Closed: Ee, Default: xe, Define: Ce, Empty: Ie, Exact: Ve, Fault: me, Ignore: $e, Len: _e, Max: Pe, Min: Fe, Never: we, Open: de, Refer: Ge, Rename: Te, Required: ve, Rest: Je, Skip: be, Type: We }); } - function He(e2, t2, n2, r3) { - return Ue(n2 || S, e2, 4e3, t2, r3); + function He(e2, t2, n3, r3) { + return Ue(n3 || S, e2, 4e3, t2, r3); } - function Ue(e2, t2, n2, r3, l2, i2) { + function Ue(e2, t2, n3, r3, l3, i2) { var o2; - let s2 = { key: t2.key, type: t2.node.t, node: t2.node, value: t2.val, path: pe(t2), why: e2, check: (null === (o2 = t2.check) || void 0 === o2 ? void 0 : o2.name) || "none", args: t2.checkargs || {}, mark: n2, text: "", use: l2 || {} }, u2 = he((void 0 === t2.val ? y : Ze(t2.val)).replace(/"/g, "")); + let s2 = { key: t2.key, type: t2.node.t, node: t2.node, value: t2.val, path: pe(t2), why: e2, check: (null === (o2 = t2.check) || void 0 === o2 ? void 0 : o2.name) || "none", args: t2.checkargs || {}, mark: n3, text: "", use: l3 || {} }, u2 = he((void 0 === t2.val ? y : Ze(t2.val)).replace(/"/g, "")); if (null == (r3 = r3 || t2.node.z) || "" === r3) { - let n3 = u2.startsWith("[") ? p : u2.startsWith("{") ? v : null == t2.val || c === typeof t2.val && isNaN(t2.val) ? "value" : typeof t2.val, r4 = u2.startsWith("[") || Y(t2.parents[t2.pI]) ? "index" : "property", o3 = "is", h2 = null == l2 ? void 0 : l2.k; - h2 = Y(h2) ? (r4 = 1 < h2.length ? (o3 = "are", "properties") : r4, h2.join(", ")) : h2, s2.text = "Validation failed for " + (0 < s2.path.length ? `${r4} "${s2.path}" with ` : "") + `${n3} "${u2}" because ` + (x === e2 ? $ === t2.node.t ? `the ${n3} is not an instance of ${t2.node.u.n}` : `the ${n3} is not of type ${j === t2.node.t ? d : t2.node.t}` : f === e2 ? "" === t2.val ? "an empty string is not allowed" : `the ${n3} is required` : "closed" === e2 ? `the ${r4} "${h2}" ${o3} not allowed` : j === e2 ? "the string did not match " + t2.node.v : a === e2 ? "no value is allowed" : `check "${null == i2 ? e2 : i2}" failed`) + (s2.use.thrown ? " (threw: " + s2.use.thrown.message + ")" : "."); + let n4 = u2.startsWith("[") ? p2 : u2.startsWith("{") ? v : null == t2.val || c === typeof t2.val && isNaN(t2.val) ? "value" : typeof t2.val, r4 = u2.startsWith("[") || Y(t2.parents[t2.pI]) ? "index" : "property", o3 = "is", h2 = null == l3 ? void 0 : l3.k; + h2 = Y(h2) ? (r4 = 1 < h2.length ? (o3 = "are", "properties") : r4, h2.join(", ")) : h2, s2.text = "Validation failed for " + (0 < s2.path.length ? `${r4} "${s2.path}" with ` : "") + `${n4} "${u2}" because ` + (x === e2 ? $ === t2.node.t ? `the ${n4} is not an instance of ${t2.node.u.n}` : `the ${n4} is not of type ${j === t2.node.t ? d : t2.node.t}` : f2 === e2 ? "" === t2.val ? "an empty string is not allowed" : `the ${n4} is required` : "closed" === e2 ? `the ${r4} "${h2}" ${o3} not allowed` : j === e2 ? "the string did not match " + t2.node.v : a === e2 ? "no value is allowed" : `check "${null == i2 ? e2 : i2}" failed`) + (s2.use.thrown ? " (threw: " + s2.use.thrown.message + ")" : "."); } else s2.text = r3.replace(/\$VALUE/g, u2).replace(/\$PATH/g, s2.path); return s2; } function Ke(e2) { var t2; - let n2 = e2.t; + let n3 = e2.t; const r3 = { number: O, string: N, boolean: V }; - if (r3[n2]) { + if (r3[n3]) { let t3 = ""; - return e2.r && (t3 += r3[n2]), "" === t3 && (t3 = JSON.stringify(e2.v)), t3 += e2.b.map((t4) => t4.s ? "." + t4.s(e2) : "").join(""), t3; + return e2.r && (t3 += r3[n3]), "" === t3 && (t3 = JSON.stringify(e2.v)), t3 += e2.b.map((t4) => t4.s ? "." + t4.s(e2) : "").join(""), t3; } - if (m === n2) { - let n3 = ""; - return e2.r && (n3 += _2), m == (null === (t2 = e2.c) || void 0 === t2 ? void 0 : t2.t) && (n3 += ("" === n3 ? "" : ".") + L), n3 += e2.b.map((t3) => t3.s ? "." + t3.s(e2) : "").join(""), n3.startsWith(".") && (n3 = n3.slice(1)), "" === n3 && (n3 = T), n3; + if (m2 === n3) { + let n4 = ""; + return e2.r && (n4 += _2), m2 == (null === (t2 = e2.c) || void 0 === t2 ? void 0 : t2.t) && (n4 += ("" === n4 ? "" : ".") + L), n4 += e2.b.map((t3) => t3.s ? "." + t3.s(e2) : "").join(""), n4.startsWith(".") && (n4 = n4.slice(1)), "" === n4 && (n4 = T), n4; } - if (S === n2) { + if (S === n3) { let t3 = ""; return t3 += e2.b.map((t4) => t4.s ? "." + t4.s(e2) : "").join(""), t3.startsWith(".") && (t3 = t3.slice(1)), t3; } - if (v === n2) { + if (v === n3) { let t3 = {}; - for (let n3 in e2.v) t3[n3] = Ke(e2.v[n3]); + for (let n4 in e2.v) t3[n4] = Ke(e2.v[n4]); return void 0 !== e2.c && (r3[e2.c.t] ? t3.$$ = W + "(" + r3[e2.c.t] + ")" : "any" === e2.c.t ? t3.$$ = L : (t3.$$ = W + "($$child)", t3.$$child = Ke(e2.c))), 0 < e2.b.length && (void 0 === t3.$$ && (t3.$$ = ""), t3.$$ += e2.b.map((t4) => t4.s ? "." + t4.s(e2) : "").join(""), t3.$$.startsWith(".") && (t3.$$ = t3.$$.slice(1))), t3.$$ && 1 === Object.keys(t3).length && t3.$$.startsWith(W) ? t3.$$ : t3; } - if (b === n2) { - let t3 = {}, n3 = 0, r4 = e2.u.list.map((e3) => Ke(e3)).map((e3, r5) => v === typeof e3 ? (t3[r5 = "$$ref" + n3++] = e3, r5) : e3), l2 = (e2.b[0].n || e2.b[0].name) + "(" + r4.join(",") + ")"; - return 0 === n3 ? l2 : __spreadValues({ $$: l2 }, t3); + if (b === n3) { + let t3 = {}, n4 = 0, r4 = e2.u.list.map((e3) => Ke(e3)).map((e3, r5) => v === typeof e3 ? (t3[r5 = "$$ref" + n4++] = e3, r5) : e3), l3 = (e2.b[0].n || e2.b[0].name) + "(" + r4.join(",") + ")"; + return 0 === n4 ? l3 : __spreadValues({ $$: l3 }, t3); } - if (p === n2) { + if (p2 === n3) { let t3 = []; - return void 0 !== e2.c ? t3[0] = Ke(e2.c) : t3 = Object.keys(e2.v).reduce((t4, n3) => (t4[+n3] = e2.v[n3], t4), []).map((e3) => Ke(e3)), t3; + return void 0 !== e2.c ? t3[0] = Ke(e2.c) : t3 = Object.keys(e2.v).reduce((t4, n4) => (t4[+n4] = e2.v[n4], t4), []).map((e3) => Ke(e3)), t3; } - if (j === n2) return e2.v.toString(); + if (j === n3) return e2.v.toString(); } - function Ze(e2, t2, r3, l2) { + function Ze(e2, t2, r3, l3) { let o2; - if (!l2 && e2 && e2.$ && (n === e2.$.gubu$ || true === e2.$.gubu$)) return e2 = JSON.stringify(Ke(e2)), r3 && (e2 = "string" == typeof e2 ? e2.replace(/\\/g, "").replace(/"/g, "") : ""), e2; + if (!l3 && e2 && e2.$ && (n2 === e2.$.gubu$ || true === e2.$.gubu$)) return e2 = JSON.stringify(Ke(e2)), r3 && (e2 = "string" == typeof e2 ? e2.replace(/\\/g, "").replace(/"/g, "") : ""), e2; try { o2 = te(e2, (e3, o3) => { var s2, u2, a2; if (t2 && (o3 = t2(e3, o3)), null != o3 && v === typeof o3 && o3.constructor && A !== o3.constructor.name && R !== o3.constructor.name) o3 = "[object RegExp]" === i.call(o3) || h === typeof o3.toString ? o3.toString() : o3.constructor.name; - else if (l2 || n !== (null === (s2 = null == o3 ? void 0 : o3.$) || void 0 === s2 ? void 0 : s2.gubu$)) if (h === typeof o3) o3 = h === typeof ue[o3.name] && isNaN(+e3) ? void 0 : null != o3.name && "" !== o3.name ? o3.name : he(o3.toString().replace(/[ \t\r\n]+/g, " ")); + else if (l3 || n2 !== (null === (s2 = null == o3 ? void 0 : o3.$) || void 0 === s2 ? void 0 : s2.gubu$)) if (h === typeof o3) o3 = h === typeof ue[o3.name] && isNaN(+e3) ? void 0 : null != o3.name && "" !== o3.name ? o3.name : he(o3.toString().replace(/[ \t\r\n]+/g, " ")); else if ("bigint" == typeof o3) o3 = String(o3.toString()); else { if (Number.isNaN(o3)) return "NaN"; - true === l2 || true !== (null === (u2 = null == o3 ? void 0 : o3.$) || void 0 === u2 ? void 0 : u2.gubu$) && n !== (null === (a2 = null == o3 ? void 0 : o3.$) || void 0 === a2 ? void 0 : a2.gubu$) || (o3 = JSON.stringify(Ke(o3))); + true === l3 || true !== (null === (u2 = null == o3 ? void 0 : o3.$) || void 0 === u2 ? void 0 : u2.gubu$) && n2 !== (null === (a2 = null == o3 ? void 0 : o3.$) || void 0 === a2 ? void 0 : a2.gubu$) || (o3 = JSON.stringify(Ke(o3))); } else "number" === o3.t || "string" === o3.t || "boolean" === o3.t ? o3 = o3.v : (o3 = Ke(o3), o3 = JSON.stringify(o3), r3 && (o3 = "string" == typeof o3 ? o3.replace(/\\/g, "").replace(/"/g, "") : "")); return o3; @@ -1665,34 +1650,34 @@ var __async = (__this, __arguments, generator) => { const et = ue; t.Gubu = et; function tt(e2) { - return function(t2, n2, r3) { - let l2 = false; - d === typeof t2 && (l2 = true, r3 = n2, n2 = t2); - const i2 = et(r3 = r3 || n2, { name: e2 + (n2 = d === typeof n2 ? " (" + n2 + ")" : "") }), o2 = i2.node(), s2 = o2.k; - let u2 = t2, a2 = {}, c2 = 0, f2 = 0; + return function(t2, n3, r3) { + let l3 = false; + d === typeof t2 && (l3 = true, r3 = n3, n3 = t2); + const i2 = et(r3 = r3 || n3, { name: e2 + (n3 = d === typeof n3 ? " (" + n3 + ")" : "") }), o2 = i2.node(), s2 = o2.k; + let u2 = t2, a2 = {}, c2 = 0, f3 = 0; for (; c2 < s2.length; c2++) { let e3 = o2.v[s2[c2]]; - e3.p && (e3 = o2.v[s2[c2]] = ((t3) => Re(function(e4, n3, r4) { + e3.p && (e3 = o2.v[s2[c2]] = ((t3) => Re(function(e4, n4, r4) { if (0 < r4.curerr.length) { - f2++; + f3++; for (let e5 = s2.length - 1; e5 > t3; e5--) o2.v[s2[e5]].m.rest ? a2[s2[e5]].splice(o2.v[s2[e5]].m.rest_pos + t3 - e5, 0, a2[s2[e5 - 1]]) : (r4.vals[r4.pI + e5 - t3] = r4.vals[r4.pI + e5 - t3 - 1], a2[s2[e5]] = a2[s2[e5 - 1]]); - n3.uval = void 0, n3.done = false; + n4.uval = void 0, n4.done = false; } return true; - }, e3))(c2), e3.e = false), c2 !== s2.length - 1 || o2.v[s2[c2]].m.rest || (o2.v[s2[c2]] = Re(function(e4, t3, n3) { - return !(s2.length - f2 < u2.length && (0 === n3.curerr.length && (t3.err = `Too many arguments for type signature (was ${u2.length}, expected ${s2.length - f2})`), t3.fatal = true, 1)); + }, e3))(c2), e3.e = false), c2 !== s2.length - 1 || o2.v[s2[c2]].m.rest || (o2.v[s2[c2]] = Re(function(e4, t3, n4) { + return !(s2.length - f3 < u2.length && (0 === n4.curerr.length && (t3.err = `Too many arguments for type signature (was ${u2.length}, expected ${s2.length - f3})`), t3.fatal = true, 1)); }, o2.v[s2[c2]])); } - function p2(e3) { + function p3(e3) { for (let t3 = 0; t3 < s2.length; t3++) { - let n3 = o2.v[s2[t3]]; - n3.m.rest ? (a2[s2[t3]] = [...e3].slice(t3), n3.m.rest_pos = a2[s2[t3]].length) : a2[s2[t3]] = e3[t3]; + let n4 = o2.v[s2[t3]]; + n4.m.rest ? (a2[s2[t3]] = [...e3].slice(t3), n4.m.rest_pos = a2[s2[t3]].length) : a2[s2[t3]] = e3[t3]; } return a2; } - return l2 ? function(e3) { - return u2 = e3, a2 = {}, c2 = 0, f2 = 0, i2(p2(e3)); - } : i2(p2(t2)); + return l3 ? function(e3) { + return u2 = e3, a2 = {}, c2 = 0, f3 = 0, i2(p3(e3)); + } : i2(p3(t2)); }; } const { Gubu: nt } = t; @@ -1701,31 +1686,31 @@ var __async = (__this, __arguments, generator) => { })(gubu_min$2, gubu_min$2.exports); var gubu_minExports = gubu_min$2.exports; const gubu_min$1 = /* @__PURE__ */ getDefaultExportFromCjs(gubu_minExports); - function cmap(o, p) { - return Object.entries(o).reduce((r2, n, _2) => (_2 = Object.entries(p).reduce((s, m) => cmap.FILTER === s ? s : (s[m[0]] = // transfom(val,key,current,parentkey,parent) - "function" === typeof m[1] ? m[1](n[1][m[0]], { - skey: m[0], - self: n[1], - key: n[0], + function cmap(o, p2) { + return Object.entries(o).reduce((r2, n2, _2) => (_2 = Object.entries(p2).reduce((s, m2) => cmap.FILTER === s ? s : (s[m2[0]] = // transfom(val,key,current,parentkey,parent) + "function" === typeof m2[1] ? m2[1](n2[1][m2[0]], { + skey: m2[0], + self: n2[1], + key: n2[0], parent: o - }) : m[1], cmap.FILTER === s[m[0]] ? cmap.FILTER : s), {}), cmap.FILTER === _2 ? 0 : r2[n[0]] = _2, r2), {}); + }) : m2[1], cmap.FILTER === s[m2[0]] ? cmap.FILTER : s), {}), cmap.FILTER === _2 ? 0 : r2[n2[0]] = _2, r2), {}); } cmap.COPY = (x) => x; - cmap.FILTER = (x) => "function" === typeof x ? (y, p, _2) => (_2 = x(y, p), Array.isArray(_2) ? !_2[0] ? _2[1] : cmap.FILTER : _2) : x ? x : cmap.FILTER; - cmap.KEY = (_2, p) => p.key; - function vmap(o, p) { - return Object.entries(o).reduce((r2, n, _2) => (_2 = Object.entries(p).reduce((s, m) => vmap.FILTER === s ? s : (s[m[0]] = // transfom(val,key,current,parentkey,parent) + cmap.FILTER = (x) => "function" === typeof x ? (y, p2, _2) => (_2 = x(y, p2), Array.isArray(_2) ? !_2[0] ? _2[1] : cmap.FILTER : _2) : x ? x : cmap.FILTER; + cmap.KEY = (_2, p2) => p2.key; + function vmap(o, p2) { + return Object.entries(o).reduce((r2, n2, _2) => (_2 = Object.entries(p2).reduce((s, m2) => vmap.FILTER === s ? s : (s[m2[0]] = // transfom(val,key,current,parentkey,parent) // 'function' === typeof m[1] ? m[1](n[1][m[0]], m[0], n[1], n[0], o) : m[1] - "function" === typeof m[1] ? m[1](n[1][m[0]], { - skey: m[0], - self: n[1], - key: n[0], + "function" === typeof m2[1] ? m2[1](n2[1][m2[0]], { + skey: m2[0], + self: n2[1], + key: n2[0], parent: o - }) : m[1], vmap.FILTER === s[m[0]] ? vmap.FILTER : s), {}), vmap.FILTER === _2 ? 0 : r2.push(_2), r2), []); + }) : m2[1], vmap.FILTER === s[m2[0]] ? vmap.FILTER : s), {}), vmap.FILTER === _2 ? 0 : r2.push(_2), r2), []); } vmap.COPY = (x) => x; - vmap.FILTER = (x) => "function" === typeof x ? (y, p, _2) => (_2 = x(y, p), Array.isArray(_2) ? !_2[0] ? _2[1] : vmap.FILTER : _2) : x ? x : vmap.FILTER; - vmap.KEY = (_2, p) => p.key; + vmap.FILTER = (x) => "function" === typeof x ? (y, p2, _2) => (_2 = x(y, p2), Array.isArray(_2) ? !_2[0] ? _2[1] : vmap.FILTER : _2) : x ? x : vmap.FILTER; + vmap.KEY = (_2, p2) => p2.key; function searchParamsToObject(searchParams) { let params = /* @__PURE__ */ Object.create(null); for (let [key, value] of searchParams.entries()) { @@ -1757,8 +1742,8 @@ var __async = (__this, __arguments, generator) => { }); function setPath(msg, meta) { return __async(this, null, function* () { - const q = Object.entries(msg.query).reduce((s, n) => s + ("" === s ? "?" : "") + (encodeURIComponent(n[0]) + "=" + encodeURIComponent(n[1])), ""); - const path = "/view/" + msg.view + q; + const q2 = Object.entries(msg.query).reduce((s, n2) => s + ("" === s ? "?" : "") + (encodeURIComponent(n2[0]) + "=" + encodeURIComponent(n2[1])), ""); + const path = "/view/" + msg.view + q2; msg.navigate(path); }); } @@ -1811,19 +1796,19 @@ var __async = (__this, __arguments, generator) => { function _objectWithoutPropertiesLoose(r2, e) { if (null == r2) return {}; var t = {}; - for (var n in r2) if ({}.hasOwnProperty.call(r2, n)) { - if (e.includes(n)) continue; - t[n] = r2[n]; + for (var n2 in r2) if ({}.hasOwnProperty.call(r2, n2)) { + if (e.includes(n2)) continue; + t[n2] = r2[n2]; } return t; } function _extends$1() { - return _extends$1 = Object.assign ? Object.assign.bind() : function(n) { + return _extends$1 = Object.assign ? Object.assign.bind() : function(n2) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; - for (var r2 in t) ({}).hasOwnProperty.call(t, r2) && (n[r2] = t[r2]); + for (var r2 in t) ({}).hasOwnProperty.call(t, r2) && (n2[r2] = t[r2]); } - return n; + return n2; }, _extends$1.apply(null, arguments); } var propTypes$1 = { exports: {} }; @@ -1842,24 +1827,24 @@ var __async = (__this, __arguments, generator) => { if (hasRequiredReactIs_production_min$1) return reactIs_production_min$1; hasRequiredReactIs_production_min$1 = 1; "use strict"; - var b = "function" === typeof Symbol && Symbol.for, c = b ? Symbol.for("react.element") : 60103, d = b ? Symbol.for("react.portal") : 60106, e = b ? Symbol.for("react.fragment") : 60107, f = b ? Symbol.for("react.strict_mode") : 60108, g = b ? Symbol.for("react.profiler") : 60114, h = b ? Symbol.for("react.provider") : 60109, k = b ? Symbol.for("react.context") : 60110, l = b ? Symbol.for("react.async_mode") : 60111, m = b ? Symbol.for("react.concurrent_mode") : 60111, n = b ? Symbol.for("react.forward_ref") : 60112, p = b ? Symbol.for("react.suspense") : 60113, q = b ? Symbol.for("react.suspense_list") : 60120, r2 = b ? Symbol.for("react.memo") : 60115, t = b ? Symbol.for("react.lazy") : 60116, v = b ? Symbol.for("react.block") : 60121, w = b ? Symbol.for("react.fundamental") : 60117, x = b ? Symbol.for("react.responder") : 60118, y = b ? Symbol.for("react.scope") : 60119; + var b = "function" === typeof Symbol && Symbol.for, c = b ? Symbol.for("react.element") : 60103, d = b ? Symbol.for("react.portal") : 60106, e = b ? Symbol.for("react.fragment") : 60107, f2 = b ? Symbol.for("react.strict_mode") : 60108, g = b ? Symbol.for("react.profiler") : 60114, h = b ? Symbol.for("react.provider") : 60109, k2 = b ? Symbol.for("react.context") : 60110, l2 = b ? Symbol.for("react.async_mode") : 60111, m2 = b ? Symbol.for("react.concurrent_mode") : 60111, n2 = b ? Symbol.for("react.forward_ref") : 60112, p2 = b ? Symbol.for("react.suspense") : 60113, q2 = b ? Symbol.for("react.suspense_list") : 60120, r2 = b ? Symbol.for("react.memo") : 60115, t = b ? Symbol.for("react.lazy") : 60116, v = b ? Symbol.for("react.block") : 60121, w = b ? Symbol.for("react.fundamental") : 60117, x = b ? Symbol.for("react.responder") : 60118, y = b ? Symbol.for("react.scope") : 60119; function z(a) { if ("object" === typeof a && null !== a) { var u = a.$$typeof; switch (u) { case c: switch (a = a.type, a) { - case l: - case m: + case l2: + case m2: case e: case g: - case f: - case p: + case f2: + case p2: return a; default: switch (a = a && a.$$typeof, a) { - case k: - case n: + case k2: + case n2: case t: case r2: case h: @@ -1874,27 +1859,27 @@ var __async = (__this, __arguments, generator) => { } } function A(a) { - return z(a) === m; + return z(a) === m2; } - reactIs_production_min$1.AsyncMode = l; - reactIs_production_min$1.ConcurrentMode = m; - reactIs_production_min$1.ContextConsumer = k; + reactIs_production_min$1.AsyncMode = l2; + reactIs_production_min$1.ConcurrentMode = m2; + reactIs_production_min$1.ContextConsumer = k2; reactIs_production_min$1.ContextProvider = h; reactIs_production_min$1.Element = c; - reactIs_production_min$1.ForwardRef = n; + reactIs_production_min$1.ForwardRef = n2; reactIs_production_min$1.Fragment = e; reactIs_production_min$1.Lazy = t; reactIs_production_min$1.Memo = r2; reactIs_production_min$1.Portal = d; reactIs_production_min$1.Profiler = g; - reactIs_production_min$1.StrictMode = f; - reactIs_production_min$1.Suspense = p; + reactIs_production_min$1.StrictMode = f2; + reactIs_production_min$1.Suspense = p2; reactIs_production_min$1.isAsyncMode = function(a) { - return A(a) || z(a) === l; + return A(a) || z(a) === l2; }; reactIs_production_min$1.isConcurrentMode = A; reactIs_production_min$1.isContextConsumer = function(a) { - return z(a) === k; + return z(a) === k2; }; reactIs_production_min$1.isContextProvider = function(a) { return z(a) === h; @@ -1903,7 +1888,7 @@ var __async = (__this, __arguments, generator) => { return "object" === typeof a && null !== a && a.$$typeof === c; }; reactIs_production_min$1.isForwardRef = function(a) { - return z(a) === n; + return z(a) === n2; }; reactIs_production_min$1.isFragment = function(a) { return z(a) === e; @@ -1921,13 +1906,13 @@ var __async = (__this, __arguments, generator) => { return z(a) === g; }; reactIs_production_min$1.isStrictMode = function(a) { - return z(a) === f; + return z(a) === f2; }; reactIs_production_min$1.isSuspense = function(a) { - return z(a) === p; + return z(a) === p2; }; reactIs_production_min$1.isValidElementType = function(a) { - return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r2 || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v); + return "string" === typeof a || "function" === typeof a || a === e || a === m2 || a === g || a === f2 || a === p2 || a === q2 || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r2 || a.$$typeof === h || a.$$typeof === k2 || a.$$typeof === n2 || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v); }; reactIs_production_min$1.typeOf = z; return reactIs_production_min$1; @@ -2011,7 +1996,7 @@ var __async = (__this, __arguments, generator) => { var ContextProvider = REACT_PROVIDER_TYPE; var Element2 = REACT_ELEMENT_TYPE; var ForwardRef = REACT_FORWARD_REF_TYPE; - var Fragment = REACT_FRAGMENT_TYPE; + var Fragment2 = REACT_FRAGMENT_TYPE; var Lazy = REACT_LAZY_TYPE; var Memo = REACT_MEMO_TYPE; var Portal2 = REACT_PORTAL_TYPE; @@ -2070,7 +2055,7 @@ var __async = (__this, __arguments, generator) => { reactIs_development$1.ContextProvider = ContextProvider; reactIs_development$1.Element = Element2; reactIs_development$1.ForwardRef = ForwardRef; - reactIs_development$1.Fragment = Fragment; + reactIs_development$1.Fragment = Fragment2; reactIs_development$1.Lazy = Lazy; reactIs_development$1.Memo = Memo; reactIs_development$1.Portal = Portal2; @@ -2143,8 +2128,8 @@ var __async = (__this, __arguments, generator) => { for (var i = 0; i < 10; i++) { test2["_" + String.fromCharCode(i)] = i; } - var order2 = Object.getOwnPropertyNames(test2).map(function(n) { - return test2[n]; + var order2 = Object.getOwnPropertyNames(test2).map(function(n2) { + return test2[n2]; }); if (order2.join("") !== "0123456789") { return false; @@ -2779,17 +2764,17 @@ var __async = (__this, __arguments, generator) => { var propTypesExports = propTypes$1.exports; const PropTypes = /* @__PURE__ */ getDefaultExportFromCjs(propTypesExports); function r(e) { - var t, f, n = ""; - if ("string" == typeof e || "number" == typeof e) n += e; + var t, f2, n2 = ""; + if ("string" == typeof e || "number" == typeof e) n2 += e; else if ("object" == typeof e) if (Array.isArray(e)) { var o = e.length; - for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f); - } else for (f in e) e[f] && (n && (n += " "), n += f); - return n; + for (t = 0; t < o; t++) e[t] && (f2 = r(e[t])) && (n2 && (n2 += " "), n2 += f2); + } else for (f2 in e) e[f2] && (n2 && (n2 += " "), n2 += f2); + return n2; } function clsx() { - for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t); - return n; + for (var e, t, f2 = 0, n2 = "", o = arguments.length; f2 < o; f2++) (e = arguments[f2]) && (t = r(e)) && (n2 && (n2 += " "), n2 += t); + return n2; } function composeClasses(slots, getUtilityClass, classes = void 0) { const output = {}; @@ -2834,12 +2819,12 @@ var __async = (__this, __arguments, generator) => { hasRequired_extends = 1; (function(module2) { function _extends3() { - return module2.exports = _extends3 = Object.assign ? Object.assign.bind() : function(n) { + return module2.exports = _extends3 = Object.assign ? Object.assign.bind() : function(n2) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; - for (var r2 in t) ({}).hasOwnProperty.call(t, r2) && (n[r2] = t[r2]); + for (var r2 in t) ({}).hasOwnProperty.call(t, r2) && (n2[r2] = t[r2]); } - return n; + return n2; }, module2.exports.__esModule = true, module2.exports["default"] = module2.exports, _extends3.apply(null, arguments); } module2.exports = _extends3, module2.exports.__esModule = true, module2.exports["default"] = module2.exports; @@ -2856,9 +2841,9 @@ var __async = (__this, __arguments, generator) => { function _objectWithoutPropertiesLoose3(r2, e) { if (null == r2) return {}; var t = {}; - for (var n in r2) if ({}.hasOwnProperty.call(r2, n)) { - if (e.includes(n)) continue; - t[n] = r2[n]; + for (var n2 in r2) if ({}.hasOwnProperty.call(r2, n2)) { + if (e.includes(n2)) continue; + t[n2] = r2[n2]; } return t; } @@ -3261,10 +3246,10 @@ var __async = (__this, __arguments, generator) => { var post = offset2 - 1; var rule = offset2 === 0 ? rules2 : [""]; var size = sizeof(rule); - for (var i = 0, j = 0, k = 0; i < index2; ++i) + for (var i = 0, j = 0, k2 = 0; i < index2; ++i) for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x) if (z = trim(j > 0 ? rule[x] + " " + y : replace(y, /&\f/g, rule[x]))) - props[k++] = z; + props[k2++] = z; return node(value, root, parent, offset2 === 0 ? RULESET : type, props, children, length2); } function comment(value, root, parent) { @@ -3396,8 +3381,8 @@ var __async = (__this, __arguments, generator) => { break; case 5152: case 5920: - return replace(value, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(_2, a, b, c, d, e, f) { - return MS + a + ":" + b + f + (c ? MS + a + "-span:" + (d ? e : +e - +b) + f : "") + value; + return replace(value, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(_2, a, b, c, d, e, f2) { + return MS + a + ":" + b + f2 + (c ? MS + a + "-span:" + (d ? e : +e - +b) + f2 : "") + value; }); case 4949: if (charat(value, length2 + 6) === 121) @@ -3609,9 +3594,9 @@ var __async = (__this, __arguments, generator) => { var points = []; var rules2 = getRules(value, points); var parentRules = parent.props; - for (var i = 0, k = 0; i < rules2.length; i++) { - for (var j = 0; j < parentRules.length; j++, k++) { - element.props[k] = points[i] ? rules2[i].replace(/&\f/g, parentRules[j]) : parentRules[j] + " " + rules2[i]; + for (var i = 0, k2 = 0; i < rules2.length; i++) { + for (var j = 0; j < parentRules.length; j++, k2++) { + element.props[k2] = points[i] ? rules2[i].replace(/&\f/g, parentRules[j]) : parentRules[j] + " " + rules2[i]; } } }; @@ -4009,7 +3994,7 @@ var __async = (__this, __arguments, generator) => { if (hasRequiredReactIs_production_min) return reactIs_production_min; hasRequiredReactIs_production_min = 1; "use strict"; - var b = Symbol.for("react.element"), c = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), e = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), g = Symbol.for("react.provider"), h = Symbol.for("react.context"), k = Symbol.for("react.server_context"), l = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), n = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), q = Symbol.for("react.lazy"), t = Symbol.for("react.offscreen"), u; + var b = Symbol.for("react.element"), c = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), e = Symbol.for("react.strict_mode"), f2 = Symbol.for("react.profiler"), g = Symbol.for("react.provider"), h = Symbol.for("react.context"), k2 = Symbol.for("react.server_context"), l2 = Symbol.for("react.forward_ref"), m2 = Symbol.for("react.suspense"), n2 = Symbol.for("react.suspense_list"), p2 = Symbol.for("react.memo"), q2 = Symbol.for("react.lazy"), t = Symbol.for("react.offscreen"), u; u = Symbol.for("react.module.reference"); function v(a) { if ("object" === typeof a && null !== a) { @@ -4018,18 +4003,18 @@ var __async = (__this, __arguments, generator) => { case b: switch (a = a.type, a) { case d: - case f: + case f2: case e: - case m: - case n: + case m2: + case n2: return a; default: switch (a = a && a.$$typeof, a) { - case k: + case k2: case h: - case l: - case q: - case p: + case l2: + case q2: + case p2: case g: return a; default: @@ -4044,15 +4029,15 @@ var __async = (__this, __arguments, generator) => { reactIs_production_min.ContextConsumer = h; reactIs_production_min.ContextProvider = g; reactIs_production_min.Element = b; - reactIs_production_min.ForwardRef = l; + reactIs_production_min.ForwardRef = l2; reactIs_production_min.Fragment = d; - reactIs_production_min.Lazy = q; - reactIs_production_min.Memo = p; + reactIs_production_min.Lazy = q2; + reactIs_production_min.Memo = p2; reactIs_production_min.Portal = c; - reactIs_production_min.Profiler = f; + reactIs_production_min.Profiler = f2; reactIs_production_min.StrictMode = e; - reactIs_production_min.Suspense = m; - reactIs_production_min.SuspenseList = n; + reactIs_production_min.Suspense = m2; + reactIs_production_min.SuspenseList = n2; reactIs_production_min.isAsyncMode = function() { return false; }; @@ -4069,34 +4054,34 @@ var __async = (__this, __arguments, generator) => { return "object" === typeof a && null !== a && a.$$typeof === b; }; reactIs_production_min.isForwardRef = function(a) { - return v(a) === l; + return v(a) === l2; }; reactIs_production_min.isFragment = function(a) { return v(a) === d; }; reactIs_production_min.isLazy = function(a) { - return v(a) === q; + return v(a) === q2; }; reactIs_production_min.isMemo = function(a) { - return v(a) === p; + return v(a) === p2; }; reactIs_production_min.isPortal = function(a) { return v(a) === c; }; reactIs_production_min.isProfiler = function(a) { - return v(a) === f; + return v(a) === f2; }; reactIs_production_min.isStrictMode = function(a) { return v(a) === e; }; reactIs_production_min.isSuspense = function(a) { - return v(a) === m; + return v(a) === m2; }; reactIs_production_min.isSuspenseList = function(a) { - return v(a) === n; + return v(a) === n2; }; reactIs_production_min.isValidElementType = function(a) { - return "string" === typeof a || "function" === typeof a || a === d || a === f || a === e || a === m || a === n || a === t || "object" === typeof a && null !== a && (a.$$typeof === q || a.$$typeof === p || a.$$typeof === g || a.$$typeof === h || a.$$typeof === l || a.$$typeof === u || void 0 !== a.getModuleId) ? true : false; + return "string" === typeof a || "function" === typeof a || a === d || a === f2 || a === e || a === m2 || a === n2 || a === t || "object" === typeof a && null !== a && (a.$$typeof === q2 || a.$$typeof === p2 || a.$$typeof === g || a.$$typeof === h || a.$$typeof === l2 || a.$$typeof === u || void 0 !== a.getModuleId) ? true : false; }; reactIs_production_min.typeOf = v; return reactIs_production_min; @@ -4197,7 +4182,7 @@ var __async = (__this, __arguments, generator) => { var ContextProvider = REACT_PROVIDER_TYPE; var Element2 = REACT_ELEMENT_TYPE; var ForwardRef = REACT_FORWARD_REF_TYPE; - var Fragment = REACT_FRAGMENT_TYPE; + var Fragment2 = REACT_FRAGMENT_TYPE; var Lazy = REACT_LAZY_TYPE; var Memo = REACT_MEMO_TYPE; var Portal2 = REACT_PORTAL_TYPE; @@ -4265,7 +4250,7 @@ var __async = (__this, __arguments, generator) => { reactIs_development.ContextProvider = ContextProvider; reactIs_development.Element = Element2; reactIs_development.ForwardRef = ForwardRef; - reactIs_development.Fragment = Fragment; + reactIs_development.Fragment = Fragment2; reactIs_development.Lazy = Lazy; reactIs_development.Memo = Memo; reactIs_development.Portal = Portal2; @@ -5536,12 +5521,12 @@ var __async = (__this, __arguments, generator) => { if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache$1(r2); if (t && t.has(e)) return t.get(e); - var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; + var n2 = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; - i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; + i && (i.get || i.set) ? Object.defineProperty(n2, u, i) : n2[u] = e[u]; } - return n.default = e, t && t.set(e, n), n; + return n2.default = e, t && t.set(e, n2), n2; } function isEmpty$3(obj) { return Object.keys(obj).length === 0; @@ -5849,10 +5834,10 @@ var __async = (__this, __arguments, generator) => { const re = new RegExp(`.{1,${color2.length >= 6 ? 2 : 1}}`, "g"); let colors = color2.match(re); if (colors && colors[0].length === 1) { - colors = colors.map((n) => n + n); + colors = colors.map((n2) => n2 + n2); } - return colors ? `rgb${colors.length === 4 ? "a" : ""}(${colors.map((n, index2) => { - return index2 < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1e3) / 1e3; + return colors ? `rgb${colors.length === 4 ? "a" : ""}(${colors.map((n2, index2) => { + return index2 < 3 ? parseInt(n2, 16) : Math.round(parseInt(n2, 16) / 255 * 1e3) / 1e3; }).join(", ")})` : ""; } function intToHex$1(int) { @@ -5919,7 +5904,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg values: values2 } = color2; if (type.indexOf("rgb") !== -1) { - values2 = values2.map((n, i) => i < 3 ? parseInt(n, 10) : n); + values2 = values2.map((n2, i) => i < 3 ? parseInt(n2, 10) : n2); } else if (type.indexOf("hsl") !== -1) { values2[1] = `${values2[1]}%`; values2[2] = `${values2[2]}%`; @@ -5938,7 +5923,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg const { values: values2 } = decomposeColor$1(color2); - return `#${values2.map((n, i) => intToHex$1(i === 3 ? Math.round(255 * n) : n)).join("")}`; + return `#${values2.map((n2, i) => intToHex$1(i === 3 ? Math.round(255 * n2) : n2)).join("")}`; } function hslToRgb$1(color2) { color2 = decomposeColor$1(color2); @@ -5947,11 +5932,11 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg } = color2; const h = values2[0]; const s = values2[1] / 100; - const l = values2[2] / 100; - const a = s * Math.min(l, 1 - l); - const f = (n, k = (n + h / 30) % 12) => l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1); + const l2 = values2[2] / 100; + const a = s * Math.min(l2, 1 - l2); + const f2 = (n2, k2 = (n2 + h / 30) % 12) => l2 - a * Math.max(Math.min(k2 - 3, 9 - k2, 1), -1); let type = "rgb"; - const rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)]; + const rgb = [Math.round(f2(0) * 255), Math.round(f2(8) * 255), Math.round(f2(4) * 255)]; if (color2.type === "hsla") { type += "a"; rgb.push(values2[3]); @@ -7510,10 +7495,10 @@ Please use another name.` : formatMuiErrorMessage$1(18)); const re = new RegExp(`.{1,${color2.length >= 6 ? 2 : 1}}`, "g"); let colors = color2.match(re); if (colors && colors[0].length === 1) { - colors = colors.map((n) => n + n); + colors = colors.map((n2) => n2 + n2); } - return colors ? `rgb${colors.length === 4 ? "a" : ""}(${colors.map((n, index2) => { - return index2 < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1e3) / 1e3; + return colors ? `rgb${colors.length === 4 ? "a" : ""}(${colors.map((n2, index2) => { + return index2 < 3 ? parseInt(n2, 16) : Math.round(parseInt(n2, 16) / 255 * 1e3) / 1e3; }).join(", ")})` : ""; } function intToHex(int) { @@ -7578,7 +7563,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg values: values2 } = color2; if (type.indexOf("rgb") !== -1) { - values2 = values2.map((n, i) => i < 3 ? parseInt(n, 10) : n); + values2 = values2.map((n2, i) => i < 3 ? parseInt(n2, 10) : n2); } else if (type.indexOf("hsl") !== -1) { values2[1] = `${values2[1]}%`; values2[2] = `${values2[2]}%`; @@ -7597,7 +7582,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg const { values: values2 } = decomposeColor(color2); - return `#${values2.map((n, i) => intToHex(i === 3 ? Math.round(255 * n) : n)).join("")}`; + return `#${values2.map((n2, i) => intToHex(i === 3 ? Math.round(255 * n2) : n2)).join("")}`; } function hslToRgb(color2) { color2 = decomposeColor(color2); @@ -7606,11 +7591,11 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg } = color2; const h = values2[0]; const s = values2[1] / 100; - const l = values2[2] / 100; - const a = s * Math.min(l, 1 - l); - const f = (n, k = (n + h / 30) % 12) => l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1); + const l2 = values2[2] / 100; + const a = s * Math.min(l2, 1 - l2); + const f2 = (n2, k2 = (n2 + h / 30) % 12) => l2 - a * Math.max(Math.min(k2 - 3, 9 - k2, 1), -1); let type = "rgb"; - const rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)]; + const rgb = [Math.round(f2(0) * 255), Math.round(f2(8) * 255), Math.round(f2(4) * 255)]; if (color2.type === "hsla") { type += "a"; rgb.push(values2[3]); @@ -9046,18 +9031,18 @@ try { } const assignNestedKeys = (obj, keys, value, arrayKeys = []) => { let temp = obj; - keys.forEach((k, index2) => { + keys.forEach((k2, index2) => { if (index2 === keys.length - 1) { if (Array.isArray(temp)) { - temp[Number(k)] = value; + temp[Number(k2)] = value; } else if (temp && typeof temp === "object") { - temp[k] = value; + temp[k2] = value; } } else if (temp && typeof temp === "object") { - if (!temp[k]) { - temp[k] = arrayKeys.includes(k) ? [] : {}; + if (!temp[k2]) { + temp[k2] = arrayKeys.includes(k2) ? [] : {}; } - temp = temp[k]; + temp = temp[k2]; } }); }; @@ -10600,8 +10585,8 @@ try { */ variant: PropTypes.oneOfType([PropTypes.oneOf(["dense", "regular"]), PropTypes.string]) } : void 0; - const CMPNAME$n = "BasicAccountTool"; - console.log(CMPNAME$n, "1"); + const CMPNAME$o = "BasicAccountTool"; + console.log(CMPNAME$o, "1"); const { Exact: Exact$2 } = gubu_minExports.Gubu; const BasicAccountToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10611,7 +10596,7 @@ try { attr: {}, sx: {}, style: {} - }, { name: CMPNAME$n }); + }, { name: CMPNAME$o }); function BasicAccountTool(props) { var _a; const { ctx, spec } = props; @@ -10685,8 +10670,8 @@ try { children: `${parts.join("")}` }; } - const CMPNAME$m = "BasicHeadTool"; - console.log(CMPNAME$m, "1"); + const CMPNAME$n = "BasicHeadTool"; + console.log(CMPNAME$n, "1"); const { Exact: Exact$1 } = gubu_minExports.Gubu; const BasicHeadToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10696,7 +10681,7 @@ try { attr: {}, sx: {}, style: {} - }, { name: CMPNAME$m }); + }, { name: CMPNAME$n }); function BasicHeadTool(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -10705,7 +10690,7 @@ try { const { name, kind, attr, sx, style: style2 } = basicHeadToolSpec; let tool = /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}); if ("" === kind) { - console.warn(CMPNAME$m, "empty-tool-kind", basicHeadToolSpec); + console.warn(CMPNAME$n, "empty-tool-kind", basicHeadToolSpec); } else if ("logo" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsxs( "div", @@ -10722,7 +10707,7 @@ try { { href: "/", style: style2, - className: `vxg-${CMPNAME$m}-logo`, + className: `vxg-${CMPNAME$n}-logo`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: attr.img }) } ), @@ -10754,17 +10739,17 @@ try { } else if ("account" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsx(BasicAccountTool, { ctx, spec }); } else { - console.warn(CMPNAME$m, "unknown-tool-kind", kind, basicHeadToolSpec); + console.warn(CMPNAME$n, "unknown-tool-kind", kind, basicHeadToolSpec); } return tool; } - const CMPNAME$l = "BasicHead"; - const { Child: Child$5, Exact, Open: Open$j, Required: Required$1 } = gubu_minExports.Gubu; + const CMPNAME$m = "BasicHead"; + const { Child: Child$5, Exact, Open: Open$k, Required: Required$1 } = gubu_minExports.Gubu; const BasicHeadSpecShape = gubu_minExports.Gubu({ head: { name: String, active: Boolean, - tool: Child$5(Open$j({ + tool: Child$5(Open$k({ align: Exact("left", "right") })) }, @@ -10774,7 +10759,7 @@ try { AppBar: {}, ToolBar: {} } - }, { name: CMPNAME$l }); + }, { name: CMPNAME$m }); function BasicHead(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -10783,9 +10768,9 @@ try { const { head } = basicHeadSpec; const tools = vmap2(head.tool, { active: vmap2.FILTER, - name: vmap2.FILTER((_2, p) => { + name: vmap2.FILTER((_2, p2) => { var _a; - return [(_a = basicHeadSpec.tool[p.key]) == null ? void 0 : _a.active, p.key]; + return [(_a = basicHeadSpec.tool[p2.key]) == null ? void 0 : _a.active, p2.key]; }), align: vmap2.COPY }).map((t) => __spreadValues(__spreadValues({}, basicHeadSpec.tool[t.name]), t)); @@ -15358,8 +15343,8 @@ try { return children; } var values = Object.values || function(obj) { - return Object.keys(obj).map(function(k) { - return obj[k]; + return Object.keys(obj).map(function(k2) { + return obj[k2]; }); }; var defaultProps = { @@ -17000,9 +16985,9 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` : for return `linear-gradient(rgba(255 255 255 / ${overlay}), rgba(255 255 255 / ${overlay}))`; }); function assignNode(obj, keys) { - keys.forEach((k) => { - if (!obj[k]) { - obj[k] = {}; + keys.forEach((k2) => { + if (!obj[k2]) { + obj[k2] = {}; } }); } @@ -17580,12 +17565,12 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r2); if (t && t.has(e)) return t.get(e); - var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; + var n2 = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; - i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; + i && (i.get || i.set) ? Object.defineProperty(n2, u, i) : n2[u] = e[u]; } - return n.default = e, t && t.set(e, n), n; + return n2.default = e, t && t.set(e, n2), n2; } function isObjectEmpty(obj) { return Object.keys(obj).length === 0; @@ -18849,8 +18834,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha popper: listScrollParents(popper2) }; var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers2, state.options.modifiers))); - state.orderedModifiers = orderedModifiers.filter(function(m) { - return m.enabled; + state.orderedModifiers = orderedModifiers.filter(function(m2) { + return m2.enabled; }); runModifierEffects(); return instance.update(); @@ -22619,7 +22604,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha return offset2; } function getTransformOriginValue(transformOrigin) { - return [transformOrigin.horizontal, transformOrigin.vertical].map((n) => typeof n === "number" ? `${n}px` : n).join(" "); + return [transformOrigin.horizontal, transformOrigin.vertical].map((n2) => typeof n2 === "number" ? `${n2}px` : n2).join(" "); } function resolveAnchorEl(anchorEl) { return typeof anchorEl === "function" ? anchorEl() : anchorEl; @@ -25323,7 +25308,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$x = ArrowDownward.default = void 0; var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); - var _jsxRuntime$x = requireJsxRuntime(); + var _jsxRuntime$x = jsxRuntimeExports; var _default$x = default_1$x = ArrowDownward.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); @@ -25336,7 +25321,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$w = ArrowRight.default = void 0; var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); - var _jsxRuntime$w = requireJsxRuntime(); + var _jsxRuntime$w = jsxRuntimeExports; var _default$w = default_1$w = ArrowRight.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); @@ -25349,7 +25334,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$v = Cancel.default = void 0; var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); - var _jsxRuntime$v = requireJsxRuntime(); + var _jsxRuntime$v = jsxRuntimeExports; var _default$v = default_1$v = Cancel.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); @@ -25362,7 +25347,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$u = ChevronLeft.default = void 0; var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); - var _jsxRuntime$u = requireJsxRuntime(); + var _jsxRuntime$u = jsxRuntimeExports; var _default$u = default_1$u = ChevronLeft.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); @@ -25375,7 +25360,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$t = ChevronRight.default = void 0; var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); - var _jsxRuntime$t = requireJsxRuntime(); + var _jsxRuntime$t = jsxRuntimeExports; var _default$t = default_1$t = ChevronRight.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); @@ -25388,7 +25373,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$s = ClearAll.default = void 0; var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); - var _jsxRuntime$s = requireJsxRuntime(); + var _jsxRuntime$s = jsxRuntimeExports; var _default$s = default_1$s = ClearAll.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); @@ -25401,7 +25386,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$r = Close.default = void 0; var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); - var _jsxRuntime$r = requireJsxRuntime(); + var _jsxRuntime$r = jsxRuntimeExports; var _default$r = default_1$r = Close.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); @@ -25414,7 +25399,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$q = ContentCopy.default = void 0; var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); - var _jsxRuntime$q = requireJsxRuntime(); + var _jsxRuntime$q = jsxRuntimeExports; var _default$q = default_1$q = ContentCopy.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); @@ -25427,7 +25412,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$p = DensityLarge.default = void 0; var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); - var _jsxRuntime$p = requireJsxRuntime(); + var _jsxRuntime$p = jsxRuntimeExports; var _default$p = default_1$p = DensityLarge.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); @@ -25440,7 +25425,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$o = DensityMedium.default = void 0; var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); - var _jsxRuntime$o = requireJsxRuntime(); + var _jsxRuntime$o = jsxRuntimeExports; var _default$o = default_1$o = DensityMedium.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); @@ -25453,7 +25438,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$n = DensitySmall.default = void 0; var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); - var _jsxRuntime$n = requireJsxRuntime(); + var _jsxRuntime$n = jsxRuntimeExports; var _default$n = default_1$n = DensitySmall.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); @@ -25466,7 +25451,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$m = DragHandle.default = void 0; var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); - var _jsxRuntime$m = requireJsxRuntime(); + var _jsxRuntime$m = jsxRuntimeExports; var _default$m = default_1$m = DragHandle.default = (0, _createSvgIcon$m.default)(/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); @@ -25479,7 +25464,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$l = DynamicFeed.default = void 0; var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); - var _jsxRuntime$l = requireJsxRuntime(); + var _jsxRuntime$l = jsxRuntimeExports; var _default$l = default_1$l = DynamicFeed.default = (0, _createSvgIcon$l.default)([/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { @@ -25494,7 +25479,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$k = Edit.default = void 0; var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); - var _jsxRuntime$k = requireJsxRuntime(); + var _jsxRuntime$k = jsxRuntimeExports; var _default$k = default_1$k = Edit.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); @@ -25507,7 +25492,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$j = ExpandMore.default = void 0; var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); - var _jsxRuntime$j = requireJsxRuntime(); + var _jsxRuntime$j = jsxRuntimeExports; var _default$j = default_1$j = ExpandMore.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); @@ -25520,7 +25505,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$i = FilterAlt.default = void 0; var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); - var _jsxRuntime$i = requireJsxRuntime(); + var _jsxRuntime$i = jsxRuntimeExports; var _default$i = default_1$i = FilterAlt.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); @@ -25533,7 +25518,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$h = FilterList.default = void 0; var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); - var _jsxRuntime$h = requireJsxRuntime(); + var _jsxRuntime$h = jsxRuntimeExports; var _default$h = default_1$h = FilterList.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); @@ -25546,7 +25531,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$g = FilterListOff.default = void 0; var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); - var _jsxRuntime$g = requireJsxRuntime(); + var _jsxRuntime$g = jsxRuntimeExports; var _default$g = default_1$g = FilterListOff.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); @@ -25559,7 +25544,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$f = FirstPage.default = void 0; var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); - var _jsxRuntime$f = requireJsxRuntime(); + var _jsxRuntime$f = jsxRuntimeExports; var _default$f = default_1$f = FirstPage.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); @@ -25572,7 +25557,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$e = Fullscreen.default = void 0; var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); - var _jsxRuntime$e = requireJsxRuntime(); + var _jsxRuntime$e = jsxRuntimeExports; var _default$e = default_1$e = Fullscreen.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); @@ -25585,7 +25570,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$d = FullscreenExit.default = void 0; var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); - var _jsxRuntime$d = requireJsxRuntime(); + var _jsxRuntime$d = jsxRuntimeExports; var _default$d = default_1$d = FullscreenExit.default = (0, _createSvgIcon$d.default)(/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); @@ -25598,7 +25583,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$c = KeyboardDoubleArrowDown.default = void 0; var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); - var _jsxRuntime$c = requireJsxRuntime(); + var _jsxRuntime$c = jsxRuntimeExports; var _default$c = default_1$c = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$c.default)([/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { @@ -25613,7 +25598,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$b = LastPage.default = void 0; var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); - var _jsxRuntime$b = requireJsxRuntime(); + var _jsxRuntime$b = jsxRuntimeExports; var _default$b = default_1$b = LastPage.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); @@ -25626,7 +25611,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$a = MoreHoriz.default = void 0; var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); - var _jsxRuntime$a = requireJsxRuntime(); + var _jsxRuntime$a = jsxRuntimeExports; var _default$a = default_1$a = MoreHoriz.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); @@ -25639,7 +25624,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$9 = MoreVert.default = void 0; var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); - var _jsxRuntime$9 = requireJsxRuntime(); + var _jsxRuntime$9 = jsxRuntimeExports; var _default$9 = default_1$9 = MoreVert.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); @@ -25652,7 +25637,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$8 = PushPin.default = void 0; var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); - var _jsxRuntime$8 = requireJsxRuntime(); + var _jsxRuntime$8 = jsxRuntimeExports; var _default$8 = default_1$8 = PushPin.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" @@ -25666,7 +25651,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$7 = RestartAlt.default = void 0; var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); - var _jsxRuntime$7 = requireJsxRuntime(); + var _jsxRuntime$7 = jsxRuntimeExports; var _default$7 = default_1$7 = RestartAlt.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); @@ -25679,7 +25664,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$6 = Save.default = void 0; var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); - var _jsxRuntime$6 = requireJsxRuntime(); + var _jsxRuntime$6 = jsxRuntimeExports; var _default$6 = default_1$6 = Save.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); @@ -25692,7 +25677,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$5 = Search.default = void 0; var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); - var _jsxRuntime$5 = requireJsxRuntime(); + var _jsxRuntime$5 = jsxRuntimeExports; var _default$5 = default_1$5 = Search.default = (0, _createSvgIcon$5.default)(/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); @@ -25705,7 +25690,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$4 = SearchOff.default = void 0; var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); - var _jsxRuntime$4 = requireJsxRuntime(); + var _jsxRuntime$4 = jsxRuntimeExports; var _default$4 = default_1$4 = SearchOff.default = (0, _createSvgIcon$4.default)([/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { @@ -25720,7 +25705,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$3 = Sort.default = void 0; var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); - var _jsxRuntime$3 = requireJsxRuntime(); + var _jsxRuntime$3 = jsxRuntimeExports; var _default$3 = default_1$3 = Sort.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); @@ -25733,7 +25718,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$2 = SyncAlt.default = void 0; var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); - var _jsxRuntime$2 = requireJsxRuntime(); + var _jsxRuntime$2 = jsxRuntimeExports; var _default$2 = default_1$2 = SyncAlt.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); @@ -25746,7 +25731,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$1 = ViewColumn.default = void 0; var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); - var _jsxRuntime$1 = requireJsxRuntime(); + var _jsxRuntime$1 = jsxRuntimeExports; var _default$1 = default_1$1 = ViewColumn.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); @@ -25759,7 +25744,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1 = VisibilityOff.default = void 0; var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); - var _jsxRuntime = requireJsxRuntime(); + var _jsxRuntime = jsxRuntimeExports; var _default = default_1 = VisibilityOff.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); @@ -26116,8 +26101,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha this.getFurthestMeasurement = (measurements, index2) => { const furthestMeasurementsFound = /* @__PURE__ */ new Map(); const furthestMeasurements = /* @__PURE__ */ new Map(); - for (let m = index2 - 1; m >= 0; m--) { - const measurement = measurements[m]; + for (let m2 = index2 - 1; m2 >= 0; m2--) { + const measurement = measurements[m2]; if (furthestMeasurementsFound.has(measurement.lane)) { continue; } @@ -26265,8 +26250,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha () => [this.getIndexes(), this.getMeasurements()], (indexes, measurements) => { const virtualItems = []; - for (let k = 0, len = indexes.length; k < len; k++) { - const i = indexes[k]; + for (let k2 = 0, len = indexes.length; k2 < len; k2++) { + const i = indexes[k2]; const measurement = measurements[i]; virtualItems.push(measurement); } @@ -26393,7 +26378,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha end2 = this.options.paddingStart; } else { end2 = this.options.lanes === 1 ? (_a2 = (_a = measurements[measurements.length - 1]) == null ? void 0 : _a.end) != null ? _a2 : 0 : Math.max( - ...measurements.slice(-this.options.lanes).map((m) => m.end) + ...measurements.slice(-this.options.lanes).map((m2) => m2.end) ); } return end2 - this.options.scrollMargin + this.options.paddingEnd; @@ -50672,8 +50657,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha getClockNumberText, selectedId }) => { - const f = utils2.formatNumber; - return [[5, f("05")], [10, f("10")], [15, f("15")], [20, f("20")], [25, f("25")], [30, f("30")], [35, f("35")], [40, f("40")], [45, f("45")], [50, f("50")], [55, f("55")], [0, f("00")]].map(([numberValue, label], index2) => { + const f2 = utils2.formatNumber; + return [[5, f2("05")], [10, f2("10")], [15, f2("15")], [20, f2("20")], [25, f2("25")], [30, f2("30")], [35, f2("35")], [40, f2("40")], [45, f2("45")], [50, f2("50")], [55, f2("55")], [0, f2("00")]].map(([numberValue, label], index2) => { const selected = numberValue === value; return /* @__PURE__ */ jsxRuntimeExports.jsx(ClockNumber, { label, @@ -59837,12 +59822,12 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); function __rest(s, e) { var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; + for (var p2 in s) if (Object.prototype.hasOwnProperty.call(s, p2) && e.indexOf(p2) < 0) + t[p2] = s[p2]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; + for (var i = 0, p2 = Object.getOwnPropertySymbols(s); i < p2.length; i++) { + if (e.indexOf(p2[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p2[i])) + t[p2[i]] = s[p2[i]]; } return t; } @@ -62718,8 +62703,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } return jsxRuntimeExports.jsx(MRT_TablePaper, { table }); }; - const { Open: Open$i, Child: Child$4 } = gubu_minExports.Gubu; - const Shape$2 = gubu_minExports.Gubu(Open$i({ + const { Open: Open$j, Child: Child$4 } = gubu_minExports.Gubu; + const Shape$2 = gubu_minExports.Gubu(Open$j({ name: String, prefix: String, ent: String, @@ -62752,8 +62737,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }; } function buildFilter(query) { - const filter = Object.entries(query).reduce((a, n) => (n[0].startsWith("f_") ? a[n[0].substring(2)] = n[1] : null, a), {}); - const filterDesc = Object.entries(filter).reduce((a, n) => a + "~" + n[0] + "=" + n[1], ""); + const filter = Object.entries(query).reduce((a, n2) => (n2[0].startsWith("f_") ? a[n2[0].substring(2)] = n2[1] : null, a), {}); + const filterDesc = Object.entries(filter).reduce((a, n2) => a + "~" + n2[0] + "=" + n2[1], ""); return { filter, filterDesc }; } Object.assign(VxgBasicEntityListPlugin, { @@ -62764,7 +62749,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } }); Object.defineProperty(VxgBasicEntityListPlugin, "name", { value: "VxgBasicEntityListPlugin" }); - const CMPNAME$k = "BasicEntityList"; + const CMPNAME$l = "BasicEntityList"; function BasicEntityList(props) { const { ctx } = props; const { seneca } = ctx(); @@ -64684,23 +64669,23 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha _formControl.current.formState = getProxyFormState(formState, control); return _formControl.current; } - const CMPNAME$j = "BasicEntitySliderField"; - const { Open: Open$h } = gubu_minExports.Gubu; + const CMPNAME$k = "BasicEntitySliderField"; + const { Open: Open$i } = gubu_minExports.Gubu; const BasicEntityCheckboxFieldSpecShape = gubu_minExports.Gubu( - Open$h({ - field: Open$h({ + Open$i({ + field: Open$i({ id: String, name: String, - kind: gubu_minExports.Skip(String), + kind: "", label: gubu_minExports.Default("", String), - ux: Open$h({ + ux: Open$i({ kind: gubu_minExports.Exact("Checkbox"), edit: gubu_minExports.Default(true), - props: Open$h({}) + props: Open$i({}) }) }) }), - { name: CMPNAME$j } + { name: CMPNAME$k } ); function BasicEntityCheckboxField(props) { const { spec } = props; @@ -64733,29 +64718,29 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } ) }), `${field.id}-box`); } - const CMPNAME$i = "BasicEntityAutocompleteField"; - const { Open: Open$g } = gubu_minExports.Gubu; + const CMPNAME$j = "BasicEntityAutocompleteField"; + const { Open: Open$h } = gubu_minExports.Gubu; const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu( - Open$g({ - field: Open$g({ + Open$h({ + field: Open$h({ id: String, name: String, - kind: gubu_minExports.Skip(String), + kind: "", label: gubu_minExports.Default(""), - options: Open$g({ + options: Open$h({ label: { field: gubu_minExports.Default("label") }, value: { field: gubu_minExports.Default("value") }, multiple: gubu_minExports.Default(false), - default: Open$g({}), - ents: Open$g({}) + default: Open$h({}), + ents: Open$h({}) }), - ux: Open$g({ + ux: Open$h({ kind: gubu_minExports.Exact("Autocomplete"), edit: gubu_minExports.Default(true) }) }) }), - { name: CMPNAME$i } + { name: CMPNAME$j } ); function BasicEntityAutocompleteField(props) { const { spec } = props; @@ -64837,16 +64822,16 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha return val || []; } } - const CMPNAME$h = "BasicEntitySliderField"; - const { Open: Open$f } = gubu_minExports.Gubu; + const CMPNAME$i = "BasicEntitySliderField"; + const { Open: Open$g } = gubu_minExports.Gubu; const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu( - Open$f({ - field: Open$f({ + Open$g({ + field: Open$g({ id: String, name: String, - kind: gubu_minExports.Skip(String), + kind: "", label: gubu_minExports.Default("", String), - ux: Open$f({ + ux: Open$g({ kind: gubu_minExports.Exact("Slider"), edit: gubu_minExports.Default(true), step: gubu_minExports.Default(1), @@ -64861,7 +64846,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }) }) }), - { name: CMPNAME$h } + { name: CMPNAME$i } ); function BasicEntitySliderField(props) { const { spec } = props; @@ -64908,29 +64893,29 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } return marks; } - const CMPNAME$g = "BasicEntitySliderField"; - const { Open: Open$e } = gubu_minExports.Gubu; + const CMPNAME$h = "BasicEntitySliderField"; + const { Open: Open$f } = gubu_minExports.Gubu; const BasicEntityRadioGroupFieldSpecShape = gubu_minExports.Gubu( - Open$e({ - field: Open$e({ + Open$f({ + field: Open$f({ id: String, name: String, - kind: gubu_minExports.Skip(String), + kind: "", label: gubu_minExports.Default("", String), - ux: Open$e({ + ux: Open$f({ kind: gubu_minExports.Exact("RadioGroup"), edit: gubu_minExports.Default(true), direction: gubu_minExports.Exact("row", "column").Default("row") }), - options: Open$e({ + options: Open$f({ label: { field: gubu_minExports.Default("label") }, value: { field: gubu_minExports.Default("value") }, - default: Open$e({}), - ents: Open$e({}) + default: Open$f({}), + ents: Open$f({}) }) }) }), - { name: CMPNAME$g } + { name: CMPNAME$h } ); function BasicEntityRadioGroupField(props) { const { spec } = props; @@ -65001,23 +64986,23 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha resolvedDefault }; } - const CMPNAME$f = "BasicEntityTextBoxField"; - const { Open: Open$d } = gubu_minExports.Gubu; + const CMPNAME$g = "BasicEntityTextBoxField"; + const { Open: Open$e } = gubu_minExports.Gubu; const BasicEntityTextBoxFieldSpecShape = gubu_minExports.Gubu( - Open$d({ - field: Open$d({ + Open$e({ + field: Open$e({ id: String, name: String, - kind: gubu_minExports.Skip(String), + kind: "", label: gubu_minExports.Default("", String), - ux: Open$d({ + ux: Open$e({ kind: gubu_minExports.Exact("TextBox"), edit: gubu_minExports.Default(true), - props: Open$d({}) + props: Open$e({}) }) }) }), - { name: CMPNAME$f } + { name: CMPNAME$g } ); function BasicEntityTextBoxField(props) { const { spec } = props; @@ -65042,23 +65027,23 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const { err } = props; return err ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-active", children: err.message }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-none" }); } - const CMPNAME$e = "BasicEntityTextField"; - const { Open: Open$c } = gubu_minExports.Gubu; + const CMPNAME$f = "BasicEntityTextField"; + const { Open: Open$d } = gubu_minExports.Gubu; const BasicEntityTextFieldSpecShape = gubu_minExports.Gubu( - Open$c({ - field: Open$c({ + Open$d({ + field: Open$d({ id: String, name: String, - kind: gubu_minExports.Skip(String), + kind: "", label: gubu_minExports.Default("", String), - ux: Open$c({ + ux: Open$d({ kind: gubu_minExports.Exact("Text"), edit: gubu_minExports.Default(true), - props: Open$c({}) + props: Open$d({}) }) }) }), - { name: CMPNAME$e } + { name: CMPNAME$f } ); function BasicEntityTextField(props) { const { spec } = props; @@ -65081,23 +65066,23 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, field.id); } - const CMPNAME$d = "BasicEntityDateField"; - const { Open: Open$b } = gubu_minExports.Gubu; + const CMPNAME$e = "BasicEntityDateField"; + const { Open: Open$c } = gubu_minExports.Gubu; const BasicEntityDateFieldSpecShape = gubu_minExports.Gubu( - Open$b({ - field: Open$b({ + Open$c({ + field: Open$c({ id: String, name: String, - kind: gubu_minExports.Skip(String), + kind: "", label: gubu_minExports.Default("", String), - ux: Open$b({ + ux: Open$c({ kind: gubu_minExports.Exact("Date"), edit: gubu_minExports.Default(true), - props: Open$b({}) + props: Open$c({}) }) }) }), - { name: CMPNAME$d } + { name: CMPNAME$e } ); function BasicEntityDateField(props) { const { spec } = props; @@ -65118,23 +65103,23 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }, register(field.name)) ) }, field.id); } - const CMPNAME$c = "BasicEntityTimeField"; - const { Open: Open$a } = gubu_minExports.Gubu; + const CMPNAME$d = "BasicEntityTimeField"; + const { Open: Open$b } = gubu_minExports.Gubu; const BasicEntityTimeFieldSpecShape = gubu_minExports.Gubu( - Open$a({ - field: Open$a({ + Open$b({ + field: Open$b({ id: String, name: String, - kind: gubu_minExports.Skip(String), + kind: "", label: gubu_minExports.Default("", String), - ux: Open$a({ + ux: Open$b({ kind: gubu_minExports.Exact("Time"), edit: gubu_minExports.Default(true), - props: Open$a({}) + props: Open$b({}) }) }) }), - { name: CMPNAME$c } + { name: CMPNAME$d } ); function BasicEntityTimeField(props) { const { spec } = props; @@ -65155,23 +65140,23 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }, register(field.name)) ) }, field.id); } - const CMPNAME$b = "BasicEntityDateTimeField"; - const { Open: Open$9 } = gubu_minExports.Gubu; + const CMPNAME$c = "BasicEntityDateTimeField"; + const { Open: Open$a } = gubu_minExports.Gubu; const BasicEntityDateTimeFieldSpecShape = gubu_minExports.Gubu( - Open$9({ - field: Open$9({ + Open$a({ + field: Open$a({ id: String, name: String, - kind: gubu_minExports.Skip(String), + kind: "", label: gubu_minExports.Default("", String), - ux: Open$9({ + ux: Open$a({ kind: gubu_minExports.Exact("DateTime"), edit: gubu_minExports.Default(true), - props: Open$9({}) + props: Open$a({}) }) }) }), - { name: CMPNAME$b } + { name: CMPNAME$c } ); function BasicEntityDateTimeField(props) { const { spec } = props; @@ -65192,24 +65177,24 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }, register(field.name)) ) }, field.id); } - const CMPNAME$a = "BasicEntitySliderField"; - const { Open: Open$8 } = gubu_minExports.Gubu; + const CMPNAME$b = "BasicEntitySliderField"; + const { Open: Open$9 } = gubu_minExports.Gubu; const BasicEntityRatingFieldSpecShape = gubu_minExports.Gubu( - Open$8({ - field: Open$8({ + Open$9({ + field: Open$9({ id: String, name: String, - kind: gubu_minExports.Skip(String), + kind: "", label: gubu_minExports.Default("", String), - ux: Open$8({ + ux: Open$9({ kind: gubu_minExports.Exact("Rating"), edit: gubu_minExports.Default(true), precision: 1, - props: Open$8({}) + props: Open$9({}) }) }) }), - { name: CMPNAME$a } + { name: CMPNAME$b } ); function BasicEntityRatingField(props) { const { spec } = props; @@ -65238,23 +65223,23 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ) ] }, `${field.id}-div`); } - const CMPNAME$9 = "BasicEntitySliderField"; - const { Open: Open$7 } = gubu_minExports.Gubu; + const CMPNAME$a = "BasicEntitySliderField"; + const { Open: Open$8 } = gubu_minExports.Gubu; const BasicEntityButtonFieldSpecShape = gubu_minExports.Gubu( - Open$7({ - field: Open$7({ + Open$8({ + field: Open$8({ id: String, name: String, - kind: gubu_minExports.Skip(String), - label: gubu_minExports.Default("", String), - ux: Open$7({ + kind: "", + label: "", + ux: Open$8({ kind: gubu_minExports.Exact("Button"), edit: gubu_minExports.Default(true), - props: Open$7({}) + props: Open$8({}) }) }) }), - { name: CMPNAME$9 } + { name: CMPNAME$a } ); function BasicEntityButtonField(props) { const { spec } = props; @@ -65279,6 +65264,48 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha `${field.id}-controller` ) }, `${field.id}-div`); } + const CMPNAME$9 = "BasicEntitySliderField"; + const { Open: Open$7 } = gubu_minExports.Gubu; + const BasicEntityButtonGroupFieldSpecShape = gubu_minExports.Gubu( + Open$7({ + field: Open$7({ + id: String, + name: String, + kind: "", + label: String, + ux: Open$7({ + kind: gubu_minExports.Exact("ButtonGroup"), + edit: gubu_minExports.Default(true), + props: Open$7({}) + }) + }) + }), + { name: CMPNAME$9 } + ); + function BasicEntityButtonGroupField(props) { + const { spec } = props; + const basicEntityButtonGroupField = BasicEntityButtonGroupFieldSpecShape(spec); + const { control, field } = basicEntityButtonGroupField; + return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx( + Controller, + { + name: field.name, + control, + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.ButtonGroup, __spreadProps(__spreadValues({}, field.ux.props), { children: Object.entries(field.options.ents).map(([key, value2]) => { + var _a, _b; + return /* @__PURE__ */ jsxRuntimeExports.jsx( + material.Button, + { + onClick: () => onChange(value2), + children: (_b = (_a = field.options.ents) == null ? void 0 : _a[key]) == null ? void 0 : _b[field.options.label.field] + }, + `${field.id}-${key}` + ); + }) })) + }, + `${field.id}-controller` + ) }, `${field.id}-div`); + } const CMPNAME$8 = "BasicEntityField"; const { Open: Open$6 } = gubu_minExports.Gubu; const BasicEntityFieldSpecShape = gubu_minExports.Gubu( @@ -65286,7 +65313,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha field: Open$6({ id: String, name: String, - kind: gubu_minExports.Skip(String), + kind: String, label: gubu_minExports.Default("", String), ux: Open$6({ kind: gubu_minExports.Exact( @@ -65300,7 +65327,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha "Slider", "RadioGroup", "Rating", - "Button" + "Button", + "ButtonGroup" ), edit: gubu_minExports.Default(true), rows: gubu_minExports.Default(3), @@ -65321,7 +65349,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha Slider: BasicEntitySliderField, RadioGroup: BasicEntityRadioGroupField, Rating: BasicEntityRatingField, - Button: BasicEntityButtonField + Button: BasicEntityButtonField, + ButtonGroup: BasicEntityButtonGroupField }; function BasicEntityField(props) { const { ctx, spec } = props; @@ -65680,7 +65709,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha "aim:app,on:BasicLed,save:item", function(msg) { return __async(this, null, function* () { - const data = Object.entries(spec.def.edit.field).filter((n) => false !== n[1].ux.edit).reduce((a, n) => (a[n[0]] = msg.data[n[0]], a), {}); + const data = Object.entries(spec.def.edit.field).filter((n2) => false !== n2[1].ux.edit).reduce((a, n2) => (a[n2[0]] = msg.data[n2[0]], a), {}); const item = yield seneca.entity(entCanon).save$(data); navigate("/view/" + name + "/edit/" + item.id); }); @@ -65864,13 +65893,13 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const sections = vmap(nav.section, { active: vmap.FILTER, name: vmap.COPY, - items: (_2, p) => vmap(p.self.item, { + items: (_2, p2) => vmap(p2.self.item, { active: vmap.FILTER, name: vmap.COPY, view: vmap.COPY, - title: vmap.FILTER((_22, p2) => { + title: vmap.FILTER((_22, p22) => { var _a; - return (_a = viewMap[p2.self.view]) == null ? void 0 : _a.title; + return (_a = viewMap[p22.self.view]) == null ? void 0 : _a.title; }) }) }); @@ -66034,8 +66063,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha var e = { exports: {} }; (function(t2) { (function() { - !function(n2) { - "object" == typeof e.exports ? e.exports = n2() : ("undefined" != typeof window ? window : void 0 !== t2 ? t2 : "undefined" != typeof self ? self : this).Gex = n2(); + !function(n3) { + "object" == typeof e.exports ? e.exports = n3() : ("undefined" != typeof window ? window : void 0 !== t2 ? t2 : "undefined" != typeof self ? self : this).Gex = n3(); }(function() { var e2 = { exports: {} }; Object.defineProperty(e2.exports, "__esModule", { value: true }), e2.exports.Gex = void 0; @@ -66054,8 +66083,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } match(e3) { e3 = "" + e3; - let t4 = false, n3 = Object.keys(this.gexmap); - for (let r3 = 0; r3 < n3.length && !t4; r3++) t4 = !!this.gexmap[n3[r3]].exec(e3); + let t4 = false, n4 = Object.keys(this.gexmap); + for (let r3 = 0; r3 < n4.length && !t4; r3++) t4 = !!this.gexmap[n4[r3]].exec(e3); return t4; } on(e3) { @@ -66064,12 +66093,12 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha if ("string" === t4 || "number" === t4 || "boolean" === t4 || e3 instanceof Date || e3 instanceof RegExp) return this.match(e3) ? e3 : null; if (Array.isArray(e3)) { let t5 = []; - for (let n3 = 0; n3 < e3.length; n3++) !this.dodgy(e3[n3]) && this.match(e3[n3]) && t5.push(e3[n3]); + for (let n4 = 0; n4 < e3.length; n4++) !this.dodgy(e3[n4]) && this.match(e3[n4]) && t5.push(e3[n4]); return t5; } { let t5 = {}; - for (let n3 in e3) Object.prototype.hasOwnProperty.call(e3, n3) && this.match(n3) && (t5[n3] = e3[n3]); + for (let n4 in e3) Object.prototype.hasOwnProperty.call(e3, n4) && this.match(n4) && (t5[n4] = e3[n4]); return t5; } } @@ -66095,41 +66124,41 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha return this.toString(); } } - function n2(e3) { + function n3(e3) { return new t3(e3); } - return e2.exports.Gex = n2, e2.exports = n2, e2.exports.Gex = n2, e2.exports.default = n2, e2.exports; + return e2.exports.Gex = n3, e2.exports = n3, e2.exports.Gex = n3, e2.exports.default = n3, e2.exports; }); }).call(this); }).call(this, "undefined" != typeof commonjsGlobal ? commonjsGlobal : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}), e = e.exports; - var t, n, r2, s, i, o, l, u, a, f = {}, p = this && this.__classPrivateFieldGet || function(e2, t2, n2, r3) { - if ("a" === n2 && !r3) throw new TypeError("Private accessor was defined without a getter"); + var t, n2, r2, s, i, o, l2, u, a, f2 = {}, p2 = this && this.__classPrivateFieldGet || function(e2, t2, n3, r3) { + if ("a" === n3 && !r3) throw new TypeError("Private accessor was defined without a getter"); if ("function" == typeof t2 ? e2 !== t2 || !r3 : !t2.has(e2)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return "m" === n2 ? r3 : "a" === n2 ? r3.call(e2) : r3 ? r3.value : t2.get(e2); + return "m" === n3 ? r3 : "a" === n3 ? r3.call(e2) : r3 ? r3.value : t2.get(e2); }; - Object.defineProperty(f, "__esModule", { value: true }), f.IntervalMatcher = f.GexMatcher = void 0, f.GexMatcher = class { + Object.defineProperty(f2, "__esModule", { value: true }), f2.IntervalMatcher = f2.GexMatcher = void 0, f2.GexMatcher = class { constructor() { } - make(t2, n2) { - if ("string" == typeof n2 && n2.match(/[*?]/)) { - let t3 = (0, e.Gex)(n2); - return { kind: "gex", match: (e2) => null != t3.on(e2), fix: n2, meta: {}, same(e2) { + make(t2, n3) { + if ("string" == typeof n3 && n3.match(/[*?]/)) { + let t3 = (0, e.Gex)(n3); + return { kind: "gex", match: (e2) => null != t3.on(e2), fix: n3, meta: {}, same(e2) { return null != e2 && e2.kind === this.kind && e2.fix === this.fix; } }; } } scan(e2, t2) { - let n2 = e2.filter((e3) => "*" === e3.fix).length > 0; - return { complete: n2, sound: n2, gaps: [], overs: [], why: "no-star" }; + let n3 = e2.filter((e3) => "*" === e3.fix).length > 0; + return { complete: n3, sound: n3, gaps: [], overs: [], why: "no-star" }; } }; const h = new RegExp(["^/s*", "(=*[<>/(/[]?=*)?/s*([-+0-9a-fA-FeEoOxX]+(/.([0-9a-fA-FeEoOxX]+))?)([/)/]]?)(/s*(,|&+|/|+|/./.)/s*(=*[<>]?=*)/s*([-+.0-9a-fA-FeEoOxX]+)/s*([/)/]]?))?/s*$"].join("").replace(/\//g, "\\")); class c { constructor() { - this.kind = "interval", t.set(this, (e2, t2) => function(n2) { - return e2(n2) && t2(n2); - }), n.set(this, (e2, t2) => function(n2) { - return e2(n2) || t2(n2); + this.kind = "interval", t.set(this, (e2, t2) => function(n3) { + return e2(n3) && t2(n3); + }), n2.set(this, (e2, t2) => function(n3) { + return e2(n3) || t2(n3); }), r2.set(this, (e2) => function(e3) { return false; }), s.set(this, (e2) => function(e3) { @@ -66138,7 +66167,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha return t2 > e2; }), o.set(this, (e2) => function(t2) { return t2 >= e2; - }), l.set(this, (e2) => function(t2) { + }), l2.set(this, (e2) => function(t2) { return t2 < e2; }), u.set(this, (e2) => function(t2) { return t2 <= e2; @@ -66146,183 +66175,183 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha return t2 === e2; }); } - make(e2, f2) { - if ("string" == typeof f2 && f2.match(/[=<>.[()\]]/)) { - let e3 = f2.match(h), d2 = { jo: "and", o0: "err", n0: NaN, o1: "err", n1: NaN }, g2 = (e4) => false; + make(e2, f3) { + if ("string" == typeof f3 && f3.match(/[=<>.[()\]]/)) { + let e3 = f3.match(h), d2 = { jo: "and", o0: "err", n0: NaN, o1: "err", n1: NaN }, g2 = (e4) => false; if (null != e3) { - let h2 = c.normop(e3[1]) || c.normop(e3[5]), m2 = c.normop(e3[8]) || c.normop(e3[10]), v = p(this, "=" === h2 ? a : "<" === h2 || ")" === h2 ? l : "<=" === h2 || "]" === h2 ? u : ">" === h2 || "(" === h2 ? i : ">=" === h2 || "[" === h2 ? o : s, "f"), x = Number(e3[2]), k = null == e3[9] ? NaN : Number(e3[9]), y = e3[7], w = null == y ? p(this, n, "f") : "&" === y.substring(0, 1) || "," === y.substring(0, 1) ? p(this, t, "f") : p(this, n, "f"); - ".." === y && (w = p(this, t, "f"), v = p(this, s, "f") === v ? p(this, o, "f") : v, m2 = "" === m2 ? "<=" : m2); - let N = p(this, null == m2 ? r2 : "=" === m2 ? a : "<" === m2 || ")" === m2 ? l : "<=" === m2 || "]" === m2 ? u : ">" === m2 ? i : ">=" === m2 ? o : s, "f"); - if (x === k && ("=" === h2 && null != m2 ? (k = NaN, N = p(this, r2, "f"), v = m2.includes("<") ? p(this, u, "f") : m2.includes(">") ? p(this, o, "f") : m2.includes("=") ? p(this, a, "f") : p(this, s, "f")) : "=" === m2 && null != h2 && (k = NaN, N = p(this, r2, "f"), v = h2.includes("<") ? p(this, u, "f") : h2.includes(">") ? p(this, o, "f") : p(this, s, "f"))), p(this, s, "f") !== v && p(this, r2, "f") === N && (p(this, l, "f") === v || p(this, u, "f") === v ? (N = v, k = x, v = p(this, o, "f"), x = Number.NEGATIVE_INFINITY, w = p(this, t, "f")) : p(this, i, "f") !== v && p(this, o, "f") !== v || (N = p(this, u, "f"), k = Number.POSITIVE_INFINITY, w = p(this, t, "f"))), !isNaN(k) && k < x) { - let e4 = N, t2 = k; - k = x, x = t2, ".." !== y && (N = v, v = e4); + let h2 = c.normop(e3[1]) || c.normop(e3[5]), m3 = c.normop(e3[8]) || c.normop(e3[10]), v = p2(this, "=" === h2 ? a : "<" === h2 || ")" === h2 ? l2 : "<=" === h2 || "]" === h2 ? u : ">" === h2 || "(" === h2 ? i : ">=" === h2 || "[" === h2 ? o : s, "f"), x = Number(e3[2]), k2 = null == e3[9] ? NaN : Number(e3[9]), y = e3[7], w = null == y ? p2(this, n2, "f") : "&" === y.substring(0, 1) || "," === y.substring(0, 1) ? p2(this, t, "f") : p2(this, n2, "f"); + ".." === y && (w = p2(this, t, "f"), v = p2(this, s, "f") === v ? p2(this, o, "f") : v, m3 = "" === m3 ? "<=" : m3); + let N = p2(this, null == m3 ? r2 : "=" === m3 ? a : "<" === m3 || ")" === m3 ? l2 : "<=" === m3 || "]" === m3 ? u : ">" === m3 ? i : ">=" === m3 ? o : s, "f"); + if (x === k2 && ("=" === h2 && null != m3 ? (k2 = NaN, N = p2(this, r2, "f"), v = m3.includes("<") ? p2(this, u, "f") : m3.includes(">") ? p2(this, o, "f") : m3.includes("=") ? p2(this, a, "f") : p2(this, s, "f")) : "=" === m3 && null != h2 && (k2 = NaN, N = p2(this, r2, "f"), v = h2.includes("<") ? p2(this, u, "f") : h2.includes(">") ? p2(this, o, "f") : p2(this, s, "f"))), p2(this, s, "f") !== v && p2(this, r2, "f") === N && (p2(this, l2, "f") === v || p2(this, u, "f") === v ? (N = v, k2 = x, v = p2(this, o, "f"), x = Number.NEGATIVE_INFINITY, w = p2(this, t, "f")) : p2(this, i, "f") !== v && p2(this, o, "f") !== v || (N = p2(this, u, "f"), k2 = Number.POSITIVE_INFINITY, w = p2(this, t, "f"))), !isNaN(k2) && k2 < x) { + let e4 = N, t2 = k2; + k2 = x, x = t2, ".." !== y && (N = v, v = e4); } - let b = v(x), O = N(k), j = w(b, O); - return d2 = { jo: j.name, o0: b.name, n0: x, o1: O.name, n1: k }, g2 = (e4) => { - let t2 = false, n2 = parseFloat(e4); - return isNaN(n2) || (t2 = j(n2)), t2; - }, { kind: "interval", fix: f2, meta: d2, match: g2, same(e4) { + let b = v(x), O = N(k2), j = w(b, O); + return d2 = { jo: j.name, o0: b.name, n0: x, o1: O.name, n1: k2 }, g2 = (e4) => { + let t2 = false, n3 = parseFloat(e4); + return isNaN(n3) || (t2 = j(n3)), t2; + }, { kind: "interval", fix: f3, meta: d2, match: g2, same(e4) { return null != e4 && e4.kind === this.kind && e4.meta.jo === this.meta.jo && e4.meta.o0 === this.meta.o0 && e4.meta.n0 === this.meta.n0 && e4.meta.o1 === this.meta.o1 && e4.meta.n1 === this.meta.n1; } }; } } } scan(e2, t2) { - let n2 = { complete: false, sound: false, gaps: [], overs: [], lower: null, upper: null }, r3 = Number.NEGATIVE_INFINITY, s2 = Number.POSITIVE_INFINITY, i2 = this.half_intervals(e2); + let n3 = { complete: false, sound: false, gaps: [], overs: [], lower: null, upper: null }, r3 = Number.NEGATIVE_INFINITY, s2 = Number.POSITIVE_INFINITY, i2 = this.half_intervals(e2); i2.reduce((e3, t3) => { - let n3 = "eq" === t3.o, s3 = "lt" === t3.o, i3 = "lte" === t3.o, o3 = "gt" === t3.o, l2 = "gte" === t3.o, u2 = t3.n; + let n4 = "eq" === t3.o, s3 = "lt" === t3.o, i3 = "lte" === t3.o, o3 = "gt" === t3.o, l3 = "gte" === t3.o, u2 = t3.n; if (null == e3.lower) { let s4 = { n: r3, o: "gte" }; - e3.lower = s4, e3.upper = t3, r3 == u2 && l2 || (o3 || l2 ? e3.gaps.push([s4, { n: u2, o: o3 ? "lte" : "lt", m: 0 }]) : n3 && e3.gaps.push([s4, { n: u2, o: "lte", m: 1 }])); + e3.lower = s4, e3.upper = t3, r3 == u2 && l3 || (o3 || l3 ? e3.gaps.push([s4, { n: u2, o: o3 ? "lte" : "lt", m: 0 }]) : n4 && e3.gaps.push([s4, { n: u2, o: "lte", m: 1 }])); } else { - let r4 = "eq" === e3.upper.o, a2 = "lt" === e3.upper.o, f2 = "lte" === e3.upper.o, p2 = (e3.upper.o, e3.upper.o, e3.upper.n), h2 = e3.upper; - u2 === p2 ? a2 && (l2 || n3) || (f2 || r4) && o3 || (r4 || a2 || f2) && e3.gaps.push([{ n: p2, o: r4 || f2 ? "gt" : "gte", m: 2, d: { u: h2, h: t3 } }, { n: u2, o: n3 || l2 ? "lt" : "lte", m: 3 }]) : p2 < u2 ? s3 || i3 || (r4 || a2 || f2) && e3.gaps.push([{ n: p2, o: r4 || f2 ? "gt" : "gte", m: 4 }, { n: u2, o: n3 || l2 ? "lt" : "lte", m: 5 }]) : e3.overs.push([{ n: u2, o: n3 || l2 ? "gte" : "gt", m: 10 }, { n: p2, o: r4 || f2 ? "lte" : "lt", m: 11 }]), e3.upper = t3; + let r4 = "eq" === e3.upper.o, a2 = "lt" === e3.upper.o, f3 = "lte" === e3.upper.o, p3 = (e3.upper.o, e3.upper.o, e3.upper.n), h2 = e3.upper; + u2 === p3 ? a2 && (l3 || n4) || (f3 || r4) && o3 || (r4 || a2 || f3) && e3.gaps.push([{ n: p3, o: r4 || f3 ? "gt" : "gte", m: 2, d: { u: h2, h: t3 } }, { n: u2, o: n4 || l3 ? "lt" : "lte", m: 3 }]) : p3 < u2 ? s3 || i3 || (r4 || a2 || f3) && e3.gaps.push([{ n: p3, o: r4 || f3 ? "gt" : "gte", m: 4 }, { n: u2, o: n4 || l3 ? "lt" : "lte", m: 5 }]) : e3.overs.push([{ n: u2, o: n4 || l3 ? "gte" : "gt", m: 10 }, { n: p3, o: r4 || f3 ? "lte" : "lt", m: 11 }]), e3.upper = t3; } return e3; - }, n2); + }, n3); let o2 = 0 < i2.length && i2[i2.length - 1]; - return o2 && s2 !== o2.n && "gt" !== o2.o && "gte" !== o2.o && n2.gaps.push([{ n: o2.n, o: "eq" === o2.o || "lte" === o2.o ? "gt" : "gte", m: 6 }, { n: s2, o: "lte", m: 7 }]), n2.complete = 0 === n2.gaps.length, n2.sound = 0 === n2.overs.length, n2; + return o2 && s2 !== o2.n && "gt" !== o2.o && "gte" !== o2.o && n3.gaps.push([{ n: o2.n, o: "eq" === o2.o || "lte" === o2.o ? "gt" : "gte", m: 6 }, { n: s2, o: "lte", m: 7 }]), n3.complete = 0 === n3.gaps.length, n3.sound = 0 === n3.overs.length, n3; } half_intervals(e2) { let t2 = []; for (let r3 of e2) t2.push([{ n: r3.meta.n0, o: r3.meta.o0 }, { n: r3.meta.n1, o: r3.meta.o1 }]); - var n2 = ["lt", "lte", "eq", "gte", "gt"]; + var n3 = ["lt", "lte", "eq", "gte", "gt"]; return t2.map((e3) => [isNaN(e3[0].n) || null == e3[0].n ? null : e3[0], isNaN(e3[1].n) || null == e3[1].n ? null : e3[1]].filter((e4) => null != e4)).sort((e3, t3) => { if (e3[0].n < t3[0].n) return -1; if (t3[0].n < e3[0].n) return 1; - var r3 = n2.indexOf(e3[0].o), s2 = n2.indexOf(t3[0].o); + var r3 = n3.indexOf(e3[0].o), s2 = n3.indexOf(t3[0].o); if (r3 < s2) return -1; if (s2 < r3) return 1; if (e3[1].n < t3[1].n) return -1; if (t3[1].n < e3[1].n) return 1; - var i2 = n2.indexOf(e3[1].o), o2 = n2.indexOf(t3[1].o); + var i2 = n3.indexOf(e3[1].o), o2 = n3.indexOf(t3[1].o); return i2 < o2 ? -1 : o2 < i2 ? 1 : 0; }).reduce((e3, t3) => e3.concat(...t3), []); } } - f.IntervalMatcher = c, t = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap(), r2 = /* @__PURE__ */ new WeakMap(), s = /* @__PURE__ */ new WeakMap(), i = /* @__PURE__ */ new WeakMap(), o = /* @__PURE__ */ new WeakMap(), l = /* @__PURE__ */ new WeakMap(), u = /* @__PURE__ */ new WeakMap(), a = /* @__PURE__ */ new WeakMap(), c.normop = (e2) => null == e2 ? null : ((e2.match(/([<>\(\)\[\]])/) || [])[1] || "") + ((e2.match(/(=)/) || [])[1] || ""); + f2.IntervalMatcher = c, t = /* @__PURE__ */ new WeakMap(), n2 = /* @__PURE__ */ new WeakMap(), r2 = /* @__PURE__ */ new WeakMap(), s = /* @__PURE__ */ new WeakMap(), i = /* @__PURE__ */ new WeakMap(), o = /* @__PURE__ */ new WeakMap(), l2 = /* @__PURE__ */ new WeakMap(), u = /* @__PURE__ */ new WeakMap(), a = /* @__PURE__ */ new WeakMap(), c.normop = (e2) => null == e2 ? null : ((e2.match(/([<>\(\)\[\]])/) || [])[1] || "") + ((e2.match(/(=)/) || [])[1] || ""); var d = { exports: {} }; function g(t2) { - var n2 = {}, r3 = {}; + var n3 = {}, r3 = {}; let s2 = []; - return (t2 = t2 || {}).gex && s2.push(new f.GexMatcher()), t2.interval && s2.push(new f.IntervalMatcher()), n2.top = function() { + return (t2 = t2 || {}).gex && s2.push(new f2.GexMatcher()), t2.interval && s2.push(new f2.IntervalMatcher()), n3.top = function() { return r3; - }, n2.add = function(e2, i2) { + }, n3.add = function(e2, i2) { e2 = __spreadValues({}, e2); - var o2 = "function" == typeof t2 ? t2.call(n2, e2, i2) : null, l2 = Object.keys(e2).filter((t3) => null != e2[t3]).sort(); - l2.forEach(function(t3) { + var o2 = "function" == typeof t2 ? t2.call(n3, e2, i2) : null, l3 = Object.keys(e2).filter((t3) => null != e2[t3]).sort(); + l3.forEach(function(t3) { e2[t3] = String(e2[t3]); }); - for (var u2, a2 = r3, f2 = 0; f2 < l2.length; f2++) { - var p2 = l2[f2], h2 = e2[p2]; - let t3 = s2.reduce((e3, t4) => e3 || t4.make(p2, h2), void 0); - if ((u2 = a2.v) && p2 == a2.k) if (t3) { - var c2 = (g2 = a2.g = a2.g || {})[p2] = g2[p2] || []; + for (var u2, a2 = r3, f3 = 0; f3 < l3.length; f3++) { + var p3 = l3[f3], h2 = e2[p3]; + let t3 = s2.reduce((e3, t4) => e3 || t4.make(p3, h2), void 0); + if ((u2 = a2.v) && p3 == a2.k) if (t3) { + var c2 = (g2 = a2.g = a2.g || {})[p3] = g2[p3] || []; t3 = c2.find((e3) => e3.same(t3)) || (c2.push(t3), t3), a2 = t3.keymap || (t3.keymap = {}); } else a2 = u2[h2] || (u2[h2] = {}); - else if (a2.k) if (p2 < a2.k) { + else if (a2.k) if (p3 < a2.k) { var d2 = a2.s; - g2 = a2.g, a2.s = { k: a2.k, v: a2.v }, d2 && (a2.s.s = d2), g2 && (a2.s.g = g2), a2.g && (a2.g = {}), a2.k = p2, a2.v = {}, t3 ? (c2 = (g2 = a2.g = a2.g || {})[p2] = g2[p2] || [], t3 = c2.find((e3) => e3.same(t3)) || (c2.push(t3), t3), a2 = t3.keymap || (t3.keymap = {})) : a2 = a2.v[h2] = {}; - } else a2 = a2.s || (a2.s = {}), f2--; - else if (a2.k = p2, a2.v = {}, t3) { + g2 = a2.g, a2.s = { k: a2.k, v: a2.v }, d2 && (a2.s.s = d2), g2 && (a2.s.g = g2), a2.g && (a2.g = {}), a2.k = p3, a2.v = {}, t3 ? (c2 = (g2 = a2.g = a2.g || {})[p3] = g2[p3] || [], t3 = c2.find((e3) => e3.same(t3)) || (c2.push(t3), t3), a2 = t3.keymap || (t3.keymap = {})) : a2 = a2.v[h2] = {}; + } else a2 = a2.s || (a2.s = {}), f3--; + else if (a2.k = p3, a2.v = {}, t3) { var g2; - c2 = (g2 = a2.g = a2.g || {})[p2] = g2[p2] || []; + c2 = (g2 = a2.g = a2.g || {})[p3] = g2[p3] || []; t3 = c2.find((e3) => e3.same(t3)) || (c2.push(t3), t3), a2 = t3.keymap || (t3.keymap = {}); } else a2 = a2.v[h2] = {}; } - return void 0 !== i2 && a2 && (a2.d = i2, o2 && (a2.f = "function" == typeof o2 ? o2 : o2.find, a2.r = "function" == typeof o2.remove ? o2.remove : void 0)), n2; - }, n2.findexact = function(e2) { - return n2.find(e2, true); - }, n2.find = function(e2, t3, s3) { + return void 0 !== i2 && a2 && (a2.d = i2, o2 && (a2.f = "function" == typeof o2 ? o2 : o2.find, a2.r = "function" == typeof o2.remove ? o2.remove : void 0)), n3; + }, n3.findexact = function(e2) { + return n3.find(e2, true); + }, n3.find = function(e2, t3, s3) { if (null == e2) return null; - var i2 = r3, o2 = void 0 === r3.d ? null : r3.d, l2 = r3.f, u2 = null, a2 = [], f2 = {}, p2 = Object.keys(e2).length, h2 = []; + var i2 = r3, o2 = void 0 === r3.d ? null : r3.d, l3 = r3.f, u2 = null, a2 = [], f3 = {}, p3 = Object.keys(e2).length, h2 = []; void 0 !== r3.d && h2.push(r3.d); do { if (u2 = i2.k, i2.v) { var c2 = e2[u2], d2 = i2.v[c2]; if (!d2 && i2.g && i2.g[u2]) { - for (var g2 = i2.g[u2], m2 = 0; m2 < g2.length; m2++) if (g2[m2].match(c2)) { - d2 = g2[m2].keymap; + for (var g2 = i2.g[u2], m3 = 0; m3 < g2.length; m3++) if (g2[m3].match(c2)) { + d2 = g2[m3].keymap; break; } } - d2 ? (f2[u2] = true, i2.s && a2.push(i2.s), o2 = void 0 === d2.d ? t3 ? null : o2 : d2.d, s3 && void 0 !== d2.d && h2.push(d2.d), l2 = d2.f, i2 = d2) : i2 = i2.s; + d2 ? (f3[u2] = true, i2.s && a2.push(i2.s), o2 = void 0 === d2.d ? t3 ? null : o2 : d2.d, s3 && void 0 !== d2.d && h2.push(d2.d), l3 = d2.f, i2 = d2) : i2 = i2.s; } else i2 = null; null == i2 && 0 < a2.length && (null == o2 || s3 && !t3) && (i2 = a2.pop()); } while (i2); - return t3 ? Object.keys(f2).length !== p2 && (o2 = null) : null == o2 && void 0 !== r3.d && (o2 = r3.d), l2 && (o2 = l2.call(n2, e2, o2)), s3 ? h2 : o2; - }, n2.remove = function(e2) { - var t3, n3 = r3, s3 = null, i2 = []; + return t3 ? Object.keys(f3).length !== p3 && (o2 = null) : null == o2 && void 0 !== r3.d && (o2 = r3.d), l3 && (o2 = l3.call(n3, e2, o2)), s3 ? h2 : o2; + }, n3.remove = function(e2) { + var t3, n4 = r3, s3 = null, i2 = []; do { - if (t3 = n3.k, n3.v || n3.g) { - if (n3.v) { - var o2 = n3.v[e2[t3]]; - o2 && i2.push({ km: n3, v: e2[t3] }); + if (t3 = n4.k, n4.v || n4.g) { + if (n4.v) { + var o2 = n4.v[e2[t3]]; + o2 && i2.push({ km: n4, v: e2[t3] }); } - if (null == o2 && n3.g) { - let r4 = n3.g[t3] || []; + if (null == o2 && n4.g) { + let r4 = n4.g[t3] || []; for (let s4 = 0; s4 < r4.length; s4++) if (r4[s4].fix === e2[t3]) { - i2.push({ km: n3, v: e2[t3], mv: r4[s4] }), o2 = r4[s4].keymap; + i2.push({ km: n4, v: e2[t3], mv: r4[s4] }), o2 = r4[s4].keymap; break; } } - o2 ? (s3 = o2.d, n3 = o2) : n3 = n3.s; - } else n3 = null; - } while (n3); + o2 ? (s3 = o2.d, n4 = o2) : n4 = n4.s; + } else n4 = null; + } while (n4); if (void 0 !== s3) { - var l2 = i2[i2.length - 1]; - if (l2 && l2.km && l2.km.v) { - var u2 = l2.km.v[l2.v] || l2.mv && l2.mv.keymap; + var l3 = i2[i2.length - 1]; + if (l3 && l3.km && l3.km.v) { + var u2 = l3.km.v[l3.v] || l3.mv && l3.mv.keymap; !u2 || u2.r && !u2.r(e2, u2.d) || delete u2.d; } } - }, n2.list = function(t3, n3) { + }, n3.list = function(t3, n4) { t3 = t3 || {}; var s3 = []; - return r3.d && s3.push({ match: {}, data: r3.d, find: r3.f }), function r4(s4, i2, o2, l2) { + return r3.d && s3.push({ match: {}, data: r3.d, find: r3.f }), function r4(s4, i2, o2, l3) { if (s4.v) { - var u2, a2 = s4.k, f2 = (0, e.Gex)(t3 ? null == t3[a2] ? n3 ? null : "*" : t3[a2] : "*"), p2 = __spreadValues({}, i2), h2 = __spreadValues({}, o2); - for (var c2 in s4.v) if (c2 === t3[a2] || !n3 && null == t3[a2] || f2.on(c2)) { - var d2 = __spreadValues({}, p2); + var u2, a2 = s4.k, f3 = (0, e.Gex)(t3 ? null == t3[a2] ? n4 ? null : "*" : t3[a2] : "*"), p3 = __spreadValues({}, i2), h2 = __spreadValues({}, o2); + for (var c2 in s4.v) if (c2 === t3[a2] || !n4 && null == t3[a2] || f3.on(c2)) { + var d2 = __spreadValues({}, p3); d2[a2] = c2; var g2 = __spreadValues({}, h2); - delete g2[a2], u2 = s4.v[c2], 0 === Object.keys(g2).length && u2 && u2.d && l2.push({ match: d2, data: u2.d, find: u2.f }), u2 && null != u2.v && r4(u2, __spreadValues({}, d2), __spreadValues({}, g2), l2); + delete g2[a2], u2 = s4.v[c2], 0 === Object.keys(g2).length && u2 && u2.d && l3.push({ match: d2, data: u2.d, find: u2.f }), u2 && null != u2.v && r4(u2, __spreadValues({}, d2), __spreadValues({}, g2), l3); } - (u2 = s4.s) && r4(u2, __spreadValues({}, p2), __spreadValues({}, h2), l2); + (u2 = s4.s) && r4(u2, __spreadValues({}, p3), __spreadValues({}, h2), l3); } }(r3, {}, __spreadValues({}, t3), s3), s3; - }, n2.toString = function(e2, t3) { - var n3 = true === e2 || !!t3, s3 = "function" == typeof e2 ? e2 : function(e3) { + }, n3.toString = function(e2, t3) { + var n4 = true === e2 || !!t3, s3 = "function" == typeof e2 ? e2 : function(e3) { return "function" == typeof e3 ? "<" + e3.name + ">" : "<" + e3 + ">"; }; function i2(e3, t4) { - for (var n4 = 0; n4 < t4; n4++) e3.push(" "); + for (var n5 = 0; n5 < t4; n5++) e3.push(" "); } - var o2 = [], l2 = []; - return function e3(t4, n4, r4, l3) { + var o2 = [], l3 = []; + return function e3(t4, n5, r4, l4) { var u2; - if (void 0 !== t4.d && (n4.push(" " + s3(t4.d)), o2.push(l3.join(", ") + " -> " + s3(t4.d))), t4.k && (n4.push("\n"), i2(n4, r4), n4.push(t4.k + ":")), (t4.v || t4.s || t4.g) && r4++, t4.v) for (var a2 = Object.keys(t4.v).sort(), f2 = 0; f2 < a2.length; f2++) { - var p2 = a2[f2]; - n4.push("\n"), i2(n4, r4), n4.push(p2 + " ->"), (u2 = l3.slice()).push(t4.k + "=" + p2), e3(t4.v[p2], n4, r4 + 1, u2); + if (void 0 !== t4.d && (n5.push(" " + s3(t4.d)), o2.push(l4.join(", ") + " -> " + s3(t4.d))), t4.k && (n5.push("\n"), i2(n5, r4), n5.push(t4.k + ":")), (t4.v || t4.s || t4.g) && r4++, t4.v) for (var a2 = Object.keys(t4.v).sort(), f3 = 0; f3 < a2.length; f3++) { + var p3 = a2[f3]; + n5.push("\n"), i2(n5, r4), n5.push(p3 + " ->"), (u2 = l4.slice()).push(t4.k + "=" + p3), e3(t4.v[p3], n5, r4 + 1, u2); } - if (t4.g) for (a2 = Object.keys(t4.g).sort(), f2 = 0; f2 < a2.length; f2++) for (var h2 = t4.g[a2[f2]], c2 = 0; c2 < h2.length; c2++) { + if (t4.g) for (a2 = Object.keys(t4.g).sort(), f3 = 0; f3 < a2.length; f3++) for (var h2 = t4.g[a2[f3]], c2 = 0; c2 < h2.length; c2++) { var d2 = h2[c2]; - n4.push("\n"), i2(n4, r4), n4.push(d2.fix + " ~>"), (u2 = l3.slice()).push(t4.k + "~" + d2.fix), e3(d2.keymap, n4, r4 + 1, u2); + n5.push("\n"), i2(n5, r4), n5.push(d2.fix + " ~>"), (u2 = l4.slice()).push(t4.k + "~" + d2.fix), e3(d2.keymap, n5, r4 + 1, u2); } - t4.s && (n4.push("\n"), i2(n4, r4), n4.push("|"), u2 = l3.slice(), e3(t4.s, n4, r4 + 1, u2)); - }(r3, l2, 0, []), n3 ? l2.join("") : o2.join("\n"); - }, n2.inspect = n2.toString, n2.toJSON = function(e2) { + t4.s && (n5.push("\n"), i2(n5, r4), n5.push("|"), u2 = l4.slice(), e3(t4.s, n5, r4 + 1, u2)); + }(r3, l3, 0, []), n4 ? l3.join("") : o2.join("\n"); + }, n3.inspect = n3.toString, n3.toJSON = function(e2) { return JSON.stringify(r3, function(e3, t3) { return "function" == typeof t3 ? "[Function]" : t3; }, e2); - }, n2; + }, n3; } - function m(e2) { + function m2(e2) { return new g(e2); } return Object.defineProperty(d.exports, "__esModule", { value: true }), d.exports.Gex = void 0, d.exports.Patrun = g, Object.defineProperty(d.exports, "Gex", { enumerable: true, get: function() { return e.Gex; - } }), d.exports = m, d.exports.Patrun = g, d.exports.Gex = e.Gex, d.exports.default = m, d = d.exports; + } }), d.exports = m2, d.exports.Patrun = g, d.exports.Gex = e.Gex, d.exports.default = m2, d = d.exports; }); })(patrun_min$1, patrun_min$1.exports); var patrun_minExports = patrun_min$1.exports; @@ -66435,9 +66464,9 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } let pnt = lex.pnt; let fwd = lex.src.substring(pnt.sI); - let m = fwd.match(fixed); - if (m) { - let msrc = m[1]; + let m2 = fwd.match(fixed); + if (m2) { + let msrc = m2[1]; let mlen = msrc.length; if (0 < mlen) { let tkn = void 0; @@ -66474,13 +66503,13 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha let oc = "o" === rule.state ? 0 : 1; for (let valueMatcher of valueMatchers) { if (valueMatcher.match instanceof RegExp) { - let m = fwd.match(valueMatcher.match); - if (m) { - let msrc = m[0]; + let m2 = fwd.match(valueMatcher.match); + if (m2) { + let msrc = m2[0]; let mlen = msrc.length; if (0 < mlen) { let tkn = void 0; - let val = valueMatcher.val ? valueMatcher.val(m) : msrc; + let val = valueMatcher.val ? valueMatcher.val(m2) : msrc; tkn = lex.token("#VL", val, msrc, pnt); pnt.sI += mlen; pnt.cI += mlen; @@ -66499,9 +66528,9 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha continue; } if (tokenMatcher instanceof RegExp) { - let m = fwd.match(tokenMatcher); - if (m) { - let msrc = m[0]; + let m2 = fwd.match(tokenMatcher); + if (m2) { + let msrc = m2[0]; let mlen = msrc.length; if (0 < mlen) { let tkn = void 0; @@ -66635,10 +66664,10 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha let fwd = lex.src.substring(pnt.sI); let def = cfg.value.def; let defre = cfg.value.defre; - let m = fwd.match(ender); - if (m) { - let msrc = m[1]; - let tsrc = m[2]; + let m2 = fwd.match(ender); + if (m2) { + let msrc = m2[1]; + let tsrc = m2[2]; let out = void 0; if (null != msrc) { let mlen = msrc.length; @@ -66718,10 +66747,10 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha let pnt = lex.pnt; let fwd = lex.src.substring(pnt.sI); let valdef = cfg.value.def; - let m = fwd.match(ender); - if (m) { - let msrc = m[1]; - let tsrc = m[9]; + let m2 = fwd.match(ender); + if (m2) { + let msrc = m2[1]; + let tsrc = m2[9]; let out = void 0; let included = true; if (null != msrc && (included = !cfg.number.exclude || !msrc.match(cfg.number.exclude))) { @@ -66790,10 +66819,10 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha let { sI, rI, cI } = pnt; let srclen = src.length; if (quoteMap[src[sI]]) { - const q = src[sI]; + const q2 = src[sI]; const qI = sI; const qrI = rI; - const isMultiLine = multiChars[q]; + const isMultiLine = multiChars[q2]; ++sI; ++cI; let s = []; @@ -66802,7 +66831,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha cI++; let c = src[sI]; rs = void 0; - if (q === c) { + if (q2 === c) { sI++; break; } else if (escChar === c) { @@ -66862,7 +66891,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha cI++; } else { let bI = sI; - let qc = q.charCodeAt(0); + let qc = q2.charCodeAt(0); let cc = src.charCodeAt(sI); while ((!hasReplace || void 0 === (rs = replaceCodeMap[cc])) && sI < srclen && 32 <= cc && qc !== cc && escCharCode !== cc) { cc = src.charCodeAt(++sI); @@ -66890,7 +66919,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } } } - if (src[sI - 1] !== q || pnt.sI === sI - 1) { + if (src[sI - 1] !== q2 || pnt.sI === sI - 1) { if (mcfg.abandon) { return void 0; } @@ -67085,9 +67114,9 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha utility.isarr = isarr; const defprop = Object.defineProperty; utility.defprop = defprop; - const omap = (o, f) => { + const omap = (o, f2) => { return Object.entries(o || {}).reduce((o2, e) => { - let me = f ? f(e) : e; + let me = f2 ? f2(e) : e; if (void 0 === me[0]) { delete o2[e[0]]; } else { @@ -67214,7 +67243,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha tin, (matcher.tin$ = +tin, matcher) ]); - const tokenSet = opts.tokenSet ? Object.keys(opts.tokenSet).reduce((a, n) => (a[n] = opts.tokenSet[n].filter((x) => null != x).map((n2) => t(n2)), a), {}) : {}; + const tokenSet = opts.tokenSet ? Object.keys(opts.tokenSet).reduce((a, n2) => (a[n2] = opts.tokenSet[n2].filter((x) => null != x).map((n3) => t(n3)), a), {}) : {}; cfg.tokenSet = cfg.tokenSet || {}; entries(tokenSet).map((entry) => { let name = entry[0]; @@ -67242,7 +67271,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }; cfg.text = { lex: !!((_q = opts.text) === null || _q === void 0 ? void 0 : _q.lex), - modify: (((_r = cfg.text) === null || _r === void 0 ? void 0 : _r.modify) || []).concat([(_s = opts.text) === null || _s === void 0 ? void 0 : _s.modify].flat()).filter((m) => null != m), + modify: (((_r = cfg.text) === null || _r === void 0 ? void 0 : _r.modify) || []).concat([(_s = opts.text) === null || _s === void 0 ? void 0 : _s.modify].flat()).filter((m2) => null != m2), check: (_t7 = opts.text) === null || _t7 === void 0 ? void 0 : _t7.check }; cfg.number = { @@ -67322,7 +67351,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha list.push(matcher); } return list; - }, []).filter((m) => null != m && false !== m && -1 < +m.order).sort((a, b) => a.order - b.order) : [] + }, []).filter((m2) => null != m2 && false !== m2 && -1 < +m2.order).sort((a, b) => a.order - b.order) : [] }; cfg.parse = { prepare: values2((_19 = opts.parse) === null || _19 === void 0 ? void 0 : _19.prepare) @@ -67382,10 +67411,10 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } utility.mesc = mesc; function regexp(flags, ...parts) { - return new RegExp(parts.map((p) => p.esc ? ( + return new RegExp(parts.map((p2) => p2.esc ? ( //p.replace(/[-\\|\]{}()[^$+*?.!=]/g, '\\$&') - escre(p.toString()) - ) : p).join(types_12.EMPTY), null == flags ? "" : flags); + escre(p2.toString()) + ) : p2).join(types_12.EMPTY), null == flags ? "" : flags); } utility.regexp = regexp; function escre(s) { @@ -67400,8 +67429,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha let over_iso = null != over && (S.object === typeof over || over_isf); let over_ctor; if (base_iso && over_iso && !over_isf && Array.isArray(base) === Array.isArray(over)) { - for (let k in over) { - base[k] = deep(base[k], over[k]); + for (let k2 in over) { + base[k2] = deep(base[k2], over[k2]); } } else { base = void 0 === over ? base : over_isf ? over : over_iso ? S.function === typeof (over_ctor = over.constructor) && S.Object !== over_ctor.name && S.Array !== over_ctor.name ? over : deep(Array.isArray(over) ? [] : {}, over) : over; @@ -67467,7 +67496,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha errinject((cfg.hint[code] || ((_c = (_b = details.use) === null || _b === void 0 ? void 0 : _b.err) === null || _c === void 0 ? void 0 : _c.message) || cfg.hint.unknown || "").trim().split("\n").map((s) => " " + s).join("\n"), code, details, token2, rule, ctx), "", " \x1B[2mhttps://jsonic.senecajs.org\x1B[0m", - " \x1B[2m--internal: rule=" + rule.name + "~" + rule.state + "; token=" + tokenize2(token2.tin, ctx.cfg) + (null == token2.why ? "" : "~" + token2.why) + "; plugins=" + ctx.plgn().map((p) => p.name).join(",") + "--\x1B[0m\n" + " \x1B[2m--internal: rule=" + rule.name + "~" + rule.state + "; token=" + tokenize2(token2.tin, ctx.cfg) + (null == token2.why ? "" : "~" + token2.why) + "; plugins=" + ctx.plgn().map((p2) => p2.name).join(",") + "--\x1B[0m\n" ].join("\n"); let desc = { internal: { @@ -67562,13 +67591,13 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } utility.clone = clone; function charset(...parts) { - return null == parts ? {} : parts.filter((p) => false !== p).map((p) => "object" === typeof p ? keys(p).join(types_12.EMPTY) : p).join(types_12.EMPTY).split(types_12.EMPTY).reduce((a, c) => (a[c] = c.charCodeAt(0), a), {}); + return null == parts ? {} : parts.filter((p2) => false !== p2).map((p2) => "object" === typeof p2 ? keys(p2).join(types_12.EMPTY) : p2).join(types_12.EMPTY).split(types_12.EMPTY).reduce((a, c) => (a[c] = c.charCodeAt(0), a), {}); } utility.charset = charset; function clean(o) { - for (let p in o) { - if (null == o[p]) { - delete o[p]; + for (let p2 in o) { + if (null == o[p2]) { + delete o[p2]; } } return o; @@ -67954,8 +67983,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } }; defaults_2 = defaults$1.defaults = defaults; - function make_hint(d = (t, r2 = "replace") => t[r2](/[A-Z]/g, (m) => " " + m.toLowerCase())[r2](/[~%][a-z]/g, (m) => ("~" == m[0] ? " " : "") + m[1].toUpperCase()), s = "~sinceTheErrorIsUnknown,ThisIsProbablyABugInsideJsonic\nitself,OrAPlugin.~pleaseConsiderPostingAGithubIssue -Thanks!\n\n~code: $code,~details: \n$details|~theCharacter(s) $srcWereNotExpectedAtThisPointAsTheyDoNot\nmatchTheExpectedSyntax,EvenUnderTheRelaxedJsonicRules.~ifIt\nisNotObviouslyWrong,TheActualSyntaxErrorMayBeElsewhere.~try\ncommentingOutLargerAreasAroundThisPointUntilYouGetNoErrors,\nthenRemoveTheCommentsInSmallSectionsUntilYouFindThe\noffendingSyntax.~n%o%t%e:~alsoCheckIfAnyPluginsYouAreUsing\nexpectDifferentSyntaxInThisCase.|~theEscapeSequence $srcDoesNotEncodeAValidUnicodeCodePoint\nnumber.~youMayNeedToValidateYourStringDataManuallyUsingTest\ncodeToSeeHow~javaScriptWillInterpretIt.~alsoConsiderThatYour\ndataMayHaveBecomeCorrupted,OrTheEscapeSequenceHasNotBeen\ngeneratedCorrectly.|~theEscapeSequence $srcDoesNotEncodeAValid~a%s%c%i%iCharacter.~you\nmayNeedToValidateYourStringDataManuallyUsingTestCodeToSee\nhow~javaScriptWillInterpretIt.~alsoConsiderThatYourDataMay\nhaveBecomeCorrupted,OrTheEscapeSequenceHasNotBeenGenerated\ncorrectly.|~stringValuesCannotContainUnprintableCharacters (characterCodes\nbelow 32).~theCharacter $srcIsUnprintable.~youMayNeedToRemove\ntheseCharactersFromYourSourceData.~alsoCheckThatItHasNot\nbecomeCorrupted.|~thisStringHasNoEndQuote.|~thisCommentIsNeverClosed.|~noRuleNamed $rulenameIsDefined.~thisIsProbablyAnErrorInThe\ngrammarOfAPlugin.".split("|")) { - return "unknown|unexpected|invalid_unicode|invalid_ascii|unprintable|unterminated_string|unterminated_comment|unknown_rule".split("|").reduce((a, n, i) => (a[n] = d(s[i]), a), {}); + function make_hint(d = (t, r2 = "replace") => t[r2](/[A-Z]/g, (m2) => " " + m2.toLowerCase())[r2](/[~%][a-z]/g, (m2) => ("~" == m2[0] ? " " : "") + m2[1].toUpperCase()), s = "~sinceTheErrorIsUnknown,ThisIsProbablyABugInsideJsonic\nitself,OrAPlugin.~pleaseConsiderPostingAGithubIssue -Thanks!\n\n~code: $code,~details: \n$details|~theCharacter(s) $srcWereNotExpectedAtThisPointAsTheyDoNot\nmatchTheExpectedSyntax,EvenUnderTheRelaxedJsonicRules.~ifIt\nisNotObviouslyWrong,TheActualSyntaxErrorMayBeElsewhere.~try\ncommentingOutLargerAreasAroundThisPointUntilYouGetNoErrors,\nthenRemoveTheCommentsInSmallSectionsUntilYouFindThe\noffendingSyntax.~n%o%t%e:~alsoCheckIfAnyPluginsYouAreUsing\nexpectDifferentSyntaxInThisCase.|~theEscapeSequence $srcDoesNotEncodeAValidUnicodeCodePoint\nnumber.~youMayNeedToValidateYourStringDataManuallyUsingTest\ncodeToSeeHow~javaScriptWillInterpretIt.~alsoConsiderThatYour\ndataMayHaveBecomeCorrupted,OrTheEscapeSequenceHasNotBeen\ngeneratedCorrectly.|~theEscapeSequence $srcDoesNotEncodeAValid~a%s%c%i%iCharacter.~you\nmayNeedToValidateYourStringDataManuallyUsingTestCodeToSee\nhow~javaScriptWillInterpretIt.~alsoConsiderThatYourDataMay\nhaveBecomeCorrupted,OrTheEscapeSequenceHasNotBeenGenerated\ncorrectly.|~stringValuesCannotContainUnprintableCharacters (characterCodes\nbelow 32).~theCharacter $srcIsUnprintable.~youMayNeedToRemove\ntheseCharactersFromYourSourceData.~alsoCheckThatItHasNot\nbecomeCorrupted.|~thisStringHasNoEndQuote.|~thisCommentIsNeverClosed.|~noRuleNamed $rulenameIsDefined.~thisIsProbablyAnErrorInThe\ngrammarOfAPlugin.".split("|")) { + return "unknown|unexpected|invalid_unicode|invalid_ascii|unprintable|unterminated_string|unterminated_comment|unknown_rule".split("|").reduce((a, n2, i) => (a[n2] = d(s[i]), a), {}); } var parser$1 = {}; var rules = {}; @@ -68833,7 +68862,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } ], { append: true, delete: [0, 1] }); }); - jsonic2.rule("elem", (rs, p) => { + jsonic2.rule("elem", (rs, p2) => { rs.open([ // Empty commas insert null elements. // Note that close consumes a comma, so b:2 works. @@ -68852,7 +68881,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }, { s: [KEY, CL], - e: p.cfg.list.property ? void 0 : (_r, ctx) => ctx.t0, + e: p2.cfg.list.property ? void 0 : (_r, ctx) => ctx.t0, p: "val", n: { pk: 1, dmap: 1 }, u: { done: true, pair: true, list: true }, @@ -69112,9 +69141,9 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } (0, utility_12.defprop)(jsonic2, "internal", { value: () => internal }); if (parent) { - for (let k in parent) { - if (void 0 === jsonic2[k]) { - jsonic2[k] = parent[k]; + for (let k2 in parent) { + if (void 0 === jsonic2[k2]) { + jsonic2[k2] = parent[k2]; } } jsonic2.parent = parent; @@ -69197,8 +69226,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const mm = Jsonic(match2); const ms = Array.isArray(match2) ? match2 : Object.keys(mm).map((x) => mm[x]); let found = null; - for (const m of ms) { - const pat = this.config.allow.modify(__spreadValues({}, m || {})); + for (const m2 of ms) { + const pat = this.config.allow.modify(__spreadValues({}, m2 || {})); found = this.match.allow.find(pat); if (found) { break; diff --git a/src/lib/BasicEntityButtonGroupField.tsx b/src/lib/BasicEntityButtonGroupField.tsx new file mode 100644 index 0000000..bb3f65c --- /dev/null +++ b/src/lib/BasicEntityButtonGroupField.tsx @@ -0,0 +1,60 @@ +import React from 'react' + +import { Button, ButtonGroup } from '@mui/material' +import { Controller } from 'react-hook-form' + +import type { Spec } from './basic-types' + +import { Default, Exact, Gubu, Skip } from 'gubu' +const CMPNAME = 'BasicEntitySliderField' + +const { Open } = Gubu +const BasicEntityButtonGroupFieldSpecShape = Gubu( + Open({ + field: Open({ + id: String, + name: String, + kind: '', + label: String, + ux: Open({ + kind: Exact('ButtonGroup'), + edit: Default(true), + props: Open({}), + }), + }), + }), + { name: CMPNAME } +) + +function BasicEntityButtonGroupField(props: any) { + const { spec } = props + + const basicEntityButtonGroupField: Spec = + BasicEntityButtonGroupFieldSpecShape(spec) + const { control, field } = basicEntityButtonGroupField + // const val = getValues(field.name) + + return ( +
+ ( + + {Object.entries(field.options.ents).map(([key, value]) => ( + + ))} + + )} + /> +
+ ) +} + +export { BasicEntityButtonGroupField } diff --git a/src/lib/BasicEntityField.tsx b/src/lib/BasicEntityField.tsx index a8c26bd..ae392bb 100644 --- a/src/lib/BasicEntityField.tsx +++ b/src/lib/BasicEntityField.tsx @@ -14,6 +14,7 @@ import { BasicEntityTimeField } from './BasicEntityTimeField' import { BasicEntityDateTimeField } from './BasicEntityDateTimeField' import { BasicEntityRatingField } from './BasicEntityRatingField' import { BasicEntityButtonField } from './BasicEntityButtonField' +import { BasicEntityButtonGroupField } from './BasicEntityButtonGroupField' const CMPNAME = 'BasicEntityField' @@ -37,7 +38,8 @@ const BasicEntityFieldSpecShape = Gubu( 'Slider', 'RadioGroup', 'Rating', - 'Button' + 'Button', + 'ButtonGroup' ), edit: Default(true), rows: Default(3), @@ -60,6 +62,7 @@ const fieldMap: any = { RadioGroup: BasicEntityRadioGroupField, Rating: BasicEntityRatingField, Button: BasicEntityButtonField, + ButtonGroup: BasicEntityButtonGroupField, } function BasicEntityField(props: any) { From 669a5331d829ecd5e652c644d56d0a8a87758d99 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Sun, 28 Jul 2024 21:21:35 +0100 Subject: [PATCH 049/122] Update Gubu validation for most BasicEntity fields --- dist/voxgig-model-react.es.js | 2850 ++++++++++----------- dist/voxgig-model-react.umd.js | 2868 +++++++++++----------- src/lib/BasicEntityAutocompleteField.tsx | 4 +- src/lib/BasicEntityButtonField.tsx | 4 +- src/lib/BasicEntityButtonGroupField.tsx | 7 +- src/lib/BasicEntityCheckboxField.tsx | 4 +- src/lib/BasicEntityDateField.tsx | 4 +- src/lib/BasicEntityDateTimeField.tsx | 4 +- src/lib/BasicEntityField.tsx | 4 +- src/lib/BasicEntityRadioGroupField.tsx | 4 +- src/lib/BasicEntityRatingField.tsx | 4 +- src/lib/BasicEntitySliderField.tsx | 8 +- src/lib/BasicEntityTextBoxField.tsx | 4 +- src/lib/BasicEntityTextField.tsx | 4 +- src/lib/BasicEntityTimeField.tsx | 4 +- 15 files changed, 2911 insertions(+), 2866 deletions(-) diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index 4fb145c..09da789 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -53,7 +53,7 @@ var __async = (__this, __arguments, generator) => { }); }; import * as React$1 from "react"; -import React__default, { isValidElement, Children, cloneElement, useMemo, useState, useReducer, useRef, useEffect, useCallback, memo as memo$2, Fragment as Fragment$2, useLayoutEffect } from "react"; +import React__default, { isValidElement, Children, cloneElement, useMemo, useState, useReducer, useRef, useEffect, useCallback, memo as memo$2, Fragment, useLayoutEffect } from "react"; import { Button as Button$1, Avatar, Menu as Menu$1, MenuItem as MenuItem$1, IconButton as IconButton$1, useTheme as useTheme$5, Box as Box$2, FormControlLabel as FormControlLabel$1, Checkbox as Checkbox$1, Autocomplete as Autocomplete$1, TextField as TextField$1, FormLabel as FormLabel$1, Slider as Slider$1, RadioGroup, Radio as Radio$1, Rating, ButtonGroup, Grid as Grid$1, Toolbar as Toolbar$1, Container as Container$2, Drawer as Drawer$1, List as List$1, ListItem as ListItem$1, ListItemButton as ListItemButton$1, ListItemIcon as ListItemIcon$1, ListItemText as ListItemText$1, Divider as Divider$1, Typography as Typography$1 } from "@mui/material"; import emStyled from "@emotion/styled"; import { CacheProvider, Global, ThemeContext as ThemeContext$1, css, keyframes } from "@emotion/react"; @@ -66,31 +66,31 @@ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof win function getDefaultExportFromCjs(x) { return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x; } -function getDefaultExportFromNamespaceIfPresent(n2) { - return n2 && Object.prototype.hasOwnProperty.call(n2, "default") ? n2["default"] : n2; +function getDefaultExportFromNamespaceIfPresent(n) { + return n && Object.prototype.hasOwnProperty.call(n, "default") ? n["default"] : n; } -function getDefaultExportFromNamespaceIfNotNamed(n2) { - return n2 && Object.prototype.hasOwnProperty.call(n2, "default") && Object.keys(n2).length === 1 ? n2["default"] : n2; +function getDefaultExportFromNamespaceIfNotNamed(n) { + return n && Object.prototype.hasOwnProperty.call(n, "default") && Object.keys(n).length === 1 ? n["default"] : n; } -function getAugmentedNamespace(n2) { - if (n2.__esModule) return n2; - var f2 = n2.default; - if (typeof f2 == "function") { +function getAugmentedNamespace(n) { + if (n.__esModule) return n; + var f = n.default; + if (typeof f == "function") { var a = function a2() { if (this instanceof a2) { - return Reflect.construct(f2, arguments, this.constructor); + return Reflect.construct(f, arguments, this.constructor); } - return f2.apply(this, arguments); + return f.apply(this, arguments); }; - a.prototype = f2.prototype; + a.prototype = f.prototype; } else a = {}; Object.defineProperty(a, "__esModule", { value: true }); - Object.keys(n2).forEach(function(k2) { - var d = Object.getOwnPropertyDescriptor(n2, k2); - Object.defineProperty(a, k2, d.get ? d : { + Object.keys(n).forEach(function(k) { + var d = Object.getOwnPropertyDescriptor(n, k); + Object.defineProperty(a, k, d.get ? d : { enumerable: true, get: function() { - return n2[k2]; + return n[k]; } }); }); @@ -107,20 +107,26 @@ var reactJsxRuntime_production_min = {}; * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -"use strict"; -var f = React__default, k = Symbol.for("react.element"), l = Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, n = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: true, ref: true, __self: true, __source: true }; -function q(c, a, g) { - var b, d = {}, e = null, h = null; - void 0 !== g && (e = "" + g); - void 0 !== a.key && (e = "" + a.key); - void 0 !== a.ref && (h = a.ref); - for (b in a) m.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]); - if (c && c.defaultProps) for (b in a = c.defaultProps, a) void 0 === d[b] && (d[b] = a[b]); - return { $$typeof: k, type: c, key: e, ref: h, props: d, _owner: n.current }; -} -var Fragment$1 = reactJsxRuntime_production_min.Fragment = l; -var jsx = reactJsxRuntime_production_min.jsx = q; -var jsxs = reactJsxRuntime_production_min.jsxs = q; +var hasRequiredReactJsxRuntime_production_min; +function requireReactJsxRuntime_production_min() { + if (hasRequiredReactJsxRuntime_production_min) return reactJsxRuntime_production_min; + hasRequiredReactJsxRuntime_production_min = 1; + "use strict"; + var f = React__default, k = Symbol.for("react.element"), l = Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, n = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: true, ref: true, __self: true, __source: true }; + function q(c, a, g) { + var b, d = {}, e = null, h = null; + void 0 !== g && (e = "" + g); + void 0 !== a.key && (e = "" + a.key); + void 0 !== a.ref && (h = a.ref); + for (b in a) m.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]); + if (c && c.defaultProps) for (b in a = c.defaultProps, a) void 0 === d[b] && (d[b] = a[b]); + return { $$typeof: k, type: c, key: e, ref: h, props: d, _owner: n.current }; + } + reactJsxRuntime_production_min.Fragment = l; + reactJsxRuntime_production_min.jsx = q; + reactJsxRuntime_production_min.jsxs = q; + return reactJsxRuntime_production_min; +} var reactJsxRuntime_development = {}; /** * @license React @@ -131,905 +137,914 @@ var reactJsxRuntime_development = {}; * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -var jsxs_1; -var jsx_1; -var Fragment; -"use strict"; -if (process.env.NODE_ENV !== "production") { - (function() { - "use strict"; - var React2 = React__default; - var REACT_ELEMENT_TYPE = Symbol.for("react.element"); - var REACT_PORTAL_TYPE = Symbol.for("react.portal"); - var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); - var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"); - var REACT_PROFILER_TYPE = Symbol.for("react.profiler"); - var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); - var REACT_CONTEXT_TYPE = Symbol.for("react.context"); - var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"); - var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"); - var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"); - var REACT_MEMO_TYPE = Symbol.for("react.memo"); - var REACT_LAZY_TYPE = Symbol.for("react.lazy"); - var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"); - var MAYBE_ITERATOR_SYMBOL = Symbol.iterator; - var FAUX_ITERATOR_SYMBOL = "@@iterator"; - function getIteratorFn(maybeIterable) { - if (maybeIterable === null || typeof maybeIterable !== "object") { +var hasRequiredReactJsxRuntime_development; +function requireReactJsxRuntime_development() { + if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development; + hasRequiredReactJsxRuntime_development = 1; + "use strict"; + if (process.env.NODE_ENV !== "production") { + (function() { + "use strict"; + var React2 = React__default; + var REACT_ELEMENT_TYPE = Symbol.for("react.element"); + var REACT_PORTAL_TYPE = Symbol.for("react.portal"); + var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); + var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"); + var REACT_PROFILER_TYPE = Symbol.for("react.profiler"); + var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); + var REACT_CONTEXT_TYPE = Symbol.for("react.context"); + var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"); + var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"); + var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"); + var REACT_MEMO_TYPE = Symbol.for("react.memo"); + var REACT_LAZY_TYPE = Symbol.for("react.lazy"); + var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"); + var MAYBE_ITERATOR_SYMBOL = Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = "@@iterator"; + function getIteratorFn(maybeIterable) { + if (maybeIterable === null || typeof maybeIterable !== "object") { + return null; + } + var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; + if (typeof maybeIterator === "function") { + return maybeIterator; + } return null; } - var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; - if (typeof maybeIterator === "function") { - return maybeIterator; - } - return null; - } - var ReactSharedInternals = React2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; - function error(format) { - { + var ReactSharedInternals = React2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; + function error(format) { { - for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { - args[_key2 - 1] = arguments[_key2]; + { + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; + } + printWarning("error", format, args); } - printWarning("error", format, args); } } - } - function printWarning(level, format, args) { - { - var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame2.getStackAddendum(); - if (stack !== "") { - format += "%s"; - args = args.concat([stack]); + function printWarning(level, format, args) { + { + var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame; + var stack = ReactDebugCurrentFrame2.getStackAddendum(); + if (stack !== "") { + format += "%s"; + args = args.concat([stack]); + } + var argsWithFormat = args.map(function(item) { + return String(item); + }); + argsWithFormat.unshift("Warning: " + format); + Function.prototype.apply.call(console[level], console, argsWithFormat); } - var argsWithFormat = args.map(function(item) { - return String(item); - }); - argsWithFormat.unshift("Warning: " + format); - Function.prototype.apply.call(console[level], console, argsWithFormat); } - } - var enableScopeAPI = false; - var enableCacheElement = false; - var enableTransitionTracing = false; - var enableLegacyHidden = false; - var enableDebugTracing = false; - var REACT_MODULE_REFERENCE; - { - REACT_MODULE_REFERENCE = Symbol.for("react.module.reference"); - } - function isValidElementType(type) { - if (typeof type === "string" || typeof type === "function") { - return true; - } - if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) { - return true; + var enableScopeAPI = false; + var enableCacheElement = false; + var enableTransitionTracing = false; + var enableLegacyHidden = false; + var enableDebugTracing = false; + var REACT_MODULE_REFERENCE; + { + REACT_MODULE_REFERENCE = Symbol.for("react.module.reference"); } - if (typeof type === "object" && type !== null) { - if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object - // types supported by any Flight configuration anywhere since - // we don't know which Flight build this will end up being used - // with. - type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) { + function isValidElementType(type) { + if (typeof type === "string" || typeof type === "function") { return true; } + if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) { + return true; + } + if (typeof type === "object" && type !== null) { + if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object + // types supported by any Flight configuration anywhere since + // we don't know which Flight build this will end up being used + // with. + type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) { + return true; + } + } + return false; } - return false; - } - function getWrappedName2(outerType, innerType, wrapperName) { - var displayName = outerType.displayName; - if (displayName) { - return displayName; + function getWrappedName2(outerType, innerType, wrapperName) { + var displayName = outerType.displayName; + if (displayName) { + return displayName; + } + var functionName = innerType.displayName || innerType.name || ""; + return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName; } - var functionName = innerType.displayName || innerType.name || ""; - return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName; - } - function getContextName(type) { - return type.displayName || "Context"; - } - function getComponentNameFromType(type) { - if (type == null) { - return null; + function getContextName(type) { + return type.displayName || "Context"; } - { - if (typeof type.tag === "number") { - error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."); + function getComponentNameFromType(type) { + if (type == null) { + return null; + } + { + if (typeof type.tag === "number") { + error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."); + } } + if (typeof type === "function") { + return type.displayName || type.name || null; + } + if (typeof type === "string") { + return type; + } + switch (type) { + case REACT_FRAGMENT_TYPE: + return "Fragment"; + case REACT_PORTAL_TYPE: + return "Portal"; + case REACT_PROFILER_TYPE: + return "Profiler"; + case REACT_STRICT_MODE_TYPE: + return "StrictMode"; + case REACT_SUSPENSE_TYPE: + return "Suspense"; + case REACT_SUSPENSE_LIST_TYPE: + return "SuspenseList"; + } + if (typeof type === "object") { + switch (type.$$typeof) { + case REACT_CONTEXT_TYPE: + var context = type; + return getContextName(context) + ".Consumer"; + case REACT_PROVIDER_TYPE: + var provider = type; + return getContextName(provider._context) + ".Provider"; + case REACT_FORWARD_REF_TYPE: + return getWrappedName2(type, type.render, "ForwardRef"); + case REACT_MEMO_TYPE: + var outerName = type.displayName || null; + if (outerName !== null) { + return outerName; + } + return getComponentNameFromType(type.type) || "Memo"; + case REACT_LAZY_TYPE: { + var lazyComponent = type; + var payload = lazyComponent._payload; + var init2 = lazyComponent._init; + try { + return getComponentNameFromType(init2(payload)); + } catch (x) { + return null; + } + } + } + } + return null; } - if (typeof type === "function") { - return type.displayName || type.name || null; + var assign2 = Object.assign; + var disabledDepth = 0; + var prevLog; + var prevInfo; + var prevWarn; + var prevError; + var prevGroup; + var prevGroupCollapsed; + var prevGroupEnd; + function disabledLog() { + } + disabledLog.__reactDisabledLog = true; + function disableLogs() { + { + if (disabledDepth === 0) { + prevLog = console.log; + prevInfo = console.info; + prevWarn = console.warn; + prevError = console.error; + prevGroup = console.group; + prevGroupCollapsed = console.groupCollapsed; + prevGroupEnd = console.groupEnd; + var props = { + configurable: true, + enumerable: true, + value: disabledLog, + writable: true + }; + Object.defineProperties(console, { + info: props, + log: props, + warn: props, + error: props, + group: props, + groupCollapsed: props, + groupEnd: props + }); + } + disabledDepth++; + } } - if (typeof type === "string") { - return type; + function reenableLogs() { + { + disabledDepth--; + if (disabledDepth === 0) { + var props = { + configurable: true, + enumerable: true, + writable: true + }; + Object.defineProperties(console, { + log: assign2({}, props, { + value: prevLog + }), + info: assign2({}, props, { + value: prevInfo + }), + warn: assign2({}, props, { + value: prevWarn + }), + error: assign2({}, props, { + value: prevError + }), + group: assign2({}, props, { + value: prevGroup + }), + groupCollapsed: assign2({}, props, { + value: prevGroupCollapsed + }), + groupEnd: assign2({}, props, { + value: prevGroupEnd + }) + }); + } + if (disabledDepth < 0) { + error("disabledDepth fell below zero. This is a bug in React. Please file an issue."); + } + } } - switch (type) { - case REACT_FRAGMENT_TYPE: - return "Fragment"; - case REACT_PORTAL_TYPE: - return "Portal"; - case REACT_PROFILER_TYPE: - return "Profiler"; - case REACT_STRICT_MODE_TYPE: - return "StrictMode"; - case REACT_SUSPENSE_TYPE: - return "Suspense"; - case REACT_SUSPENSE_LIST_TYPE: - return "SuspenseList"; - } - if (typeof type === "object") { - switch (type.$$typeof) { - case REACT_CONTEXT_TYPE: - var context = type; - return getContextName(context) + ".Consumer"; - case REACT_PROVIDER_TYPE: - var provider = type; - return getContextName(provider._context) + ".Provider"; - case REACT_FORWARD_REF_TYPE: - return getWrappedName2(type, type.render, "ForwardRef"); - case REACT_MEMO_TYPE: - var outerName = type.displayName || null; - if (outerName !== null) { - return outerName; - } - return getComponentNameFromType(type.type) || "Memo"; - case REACT_LAZY_TYPE: { - var lazyComponent = type; - var payload = lazyComponent._payload; - var init2 = lazyComponent._init; + var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; + var prefix2; + function describeBuiltInComponentFrame(name, source, ownerFn) { + { + if (prefix2 === void 0) { try { - return getComponentNameFromType(init2(payload)); + throw Error(); } catch (x) { - return null; + var match2 = x.stack.trim().match(/\n( *(at )?)/); + prefix2 = match2 && match2[1] || ""; } } + return "\n" + prefix2 + name; } } - return null; - } - var assign2 = Object.assign; - var disabledDepth = 0; - var prevLog; - var prevInfo; - var prevWarn; - var prevError; - var prevGroup; - var prevGroupCollapsed; - var prevGroupEnd; - function disabledLog() { - } - disabledLog.__reactDisabledLog = true; - function disableLogs() { + var reentry = false; + var componentFrameCache; { - if (disabledDepth === 0) { - prevLog = console.log; - prevInfo = console.info; - prevWarn = console.warn; - prevError = console.error; - prevGroup = console.group; - prevGroupCollapsed = console.groupCollapsed; - prevGroupEnd = console.groupEnd; - var props = { - configurable: true, - enumerable: true, - value: disabledLog, - writable: true - }; - Object.defineProperties(console, { - info: props, - log: props, - warn: props, - error: props, - group: props, - groupCollapsed: props, - groupEnd: props - }); - } - disabledDepth++; + var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map; + componentFrameCache = new PossiblyWeakMap(); } - } - function reenableLogs() { - { - disabledDepth--; - if (disabledDepth === 0) { - var props = { - configurable: true, - enumerable: true, - writable: true - }; - Object.defineProperties(console, { - log: assign2({}, props, { - value: prevLog - }), - info: assign2({}, props, { - value: prevInfo - }), - warn: assign2({}, props, { - value: prevWarn - }), - error: assign2({}, props, { - value: prevError - }), - group: assign2({}, props, { - value: prevGroup - }), - groupCollapsed: assign2({}, props, { - value: prevGroupCollapsed - }), - groupEnd: assign2({}, props, { - value: prevGroupEnd - }) - }); - } - if (disabledDepth < 0) { - error("disabledDepth fell below zero. This is a bug in React. Please file an issue."); + function describeNativeComponentFrame(fn2, construct) { + if (!fn2 || reentry) { + return ""; } - } - } - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; - var prefix2; - function describeBuiltInComponentFrame(name, source, ownerFn) { - { - if (prefix2 === void 0) { - try { - throw Error(); - } catch (x) { - var match2 = x.stack.trim().match(/\n( *(at )?)/); - prefix2 = match2 && match2[1] || ""; + { + var frame = componentFrameCache.get(fn2); + if (frame !== void 0) { + return frame; } } - return "\n" + prefix2 + name; - } - } - var reentry = false; - var componentFrameCache; - { - var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map; - componentFrameCache = new PossiblyWeakMap(); - } - function describeNativeComponentFrame(fn2, construct) { - if (!fn2 || reentry) { - return ""; - } - { - var frame = componentFrameCache.get(fn2); - if (frame !== void 0) { - return frame; + var control; + reentry = true; + var previousPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + var previousDispatcher; + { + previousDispatcher = ReactCurrentDispatcher.current; + ReactCurrentDispatcher.current = null; + disableLogs(); } - } - var control; - reentry = true; - var previousPrepareStackTrace = Error.prepareStackTrace; - Error.prepareStackTrace = void 0; - var previousDispatcher; - { - previousDispatcher = ReactCurrentDispatcher.current; - ReactCurrentDispatcher.current = null; - disableLogs(); - } - try { - if (construct) { - var Fake = function() { - throw Error(); - }; - Object.defineProperty(Fake.prototype, "props", { - set: function() { + try { + if (construct) { + var Fake = function() { throw Error(); + }; + Object.defineProperty(Fake.prototype, "props", { + set: function() { + throw Error(); + } + }); + if (typeof Reflect === "object" && Reflect.construct) { + try { + Reflect.construct(Fake, []); + } catch (x) { + control = x; + } + Reflect.construct(fn2, [], Fake); + } else { + try { + Fake.call(); + } catch (x) { + control = x; + } + fn2.call(Fake.prototype); } - }); - if (typeof Reflect === "object" && Reflect.construct) { - try { - Reflect.construct(Fake, []); - } catch (x) { - control = x; - } - Reflect.construct(fn2, [], Fake); } else { try { - Fake.call(); + throw Error(); } catch (x) { control = x; } - fn2.call(Fake.prototype); - } - } else { - try { - throw Error(); - } catch (x) { - control = x; - } - fn2(); - } - } catch (sample) { - if (sample && control && typeof sample.stack === "string") { - var sampleLines = sample.stack.split("\n"); - var controlLines = control.stack.split("\n"); - var s = sampleLines.length - 1; - var c = controlLines.length - 1; - while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { - c--; + fn2(); } - for (; s >= 1 && c >= 0; s--, c--) { - if (sampleLines[s] !== controlLines[c]) { - if (s !== 1 || c !== 1) { - do { - s--; - c--; - if (c < 0 || sampleLines[s] !== controlLines[c]) { - var _frame = "\n" + sampleLines[s].replace(" at new ", " at "); - if (fn2.displayName && _frame.includes("")) { - _frame = _frame.replace("", fn2.displayName); - } - { - if (typeof fn2 === "function") { - componentFrameCache.set(fn2, _frame); + } catch (sample) { + if (sample && control && typeof sample.stack === "string") { + var sampleLines = sample.stack.split("\n"); + var controlLines = control.stack.split("\n"); + var s = sampleLines.length - 1; + var c = controlLines.length - 1; + while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { + c--; + } + for (; s >= 1 && c >= 0; s--, c--) { + if (sampleLines[s] !== controlLines[c]) { + if (s !== 1 || c !== 1) { + do { + s--; + c--; + if (c < 0 || sampleLines[s] !== controlLines[c]) { + var _frame = "\n" + sampleLines[s].replace(" at new ", " at "); + if (fn2.displayName && _frame.includes("")) { + _frame = _frame.replace("", fn2.displayName); + } + { + if (typeof fn2 === "function") { + componentFrameCache.set(fn2, _frame); + } } + return _frame; } - return _frame; - } - } while (s >= 1 && c >= 0); + } while (s >= 1 && c >= 0); + } + break; } - break; } } + } finally { + reentry = false; + { + ReactCurrentDispatcher.current = previousDispatcher; + reenableLogs(); + } + Error.prepareStackTrace = previousPrepareStackTrace; } - } finally { - reentry = false; + var name = fn2 ? fn2.displayName || fn2.name : ""; + var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ""; { - ReactCurrentDispatcher.current = previousDispatcher; - reenableLogs(); - } - Error.prepareStackTrace = previousPrepareStackTrace; - } - var name = fn2 ? fn2.displayName || fn2.name : ""; - var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ""; - { - if (typeof fn2 === "function") { - componentFrameCache.set(fn2, syntheticFrame); + if (typeof fn2 === "function") { + componentFrameCache.set(fn2, syntheticFrame); + } } + return syntheticFrame; } - return syntheticFrame; - } - function describeFunctionComponentFrame(fn2, source, ownerFn) { - { - return describeNativeComponentFrame(fn2, false); - } - } - function shouldConstruct(Component) { - var prototype = Component.prototype; - return !!(prototype && prototype.isReactComponent); - } - function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { - if (type == null) { - return ""; - } - if (typeof type === "function") { + function describeFunctionComponentFrame(fn2, source, ownerFn) { { - return describeNativeComponentFrame(type, shouldConstruct(type)); + return describeNativeComponentFrame(fn2, false); } } - if (typeof type === "string") { - return describeBuiltInComponentFrame(type); + function shouldConstruct(Component) { + var prototype = Component.prototype; + return !!(prototype && prototype.isReactComponent); } - switch (type) { - case REACT_SUSPENSE_TYPE: - return describeBuiltInComponentFrame("Suspense"); - case REACT_SUSPENSE_LIST_TYPE: - return describeBuiltInComponentFrame("SuspenseList"); - } - if (typeof type === "object") { - switch (type.$$typeof) { - case REACT_FORWARD_REF_TYPE: - return describeFunctionComponentFrame(type.render); - case REACT_MEMO_TYPE: - return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn); - case REACT_LAZY_TYPE: { - var lazyComponent = type; - var payload = lazyComponent._payload; - var init2 = lazyComponent._init; - try { - return describeUnknownElementTypeFrameInDEV(init2(payload), source, ownerFn); - } catch (x) { + function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { + if (type == null) { + return ""; + } + if (typeof type === "function") { + { + return describeNativeComponentFrame(type, shouldConstruct(type)); + } + } + if (typeof type === "string") { + return describeBuiltInComponentFrame(type); + } + switch (type) { + case REACT_SUSPENSE_TYPE: + return describeBuiltInComponentFrame("Suspense"); + case REACT_SUSPENSE_LIST_TYPE: + return describeBuiltInComponentFrame("SuspenseList"); + } + if (typeof type === "object") { + switch (type.$$typeof) { + case REACT_FORWARD_REF_TYPE: + return describeFunctionComponentFrame(type.render); + case REACT_MEMO_TYPE: + return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn); + case REACT_LAZY_TYPE: { + var lazyComponent = type; + var payload = lazyComponent._payload; + var init2 = lazyComponent._init; + try { + return describeUnknownElementTypeFrameInDEV(init2(payload), source, ownerFn); + } catch (x) { + } } } } + return ""; } - return ""; - } - var hasOwnProperty = Object.prototype.hasOwnProperty; - var loggedTypeFailures = {}; - var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; - function setCurrentlyValidatingElement(element) { - { - if (element) { - var owner = element._owner; - var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); - ReactDebugCurrentFrame.setExtraStackFrame(stack); - } else { - ReactDebugCurrentFrame.setExtraStackFrame(null); + var hasOwnProperty = Object.prototype.hasOwnProperty; + var loggedTypeFailures = {}; + var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + function setCurrentlyValidatingElement(element) { + { + if (element) { + var owner = element._owner; + var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); + ReactDebugCurrentFrame.setExtraStackFrame(stack); + } else { + ReactDebugCurrentFrame.setExtraStackFrame(null); + } } } - } - function checkPropTypes(typeSpecs, values2, location, componentName, element) { - { - var has2 = Function.call.bind(hasOwnProperty); - for (var typeSpecName in typeSpecs) { - if (has2(typeSpecs, typeSpecName)) { - var error$1 = void 0; - try { - if (typeof typeSpecs[typeSpecName] !== "function") { - var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); - err.name = "Invariant Violation"; - throw err; + function checkPropTypes(typeSpecs, values2, location, componentName, element) { + { + var has2 = Function.call.bind(hasOwnProperty); + for (var typeSpecName in typeSpecs) { + if (has2(typeSpecs, typeSpecName)) { + var error$1 = void 0; + try { + if (typeof typeSpecs[typeSpecName] !== "function") { + var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); + err.name = "Invariant Violation"; + throw err; + } + error$1 = typeSpecs[typeSpecName](values2, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); + } catch (ex) { + error$1 = ex; + } + if (error$1 && !(error$1 instanceof Error)) { + setCurrentlyValidatingElement(element); + error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1); + setCurrentlyValidatingElement(null); + } + if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) { + loggedTypeFailures[error$1.message] = true; + setCurrentlyValidatingElement(element); + error("Failed %s type: %s", location, error$1.message); + setCurrentlyValidatingElement(null); } - error$1 = typeSpecs[typeSpecName](values2, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); - } catch (ex) { - error$1 = ex; - } - if (error$1 && !(error$1 instanceof Error)) { - setCurrentlyValidatingElement(element); - error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1); - setCurrentlyValidatingElement(null); - } - if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) { - loggedTypeFailures[error$1.message] = true; - setCurrentlyValidatingElement(element); - error("Failed %s type: %s", location, error$1.message); - setCurrentlyValidatingElement(null); } } } } - } - var isArrayImpl = Array.isArray; - function isArray(a) { - return isArrayImpl(a); - } - function typeName(value) { - { - var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag; - var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object"; - return type; - } - } - function willCoercionThrow(value) { - { - try { - testStringCoercion(value); - return false; - } catch (e) { - return true; - } + var isArrayImpl = Array.isArray; + function isArray(a) { + return isArrayImpl(a); } - } - function testStringCoercion(value) { - return "" + value; - } - function checkKeyStringCoercion(value) { - { - if (willCoercionThrow(value)) { - error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value)); - return testStringCoercion(value); + function typeName(value) { + { + var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag; + var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object"; + return type; } } - } - var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; - var RESERVED_PROPS = { - key: true, - ref: true, - __self: true, - __source: true - }; - var specialPropKeyWarningShown; - var specialPropRefWarningShown; - var didWarnAboutStringRefs; - { - didWarnAboutStringRefs = {}; - } - function hasValidRef(config2) { - { - if (hasOwnProperty.call(config2, "ref")) { - var getter = Object.getOwnPropertyDescriptor(config2, "ref").get; - if (getter && getter.isReactWarning) { + function willCoercionThrow(value) { + { + try { + testStringCoercion(value); return false; + } catch (e) { + return true; } } } - return config2.ref !== void 0; - } - function hasValidKey(config2) { - { - if (hasOwnProperty.call(config2, "key")) { - var getter = Object.getOwnPropertyDescriptor(config2, "key").get; - if (getter && getter.isReactWarning) { - return false; + function testStringCoercion(value) { + return "" + value; + } + function checkKeyStringCoercion(value) { + { + if (willCoercionThrow(value)) { + error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value)); + return testStringCoercion(value); } } } - return config2.key !== void 0; - } - function warnIfStringRefCannotBeAutoConverted(config2, self2) { + var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; + var RESERVED_PROPS = { + key: true, + ref: true, + __self: true, + __source: true + }; + var specialPropKeyWarningShown; + var specialPropRefWarningShown; + var didWarnAboutStringRefs; { - if (typeof config2.ref === "string" && ReactCurrentOwner.current && self2 && ReactCurrentOwner.current.stateNode !== self2) { - var componentName = getComponentNameFromType(ReactCurrentOwner.current.type); - if (!didWarnAboutStringRefs[componentName]) { - error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config2.ref); - didWarnAboutStringRefs[componentName] = true; + didWarnAboutStringRefs = {}; + } + function hasValidRef(config2) { + { + if (hasOwnProperty.call(config2, "ref")) { + var getter = Object.getOwnPropertyDescriptor(config2, "ref").get; + if (getter && getter.isReactWarning) { + return false; + } } } + return config2.ref !== void 0; } - } - function defineKeyPropWarningGetter(props, displayName) { - { - var warnAboutAccessingKey = function() { - if (!specialPropKeyWarningShown) { - specialPropKeyWarningShown = true; - error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); + function hasValidKey(config2) { + { + if (hasOwnProperty.call(config2, "key")) { + var getter = Object.getOwnPropertyDescriptor(config2, "key").get; + if (getter && getter.isReactWarning) { + return false; + } } - }; - warnAboutAccessingKey.isReactWarning = true; - Object.defineProperty(props, "key", { - get: warnAboutAccessingKey, - configurable: true - }); + } + return config2.key !== void 0; } - } - function defineRefPropWarningGetter(props, displayName) { - { - var warnAboutAccessingRef = function() { - if (!specialPropRefWarningShown) { - specialPropRefWarningShown = true; - error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); + function warnIfStringRefCannotBeAutoConverted(config2, self2) { + { + if (typeof config2.ref === "string" && ReactCurrentOwner.current && self2 && ReactCurrentOwner.current.stateNode !== self2) { + var componentName = getComponentNameFromType(ReactCurrentOwner.current.type); + if (!didWarnAboutStringRefs[componentName]) { + error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config2.ref); + didWarnAboutStringRefs[componentName] = true; + } } - }; - warnAboutAccessingRef.isReactWarning = true; - Object.defineProperty(props, "ref", { - get: warnAboutAccessingRef, - configurable: true - }); + } } - } - var ReactElement = function(type, key, ref, self2, source, owner, props) { - var element = { - // This tag allows us to uniquely identify this as a React Element - $$typeof: REACT_ELEMENT_TYPE, - // Built-in properties that belong on the element - type, - key, - ref, - props, - // Record the component responsible for creating this element. - _owner: owner - }; - { - element._store = {}; - Object.defineProperty(element._store, "validated", { - configurable: false, - enumerable: false, - writable: true, - value: false - }); - Object.defineProperty(element, "_self", { - configurable: false, - enumerable: false, - writable: false, - value: self2 - }); - Object.defineProperty(element, "_source", { - configurable: false, - enumerable: false, - writable: false, - value: source - }); - if (Object.freeze) { - Object.freeze(element.props); - Object.freeze(element); + function defineKeyPropWarningGetter(props, displayName) { + { + var warnAboutAccessingKey = function() { + if (!specialPropKeyWarningShown) { + specialPropKeyWarningShown = true; + error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); + } + }; + warnAboutAccessingKey.isReactWarning = true; + Object.defineProperty(props, "key", { + get: warnAboutAccessingKey, + configurable: true + }); } } - return element; - }; - function jsxDEV(type, config2, maybeKey, source, self2) { - { - var propName; - var props = {}; - var key = null; - var ref = null; - if (maybeKey !== void 0) { - { - checkKeyStringCoercion(maybeKey); - } - key = "" + maybeKey; + function defineRefPropWarningGetter(props, displayName) { + { + var warnAboutAccessingRef = function() { + if (!specialPropRefWarningShown) { + specialPropRefWarningShown = true; + error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); + } + }; + warnAboutAccessingRef.isReactWarning = true; + Object.defineProperty(props, "ref", { + get: warnAboutAccessingRef, + configurable: true + }); } - if (hasValidKey(config2)) { - { - checkKeyStringCoercion(config2.key); + } + var ReactElement = function(type, key, ref, self2, source, owner, props) { + var element = { + // This tag allows us to uniquely identify this as a React Element + $$typeof: REACT_ELEMENT_TYPE, + // Built-in properties that belong on the element + type, + key, + ref, + props, + // Record the component responsible for creating this element. + _owner: owner + }; + { + element._store = {}; + Object.defineProperty(element._store, "validated", { + configurable: false, + enumerable: false, + writable: true, + value: false + }); + Object.defineProperty(element, "_self", { + configurable: false, + enumerable: false, + writable: false, + value: self2 + }); + Object.defineProperty(element, "_source", { + configurable: false, + enumerable: false, + writable: false, + value: source + }); + if (Object.freeze) { + Object.freeze(element.props); + Object.freeze(element); } - key = "" + config2.key; } - if (hasValidRef(config2)) { - ref = config2.ref; - warnIfStringRefCannotBeAutoConverted(config2, self2); - } - for (propName in config2) { - if (hasOwnProperty.call(config2, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { - props[propName] = config2[propName]; + return element; + }; + function jsxDEV(type, config2, maybeKey, source, self2) { + { + var propName; + var props = {}; + var key = null; + var ref = null; + if (maybeKey !== void 0) { + { + checkKeyStringCoercion(maybeKey); + } + key = "" + maybeKey; } - } - if (type && type.defaultProps) { - var defaultProps2 = type.defaultProps; - for (propName in defaultProps2) { - if (props[propName] === void 0) { - props[propName] = defaultProps2[propName]; + if (hasValidKey(config2)) { + { + checkKeyStringCoercion(config2.key); } + key = "" + config2.key; } - } - if (key || ref) { - var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type; - if (key) { - defineKeyPropWarningGetter(props, displayName); + if (hasValidRef(config2)) { + ref = config2.ref; + warnIfStringRefCannotBeAutoConverted(config2, self2); } - if (ref) { - defineRefPropWarningGetter(props, displayName); + for (propName in config2) { + if (hasOwnProperty.call(config2, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + props[propName] = config2[propName]; + } + } + if (type && type.defaultProps) { + var defaultProps2 = type.defaultProps; + for (propName in defaultProps2) { + if (props[propName] === void 0) { + props[propName] = defaultProps2[propName]; + } + } + } + if (key || ref) { + var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type; + if (key) { + defineKeyPropWarningGetter(props, displayName); + } + if (ref) { + defineRefPropWarningGetter(props, displayName); + } } + return ReactElement(type, key, ref, self2, source, ReactCurrentOwner.current, props); } - return ReactElement(type, key, ref, self2, source, ReactCurrentOwner.current, props); } - } - var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner; - var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; - function setCurrentlyValidatingElement$1(element) { - { - if (element) { - var owner = element._owner; - var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); - ReactDebugCurrentFrame$1.setExtraStackFrame(stack); - } else { - ReactDebugCurrentFrame$1.setExtraStackFrame(null); + var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner; + var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; + function setCurrentlyValidatingElement$1(element) { + { + if (element) { + var owner = element._owner; + var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); + ReactDebugCurrentFrame$1.setExtraStackFrame(stack); + } else { + ReactDebugCurrentFrame$1.setExtraStackFrame(null); + } } } - } - var propTypesMisspellWarningShown; - { - propTypesMisspellWarningShown = false; - } - function isValidElement2(object) { + var propTypesMisspellWarningShown; { - return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; + propTypesMisspellWarningShown = false; } - } - function getDeclarationErrorAddendum() { - { - if (ReactCurrentOwner$1.current) { - var name = getComponentNameFromType(ReactCurrentOwner$1.current.type); - if (name) { - return "\n\nCheck the render method of `" + name + "`."; - } + function isValidElement2(object) { + { + return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; } - return ""; } - } - function getSourceInfoErrorAddendum(source) { - { - if (source !== void 0) { - var fileName = source.fileName.replace(/^.*[\\\/]/, ""); - var lineNumber = source.lineNumber; - return "\n\nCheck your code at " + fileName + ":" + lineNumber + "."; + function getDeclarationErrorAddendum() { + { + if (ReactCurrentOwner$1.current) { + var name = getComponentNameFromType(ReactCurrentOwner$1.current.type); + if (name) { + return "\n\nCheck the render method of `" + name + "`."; + } + } + return ""; } - return ""; } - } - var ownerHasKeyUseWarning = {}; - function getCurrentComponentErrorInfo(parentType) { - { - var info = getDeclarationErrorAddendum(); - if (!info) { - var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name; - if (parentName) { - info = "\n\nCheck the top-level render call using <" + parentName + ">."; + function getSourceInfoErrorAddendum(source) { + { + if (source !== void 0) { + var fileName = source.fileName.replace(/^.*[\\\/]/, ""); + var lineNumber = source.lineNumber; + return "\n\nCheck your code at " + fileName + ":" + lineNumber + "."; } + return ""; } - return info; } - } - function validateExplicitKey(element, parentType) { - { - if (!element._store || element._store.validated || element.key != null) { - return; - } - element._store.validated = true; - var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); - if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { - return; - } - ownerHasKeyUseWarning[currentComponentErrorInfo] = true; - var childOwner = ""; - if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) { - childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + "."; + var ownerHasKeyUseWarning = {}; + function getCurrentComponentErrorInfo(parentType) { + { + var info = getDeclarationErrorAddendum(); + if (!info) { + var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name; + if (parentName) { + info = "\n\nCheck the top-level render call using <" + parentName + ">."; + } + } + return info; } - setCurrentlyValidatingElement$1(element); - error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner); - setCurrentlyValidatingElement$1(null); } - } - function validateChildKeys(node2, parentType) { - { - if (typeof node2 !== "object") { - return; - } - if (isArray(node2)) { - for (var i = 0; i < node2.length; i++) { - var child = node2[i]; - if (isValidElement2(child)) { - validateExplicitKey(child, parentType); - } + function validateExplicitKey(element, parentType) { + { + if (!element._store || element._store.validated || element.key != null) { + return; } - } else if (isValidElement2(node2)) { - if (node2._store) { - node2._store.validated = true; + element._store.validated = true; + var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); + if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { + return; } - } else if (node2) { - var iteratorFn = getIteratorFn(node2); - if (typeof iteratorFn === "function") { - if (iteratorFn !== node2.entries) { - var iterator = iteratorFn.call(node2); - var step; - while (!(step = iterator.next()).done) { - if (isValidElement2(step.value)) { - validateExplicitKey(step.value, parentType); + ownerHasKeyUseWarning[currentComponentErrorInfo] = true; + var childOwner = ""; + if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) { + childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + "."; + } + setCurrentlyValidatingElement$1(element); + error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner); + setCurrentlyValidatingElement$1(null); + } + } + function validateChildKeys(node2, parentType) { + { + if (typeof node2 !== "object") { + return; + } + if (isArray(node2)) { + for (var i = 0; i < node2.length; i++) { + var child = node2[i]; + if (isValidElement2(child)) { + validateExplicitKey(child, parentType); + } + } + } else if (isValidElement2(node2)) { + if (node2._store) { + node2._store.validated = true; + } + } else if (node2) { + var iteratorFn = getIteratorFn(node2); + if (typeof iteratorFn === "function") { + if (iteratorFn !== node2.entries) { + var iterator = iteratorFn.call(node2); + var step; + while (!(step = iterator.next()).done) { + if (isValidElement2(step.value)) { + validateExplicitKey(step.value, parentType); + } } } } } } } - } - function validatePropTypes(element) { - { - var type = element.type; - if (type === null || type === void 0 || typeof type === "string") { - return; - } - var propTypes2; - if (typeof type === "function") { - propTypes2 = type.propTypes; - } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here. - // Inner props are checked in the reconciler. - type.$$typeof === REACT_MEMO_TYPE)) { - propTypes2 = type.propTypes; - } else { - return; - } - if (propTypes2) { - var name = getComponentNameFromType(type); - checkPropTypes(propTypes2, element.props, "prop", name, element); - } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) { - propTypesMisspellWarningShown = true; - var _name = getComponentNameFromType(type); - error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown"); - } - if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) { - error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); + function validatePropTypes(element) { + { + var type = element.type; + if (type === null || type === void 0 || typeof type === "string") { + return; + } + var propTypes2; + if (typeof type === "function") { + propTypes2 = type.propTypes; + } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here. + // Inner props are checked in the reconciler. + type.$$typeof === REACT_MEMO_TYPE)) { + propTypes2 = type.propTypes; + } else { + return; + } + if (propTypes2) { + var name = getComponentNameFromType(type); + checkPropTypes(propTypes2, element.props, "prop", name, element); + } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) { + propTypesMisspellWarningShown = true; + var _name = getComponentNameFromType(type); + error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown"); + } + if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) { + error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); + } } } - } - function validateFragmentProps(fragment) { - { - var keys = Object.keys(fragment.props); - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - if (key !== "children" && key !== "key") { + function validateFragmentProps(fragment) { + { + var keys = Object.keys(fragment.props); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (key !== "children" && key !== "key") { + setCurrentlyValidatingElement$1(fragment); + error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key); + setCurrentlyValidatingElement$1(null); + break; + } + } + if (fragment.ref !== null) { setCurrentlyValidatingElement$1(fragment); - error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key); + error("Invalid attribute `ref` supplied to `React.Fragment`."); setCurrentlyValidatingElement$1(null); - break; } } - if (fragment.ref !== null) { - setCurrentlyValidatingElement$1(fragment); - error("Invalid attribute `ref` supplied to `React.Fragment`."); - setCurrentlyValidatingElement$1(null); - } } - } - var didWarnAboutKeySpread = {}; - function jsxWithValidation(type, props, key, isStaticChildren, source, self2) { - { - var validType = isValidElementType(type); - if (!validType) { - var info = ""; - if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) { - info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."; - } - var sourceInfo = getSourceInfoErrorAddendum(source); - if (sourceInfo) { - info += sourceInfo; - } else { - info += getDeclarationErrorAddendum(); + var didWarnAboutKeySpread = {}; + function jsxWithValidation(type, props, key, isStaticChildren, source, self2) { + { + var validType = isValidElementType(type); + if (!validType) { + var info = ""; + if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) { + info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."; + } + var sourceInfo = getSourceInfoErrorAddendum(source); + if (sourceInfo) { + info += sourceInfo; + } else { + info += getDeclarationErrorAddendum(); + } + var typeString; + if (type === null) { + typeString = "null"; + } else if (isArray(type)) { + typeString = "array"; + } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) { + typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />"; + info = " Did you accidentally export a JSX literal instead of a component?"; + } else { + typeString = typeof type; + } + error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info); } - var typeString; - if (type === null) { - typeString = "null"; - } else if (isArray(type)) { - typeString = "array"; - } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) { - typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />"; - info = " Did you accidentally export a JSX literal instead of a component?"; - } else { - typeString = typeof type; + var element = jsxDEV(type, props, key, source, self2); + if (element == null) { + return element; } - error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info); - } - var element = jsxDEV(type, props, key, source, self2); - if (element == null) { - return element; - } - if (validType) { - var children2 = props.children; - if (children2 !== void 0) { - if (isStaticChildren) { - if (isArray(children2)) { - for (var i = 0; i < children2.length; i++) { - validateChildKeys(children2[i], type); - } - if (Object.freeze) { - Object.freeze(children2); + if (validType) { + var children2 = props.children; + if (children2 !== void 0) { + if (isStaticChildren) { + if (isArray(children2)) { + for (var i = 0; i < children2.length; i++) { + validateChildKeys(children2[i], type); + } + if (Object.freeze) { + Object.freeze(children2); + } + } else { + error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."); } } else { - error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."); + validateChildKeys(children2, type); } - } else { - validateChildKeys(children2, type); } } - } - { - if (hasOwnProperty.call(props, "key")) { - var componentName = getComponentNameFromType(type); - var keys = Object.keys(props).filter(function(k2) { - return k2 !== "key"; - }); - var beforeExample = keys.length > 0 ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}"; - if (!didWarnAboutKeySpread[componentName + beforeExample]) { - var afterExample = keys.length > 0 ? "{" + keys.join(": ..., ") + ": ...}" : "{}"; - error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName); - didWarnAboutKeySpread[componentName + beforeExample] = true; + { + if (hasOwnProperty.call(props, "key")) { + var componentName = getComponentNameFromType(type); + var keys = Object.keys(props).filter(function(k) { + return k !== "key"; + }); + var beforeExample = keys.length > 0 ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}"; + if (!didWarnAboutKeySpread[componentName + beforeExample]) { + var afterExample = keys.length > 0 ? "{" + keys.join(": ..., ") + ": ...}" : "{}"; + error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName); + didWarnAboutKeySpread[componentName + beforeExample] = true; + } } } + if (type === REACT_FRAGMENT_TYPE) { + validateFragmentProps(element); + } else { + validatePropTypes(element); + } + return element; } - if (type === REACT_FRAGMENT_TYPE) { - validateFragmentProps(element); - } else { - validatePropTypes(element); - } - return element; } - } - function jsxWithValidationStatic(type, props, key) { - { - return jsxWithValidation(type, props, key, true); + function jsxWithValidationStatic(type, props, key) { + { + return jsxWithValidation(type, props, key, true); + } } - } - function jsxWithValidationDynamic(type, props, key) { - { - return jsxWithValidation(type, props, key, false); + function jsxWithValidationDynamic(type, props, key) { + { + return jsxWithValidation(type, props, key, false); + } } - } - var jsx2 = jsxWithValidationDynamic; - var jsxs2 = jsxWithValidationStatic; - Fragment = reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE; - jsx_1 = reactJsxRuntime_development.jsx = jsx2; - jsxs_1 = reactJsxRuntime_development.jsxs = jsxs2; - })(); + var jsx = jsxWithValidationDynamic; + var jsxs = jsxWithValidationStatic; + reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE; + reactJsxRuntime_development.jsx = jsx; + reactJsxRuntime_development.jsxs = jsxs; + })(); + } + return reactJsxRuntime_development; } -var jsxRuntime = jsxRuntime$2.exports; -"use strict"; -if (process.env.NODE_ENV === "production") { - jsxRuntime$2.exports = reactJsxRuntime_production_min; -} else { - jsxRuntime$2.exports = reactJsxRuntime_development; +var jsxRuntime$1 = jsxRuntime$2.exports; +var hasRequiredJsxRuntime; +function requireJsxRuntime() { + if (hasRequiredJsxRuntime) return jsxRuntime$2.exports; + hasRequiredJsxRuntime = 1; + "use strict"; + if (process.env.NODE_ENV === "production") { + jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); + } else { + jsxRuntime$2.exports = requireReactJsxRuntime_development(); + } + return jsxRuntime$2.exports; } -var jsxRuntimeExports = jsxRuntime$2.exports; -const jsxRuntime$1 = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); +var jsxRuntimeExports = requireJsxRuntime(); +const jsxRuntime = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); var gubu_min$2 = { exports: {} }; var gubu_min = gubu_min$2.exports; (function(module, exports) { @@ -1042,10 +1057,10 @@ var gubu_min = gubu_min$2.exports; }(function() { var e = {}, t = {}; Object.defineProperty(t, "__esModule", { value: true }), t.Gubu = void 0; - const n2 = Symbol.for("gubu$"), r2 = { gubu$: n2, v$: "8.3.0" }, l2 = /^[A-Z]/, { toString: i } = Object.prototype, o = "gubu", s = "name", u = "nan", a = "never", c = "number", f2 = "required", p2 = "array", h = "function", v = "object", d = "string", g = "boolean", y = "undefined", m2 = "any", b = "list", $ = "instance", k2 = "null", x = "type", I = "closed", w = "shape", S = "check", j = "regexp", N = "String", O = "Number", V = "Boolean", A = "Object", R = "Array", D = "Function", E = "Value", C = "Above", G = "All", T = "Any", B = "Below", J = "Check", W = "Child", M = "Exact", F = "Max", P = "Min", z = "One", L = "Open", _2 = "Required", q2 = "Some", H = " for property ", U = '"$PATH"', K = '"$VALUE"', Z = { [N]: String, [O]: Number, [V]: Boolean, [A]: Object, [R]: Array, ["Symbol"]: Symbol, [D]: Function }, Q = (e2) => Object.keys(e2), X = (e2, t2, n3) => Object.defineProperty(e2, t2, n3), Y = (e2) => Array.isArray(e2), ee = (e2) => JSON.parse(e2), te = (e2, t2) => JSON.stringify(e2, t2); + const n = Symbol.for("gubu$"), r2 = { gubu$: n, v$: "8.3.0" }, l = /^[A-Z]/, { toString: i } = Object.prototype, o = "gubu", s = "name", u = "nan", a = "never", c = "number", f = "required", p = "array", h = "function", v = "object", d = "string", g = "boolean", y = "undefined", m = "any", b = "list", $ = "instance", k = "null", x = "type", I = "closed", w = "shape", S = "check", j = "regexp", N = "String", O = "Number", V = "Boolean", A = "Object", R = "Array", D = "Function", E = "Value", C = "Above", G = "All", T = "Any", B = "Below", J = "Check", W = "Child", M = "Exact", F = "Max", P = "Min", z = "One", L = "Open", _2 = "Required", q = "Some", H = " for property ", U = '"$PATH"', K = '"$VALUE"', Z = { [N]: String, [O]: Number, [V]: Boolean, [A]: Object, [R]: Array, ["Symbol"]: Symbol, [D]: Function }, Q = (e2) => Object.keys(e2), X = (e2, t2, n2) => Object.defineProperty(e2, t2, n2), Y = (e2) => Array.isArray(e2), ee = (e2) => JSON.parse(e2), te = (e2, t2) => JSON.stringify(e2, t2); class ne { - constructor(e2, t2, n3, r3) { - this.match = false, this.dI = 0, this.nI = 2, this.cI = -1, this.pI = 0, this.sI = -1, this.valType = a, this.isRoot = false, this.key = "", this.type = a, this.stop = true, this.nextSibling = true, this.fromDflt = false, this.ignoreVal = void 0, this.curerr = [], this.err = [], this.parents = [], this.keys = [], this.ancestors = [], this.path = [], this.root = e2, this.vals = [e2, -1], this.node = t2, this.nodes = [t2, -1], this.ctx = n3 || {}, this.match = !!r3; + constructor(e2, t2, n2, r3) { + this.match = false, this.dI = 0, this.nI = 2, this.cI = -1, this.pI = 0, this.sI = -1, this.valType = a, this.isRoot = false, this.key = "", this.type = a, this.stop = true, this.nextSibling = true, this.fromDflt = false, this.ignoreVal = void 0, this.curerr = [], this.err = [], this.parents = [], this.keys = [], this.ancestors = [], this.path = [], this.root = e2, this.vals = [e2, -1], this.node = t2, this.nodes = [t2, -1], this.ctx = n2 || {}, this.match = !!r3; } next() { this.stop = false, this.fromDflt = false, this.ignoreVal = void 0, this.isRoot = 0 === this.pI, this.check = void 0; @@ -1058,9 +1073,9 @@ var gubu_min = gubu_min$2.exports; } } class re extends TypeError { - constructor(e2, t2, n3, r3) { - var l3; - super((t2 = null == t2 || t2.startsWith("G$") ? "" : t2 + ": ") + n3.map((e3) => e3.text).join("\n")), this.gubu = true, this.name = "GubuError", this.code = e2, this.gname = t2, this.desc = () => ({ name: "GubuError", code: e2, err: n3, ctx: r3 }), this.stack = null === (l3 = this.stack) || void 0 === l3 ? void 0 : l3.replace(/.*\/gubu\/gubu\.[tj]s.*\n/g, ""), this.props = n3.map((e3) => { + constructor(e2, t2, n2, r3) { + var l2; + super((t2 = null == t2 || t2.startsWith("G$") ? "" : t2 + ": ") + n2.map((e3) => e3.text).join("\n")), this.gubu = true, this.name = "GubuError", this.code = e2, this.gname = t2, this.desc = () => ({ name: "GubuError", code: e2, err: n2, ctx: r3 }), this.stack = null === (l2 = this.stack) || void 0 === l2 ? void 0 : l2.replace(/.*\/gubu\/gubu\.[tj]s.*\n/g, ""), this.props = n2.map((e3) => { var t3; return { path: e3.path, what: e3.why, type: null === (t3 = e3.node) || void 0 === t3 ? void 0 : t3.t, value: e3.value }; }); @@ -1071,47 +1086,47 @@ var gubu_min = gubu_min$2.exports; } const le = { Array: true, BigInt: true, Boolean: true, Function: true, Number: true, Object: true, String: true, Symbol: true }, ie = { string: "", number: 0, boolean: false, object: {}, array: [], symbol: Symbol(""), bigint: BigInt(0), null: null, regexp: /.*/ }; function oe(e2, t2, o2) { - var s2, a2, f3, g2; + var s2, a2, f2, g2; if (ue === e2) e2 = void 0; else if (null != e2 && (null === (s2 = e2.$) || void 0 === s2 ? void 0 : s2.gubu$)) { - if (n2 === e2.$.gubu$) return e2.d = null == t2 ? e2.d : t2, e2; + if (n === e2.$.gubu$) return e2.d = null == t2 ? e2.d : t2, e2; if (true === e2.$.gubu$) { let r3 = __spreadValues({}, e2); - return r3.$ = __spreadProps(__spreadValues({ v$: "8.3.0" }, r3.$), { gubu$: n2 }), r3.v = null != r3.v && v === typeof r3.v ? __spreadValues({}, r3.v) : r3.v, r3.t = r3.t || typeof r3.v, h === r3.t && le[r3.v.name] && (r3.t = r3.v.name.toLowerCase(), r3.v = Qe(ie[r3.t]), r3.f = r3.v), r3.r = !!r3.r, r3.p = !!r3.p, r3.d = null == t2 ? null == r3.d ? -1 : r3.d : t2, r3.b = r3.b || [], r3.a = r3.a || [], r3.u = r3.u || {}, r3.m = r3.m || o2 || {}, r3; + return r3.$ = __spreadProps(__spreadValues({ v$: "8.3.0" }, r3.$), { gubu$: n }), r3.v = null != r3.v && v === typeof r3.v ? __spreadValues({}, r3.v) : r3.v, r3.t = r3.t || typeof r3.v, h === r3.t && le[r3.v.name] && (r3.t = r3.v.name.toLowerCase(), r3.v = Qe(ie[r3.t]), r3.f = r3.v), r3.r = !!r3.r, r3.p = !!r3.p, r3.d = null == t2 ? null == r3.d ? -1 : r3.d : t2, r3.b = r3.b || [], r3.a = r3.a || [], r3.u = r3.u || {}, r3.m = r3.m || o2 || {}, r3; } } - let b2 = null === e2 ? k2 : typeof e2; - b2 = y === b2 ? m2 : b2; + let b2 = null === e2 ? k : typeof e2; + b2 = y === b2 ? m : b2; let x2, I2 = e2, w2 = I2, S2 = false, N2 = {}, O2 = [], V2 = []; - if (v === b2) w2 = void 0, Y(I2) ? (b2 = p2, 1 === I2.length && (x2 = I2[0], I2 = [])) : null != I2 && Function !== I2.constructor && Object !== I2.constructor && null != I2.constructor ? ("[object RegExp]" === i.call(I2) ? (b2 = j, S2 = true) : (b2 = $, N2.n = I2.constructor.name, N2.i = I2.constructor), w2 = I2) : 0 === Q(I2).length && (x2 = ye()); + if (v === b2) w2 = void 0, Y(I2) ? (b2 = p, 1 === I2.length && (x2 = I2[0], I2 = [])) : null != I2 && Function !== I2.constructor && Object !== I2.constructor && null != I2.constructor ? ("[object RegExp]" === i.call(I2) ? (b2 = j, S2 = true) : (b2 = $, N2.n = I2.constructor.name, N2.i = I2.constructor), w2 = I2) : 0 === Q(I2).length && (x2 = ye()); else if (h === b2) if (le[e2.name]) b2 = e2.name.toLowerCase(), S2 = true, I2 = Qe(ie[b2]), w2 = I2, A === e2.name && (x2 = ye()); else if (I2.gubu === r2 || true === (null === (a2 = I2.$) || void 0 === a2 ? void 0 : a2.gubu)) { let e3 = I2.node ? I2.node() : I2; b2 = e3.t, I2 = e3.v, w2 = I2, S2 = e3.r, N2 = __spreadValues({}, e3.u), O2 = [...e3.a], V2 = [...e3.b]; - } else D === I2.constructor.name && l2.test(I2.name) && (b2 = $, S2 = true, N2.n = null === (g2 = null === (f3 = I2.prototype) || void 0 === f3 ? void 0 : f3.constructor) || void 0 === g2 ? void 0 : g2.name, N2.i = I2); + } else D === I2.constructor.name && l.test(I2.name) && (b2 = $, S2 = true, N2.n = null === (g2 = null === (f2 = I2.prototype) || void 0 === f2 ? void 0 : f2.constructor) || void 0 === g2 ? void 0 : g2.name, N2.i = I2); else c === b2 && isNaN(I2) ? b2 = u : d === b2 && "" === I2 && (N2.empty = true); - let R2 = null == I2 || v !== b2 && p2 !== b2 ? I2 : __spreadValues({}, I2); + let R2 = null == I2 || v !== b2 && p !== b2 ? I2 : __spreadValues({}, I2); return { $: r2, t: b2, v: R2, f: w2, n: null != R2 && v === typeof R2 ? Q(R2).length : 0, c: x2, r: S2, p: false, d: null == t2 ? -1 : t2, k: [], e: true, u: N2, a: O2, b: V2, m: o2 || {}, [Symbol.for("nodejs.util.inspect.custom")]() { const e3 = __spreadValues({}, this); return delete e3.$, JSON.stringify(e3, (e4, t3) => "function" != typeof t3 || Ye[t3.name] ? t3 : t3.name).replace(/"/g, "").replace(/,/g, " "); } }; } function se(e2, t2) { - var n3; + var n2; const r3 = [[{}, "root", e2, t2]]; - for (let l3 = 0; l3 < r3.length; l3++) { - const e3 = r3[l3], t3 = e3[0][e3[1]] = oe(e3[2], e3[3]); - void 0 !== t3.c && ((null === (n3 = t3.c.$) || void 0 === n3 ? void 0 : n3.gubu$) || r3.push([t3, "c", t3.c, t3.d])); + for (let l2 = 0; l2 < r3.length; l2++) { + const e3 = r3[l2], t3 = e3[0][e3[1]] = oe(e3[2], e3[3]); + void 0 !== t3.c && ((null === (n2 = t3.c.$) || void 0 === n2 ? void 0 : n2.gubu$) || r3.push([t3, "c", t3.c, t3.d])); let i2 = typeof t3.v; v === i2 && null != t3.v && Object.entries(t3.v).map((e4) => { - var n4; - (null === (n4 = e4[1].$) || void 0 === n4 ? void 0 : n4.gubu$) || r3.push([t3.v, e4[0], e4[1], t3.d + 1]); + var n3; + (null === (n3 = e4[1].$) || void 0 === n3 ? void 0 : n3.gubu$) || r3.push([t3.v, e4[0], e4[1], t3.d + 1]); }); } return r3[0][0].root; } - function ue(t2, l3) { - const i2 = null == l3 ? {} : l3; + function ue(t2, l2) { + const i2 = null == l2 ? {} : l2; i2.name = null == i2.name ? "G$" + ("" + Math.random()).substring(2, 8) : "" + i2.name; let o2 = i2.meta = i2.meta || {}; o2.active = true === o2.active || false, o2.suffix = d == typeof o2.suffix ? o2.suffix : "$$"; @@ -1120,95 +1135,95 @@ var gubu_min = gubu_min$2.exports; let u2 = i2.valexpr = i2.valexpr || {}; u2.active = true === u2.active, u2.keymark = d == typeof u2.keymark ? u2.keymark : o2.suffix; let c2, h2 = oe(t2, 0), g2 = ""; - function N2(e2, t3, n3) { - var r3, l4, c3; - const g3 = null === (r3 = null == t3 ? void 0 : t3.skip) || void 0 === r3 ? void 0 : r3.depth, N3 = Array.isArray(null === (l4 = null == t3 ? void 0 : t3.skip) || void 0 === l4 ? void 0 : l4.depth) ? t3.skip.depth : null, O3 = Array.isArray(null === (c3 = null == t3 ? void 0 : t3.skip) || void 0 === c3 ? void 0 : c3.keys) ? t3.skip.keys : null, V2 = new ne(e2, h2, t3, n3); + function N2(e2, t3, n2) { + var r3, l3, c3; + const g3 = null === (r3 = null == t3 ? void 0 : t3.skip) || void 0 === r3 ? void 0 : r3.depth, N3 = Array.isArray(null === (l3 = null == t3 ? void 0 : t3.skip) || void 0 === l3 ? void 0 : l3.depth) ? t3.skip.depth : null, O3 = Array.isArray(null === (c3 = null == t3 ? void 0 : t3.skip) || void 0 === c3 ? void 0 : c3.keys) ? t3.skip.keys : null, V2 = new ne(e2, h2, t3, n2); for (; V2.next(), !V2.stop; ) { - let t4 = V2.node, n4 = false, r4 = false, l5 = !!(t4.d === g3 || N3 && N3.includes(t4.d) || O3 && 1 === t4.d && O3.includes(V2.key)) || t4.p; + let t4 = V2.node, n3 = false, r4 = false, l4 = !!(t4.d === g3 || N3 && N3.includes(t4.d) || O3 && 1 === t4.d && O3.includes(V2.key)) || t4.p; if (0 < t4.b.length) for (let e3 = 0; e3 < t4.b.length; e3++) { - let l6 = fe(t4.b[e3], V2); - t4 = V2.node, void 0 !== l6.done && (n4 = l6.done), r4 = r4 || !!l6.fatal; + let l5 = fe(t4.b[e3], V2); + t4 = V2.node, void 0 !== l5.done && (n3 = l5.done), r4 = r4 || !!l5.fatal; } - if (!n4) { - let n5 = true, r5 = void 0 === V2.val; + if (!n3) { + let n4 = true, r5 = void 0 === V2.val; if (a === V2.type) V2.curerr.push(Ue(a, V2, 1070)); else if (v === V2.type) { let e3; - if (void 0 !== t4.c && (t4.c = se(t4.c, 1 + V2.dI)), t4.r && r5 ? (V2.ignoreVal = true, V2.curerr.push(Ue(f2, V2, 1010))) : r5 || null !== V2.val && v === V2.valType && !Y(V2.val) ? !l5 && r5 && void 0 !== t4.f ? (V2.updateVal(t4.f), V2.fromDflt = true, e3 = V2.val, n5 = false) : l5 && r5 || (V2.updateVal(V2.val || (V2.fromDflt = true, {})), e3 = V2.val) : (V2.curerr.push(Ue(x, V2, 1020)), e3 = Y(V2.val) ? V2.val : {}), n5 && (e3 = null == e3 && false === V2.ctx.err ? {} : e3, null != e3)) { + if (void 0 !== t4.c && (t4.c = se(t4.c, 1 + V2.dI)), t4.r && r5 ? (V2.ignoreVal = true, V2.curerr.push(Ue(f, V2, 1010))) : r5 || null !== V2.val && v === V2.valType && !Y(V2.val) ? !l4 && r5 && void 0 !== t4.f ? (V2.updateVal(t4.f), V2.fromDflt = true, e3 = V2.val, n4 = false) : l4 && r5 || (V2.updateVal(V2.val || (V2.fromDflt = true, {})), e3 = V2.val) : (V2.curerr.push(Ue(x, V2, 1020)), e3 = Y(V2.val) ? V2.val : {}), n4 && (e3 = null == e3 && false === V2.ctx.err ? {} : e3, null != e3)) { V2.ctx.log && V2.ctx.log("so", V2); - let n6 = false, r6 = Q(t4.v), l6 = V2.nI; + let n5 = false, r6 = Q(t4.v), l5 = V2.nI; if (0 < r6.length) { - n6 = true, V2.pI = l6; - for (let n7 = 0; n7 < r6.length; n7++) { - let l7, i5 = r6[n7]; + n5 = true, V2.pI = l5; + for (let n6 = 0; n6 < r6.length; n6++) { + let l6, i5 = r6[n6]; if (o2.active && i5.endsWith(o2.suffix)) { - if (l7 = { short: "" }, d === typeof t4.v[i5] ? l7.short = t4.v[i5] : l7 = __spreadValues(__spreadValues({}, l7), t4.v[i5]), delete t4.v[i5], n7++, r6.length <= n7) break; - if (r6[n7] !== i5.substring(0, i5.length - o2.suffix.length)) throw new Error("Invalid meta key: " + i5); - i5 = r6[n7]; + if (l6 = { short: "" }, d === typeof t4.v[i5] ? l6.short = t4.v[i5] : l6 = __spreadValues(__spreadValues({}, l6), t4.v[i5]), delete t4.v[i5], n6++, r6.length <= n6) break; + if (r6[n6] !== i5.substring(0, i5.length - o2.suffix.length)) throw new Error("Invalid meta key: " + i5); + i5 = r6[n6]; } let a2 = i5, c4 = t4.v[i5]; if (s2.active) { let e4 = /^\s*("(\\.|[^"\\])*"|[^\s]+):\s*(.*?)\s*$/.exec(i5); - e4 && (a2 = e4[1], c4 = ae({ src: e4[3], d: 1 + V2.dI, meta: l7 }, c4), delete t4.v[i5]); + e4 && (a2 = e4[1], c4 = ae({ src: e4[3], d: 1 + V2.dI, meta: l6 }, c4), delete t4.v[i5]); } if (u2.active && i5.startsWith(u2.keymark)) { if (i5 === u2.keymark) { - let e4 = ae({ src: c4, d: 1 + V2.dI, meta: l7, ancestors: V2.ancestors, node: t4 }, t4); + let e4 = ae({ src: c4, d: 1 + V2.dI, meta: l6, ancestors: V2.ancestors, node: t4 }, t4); Object.assign(t4, e4); } else t4.m.$$ = t4.m.$$ || {}, t4.m.$$[i5.substring(u2.keymark.length)] = t4.v[i5]; delete t4.v[i5]; continue; } - let f3 = oe(c4, 1 + V2.dI, l7); - t4.v[a2] = f3, t4.k.includes(a2) || t4.k.push(a2), V2.nodes[V2.nI] = f3, V2.vals[V2.nI] = e3[a2], V2.parents[V2.nI] = e3, V2.keys[V2.nI] = a2, V2.nI++; + let f2 = oe(c4, 1 + V2.dI, l6); + t4.v[a2] = f2, t4.k.includes(a2) || t4.k.push(a2), V2.nodes[V2.nI] = f2, V2.vals[V2.nI] = e3[a2], V2.parents[V2.nI] = e3, V2.keys[V2.nI] = a2, V2.nI++; } } let i4 = Q(e3).filter((e4) => void 0 === t4.v[e4]); if (0 < i4.length) if (void 0 === t4.c) V2.ignoreVal = true, V2.curerr.push(Ue(I, V2, 1100, void 0, { k: i4 })); else { - n6 = true, V2.pI = l6; - for (let n7 of i4) { + n5 = true, V2.pI = l5; + for (let n6 of i4) { let r7 = t4.c = oe(t4.c, 1 + V2.dI); - V2.nodes[V2.nI] = r7, V2.vals[V2.nI] = e3[n7], V2.parents[V2.nI] = e3, V2.keys[V2.nI] = n7, V2.nI++; + V2.nodes[V2.nI] = r7, V2.vals[V2.nI] = e3[n6], V2.parents[V2.nI] = e3, V2.keys[V2.nI] = n6, V2.nI++; } } - n6 ? (V2.dI++, V2.nodes[V2.nI] = V2.sI, V2.parents[V2.nI] = e3, V2.nextSibling = false, V2.nI++) : V2.ctx.log && V2.ctx.log("eo", V2); + n5 ? (V2.dI++, V2.nodes[V2.nI] = V2.sI, V2.parents[V2.nI] = e3, V2.nextSibling = false, V2.nI++) : V2.ctx.log && V2.ctx.log("eo", V2); } - } else if (p2 === V2.type) if (t4.r && r5) V2.ignoreVal = true, V2.curerr.push(Ue(f2, V2, 1030)); + } else if (p === V2.type) if (t4.r && r5) V2.ignoreVal = true, V2.curerr.push(Ue(f, V2, 1030)); else if (r5 || Y(V2.val)) { - if (!l5 && r5 && void 0 !== t4.f) V2.updateVal(t4.f), V2.fromDflt = true; - else if (!l5 || null != V2.val) { + if (!l4 && r5 && void 0 !== t4.f) V2.updateVal(t4.f), V2.fromDflt = true; + else if (!l4 || null != V2.val) { V2.updateVal(V2.val || (V2.fromDflt = true, [])); - let n6 = void 0 !== t4.c, r6 = 0 < V2.val.length, l6 = Q(t4.v).filter((e3) => !isNaN(+e3)), i4 = 0 < l6.length; - if (n6 && (t4.c = se(t4.c, 1 + V2.dI)), V2.ctx.log && V2.ctx.log("sa", V2), r6 || i4) { + let n5 = void 0 !== t4.c, r6 = 0 < V2.val.length, l5 = Q(t4.v).filter((e3) => !isNaN(+e3)), i4 = 0 < l5.length; + if (n5 && (t4.c = se(t4.c, 1 + V2.dI)), V2.ctx.log && V2.ctx.log("sa", V2), r6 || i4) { V2.pI = V2.nI; let e3 = 0; - if (i4) if (l6.length < V2.val.length && !n6) V2.ignoreVal = true, V2.curerr.push(Ue(I, V2, 1090, void 0, { k: l6.length })); - else for (; e3 < l6.length; e3++) { - let n7 = t4.v[e3] = oe(t4.v[e3], 1 + V2.dI); - V2.nodes[V2.nI] = n7, V2.vals[V2.nI] = V2.val[e3], V2.parents[V2.nI] = V2.val, V2.keys[V2.nI] = "" + e3, V2.nI++; + if (i4) if (l5.length < V2.val.length && !n5) V2.ignoreVal = true, V2.curerr.push(Ue(I, V2, 1090, void 0, { k: l5.length })); + else for (; e3 < l5.length; e3++) { + let n6 = t4.v[e3] = oe(t4.v[e3], 1 + V2.dI); + V2.nodes[V2.nI] = n6, V2.vals[V2.nI] = V2.val[e3], V2.parents[V2.nI] = V2.val, V2.keys[V2.nI] = "" + e3, V2.nI++; } - if (n6 && r6) { - let n7 = t4.c; - for (; e3 < V2.val.length; e3++) V2.nodes[V2.nI] = n7, V2.vals[V2.nI] = V2.val[e3], V2.parents[V2.nI] = V2.val, V2.keys[V2.nI] = "" + e3, V2.nI++; + if (n5 && r6) { + let n6 = t4.c; + for (; e3 < V2.val.length; e3++) V2.nodes[V2.nI] = n6, V2.vals[V2.nI] = V2.val[e3], V2.parents[V2.nI] = V2.val, V2.keys[V2.nI] = "" + e3, V2.nI++; } V2.ignoreVal || (V2.dI++, V2.nodes[V2.nI] = V2.sI, V2.parents[V2.nI] = V2.val, V2.nextSibling = false, V2.nI++); - } else V2.ctx.log && n6 && null == e2 && V2.ctx.log("kv", __spreadProps(__spreadValues({}, V2), { key: 0, val: t4.c })), V2.ctx.log && V2.ctx.log("ea", V2); + } else V2.ctx.log && n5 && null == e2 && V2.ctx.log("kv", __spreadProps(__spreadValues({}, V2), { key: 0, val: t4.c })), V2.ctx.log && V2.ctx.log("ea", V2); } } else V2.curerr.push(Ue(x, V2, 1040)); else if (j === V2.type) r5 && !t4.r ? V2.ignoreVal = true : d !== V2.valType ? (V2.ignoreVal = true, V2.curerr.push(Ue(x, V2, 1045))) : V2.val.match(t4.v) || (V2.ignoreVal = true, V2.curerr.push(Ue(j, V2, 1045))); - else if (m2 === V2.type || b === V2.type || S === V2.type || void 0 === V2.val || V2.type === V2.valType || $ === V2.type && t4.u.i && V2.val instanceof t4.u.i || k2 === V2.type && null === V2.val) if (void 0 === V2.val) { + else if (m === V2.type || b === V2.type || S === V2.type || void 0 === V2.val || V2.type === V2.valType || $ === V2.type && t4.u.i && V2.val instanceof t4.u.i || k === V2.type && null === V2.val) if (void 0 === V2.val) { let e3 = V2.path[V2.dI]; - l5 || !t4.r || y === V2.type && V2.parent.hasOwnProperty(e3) ? void 0 !== t4.f && !l5 || y === V2.type ? (V2.updateVal(t4.f), V2.fromDflt = true) : m2 === V2.type && (V2.ignoreVal = void 0 === V2.ignoreVal || V2.ignoreVal) : (V2.ignoreVal = true, V2.curerr.push(Ue(f2, V2, 1060))), V2.ctx.log && V2.ctx.log("kv", V2); - } else d !== V2.type || "" !== V2.val || t4.u.empty || V2.curerr.push(Ue(f2, V2, 1080)), V2.ctx.log && V2.ctx.log("kv", V2); + l4 || !t4.r || y === V2.type && V2.parent.hasOwnProperty(e3) ? void 0 !== t4.f && !l4 || y === V2.type ? (V2.updateVal(t4.f), V2.fromDflt = true) : m === V2.type && (V2.ignoreVal = void 0 === V2.ignoreVal || V2.ignoreVal) : (V2.ignoreVal = true, V2.curerr.push(Ue(f, V2, 1060))), V2.ctx.log && V2.ctx.log("kv", V2); + } else d !== V2.type || "" !== V2.val || t4.u.empty || V2.curerr.push(Ue(f, V2, 1080)), V2.ctx.log && V2.ctx.log("kv", V2); else V2.curerr.push(Ue(x, V2, 1050)); } if (0 < t4.a.length) for (let e3 = 0; e3 < t4.a.length; e3++) { - let l6 = fe(t4.a[e3], V2); - t4 = V2.node, void 0 !== l6.done && (n4 = l6.done), r4 = r4 || !!l6.fatal; + let l5 = fe(t4.a[e3], V2); + t4 = V2.node, void 0 !== l5.done && (n3 = l5.done), r4 = r4 || !!l5.fatal; } - let i3 = l5 ? false !== V2.ignoreVal : !!V2.ignoreVal; - !V2.match && null != V2.parent && !n4 && !i3 && (V2.parent[V2.key] = V2.val), V2.nextSibling && (V2.pI = V2.sI), (V2.node.e || r4) && V2.err.push(...V2.curerr); + let i3 = l4 ? false !== V2.ignoreVal : !!V2.ignoreVal; + !V2.match && null != V2.parent && !n3 && !i3 && (V2.parent[V2.key] = V2.val), V2.nextSibling && (V2.pI = V2.sI), (V2.node.e || r4) && V2.err.push(...V2.curerr); } if (0 < V2.err.length) { if (Y(V2.ctx.err)) V2.ctx.err.push(...V2.err); @@ -1220,38 +1235,38 @@ var gubu_min = gubu_min$2.exports; return N2(e2, t3, false); } return O2.valid = function(e2, t3) { - let n3 = t3 || {}; - return n3.err = n3.err || [], N2(e2, n3, false), 0 === n3.err.length; + let n2 = t3 || {}; + return n2.err = n2.err || [], N2(e2, n2, false), 0 === n2.err.length; }, O2.match = (e2, t3) => N2(e2, t3 = t3 || {}, true), O2.error = (e2, t3) => { - let n3 = t3 || {}; - return n3.err = n3.err || [], N2(e2, n3, false), n3.err; + let n2 = t3 || {}; + return n2.err = n2.err || [], N2(e2, n2, false), n2.err; }, O2.spec = () => { O2(void 0, { err: false }); - const e2 = Ze(h2, (e3, t3) => n2 === t3 || t3, false, true); + const e2 = Ze(h2, (e3, t3) => n === t3 || t3, false, true); return ee(e2); }, O2.node = () => (O2.spec(), h2), O2.stringify = (...e2) => { const t3 = O2.jsonify(); return "" === g2 ? g2 = "string" == typeof t3 ? t3.replace(/^"(.*)"$/, "$1") : JSON.stringify(t3, ...e2) : g2; - }, O2.jsonify = () => null == c2 ? c2 = Ke(O2.node()) : c2, O2.toString = () => (g2 = he("" === g2 ? Ze(null == h2 || !h2.$ || n2 !== h2.$.gubu$ && true !== h2.$.gubu$ ? h2 : h2.v, null, true) : g2), `[Gubu ${i2.name} ${g2}]`), e.inspect && e.inspect.custom && (O2[e.inspect.custom] = O2.toString), O2.gubu = r2, O2.spec(), O2; + }, O2.jsonify = () => null == c2 ? c2 = Ke(O2.node()) : c2, O2.toString = () => (g2 = he("" === g2 ? Ze(null == h2 || !h2.$ || n !== h2.$.gubu$ && true !== h2.$.gubu$ ? h2 : h2.v, null, true) : g2), `[Gubu ${i2.name} ${g2}]`), e.inspect && e.inspect.custom && (O2[e.inspect.custom] = O2.toString), O2.gubu = r2, O2.spec(), O2; } function ae(e2, t2) { - var n3, r3; - let l3, i2 = false; + var n2, r3; + let l2, i2 = false; "string" == typeof e2 && (e2 = { src: e2 }), e2.keymark = e2.keymark || "$$"; - const o2 = null === (n3 = null == t2 ? void 0 : t2.$) || void 0 === n3 ? void 0 : n3.gubu$; + const o2 = null === (n2 = null == t2 ? void 0 : t2.$) || void 0 === n2 ? void 0 : n2.gubu$; if (e2.i = e2.i || 0, null == e2.tokens) { - l3 = null != e2.val ? oe(e2.val, (e2.d || 0) + 1, e2.meta) : void 0, i2 = true, e2.tokens = []; - let n4 = /\s*,?\s*([)(\.]|"(\\.|[^"\\])*"|\/(\\.|[^\/\\])*\/[a-z]?|[^)(,.\s]+)\s*/g, r4 = null; - for (; r4 = n4.exec(e2.src); ) e2.tokens.push(r4[1]); + l2 = null != e2.val ? oe(e2.val, (e2.d || 0) + 1, e2.meta) : void 0, i2 = true, e2.tokens = []; + let n3 = /\s*,?\s*([)(\.]|"(\\.|[^"\\])*"|\/(\\.|[^\/\\])*\/[a-z]?|[^)(,.\s]+)\s*/g, r4 = null; + for (; r4 = n3.exec(e2.src); ) e2.tokens.push(r4[1]); if (!o2) { - let n5 = 0, r5 = false; - for (; n5 < e2.tokens.length; n5++) if (")" == e2.tokens[n5]) { + let n4 = 0, r5 = false; + for (; n4 < e2.tokens.length; n4++) if (")" == e2.tokens[n4]) { r5 = true; break; } - if ((r5 || n5 === e2.tokens.length) && void 0 !== t2) { - let l4 = "token_" + e2.d + "_" + e2.i; - e2.refs = e2.refs || {}, e2.refs[l4] = t2, r5 ? e2.tokens.splice(n5, 0, e2.keymark + l4) : e2.tokens.push("(", e2.keymark + l4, ")"); + if ((r5 || n4 === e2.tokens.length) && void 0 !== t2) { + let l3 = "token_" + e2.d + "_" + e2.i; + e2.refs = e2.refs || {}, e2.refs[l3] = t2, r5 ? e2.tokens.splice(n4, 0, e2.keymark + l3) : e2.tokens.push("(", e2.keymark + l3, ")"); } } } @@ -1285,49 +1300,49 @@ var gubu_min = gubu_min$2.exports; } e2.i++; } - return l3 = o2 ? u2.call(t2, ...a2) : u2.call(void 0, ...a2), "." === e2.tokens[e2.i] ? (e2.i++, l3 = ae(e2, l3)) : i2 && e2.i < e2.tokens.length && (l3 = ae(e2, l3)), l3; + return l2 = o2 ? u2.call(t2, ...a2) : u2.call(void 0, ...a2), "." === e2.tokens[e2.i] ? (e2.i++, l2 = ae(e2, l2)) : i2 && e2.i < e2.tokens.length && (l2 = ae(e2, l2)), l2; } - function ce(e2, t2 = {}, n3 = true) { + function ce(e2, t2 = {}, n2 = true) { let r3; - const l3 = Array.isArray(e2) ? "array" : null === e2 ? "null" : typeof e2; - return "string" === l3 ? r3 = ae(e2) : "number" === l3 || "boolean" === l3 ? r3 = e2 : v === l3 ? r3 = Object.entries(e2).reduce((e3, n4) => { + const l2 = Array.isArray(e2) ? "array" : null === e2 ? "null" : typeof e2; + return "string" === l2 ? r3 = ae(e2) : "number" === l2 || "boolean" === l2 ? r3 = e2 : v === l2 ? r3 = Object.entries(e2).reduce((e3, n3) => { var r4; - return e3[n4[0]] = ((null === (r4 = t2.valexpr) || void 0 === r4 ? void 0 : r4.keymark) || "$$") === n4[0] ? n4[1] : ce(n4[1], t2, false), e3; - }, {}) : p2 === l3 && (r3 = e2.map((e3) => ce(e3, t2, false))), n3 ? (t2.valexpr = t2.valexpr || {}, t2.valexpr.active = true, et(r3, t2)) : r3; + return e3[n3[0]] = ((null === (r4 = t2.valexpr) || void 0 === r4 ? void 0 : r4.keymark) || "$$") === n3[0] ? n3[1] : ce(n3[1], t2, false), e3; + }, {}) : p === l2 && (r3 = e2.map((e3) => ce(e3, t2, false))), n2 ? (t2.valexpr = t2.valexpr || {}, t2.valexpr.active = true, et(r3, t2)) : r3; } function fe(e2, t2) { - var n3; - let r3, l3 = {}, i2 = false; + var n2; + let r3, l2 = {}, i2 = false; try { - i2 = !(void 0 !== t2.val || !(null === (n3 = e2.gubu$) || void 0 === n3 ? void 0 : n3.Check)) || (t2.check = e2, e2(t2.val, l3, t2)); + i2 = !(void 0 !== t2.val || !(null === (n2 = e2.gubu$) || void 0 === n2 ? void 0 : n2.Check)) || (t2.check = e2, e2(t2.val, l2, t2)); } catch (s2) { r3 = s2; } - let o2 = Y(l3.err) ? 0 < l3.err.length : null != l3.err; + let o2 = Y(l2.err) ? 0 < l2.err.length : null != l2.err; if (!i2 || o2) { - if (void 0 === t2.val && (t2.node.p || !t2.node.r) && true !== l3.done) return delete l3.err, l3; - let n4 = l3.why || S, i3 = pe(t2); - if (d === typeof l3.err) t2.curerr.push(He(t2, l3.err)); - else if (v === typeof l3.err) t2.curerr.push(...[l3.err].flat().filter((e3) => null != e3).map((e3) => (e3.path = null == e3.path ? i3 : e3.path, e3.mark = null == e3.mark ? 2010 : e3.mark, e3))); + if (void 0 === t2.val && (t2.node.p || !t2.node.r) && true !== l2.done) return delete l2.err, l2; + let n3 = l2.why || S, i3 = pe(t2); + if (d === typeof l2.err) t2.curerr.push(He(t2, l2.err)); + else if (v === typeof l2.err) t2.curerr.push(...[l2.err].flat().filter((e3) => null != e3).map((e3) => (e3.path = null == e3.path ? i3 : e3.path, e3.mark = null == e3.mark ? 2010 : e3.mark, e3))); else { - let l4 = e2.name; - null != l4 && "" != l4 || (l4 = he(e2.toString().replace(/[ \t\r\n]+/g, " "))), t2.curerr.push(Ue(n4, t2, 1045, void 0, { thrown: r3 }, l4)); + let l3 = e2.name; + null != l3 && "" != l3 || (l3 = he(e2.toString().replace(/[ \t\r\n]+/g, " "))), t2.curerr.push(Ue(n3, t2, 1045, void 0, { thrown: r3 }, l3)); } - l3.done = null == l3.done || l3.done; + l2.done = null == l2.done || l2.done; } - return l3.hasOwnProperty("uval") ? (t2.updateVal(l3.uval), t2.ignoreVal = false) : void 0 === l3.val || Number.isNaN(l3.val) || (t2.updateVal(l3.val), t2.ignoreVal = false), void 0 !== l3.node && (t2.node = l3.node), void 0 !== l3.type && (t2.type = l3.type), l3; + return l2.hasOwnProperty("uval") ? (t2.updateVal(l2.uval), t2.ignoreVal = false) : void 0 === l2.val || Number.isNaN(l2.val) || (t2.updateVal(l2.val), t2.ignoreVal = false), void 0 !== l2.node && (t2.node = l2.node), void 0 !== l2.type && (t2.type = l2.type), l2; } function pe(e2) { return e2.path.slice(1, e2.dI + 1).filter((e3) => null != e3).join("."); } function he(e2, t2) { - let n3 = String(e2), r3 = null == t2 || isNaN(t2) ? 30 : t2 < 0 ? 0 : ~~t2, l3 = null == e2 ? 0 : n3.length, i2 = null == e2 ? "" : n3.substring(0, l3); - return i2 = r3 < l3 ? i2.substring(0, r3 - 3) + "..." : i2, i2.substring(0, r3); + let n2 = String(e2), r3 = null == t2 || isNaN(t2) ? 30 : t2 < 0 ? 0 : ~~t2, l2 = null == e2 ? 0 : n2.length, i2 = null == e2 ? "" : n2.substring(0, l2); + return i2 = r3 < l2 ? i2.substring(0, r3 - 3) + "..." : i2, i2.substring(0, r3); } const ve = function(e2) { var t2; - let n3 = qe(this, e2); - return n3.r = true, n3.p = false, void 0 === e2 ? (n3.f = void 0, 1 === arguments.length && (n3.t = y, n3.v = void 0)) : (null === (t2 = null == this ? void 0 : this.$) || void 0 === t2 ? void 0 : t2.gubu$) && (n3.f = void 0), n3; + let n2 = qe(this, e2); + return n2.r = true, n2.p = false, void 0 === e2 ? (n2.f = void 0, 1 === arguments.length && (n2.t = y, n2.v = void 0)) : (null === (t2 = null == this ? void 0 : this.$) || void 0 === t2 ? void 0 : t2.gubu$) && (n2.f = void 0), n2; }, de = function(e2) { let t2 = qe(this, e2); return t2.c = ye(), t2; @@ -1336,30 +1351,30 @@ var gubu_min = gubu_min$2.exports; return t2.r = false, void 0 === e2 && 1 === arguments.length && (t2.t = y, t2.v = void 0), t2; }, ye = function(e2) { let t2 = qe(this, e2); - return t2.t = m2, void 0 !== e2 && (t2.v = e2, t2.f = e2), t2; + return t2.t = m, void 0 !== e2 && (t2.v = e2, t2.f = e2), t2; }, me = function(e2, t2) { - let n3 = qe(this, t2); - return n3.z = e2, n3; + let n2 = qe(this, t2); + return n2.z = e2, n2; }, be = function(e2) { let t2 = qe(this, e2); return t2.r = false, t2.p = true, t2; }, $e = function(e2) { let t2 = qe(this, e2); - return t2.r = false, t2.p = true, t2.e = false, t2.a.push(function(e3, t3, n3) { - return 0 < n3.curerr.length && (t3.uval = void 0, t3.done = false), true; + return t2.r = false, t2.p = true, t2.e = false, t2.a.push(function(e3, t3, n2) { + return 0 < n2.curerr.length && (t3.uval = void 0, t3.done = false), true; }), t2; }, ke = function(e2) { let t2 = qe(this); return t2.t = h, t2.v = e2, t2.f = e2, t2; }, xe = function(e2, t2) { - let n3 = qe(this, e2); - if (void 0 !== t2 && (n3 = qe(n3, t2)), n3.r = false, n3.f = e2, void 0 === t2) { - h === typeof e2 && le[e2.name] && (n3.t = e2.name.toLowerCase(), n3.f = Qe(ie[n3.t])); + let n2 = qe(this, e2); + if (void 0 !== t2 && (n2 = qe(n2, t2)), n2.r = false, n2.f = e2, void 0 === t2) { + h === typeof e2 && le[e2.name] && (n2.t = e2.name.toLowerCase(), n2.f = Qe(ie[n2.t])); } else { const e3 = oe(t2); - n3.t = e3.t; + n2.t = e3.t; } - return n3.p = false, n3; + return n2.p = false, n2; }, Ie = function(e2) { let t2 = qe(this, e2); return t2.u.empty = true, t2; @@ -1367,259 +1382,259 @@ var gubu_min = gubu_min$2.exports; let t2 = qe(this, e2); return t2.t = a, t2; }, Se = function(e2, t2) { - let n3 = qe(this), r3 = c === typeof e2; - n3.t = d, r3 && null == t2 && (n3 = oe([])); - let l3 = null; - return h === typeof e2 && (l3 = e2, n3 = ye()), n3.b.push(function(n4, i2, o2) { - if (l3) i2.val = l3(o2.path, o2); + let n2 = qe(this), r3 = c === typeof e2; + n2.t = d, r3 && null == t2 && (n2 = oe([])); + let l2 = null; + return h === typeof e2 && (l2 = e2, n2 = ye()), n2.b.push(function(n3, i2, o2) { + if (l2) i2.val = l2(o2.path, o2); else if (r3) { - let n5 = e2; - i2.val = o2.path.slice(o2.path.length - 1 - (0 <= n5 ? n5 : 0), o2.path.length - 1 + (0 <= n5 ? 0 : 1)), d === typeof t2 && (i2.val = i2.val.join(t2)); + let n4 = e2; + i2.val = o2.path.slice(o2.path.length - 1 - (0 <= n4 ? n4 : 0), o2.path.length - 1 + (0 <= n4 ? 0 : 1)), d === typeof t2 && (i2.val = i2.val.join(t2)); } else null == e2 && (i2.val = o2.path[o2.path.length - 2]); return true; - }), n3; + }), n2; }, je = function(...e2) { const t2 = qe(this); t2.t = b, t2.r = true; - const n3 = e2.map((e3) => et(e3)); - t2.u.list = n3.map((e3) => e3.node()); - const r3 = function(t3, r4, l3) { + const n2 = e2.map((e3) => et(e3)); + t2.u.list = n2.map((e3) => e3.node()); + const r3 = function(t3, r4, l2) { let i2 = true; - for (let e3 of n3) { - let n4 = __spreadProps(__spreadValues({}, l3.ctx), { err: [] }); - e3(t3, n4), 0 < n4.err.length && (i2 = false); + for (let e3 of n2) { + let n3 = __spreadProps(__spreadValues({}, l2.ctx), { err: [] }); + e3(t3, n3), 0 < n3.err.length && (i2 = false); } - return i2 || (r4.why = G, r4.err = [He(l3, E + " " + K + H + U + " does not satisfy all of: " + e2.map((e3) => Ze(e3, null, true)).join(", "))]), i2; + return i2 || (r4.why = G, r4.err = [He(l2, E + " " + K + H + U + " does not satisfy all of: " + e2.map((e3) => Ze(e3, null, true)).join(", "))]), i2; }; return r3.n = G, r3.a = e2, t2.b.push(r3), t2; }, Ne = function(...e2) { let t2 = qe(this); t2.t = b, t2.r = true; - let n3 = e2.map((e3) => et(e3)); - t2.u.list = n3.map((e3) => e3.node()); - const r3 = function(t3, r4, l3) { + let n2 = e2.map((e3) => et(e3)); + t2.u.list = n2.map((e3) => e3.node()); + const r3 = function(t3, r4, l2) { let i2 = false; - for (let e3 of n3) { - let n4 = __spreadProps(__spreadValues({}, l3.ctx), { err: [] }), o2 = e3.match(t3, n4); - o2 && (r4.val = e3(t3, n4)), i2 || (i2 = o2); + for (let e3 of n2) { + let n3 = __spreadProps(__spreadValues({}, l2.ctx), { err: [] }), o2 = e3.match(t3, n3); + o2 && (r4.val = e3(t3, n3)), i2 || (i2 = o2); } - return i2 || (r4.why = q2, r4.err = [He(l3, E + " " + K + H + U + " does not satisfy any of: " + e2.map((e3) => Ze(e3, null, true)).join(", "))]), i2; + return i2 || (r4.why = q, r4.err = [He(l2, E + " " + K + H + U + " does not satisfy any of: " + e2.map((e3) => Ze(e3, null, true)).join(", "))]), i2; }; - return r3.n = q2, r3.a = e2, t2.b.push(r3), t2; + return r3.n = q, r3.a = e2, t2.b.push(r3), t2; }, Oe = function(...e2) { let t2 = qe(this); t2.t = b, t2.r = true; - let n3 = e2.map((e3) => et(e3)); - t2.u.list = n3.map((e3) => e3.node()); - const r3 = function(t3, r4, l3) { + let n2 = e2.map((e3) => et(e3)); + t2.u.list = n2.map((e3) => e3.node()); + const r3 = function(t3, r4, l2) { let i2 = 0; - for (let e3 of n3) { - let n4 = __spreadProps(__spreadValues({}, l3.ctx), { err: [] }); - if (e3.match(t3, n4)) { - i2++, r4.val = e3(t3, n4); + for (let e3 of n2) { + let n3 = __spreadProps(__spreadValues({}, l2.ctx), { err: [] }); + if (e3.match(t3, n3)) { + i2++, r4.val = e3(t3, n3); break; } } - return 1 !== i2 && (r4.why = z, r4.err = [He(l3, E + " " + K + H + U + " does not satisfy one of: " + e2.map((e3) => Ze(e3, null, true)).join(", "))]), true; + return 1 !== i2 && (r4.why = z, r4.err = [He(l2, E + " " + K + H + U + " does not satisfy one of: " + e2.map((e3) => Ze(e3, null, true)).join(", "))]), true; }; return r3.n = z, r3.a = e2, t2.b.push(r3), t2; }, Ve = function(...e2) { - const t2 = qe(this), n3 = function(t3, n4, r3) { - for (let l3 = 0; l3 < e2.length; l3++) if (t3 === e2[l3]) return true; + const t2 = qe(this), n2 = function(t3, n3, r3) { + for (let l2 = 0; l2 < e2.length; l2++) if (t3 === e2[l2]) return true; if (r3.node.hasOwnProperty("f") && void 0 === t3) { const t4 = r3.node.f; - for (let n5 = 0; n5 < e2.length; n5++) if (t4 === e2[n5]) return true; + for (let n4 = 0; n4 < e2.length; n4++) if (t4 === e2[n4]) return true; } - return n4.err = He(r3, E + " " + K + H + U + " must be exactly one of: " + e2.map((e3) => Ze(e3, null, true)).join(", ")), n4.done = true, false; + return n3.err = He(r3, E + " " + K + H + U + " must be exactly one of: " + e2.map((e3) => Ze(e3, null, true)).join(", ")), n3.done = true, false; }; - return n3.n = M, n3.a = e2, n3.s = () => M + "(" + e2.map((e3) => Ze(e3, null, true)).join(",") + ")", t2.b.push(n3), t2; + return n2.n = M, n2.a = e2, n2.s = () => M + "(" + e2.map((e3) => Ze(e3, null, true)).join(",") + ")", t2.b.push(n2), t2; }, Ae = function(e2, t2) { - let n3 = qe(this, t2); - return n3.b.push(e2), n3; + let n2 = qe(this, t2); + return n2.b.push(e2), n2; }, Re = function(e2, t2) { - let n3 = qe(this, t2); - return n3.a.push(e2), n3; + let n2 = qe(this, t2); + return n2.a.push(e2), n2; }, De = function(e2, t2) { - let n3 = qe(this, t2); - if (n3.r = true, h === typeof e2) { + let n2 = qe(this, t2); + if (n2.r = true, h === typeof e2) { let t3 = e2; - t3.gubu$ = t3.gubu$ || {}, t3.gubu$.Check = true, t3.s = () => J + "(" + Ze(e2, null, true) + ")", n3.b.push(e2), n3.t = S; + t3.gubu$ = t3.gubu$ || {}, t3.gubu$.Check = true, t3.s = () => J + "(" + Ze(e2, null, true) + ")", n2.b.push(e2), n2.t = S; } else if (v === typeof e2) { if (Object.prototype.toString.call(e2).includes("RegExp")) { let t3 = (t4) => null != t4 && !Number.isNaN(t4) && !!String(t4).match(e2); - X(t3, s, { value: String(e2) }), X(t3, "gubu$", { value: { Check: true } }), t3.s = () => J + "(" + Ze(e2, null, true) + ")", n3.b.push(t3), n3.t = S; + X(t3, s, { value: String(e2) }), X(t3, "gubu$", { value: { Check: true } }), t3.s = () => J + "(" + Ze(e2, null, true) + ")", n2.b.push(t3), n2.t = S; } - } else d === typeof e2 && (n3.t = e2); + } else d === typeof e2 && (n2.t = e2); if (void 0 !== t2) { const e3 = oe(t2); - n3.t = e3.t; + n2.t = e3.t; } - return n3; + return n2; }, Ee = function(e2) { let t2 = qe(this, e2); - return p2 === t2.t && void 0 !== t2.c && 0 === t2.n && (t2.v = [t2.c]), t2.c = void 0, t2; + return p === t2.t && void 0 !== t2.c && 0 === t2.n && (t2.v = [t2.c]), t2.c = void 0, t2; }, Ce = function(e2, t2) { - let n3 = qe(this, t2), r3 = d === typeof e2 ? e2 : (v === typeof e2 && e2 || {}).name; - return null != r3 && "" != r3 && n3.b.push(function(e3, t3, n4) { - return (n4.ctx.ref = n4.ctx.ref || {})[r3] = n4.node, true; - }), n3; + let n2 = qe(this, t2), r3 = d === typeof e2 ? e2 : (v === typeof e2 && e2 || {}).name; + return null != r3 && "" != r3 && n2.b.push(function(e3, t3, n3) { + return (n3.ctx.ref = n3.ctx.ref || {})[r3] = n3.node, true; + }), n2; }, Ge = function(e2, t2) { - let n3 = qe(this, t2), r3 = v === typeof e2 && e2 || {}, l3 = d === typeof e2 ? e2 : r3.name, i2 = !!r3.fill; - return null != l3 && "" != l3 && n3.b.push(function(e3, t3, n4) { + let n2 = qe(this, t2), r3 = v === typeof e2 && e2 || {}, l2 = d === typeof e2 ? e2 : r3.name, i2 = !!r3.fill; + return null != l2 && "" != l2 && n2.b.push(function(e3, t3, n3) { if (void 0 !== e3 || i2) { - let e4 = n4.ctx.ref = n4.ctx.ref || {}; - if (void 0 !== e4[l3]) { - let n5 = __spreadValues({}, e4[l3]); - n5.t = n5.t || a, t3.node = n5, t3.type = n5.t; + let e4 = n3.ctx.ref = n3.ctx.ref || {}; + if (void 0 !== e4[l2]) { + let n4 = __spreadValues({}, e4[l2]); + n4.t = n4.t || a, t3.node = n4, t3.type = n4.t; } } return true; - }), n3; + }), n2; }, Te = function(e2, t2) { - let n3 = qe(this, t2), r3 = v === typeof e2 && e2 || {}, l3 = d === typeof e2 ? e2 : r3.name, i2 = g === typeof r3.keep ? r3.keep : void 0, o2 = Y(r3.claim) ? r3.claim : []; - if (null != l3 && "" != l3) { - let e3 = (e4, t4, n4) => { + let n2 = qe(this, t2), r3 = v === typeof e2 && e2 || {}, l2 = d === typeof e2 ? e2 : r3.name, i2 = g === typeof r3.keep ? r3.keep : void 0, o2 = Y(r3.claim) ? r3.claim : []; + if (null != l2 && "" != l2) { + let e3 = (e4, t4, n3) => { if (void 0 === e4 && 0 < o2.length) { - n4.ctx.Rename = n4.ctx.Rename || {}, n4.ctx.Rename.fromDflt = n4.ctx.Rename.fromDflt || {}; + n3.ctx.Rename = n3.ctx.Rename || {}, n3.ctx.Rename.fromDflt = n3.ctx.Rename.fromDflt || {}; for (let e5 of o2) { - let r4 = n4.ctx.Rename.fromDflt[e5] || {}; - if (void 0 !== n4.parent[e5] && !r4.yes) { - t4.val = n4.parent[e5], n4.match || (n4.parent[l3] = t4.val), t4.node = r4.node; - for (let e6 = 0; e6 < n4.err.length; e6++) n4.err[e6].k === r4.key && (n4.err.splice(e6, 1), e6--); + let r4 = n3.ctx.Rename.fromDflt[e5] || {}; + if (void 0 !== n3.parent[e5] && !r4.yes) { + t4.val = n3.parent[e5], n3.match || (n3.parent[l2] = t4.val), t4.node = r4.node; + for (let e6 = 0; e6 < n3.err.length; e6++) n3.err[e6].k === r4.key && (n3.err.splice(e6, 1), e6--); if (i2) { - let t5 = n4.cI + 1; - n4.nodes.splice(t5, 0, oe(r4.dval)), n4.vals.splice(t5, 0, void 0), n4.parents.splice(t5, 0, n4.parent), n4.keys.splice(t5, 0, e5), n4.nI++, n4.pI++; - } else delete n4.parent[e5]; + let t5 = n3.cI + 1; + n3.nodes.splice(t5, 0, oe(r4.dval)), n3.vals.splice(t5, 0, void 0), n3.parents.splice(t5, 0, n3.parent), n3.keys.splice(t5, 0, e5), n3.nI++, n3.pI++; + } else delete n3.parent[e5]; break; } } - void 0 === t4.val && (t4.val = n4.node.v); + void 0 === t4.val && (t4.val = n3.node.v); } return true; }; - X(e3, s, { value: "Rename:" + l3 }), n3.b.push(e3); - let t3 = (e4, t4, n4) => (n4.parent[l3] = e4, n4.match || i2 || n4.key === l3 || Y(n4.parent) && false !== i2 || (delete n4.parent[n4.key], t4.done = true), n4.ctx.Rename = n4.ctx.Rename || {}, n4.ctx.Rename.fromDflt = n4.ctx.Rename.fromDflt || {}, n4.ctx.Rename.fromDflt[l3] = { yes: n4.fromDflt, key: n4.key, dval: n4.node.v, node: n4.node }, true); - X(t3, s, { value: "Rename:" + l3 }), n3.a.push(t3); + X(e3, s, { value: "Rename:" + l2 }), n2.b.push(e3); + let t3 = (e4, t4, n3) => (n3.parent[l2] = e4, n3.match || i2 || n3.key === l2 || Y(n3.parent) && false !== i2 || (delete n3.parent[n3.key], t4.done = true), n3.ctx.Rename = n3.ctx.Rename || {}, n3.ctx.Rename.fromDflt = n3.ctx.Rename.fromDflt || {}, n3.ctx.Rename.fromDflt[l2] = { yes: n3.fromDflt, key: n3.key, dval: n3.node.v, node: n3.node }, true); + X(t3, s, { value: "Rename:" + l2 }), n2.a.push(t3); } - return n3; + return n2; }, Be = function(e2, t2) { - let n3 = qe(this, t2); - return n3.c = oe(e2), void 0 === n3.v && (n3.t = "object", n3.v = {}, n3.f = {}), n3; + let n2 = qe(this, t2); + return n2.c = oe(e2), void 0 === n2.v && (n2.t = "object", n2.v = {}, n2.f = {}), n2; }, Je = function(e2, t2) { - let n3 = qe(this, t2 || []); - return n3.t = "array", n3.c = oe(e2), n3.m = n3.m || {}, n3.m.rest = true, n3; + let n2 = qe(this, t2 || []); + return n2.t = "array", n2.c = oe(e2), n2.m = n2.m || {}, n2.m.rest = true, n2; }, We = function(e2, t2) { - let n3 = oe(Z[e2]), r3 = qe(this, t2); - return r3 !== n3 && (r3.t = n3.t, r3.r = n3.r, r3.p = n3.p, r3.v = n3.v), r3; + let n2 = oe(Z[e2]), r3 = qe(this, t2); + return r3 !== n2 && (r3.t = n2.t, r3.r = n2.r, r3.p = n2.p, r3.v = n2.v), r3; }; - function Me(e2, t2, n3, r3, l3) { - let i2 = qe(e2, n3); + function Me(e2, t2, n2, r3, l2) { + let i2 = qe(e2, n2); t2 = +t2; - let o2 = function(e3, n4, r4) { - return l3(function(e4) { + let o2 = function(e3, n3, r4) { + return l2(function(e4) { return c === typeof e4 ? e4 : c === typeof (null == e4 ? void 0 : e4.length) ? e4.length : null != e4 && v === typeof e4 ? Q(e4).length : NaN; - }(e3), t2, e3, n4, r4); + }(e3), t2, e3, n3, r4); }; return Object.defineProperty(o2, s, { value: r3 }), o2.n = r3, o2.a = [t2], o2.s = () => r3 + "(" + t2 + ")", o2[Symbol.for("nodejs.util.inspect.custom")] = o2.s(), o2.toJSON = () => o2.s(), i2.b.push(o2), i2; } const Fe = function(e2, t2) { - return Me(this, e2, t2, P, (e3, t3, n3, r3, l3) => { + return Me(this, e2, t2, P, (e3, t3, n2, r3, l2) => { if (t3 <= e3) return true; - l3.checkargs = { min: 1 }; - let i2 = c === typeof n3 ? "" : "length "; - return r3.err = He(l3, E + " " + K + H + U + ` must be a minimum ${i2}of ${t3} (was ${e3}).`), false; + l2.checkargs = { min: 1 }; + let i2 = c === typeof n2 ? "" : "length "; + return r3.err = He(l2, E + " " + K + H + U + ` must be a minimum ${i2}of ${t3} (was ${e3}).`), false; }); }, Pe = function(e2, t2) { - return Me(this, e2, t2, F, (e3, t3, n3, r3, l3) => { + return Me(this, e2, t2, F, (e3, t3, n2, r3, l2) => { if (e3 <= t3) return true; - let i2 = c === typeof n3 ? "" : "length "; - return r3.err = He(l3, E + " " + K + H + U + ` must be a maximum ${i2}of ${t3} (was ${e3}).`), false; + let i2 = c === typeof n2 ? "" : "length "; + return r3.err = He(l2, E + " " + K + H + U + ` must be a maximum ${i2}of ${t3} (was ${e3}).`), false; }); }, ze = function(e2, t2) { - return Me(this, e2, t2, C, (e3, t3, n3, r3, l3) => { + return Me(this, e2, t2, C, (e3, t3, n2, r3, l2) => { if (t3 < e3) return true; - let i2 = c === typeof n3 ? "be" : "have length"; - return r3.err = He(l3, E + " " + K + H + U + ` must ${i2} above ${t3} (was ${e3}).`), false; + let i2 = c === typeof n2 ? "be" : "have length"; + return r3.err = He(l2, E + " " + K + H + U + ` must ${i2} above ${t3} (was ${e3}).`), false; }); }, Le = function(e2, t2) { - return Me(this, e2, t2, B, (e3, t3, n3, r3, l3) => { + return Me(this, e2, t2, B, (e3, t3, n2, r3, l2) => { if (e3 < t3) return true; - let i2 = c === typeof n3 ? "be" : "have length"; - return r3.err = He(l3, E + " " + K + H + U + ` must ${i2} below ${t3} (was ${e3}).`), false; + let i2 = c === typeof n2 ? "be" : "have length"; + return r3.err = He(l2, E + " " + K + H + U + ` must ${i2} below ${t3} (was ${e3}).`), false; }); }, _e = function(e2, t2) { - return Me(this, e2, t2, B, (e3, t3, n3, r3, l3) => { + return Me(this, e2, t2, B, (e3, t3, n2, r3, l2) => { if (t3 === e3) return true; - let i2 = c === typeof n3 ? "" : " in length"; - return r3.err = He(l3, E + " " + K + H + U + ` must be exactly ${t3}${i2} (was ${e3}).`), false; + let i2 = c === typeof n2 ? "" : " in length"; + return r3.err = He(l2, E + " " + K + H + U + ` must be exactly ${t3}${i2} (was ${e3}).`), false; }); }; function qe(e2, t2) { - let n3, r3 = null != e2 && (e2.window === e2 || e2.global === e2); - if (void 0 !== e2 && !r3 || void 0 === t2) if (void 0 === e2 || r3) n3 = oe(void 0); + let n2, r3 = null != e2 && (e2.window === e2 || e2.global === e2); + if (void 0 !== e2 && !r3 || void 0 === t2) if (void 0 === e2 || r3) n2 = oe(void 0); else if (void 0 !== t2) { - n3 = oe(t2); + n2 = oe(t2); let r4 = oe(e2); - void 0 === n3.v && "list" !== n3.t && (n3.v = r4.v, n3.t = r4.t), ["f", "r", "p", "c", "e", "z"].map((e3) => n3[e3] = void 0 !== r4[e3] ? r4[e3] : n3[e3]), n3.u = Object.assign(__spreadValues({}, r4.u), n3.u), n3.m = Object.assign(__spreadValues({}, r4.m), n3.m), n3.a = r4.a.concat(n3.a), n3.b = r4.b.concat(n3.b); - } else n3 = oe(e2); - else n3 = oe(t2); - return n3.Above ? n3 : Object.assign(n3, { Above: ze, After: Re, Any: ye, Before: Ae, Below: Le, Check: De, Child: Be, Closed: Ee, Default: xe, Define: Ce, Empty: Ie, Exact: Ve, Fault: me, Ignore: $e, Len: _e, Max: Pe, Min: Fe, Never: we, Open: de, Refer: Ge, Rename: Te, Required: ve, Rest: Je, Skip: be, Type: We }); + void 0 === n2.v && "list" !== n2.t && (n2.v = r4.v, n2.t = r4.t), ["f", "r", "p", "c", "e", "z"].map((e3) => n2[e3] = void 0 !== r4[e3] ? r4[e3] : n2[e3]), n2.u = Object.assign(__spreadValues({}, r4.u), n2.u), n2.m = Object.assign(__spreadValues({}, r4.m), n2.m), n2.a = r4.a.concat(n2.a), n2.b = r4.b.concat(n2.b); + } else n2 = oe(e2); + else n2 = oe(t2); + return n2.Above ? n2 : Object.assign(n2, { Above: ze, After: Re, Any: ye, Before: Ae, Below: Le, Check: De, Child: Be, Closed: Ee, Default: xe, Define: Ce, Empty: Ie, Exact: Ve, Fault: me, Ignore: $e, Len: _e, Max: Pe, Min: Fe, Never: we, Open: de, Refer: Ge, Rename: Te, Required: ve, Rest: Je, Skip: be, Type: We }); } - function He(e2, t2, n3, r3) { - return Ue(n3 || S, e2, 4e3, t2, r3); + function He(e2, t2, n2, r3) { + return Ue(n2 || S, e2, 4e3, t2, r3); } - function Ue(e2, t2, n3, r3, l3, i2) { + function Ue(e2, t2, n2, r3, l2, i2) { var o2; - let s2 = { key: t2.key, type: t2.node.t, node: t2.node, value: t2.val, path: pe(t2), why: e2, check: (null === (o2 = t2.check) || void 0 === o2 ? void 0 : o2.name) || "none", args: t2.checkargs || {}, mark: n3, text: "", use: l3 || {} }, u2 = he((void 0 === t2.val ? y : Ze(t2.val)).replace(/"/g, "")); + let s2 = { key: t2.key, type: t2.node.t, node: t2.node, value: t2.val, path: pe(t2), why: e2, check: (null === (o2 = t2.check) || void 0 === o2 ? void 0 : o2.name) || "none", args: t2.checkargs || {}, mark: n2, text: "", use: l2 || {} }, u2 = he((void 0 === t2.val ? y : Ze(t2.val)).replace(/"/g, "")); if (null == (r3 = r3 || t2.node.z) || "" === r3) { - let n4 = u2.startsWith("[") ? p2 : u2.startsWith("{") ? v : null == t2.val || c === typeof t2.val && isNaN(t2.val) ? "value" : typeof t2.val, r4 = u2.startsWith("[") || Y(t2.parents[t2.pI]) ? "index" : "property", o3 = "is", h2 = null == l3 ? void 0 : l3.k; - h2 = Y(h2) ? (r4 = 1 < h2.length ? (o3 = "are", "properties") : r4, h2.join(", ")) : h2, s2.text = "Validation failed for " + (0 < s2.path.length ? `${r4} "${s2.path}" with ` : "") + `${n4} "${u2}" because ` + (x === e2 ? $ === t2.node.t ? `the ${n4} is not an instance of ${t2.node.u.n}` : `the ${n4} is not of type ${j === t2.node.t ? d : t2.node.t}` : f2 === e2 ? "" === t2.val ? "an empty string is not allowed" : `the ${n4} is required` : "closed" === e2 ? `the ${r4} "${h2}" ${o3} not allowed` : j === e2 ? "the string did not match " + t2.node.v : a === e2 ? "no value is allowed" : `check "${null == i2 ? e2 : i2}" failed`) + (s2.use.thrown ? " (threw: " + s2.use.thrown.message + ")" : "."); + let n3 = u2.startsWith("[") ? p : u2.startsWith("{") ? v : null == t2.val || c === typeof t2.val && isNaN(t2.val) ? "value" : typeof t2.val, r4 = u2.startsWith("[") || Y(t2.parents[t2.pI]) ? "index" : "property", o3 = "is", h2 = null == l2 ? void 0 : l2.k; + h2 = Y(h2) ? (r4 = 1 < h2.length ? (o3 = "are", "properties") : r4, h2.join(", ")) : h2, s2.text = "Validation failed for " + (0 < s2.path.length ? `${r4} "${s2.path}" with ` : "") + `${n3} "${u2}" because ` + (x === e2 ? $ === t2.node.t ? `the ${n3} is not an instance of ${t2.node.u.n}` : `the ${n3} is not of type ${j === t2.node.t ? d : t2.node.t}` : f === e2 ? "" === t2.val ? "an empty string is not allowed" : `the ${n3} is required` : "closed" === e2 ? `the ${r4} "${h2}" ${o3} not allowed` : j === e2 ? "the string did not match " + t2.node.v : a === e2 ? "no value is allowed" : `check "${null == i2 ? e2 : i2}" failed`) + (s2.use.thrown ? " (threw: " + s2.use.thrown.message + ")" : "."); } else s2.text = r3.replace(/\$VALUE/g, u2).replace(/\$PATH/g, s2.path); return s2; } function Ke(e2) { var t2; - let n3 = e2.t; + let n2 = e2.t; const r3 = { number: O, string: N, boolean: V }; - if (r3[n3]) { + if (r3[n2]) { let t3 = ""; - return e2.r && (t3 += r3[n3]), "" === t3 && (t3 = JSON.stringify(e2.v)), t3 += e2.b.map((t4) => t4.s ? "." + t4.s(e2) : "").join(""), t3; + return e2.r && (t3 += r3[n2]), "" === t3 && (t3 = JSON.stringify(e2.v)), t3 += e2.b.map((t4) => t4.s ? "." + t4.s(e2) : "").join(""), t3; } - if (m2 === n3) { - let n4 = ""; - return e2.r && (n4 += _2), m2 == (null === (t2 = e2.c) || void 0 === t2 ? void 0 : t2.t) && (n4 += ("" === n4 ? "" : ".") + L), n4 += e2.b.map((t3) => t3.s ? "." + t3.s(e2) : "").join(""), n4.startsWith(".") && (n4 = n4.slice(1)), "" === n4 && (n4 = T), n4; + if (m === n2) { + let n3 = ""; + return e2.r && (n3 += _2), m == (null === (t2 = e2.c) || void 0 === t2 ? void 0 : t2.t) && (n3 += ("" === n3 ? "" : ".") + L), n3 += e2.b.map((t3) => t3.s ? "." + t3.s(e2) : "").join(""), n3.startsWith(".") && (n3 = n3.slice(1)), "" === n3 && (n3 = T), n3; } - if (S === n3) { + if (S === n2) { let t3 = ""; return t3 += e2.b.map((t4) => t4.s ? "." + t4.s(e2) : "").join(""), t3.startsWith(".") && (t3 = t3.slice(1)), t3; } - if (v === n3) { + if (v === n2) { let t3 = {}; - for (let n4 in e2.v) t3[n4] = Ke(e2.v[n4]); + for (let n3 in e2.v) t3[n3] = Ke(e2.v[n3]); return void 0 !== e2.c && (r3[e2.c.t] ? t3.$$ = W + "(" + r3[e2.c.t] + ")" : "any" === e2.c.t ? t3.$$ = L : (t3.$$ = W + "($$child)", t3.$$child = Ke(e2.c))), 0 < e2.b.length && (void 0 === t3.$$ && (t3.$$ = ""), t3.$$ += e2.b.map((t4) => t4.s ? "." + t4.s(e2) : "").join(""), t3.$$.startsWith(".") && (t3.$$ = t3.$$.slice(1))), t3.$$ && 1 === Object.keys(t3).length && t3.$$.startsWith(W) ? t3.$$ : t3; } - if (b === n3) { - let t3 = {}, n4 = 0, r4 = e2.u.list.map((e3) => Ke(e3)).map((e3, r5) => v === typeof e3 ? (t3[r5 = "$$ref" + n4++] = e3, r5) : e3), l3 = (e2.b[0].n || e2.b[0].name) + "(" + r4.join(",") + ")"; - return 0 === n4 ? l3 : __spreadValues({ $$: l3 }, t3); + if (b === n2) { + let t3 = {}, n3 = 0, r4 = e2.u.list.map((e3) => Ke(e3)).map((e3, r5) => v === typeof e3 ? (t3[r5 = "$$ref" + n3++] = e3, r5) : e3), l2 = (e2.b[0].n || e2.b[0].name) + "(" + r4.join(",") + ")"; + return 0 === n3 ? l2 : __spreadValues({ $$: l2 }, t3); } - if (p2 === n3) { + if (p === n2) { let t3 = []; - return void 0 !== e2.c ? t3[0] = Ke(e2.c) : t3 = Object.keys(e2.v).reduce((t4, n4) => (t4[+n4] = e2.v[n4], t4), []).map((e3) => Ke(e3)), t3; + return void 0 !== e2.c ? t3[0] = Ke(e2.c) : t3 = Object.keys(e2.v).reduce((t4, n3) => (t4[+n3] = e2.v[n3], t4), []).map((e3) => Ke(e3)), t3; } - if (j === n3) return e2.v.toString(); + if (j === n2) return e2.v.toString(); } - function Ze(e2, t2, r3, l3) { + function Ze(e2, t2, r3, l2) { let o2; - if (!l3 && e2 && e2.$ && (n2 === e2.$.gubu$ || true === e2.$.gubu$)) return e2 = JSON.stringify(Ke(e2)), r3 && (e2 = "string" == typeof e2 ? e2.replace(/\\/g, "").replace(/"/g, "") : ""), e2; + if (!l2 && e2 && e2.$ && (n === e2.$.gubu$ || true === e2.$.gubu$)) return e2 = JSON.stringify(Ke(e2)), r3 && (e2 = "string" == typeof e2 ? e2.replace(/\\/g, "").replace(/"/g, "") : ""), e2; try { o2 = te(e2, (e3, o3) => { var s2, u2, a2; if (t2 && (o3 = t2(e3, o3)), null != o3 && v === typeof o3 && o3.constructor && A !== o3.constructor.name && R !== o3.constructor.name) o3 = "[object RegExp]" === i.call(o3) || h === typeof o3.toString ? o3.toString() : o3.constructor.name; - else if (l3 || n2 !== (null === (s2 = null == o3 ? void 0 : o3.$) || void 0 === s2 ? void 0 : s2.gubu$)) if (h === typeof o3) o3 = h === typeof ue[o3.name] && isNaN(+e3) ? void 0 : null != o3.name && "" !== o3.name ? o3.name : he(o3.toString().replace(/[ \t\r\n]+/g, " ")); + else if (l2 || n !== (null === (s2 = null == o3 ? void 0 : o3.$) || void 0 === s2 ? void 0 : s2.gubu$)) if (h === typeof o3) o3 = h === typeof ue[o3.name] && isNaN(+e3) ? void 0 : null != o3.name && "" !== o3.name ? o3.name : he(o3.toString().replace(/[ \t\r\n]+/g, " ")); else if ("bigint" == typeof o3) o3 = String(o3.toString()); else { if (Number.isNaN(o3)) return "NaN"; - true === l3 || true !== (null === (u2 = null == o3 ? void 0 : o3.$) || void 0 === u2 ? void 0 : u2.gubu$) && n2 !== (null === (a2 = null == o3 ? void 0 : o3.$) || void 0 === a2 ? void 0 : a2.gubu$) || (o3 = JSON.stringify(Ke(o3))); + true === l2 || true !== (null === (u2 = null == o3 ? void 0 : o3.$) || void 0 === u2 ? void 0 : u2.gubu$) && n !== (null === (a2 = null == o3 ? void 0 : o3.$) || void 0 === a2 ? void 0 : a2.gubu$) || (o3 = JSON.stringify(Ke(o3))); } else "number" === o3.t || "string" === o3.t || "boolean" === o3.t ? o3 = o3.v : (o3 = Ke(o3), o3 = JSON.stringify(o3), r3 && (o3 = "string" == typeof o3 ? o3.replace(/\\/g, "").replace(/"/g, "") : "")); return o3; @@ -1638,34 +1653,34 @@ var gubu_min = gubu_min$2.exports; const et = ue; t.Gubu = et; function tt(e2) { - return function(t2, n3, r3) { - let l3 = false; - d === typeof t2 && (l3 = true, r3 = n3, n3 = t2); - const i2 = et(r3 = r3 || n3, { name: e2 + (n3 = d === typeof n3 ? " (" + n3 + ")" : "") }), o2 = i2.node(), s2 = o2.k; - let u2 = t2, a2 = {}, c2 = 0, f3 = 0; + return function(t2, n2, r3) { + let l2 = false; + d === typeof t2 && (l2 = true, r3 = n2, n2 = t2); + const i2 = et(r3 = r3 || n2, { name: e2 + (n2 = d === typeof n2 ? " (" + n2 + ")" : "") }), o2 = i2.node(), s2 = o2.k; + let u2 = t2, a2 = {}, c2 = 0, f2 = 0; for (; c2 < s2.length; c2++) { let e3 = o2.v[s2[c2]]; - e3.p && (e3 = o2.v[s2[c2]] = ((t3) => Re(function(e4, n4, r4) { + e3.p && (e3 = o2.v[s2[c2]] = ((t3) => Re(function(e4, n3, r4) { if (0 < r4.curerr.length) { - f3++; + f2++; for (let e5 = s2.length - 1; e5 > t3; e5--) o2.v[s2[e5]].m.rest ? a2[s2[e5]].splice(o2.v[s2[e5]].m.rest_pos + t3 - e5, 0, a2[s2[e5 - 1]]) : (r4.vals[r4.pI + e5 - t3] = r4.vals[r4.pI + e5 - t3 - 1], a2[s2[e5]] = a2[s2[e5 - 1]]); - n4.uval = void 0, n4.done = false; + n3.uval = void 0, n3.done = false; } return true; - }, e3))(c2), e3.e = false), c2 !== s2.length - 1 || o2.v[s2[c2]].m.rest || (o2.v[s2[c2]] = Re(function(e4, t3, n4) { - return !(s2.length - f3 < u2.length && (0 === n4.curerr.length && (t3.err = `Too many arguments for type signature (was ${u2.length}, expected ${s2.length - f3})`), t3.fatal = true, 1)); + }, e3))(c2), e3.e = false), c2 !== s2.length - 1 || o2.v[s2[c2]].m.rest || (o2.v[s2[c2]] = Re(function(e4, t3, n3) { + return !(s2.length - f2 < u2.length && (0 === n3.curerr.length && (t3.err = `Too many arguments for type signature (was ${u2.length}, expected ${s2.length - f2})`), t3.fatal = true, 1)); }, o2.v[s2[c2]])); } - function p3(e3) { + function p2(e3) { for (let t3 = 0; t3 < s2.length; t3++) { - let n4 = o2.v[s2[t3]]; - n4.m.rest ? (a2[s2[t3]] = [...e3].slice(t3), n4.m.rest_pos = a2[s2[t3]].length) : a2[s2[t3]] = e3[t3]; + let n3 = o2.v[s2[t3]]; + n3.m.rest ? (a2[s2[t3]] = [...e3].slice(t3), n3.m.rest_pos = a2[s2[t3]].length) : a2[s2[t3]] = e3[t3]; } return a2; } - return l3 ? function(e3) { - return u2 = e3, a2 = {}, c2 = 0, f3 = 0, i2(p3(e3)); - } : i2(p3(t2)); + return l2 ? function(e3) { + return u2 = e3, a2 = {}, c2 = 0, f2 = 0, i2(p2(e3)); + } : i2(p2(t2)); }; } const { Gubu: nt } = t; @@ -1674,31 +1689,31 @@ var gubu_min = gubu_min$2.exports; })(gubu_min$2, gubu_min$2.exports); var gubu_minExports = gubu_min$2.exports; const gubu_min$1 = /* @__PURE__ */ getDefaultExportFromCjs(gubu_minExports); -function cmap(o, p2) { - return Object.entries(o).reduce((r2, n2, _2) => (_2 = Object.entries(p2).reduce((s, m2) => cmap.FILTER === s ? s : (s[m2[0]] = // transfom(val,key,current,parentkey,parent) - "function" === typeof m2[1] ? m2[1](n2[1][m2[0]], { - skey: m2[0], - self: n2[1], - key: n2[0], +function cmap(o, p) { + return Object.entries(o).reduce((r2, n, _2) => (_2 = Object.entries(p).reduce((s, m) => cmap.FILTER === s ? s : (s[m[0]] = // transfom(val,key,current,parentkey,parent) + "function" === typeof m[1] ? m[1](n[1][m[0]], { + skey: m[0], + self: n[1], + key: n[0], parent: o - }) : m2[1], cmap.FILTER === s[m2[0]] ? cmap.FILTER : s), {}), cmap.FILTER === _2 ? 0 : r2[n2[0]] = _2, r2), {}); + }) : m[1], cmap.FILTER === s[m[0]] ? cmap.FILTER : s), {}), cmap.FILTER === _2 ? 0 : r2[n[0]] = _2, r2), {}); } cmap.COPY = (x) => x; -cmap.FILTER = (x) => "function" === typeof x ? (y, p2, _2) => (_2 = x(y, p2), Array.isArray(_2) ? !_2[0] ? _2[1] : cmap.FILTER : _2) : x ? x : cmap.FILTER; -cmap.KEY = (_2, p2) => p2.key; -function vmap(o, p2) { - return Object.entries(o).reduce((r2, n2, _2) => (_2 = Object.entries(p2).reduce((s, m2) => vmap.FILTER === s ? s : (s[m2[0]] = // transfom(val,key,current,parentkey,parent) +cmap.FILTER = (x) => "function" === typeof x ? (y, p, _2) => (_2 = x(y, p), Array.isArray(_2) ? !_2[0] ? _2[1] : cmap.FILTER : _2) : x ? x : cmap.FILTER; +cmap.KEY = (_2, p) => p.key; +function vmap(o, p) { + return Object.entries(o).reduce((r2, n, _2) => (_2 = Object.entries(p).reduce((s, m) => vmap.FILTER === s ? s : (s[m[0]] = // transfom(val,key,current,parentkey,parent) // 'function' === typeof m[1] ? m[1](n[1][m[0]], m[0], n[1], n[0], o) : m[1] - "function" === typeof m2[1] ? m2[1](n2[1][m2[0]], { - skey: m2[0], - self: n2[1], - key: n2[0], + "function" === typeof m[1] ? m[1](n[1][m[0]], { + skey: m[0], + self: n[1], + key: n[0], parent: o - }) : m2[1], vmap.FILTER === s[m2[0]] ? vmap.FILTER : s), {}), vmap.FILTER === _2 ? 0 : r2.push(_2), r2), []); + }) : m[1], vmap.FILTER === s[m[0]] ? vmap.FILTER : s), {}), vmap.FILTER === _2 ? 0 : r2.push(_2), r2), []); } vmap.COPY = (x) => x; -vmap.FILTER = (x) => "function" === typeof x ? (y, p2, _2) => (_2 = x(y, p2), Array.isArray(_2) ? !_2[0] ? _2[1] : vmap.FILTER : _2) : x ? x : vmap.FILTER; -vmap.KEY = (_2, p2) => p2.key; +vmap.FILTER = (x) => "function" === typeof x ? (y, p, _2) => (_2 = x(y, p), Array.isArray(_2) ? !_2[0] ? _2[1] : vmap.FILTER : _2) : x ? x : vmap.FILTER; +vmap.KEY = (_2, p) => p.key; function searchParamsToObject(searchParams) { let params = /* @__PURE__ */ Object.create(null); for (let [key, value] of searchParams.entries()) { @@ -1730,8 +1745,8 @@ function VxgBasicAdminPlugin() { }); function setPath(msg, meta) { return __async(this, null, function* () { - const q2 = Object.entries(msg.query).reduce((s, n2) => s + ("" === s ? "?" : "") + (encodeURIComponent(n2[0]) + "=" + encodeURIComponent(n2[1])), ""); - const path = "/view/" + msg.view + q2; + const q = Object.entries(msg.query).reduce((s, n) => s + ("" === s ? "?" : "") + (encodeURIComponent(n[0]) + "=" + encodeURIComponent(n[1])), ""); + const path = "/view/" + msg.view + q; msg.navigate(path); }); } @@ -1784,19 +1799,19 @@ function VxgBasicAdminPlugin() { function _objectWithoutPropertiesLoose(r2, e) { if (null == r2) return {}; var t = {}; - for (var n2 in r2) if ({}.hasOwnProperty.call(r2, n2)) { - if (e.includes(n2)) continue; - t[n2] = r2[n2]; + for (var n in r2) if ({}.hasOwnProperty.call(r2, n)) { + if (e.includes(n)) continue; + t[n] = r2[n]; } return t; } function _extends$1() { - return _extends$1 = Object.assign ? Object.assign.bind() : function(n2) { + return _extends$1 = Object.assign ? Object.assign.bind() : function(n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; - for (var r2 in t) ({}).hasOwnProperty.call(t, r2) && (n2[r2] = t[r2]); + for (var r2 in t) ({}).hasOwnProperty.call(t, r2) && (n[r2] = t[r2]); } - return n2; + return n; }, _extends$1.apply(null, arguments); } var propTypes$1 = { exports: {} }; @@ -1815,24 +1830,24 @@ function requireReactIs_production_min$1() { if (hasRequiredReactIs_production_min$1) return reactIs_production_min$1; hasRequiredReactIs_production_min$1 = 1; "use strict"; - var b = "function" === typeof Symbol && Symbol.for, c = b ? Symbol.for("react.element") : 60103, d = b ? Symbol.for("react.portal") : 60106, e = b ? Symbol.for("react.fragment") : 60107, f2 = b ? Symbol.for("react.strict_mode") : 60108, g = b ? Symbol.for("react.profiler") : 60114, h = b ? Symbol.for("react.provider") : 60109, k2 = b ? Symbol.for("react.context") : 60110, l2 = b ? Symbol.for("react.async_mode") : 60111, m2 = b ? Symbol.for("react.concurrent_mode") : 60111, n2 = b ? Symbol.for("react.forward_ref") : 60112, p2 = b ? Symbol.for("react.suspense") : 60113, q2 = b ? Symbol.for("react.suspense_list") : 60120, r2 = b ? Symbol.for("react.memo") : 60115, t = b ? Symbol.for("react.lazy") : 60116, v = b ? Symbol.for("react.block") : 60121, w = b ? Symbol.for("react.fundamental") : 60117, x = b ? Symbol.for("react.responder") : 60118, y = b ? Symbol.for("react.scope") : 60119; + var b = "function" === typeof Symbol && Symbol.for, c = b ? Symbol.for("react.element") : 60103, d = b ? Symbol.for("react.portal") : 60106, e = b ? Symbol.for("react.fragment") : 60107, f = b ? Symbol.for("react.strict_mode") : 60108, g = b ? Symbol.for("react.profiler") : 60114, h = b ? Symbol.for("react.provider") : 60109, k = b ? Symbol.for("react.context") : 60110, l = b ? Symbol.for("react.async_mode") : 60111, m = b ? Symbol.for("react.concurrent_mode") : 60111, n = b ? Symbol.for("react.forward_ref") : 60112, p = b ? Symbol.for("react.suspense") : 60113, q = b ? Symbol.for("react.suspense_list") : 60120, r2 = b ? Symbol.for("react.memo") : 60115, t = b ? Symbol.for("react.lazy") : 60116, v = b ? Symbol.for("react.block") : 60121, w = b ? Symbol.for("react.fundamental") : 60117, x = b ? Symbol.for("react.responder") : 60118, y = b ? Symbol.for("react.scope") : 60119; function z(a) { if ("object" === typeof a && null !== a) { var u = a.$$typeof; switch (u) { case c: switch (a = a.type, a) { - case l2: - case m2: + case l: + case m: case e: case g: - case f2: - case p2: + case f: + case p: return a; default: switch (a = a && a.$$typeof, a) { - case k2: - case n2: + case k: + case n: case t: case r2: case h: @@ -1847,27 +1862,27 @@ function requireReactIs_production_min$1() { } } function A(a) { - return z(a) === m2; + return z(a) === m; } - reactIs_production_min$1.AsyncMode = l2; - reactIs_production_min$1.ConcurrentMode = m2; - reactIs_production_min$1.ContextConsumer = k2; + reactIs_production_min$1.AsyncMode = l; + reactIs_production_min$1.ConcurrentMode = m; + reactIs_production_min$1.ContextConsumer = k; reactIs_production_min$1.ContextProvider = h; reactIs_production_min$1.Element = c; - reactIs_production_min$1.ForwardRef = n2; + reactIs_production_min$1.ForwardRef = n; reactIs_production_min$1.Fragment = e; reactIs_production_min$1.Lazy = t; reactIs_production_min$1.Memo = r2; reactIs_production_min$1.Portal = d; reactIs_production_min$1.Profiler = g; - reactIs_production_min$1.StrictMode = f2; - reactIs_production_min$1.Suspense = p2; + reactIs_production_min$1.StrictMode = f; + reactIs_production_min$1.Suspense = p; reactIs_production_min$1.isAsyncMode = function(a) { - return A(a) || z(a) === l2; + return A(a) || z(a) === l; }; reactIs_production_min$1.isConcurrentMode = A; reactIs_production_min$1.isContextConsumer = function(a) { - return z(a) === k2; + return z(a) === k; }; reactIs_production_min$1.isContextProvider = function(a) { return z(a) === h; @@ -1876,7 +1891,7 @@ function requireReactIs_production_min$1() { return "object" === typeof a && null !== a && a.$$typeof === c; }; reactIs_production_min$1.isForwardRef = function(a) { - return z(a) === n2; + return z(a) === n; }; reactIs_production_min$1.isFragment = function(a) { return z(a) === e; @@ -1894,13 +1909,13 @@ function requireReactIs_production_min$1() { return z(a) === g; }; reactIs_production_min$1.isStrictMode = function(a) { - return z(a) === f2; + return z(a) === f; }; reactIs_production_min$1.isSuspense = function(a) { - return z(a) === p2; + return z(a) === p; }; reactIs_production_min$1.isValidElementType = function(a) { - return "string" === typeof a || "function" === typeof a || a === e || a === m2 || a === g || a === f2 || a === p2 || a === q2 || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r2 || a.$$typeof === h || a.$$typeof === k2 || a.$$typeof === n2 || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v); + return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r2 || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v); }; reactIs_production_min$1.typeOf = z; return reactIs_production_min$1; @@ -2116,8 +2131,8 @@ function requireObjectAssign() { for (var i = 0; i < 10; i++) { test2["_" + String.fromCharCode(i)] = i; } - var order2 = Object.getOwnPropertyNames(test2).map(function(n2) { - return test2[n2]; + var order2 = Object.getOwnPropertyNames(test2).map(function(n) { + return test2[n]; }); if (order2.join("") !== "0123456789") { return false; @@ -2752,17 +2767,17 @@ if (process.env.NODE_ENV !== "production") { var propTypesExports = propTypes$1.exports; const PropTypes = /* @__PURE__ */ getDefaultExportFromCjs(propTypesExports); function r(e) { - var t, f2, n2 = ""; - if ("string" == typeof e || "number" == typeof e) n2 += e; + var t, f, n = ""; + if ("string" == typeof e || "number" == typeof e) n += e; else if ("object" == typeof e) if (Array.isArray(e)) { var o = e.length; - for (t = 0; t < o; t++) e[t] && (f2 = r(e[t])) && (n2 && (n2 += " "), n2 += f2); - } else for (f2 in e) e[f2] && (n2 && (n2 += " "), n2 += f2); - return n2; + for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f); + } else for (f in e) e[f] && (n && (n += " "), n += f); + return n; } function clsx() { - for (var e, t, f2 = 0, n2 = "", o = arguments.length; f2 < o; f2++) (e = arguments[f2]) && (t = r(e)) && (n2 && (n2 += " "), n2 += t); - return n2; + for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t); + return n; } function composeClasses(slots, getUtilityClass, classes = void 0) { const output = {}; @@ -2807,12 +2822,12 @@ function require_extends() { hasRequired_extends = 1; (function(module) { function _extends3() { - return module.exports = _extends3 = Object.assign ? Object.assign.bind() : function(n2) { + return module.exports = _extends3 = Object.assign ? Object.assign.bind() : function(n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; - for (var r2 in t) ({}).hasOwnProperty.call(t, r2) && (n2[r2] = t[r2]); + for (var r2 in t) ({}).hasOwnProperty.call(t, r2) && (n[r2] = t[r2]); } - return n2; + return n; }, module.exports.__esModule = true, module.exports["default"] = module.exports, _extends3.apply(null, arguments); } module.exports = _extends3, module.exports.__esModule = true, module.exports["default"] = module.exports; @@ -2829,9 +2844,9 @@ function requireObjectWithoutPropertiesLoose() { function _objectWithoutPropertiesLoose3(r2, e) { if (null == r2) return {}; var t = {}; - for (var n2 in r2) if ({}.hasOwnProperty.call(r2, n2)) { - if (e.includes(n2)) continue; - t[n2] = r2[n2]; + for (var n in r2) if ({}.hasOwnProperty.call(r2, n)) { + if (e.includes(n)) continue; + t[n] = r2[n]; } return t; } @@ -3234,10 +3249,10 @@ function ruleset(value, root, parent, index2, offset2, rules2, points, type, pro var post = offset2 - 1; var rule = offset2 === 0 ? rules2 : [""]; var size = sizeof(rule); - for (var i = 0, j = 0, k2 = 0; i < index2; ++i) + for (var i = 0, j = 0, k = 0; i < index2; ++i) for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x) if (z = trim(j > 0 ? rule[x] + " " + y : replace(y, /&\f/g, rule[x]))) - props[k2++] = z; + props[k++] = z; return node(value, root, parent, offset2 === 0 ? RULESET : type, props, children2, length2); } function comment(value, root, parent) { @@ -3369,8 +3384,8 @@ function prefix$1(value, length2, children2) { break; case 5152: case 5920: - return replace(value, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(_2, a, b, c, d, e, f2) { - return MS + a + ":" + b + f2 + (c ? MS + a + "-span:" + (d ? e : +e - +b) + f2 : "") + value; + return replace(value, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(_2, a, b, c, d, e, f) { + return MS + a + ":" + b + f + (c ? MS + a + "-span:" + (d ? e : +e - +b) + f : "") + value; }); case 4949: if (charat(value, length2 + 6) === 121) @@ -3582,9 +3597,9 @@ var compat = function compat2(element) { var points = []; var rules2 = getRules(value, points); var parentRules = parent.props; - for (var i = 0, k2 = 0; i < rules2.length; i++) { - for (var j = 0; j < parentRules.length; j++, k2++) { - element.props[k2] = points[i] ? rules2[i].replace(/&\f/g, parentRules[j]) : parentRules[j] + " " + rules2[i]; + for (var i = 0, k = 0; i < rules2.length; i++) { + for (var j = 0; j < parentRules.length; j++, k++) { + element.props[k] = points[i] ? rules2[i].replace(/&\f/g, parentRules[j]) : parentRules[j] + " " + rules2[i]; } } }; @@ -3982,7 +3997,7 @@ function requireReactIs_production_min() { if (hasRequiredReactIs_production_min) return reactIs_production_min; hasRequiredReactIs_production_min = 1; "use strict"; - var b = Symbol.for("react.element"), c = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), e = Symbol.for("react.strict_mode"), f2 = Symbol.for("react.profiler"), g = Symbol.for("react.provider"), h = Symbol.for("react.context"), k2 = Symbol.for("react.server_context"), l2 = Symbol.for("react.forward_ref"), m2 = Symbol.for("react.suspense"), n2 = Symbol.for("react.suspense_list"), p2 = Symbol.for("react.memo"), q2 = Symbol.for("react.lazy"), t = Symbol.for("react.offscreen"), u; + var b = Symbol.for("react.element"), c = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), e = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), g = Symbol.for("react.provider"), h = Symbol.for("react.context"), k = Symbol.for("react.server_context"), l = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), n = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), q = Symbol.for("react.lazy"), t = Symbol.for("react.offscreen"), u; u = Symbol.for("react.module.reference"); function v(a) { if ("object" === typeof a && null !== a) { @@ -3991,18 +4006,18 @@ function requireReactIs_production_min() { case b: switch (a = a.type, a) { case d: - case f2: + case f: case e: - case m2: - case n2: + case m: + case n: return a; default: switch (a = a && a.$$typeof, a) { - case k2: + case k: case h: - case l2: - case q2: - case p2: + case l: + case q: + case p: case g: return a; default: @@ -4017,15 +4032,15 @@ function requireReactIs_production_min() { reactIs_production_min.ContextConsumer = h; reactIs_production_min.ContextProvider = g; reactIs_production_min.Element = b; - reactIs_production_min.ForwardRef = l2; + reactIs_production_min.ForwardRef = l; reactIs_production_min.Fragment = d; - reactIs_production_min.Lazy = q2; - reactIs_production_min.Memo = p2; + reactIs_production_min.Lazy = q; + reactIs_production_min.Memo = p; reactIs_production_min.Portal = c; - reactIs_production_min.Profiler = f2; + reactIs_production_min.Profiler = f; reactIs_production_min.StrictMode = e; - reactIs_production_min.Suspense = m2; - reactIs_production_min.SuspenseList = n2; + reactIs_production_min.Suspense = m; + reactIs_production_min.SuspenseList = n; reactIs_production_min.isAsyncMode = function() { return false; }; @@ -4042,34 +4057,34 @@ function requireReactIs_production_min() { return "object" === typeof a && null !== a && a.$$typeof === b; }; reactIs_production_min.isForwardRef = function(a) { - return v(a) === l2; + return v(a) === l; }; reactIs_production_min.isFragment = function(a) { return v(a) === d; }; reactIs_production_min.isLazy = function(a) { - return v(a) === q2; + return v(a) === q; }; reactIs_production_min.isMemo = function(a) { - return v(a) === p2; + return v(a) === p; }; reactIs_production_min.isPortal = function(a) { return v(a) === c; }; reactIs_production_min.isProfiler = function(a) { - return v(a) === f2; + return v(a) === f; }; reactIs_production_min.isStrictMode = function(a) { return v(a) === e; }; reactIs_production_min.isSuspense = function(a) { - return v(a) === m2; + return v(a) === m; }; reactIs_production_min.isSuspenseList = function(a) { - return v(a) === n2; + return v(a) === n; }; reactIs_production_min.isValidElementType = function(a) { - return "string" === typeof a || "function" === typeof a || a === d || a === f2 || a === e || a === m2 || a === n2 || a === t || "object" === typeof a && null !== a && (a.$$typeof === q2 || a.$$typeof === p2 || a.$$typeof === g || a.$$typeof === h || a.$$typeof === l2 || a.$$typeof === u || void 0 !== a.getModuleId) ? true : false; + return "string" === typeof a || "function" === typeof a || a === d || a === f || a === e || a === m || a === n || a === t || "object" === typeof a && null !== a && (a.$$typeof === q || a.$$typeof === p || a.$$typeof === g || a.$$typeof === h || a.$$typeof === l || a.$$typeof === u || void 0 !== a.getModuleId) ? true : false; }; reactIs_production_min.typeOf = v; return reactIs_production_min; @@ -5509,12 +5524,12 @@ function _interopRequireWildcard$1(e, r2) { if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache$1(r2); if (t && t.has(e)) return t.get(e); - var n2 = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; + var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; - i && (i.get || i.set) ? Object.defineProperty(n2, u, i) : n2[u] = e[u]; + i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } - return n2.default = e, t && t.set(e, n2), n2; + return n.default = e, t && t.set(e, n), n; } function isEmpty$3(obj) { return Object.keys(obj).length === 0; @@ -5822,10 +5837,10 @@ function hexToRgb$1(color2) { const re = new RegExp(`.{1,${color2.length >= 6 ? 2 : 1}}`, "g"); let colors = color2.match(re); if (colors && colors[0].length === 1) { - colors = colors.map((n2) => n2 + n2); + colors = colors.map((n) => n + n); } - return colors ? `rgb${colors.length === 4 ? "a" : ""}(${colors.map((n2, index2) => { - return index2 < 3 ? parseInt(n2, 16) : Math.round(parseInt(n2, 16) / 255 * 1e3) / 1e3; + return colors ? `rgb${colors.length === 4 ? "a" : ""}(${colors.map((n, index2) => { + return index2 < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1e3) / 1e3; }).join(", ")})` : ""; } function intToHex$1(int) { @@ -5892,7 +5907,7 @@ function recomposeColor$1(color2) { values: values2 } = color2; if (type.indexOf("rgb") !== -1) { - values2 = values2.map((n2, i) => i < 3 ? parseInt(n2, 10) : n2); + values2 = values2.map((n, i) => i < 3 ? parseInt(n, 10) : n); } else if (type.indexOf("hsl") !== -1) { values2[1] = `${values2[1]}%`; values2[2] = `${values2[2]}%`; @@ -5911,7 +5926,7 @@ function rgbToHex$1(color2) { const { values: values2 } = decomposeColor$1(color2); - return `#${values2.map((n2, i) => intToHex$1(i === 3 ? Math.round(255 * n2) : n2)).join("")}`; + return `#${values2.map((n, i) => intToHex$1(i === 3 ? Math.round(255 * n) : n)).join("")}`; } function hslToRgb$1(color2) { color2 = decomposeColor$1(color2); @@ -5920,11 +5935,11 @@ function hslToRgb$1(color2) { } = color2; const h = values2[0]; const s = values2[1] / 100; - const l2 = values2[2] / 100; - const a = s * Math.min(l2, 1 - l2); - const f2 = (n2, k2 = (n2 + h / 30) % 12) => l2 - a * Math.max(Math.min(k2 - 3, 9 - k2, 1), -1); + const l = values2[2] / 100; + const a = s * Math.min(l, 1 - l); + const f = (n, k = (n + h / 30) % 12) => l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1); let type = "rgb"; - const rgb = [Math.round(f2(0) * 255), Math.round(f2(8) * 255), Math.round(f2(4) * 255)]; + const rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)]; if (color2.type === "hsla") { type += "a"; rgb.push(values2[3]); @@ -7483,10 +7498,10 @@ function hexToRgb(color2) { const re = new RegExp(`.{1,${color2.length >= 6 ? 2 : 1}}`, "g"); let colors = color2.match(re); if (colors && colors[0].length === 1) { - colors = colors.map((n2) => n2 + n2); + colors = colors.map((n) => n + n); } - return colors ? `rgb${colors.length === 4 ? "a" : ""}(${colors.map((n2, index2) => { - return index2 < 3 ? parseInt(n2, 16) : Math.round(parseInt(n2, 16) / 255 * 1e3) / 1e3; + return colors ? `rgb${colors.length === 4 ? "a" : ""}(${colors.map((n, index2) => { + return index2 < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1e3) / 1e3; }).join(", ")})` : ""; } function intToHex(int) { @@ -7551,7 +7566,7 @@ function recomposeColor(color2) { values: values2 } = color2; if (type.indexOf("rgb") !== -1) { - values2 = values2.map((n2, i) => i < 3 ? parseInt(n2, 10) : n2); + values2 = values2.map((n, i) => i < 3 ? parseInt(n, 10) : n); } else if (type.indexOf("hsl") !== -1) { values2[1] = `${values2[1]}%`; values2[2] = `${values2[2]}%`; @@ -7570,7 +7585,7 @@ function rgbToHex(color2) { const { values: values2 } = decomposeColor(color2); - return `#${values2.map((n2, i) => intToHex(i === 3 ? Math.round(255 * n2) : n2)).join("")}`; + return `#${values2.map((n, i) => intToHex(i === 3 ? Math.round(255 * n) : n)).join("")}`; } function hslToRgb(color2) { color2 = decomposeColor(color2); @@ -7579,11 +7594,11 @@ function hslToRgb(color2) { } = color2; const h = values2[0]; const s = values2[1] / 100; - const l2 = values2[2] / 100; - const a = s * Math.min(l2, 1 - l2); - const f2 = (n2, k2 = (n2 + h / 30) % 12) => l2 - a * Math.max(Math.min(k2 - 3, 9 - k2, 1), -1); + const l = values2[2] / 100; + const a = s * Math.min(l, 1 - l); + const f = (n, k = (n + h / 30) % 12) => l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1); let type = "rgb"; - const rgb = [Math.round(f2(0) * 255), Math.round(f2(8) * 255), Math.round(f2(4) * 255)]; + const rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)]; if (color2.type === "hsla") { type += "a"; rgb.push(values2[3]); @@ -9019,18 +9034,18 @@ function createGetCssVar$1(prefix2 = "") { } const assignNestedKeys = (obj, keys, value, arrayKeys = []) => { let temp = obj; - keys.forEach((k2, index2) => { + keys.forEach((k, index2) => { if (index2 === keys.length - 1) { if (Array.isArray(temp)) { - temp[Number(k2)] = value; + temp[Number(k)] = value; } else if (temp && typeof temp === "object") { - temp[k2] = value; + temp[k] = value; } } else if (temp && typeof temp === "object") { - if (!temp[k2]) { - temp[k2] = arrayKeys.includes(k2) ? [] : {}; + if (!temp[k]) { + temp[k] = arrayKeys.includes(k) ? [] : {}; } - temp = temp[k2]; + temp = temp[k]; } }); }; @@ -10756,9 +10771,9 @@ function BasicHead(props) { const { head } = basicHeadSpec; const tools = vmap2(head.tool, { active: vmap2.FILTER, - name: vmap2.FILTER((_2, p2) => { + name: vmap2.FILTER((_2, p) => { var _a; - return [(_a = basicHeadSpec.tool[p2.key]) == null ? void 0 : _a.active, p2.key]; + return [(_a = basicHeadSpec.tool[p.key]) == null ? void 0 : _a.active, p.key]; }), align: vmap2.COPY }).map((t) => __spreadValues(__spreadValues({}, basicHeadSpec.tool[t.name]), t)); @@ -15331,8 +15346,8 @@ function getNextChildMapping(nextProps, prevChildMapping, onExited) { return children2; } var values = Object.values || function(obj) { - return Object.keys(obj).map(function(k2) { - return obj[k2]; + return Object.keys(obj).map(function(k) { + return obj[k]; }); }; var defaultProps = { @@ -16973,9 +16988,9 @@ const defaultDarkOverlays = [...Array(25)].map((_2, index2) => { return `linear-gradient(rgba(255 255 255 / ${overlay}), rgba(255 255 255 / ${overlay}))`; }); function assignNode(obj, keys) { - keys.forEach((k2) => { - if (!obj[k2]) { - obj[k2] = {}; + keys.forEach((k) => { + if (!obj[k]) { + obj[k] = {}; } }); } @@ -17553,12 +17568,12 @@ function _interopRequireWildcard(e, r2) { if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r2); if (t && t.has(e)) return t.get(e); - var n2 = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; + var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; - i && (i.get || i.set) ? Object.defineProperty(n2, u, i) : n2[u] = e[u]; + i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } - return n2.default = e, t && t.set(e, n2), n2; + return n.default = e, t && t.set(e, n), n; } function isObjectEmpty(obj) { return Object.keys(obj).length === 0; @@ -18822,8 +18837,8 @@ function popperGenerator(generatorOptions) { popper: listScrollParents(popper2) }; var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers2, state.options.modifiers))); - state.orderedModifiers = orderedModifiers.filter(function(m2) { - return m2.enabled; + state.orderedModifiers = orderedModifiers.filter(function(m) { + return m.enabled; }); runModifierEffects(); return instance.update(); @@ -22592,7 +22607,7 @@ function getOffsetLeft(rect, horizontal) { return offset2; } function getTransformOriginValue(transformOrigin) { - return [transformOrigin.horizontal, transformOrigin.vertical].map((n2) => typeof n2 === "number" ? `${n2}px` : n2).join(" "); + return [transformOrigin.horizontal, transformOrigin.vertical].map((n) => typeof n === "number" ? `${n}px` : n).join(" "); } function resolveAnchorEl(anchorEl) { return typeof anchorEl === "function" ? anchorEl() : anchorEl; @@ -25296,7 +25311,7 @@ Object.defineProperty(ArrowDownward, "__esModule", { }); var default_1$x = ArrowDownward.default = void 0; var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); -var _jsxRuntime$x = jsxRuntimeExports; +var _jsxRuntime$x = requireJsxRuntime(); var _default$x = default_1$x = ArrowDownward.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); @@ -25309,7 +25324,7 @@ Object.defineProperty(ArrowRight, "__esModule", { }); var default_1$w = ArrowRight.default = void 0; var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); -var _jsxRuntime$w = jsxRuntimeExports; +var _jsxRuntime$w = requireJsxRuntime(); var _default$w = default_1$w = ArrowRight.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); @@ -25322,7 +25337,7 @@ Object.defineProperty(Cancel, "__esModule", { }); var default_1$v = Cancel.default = void 0; var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); -var _jsxRuntime$v = jsxRuntimeExports; +var _jsxRuntime$v = requireJsxRuntime(); var _default$v = default_1$v = Cancel.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); @@ -25335,7 +25350,7 @@ Object.defineProperty(ChevronLeft, "__esModule", { }); var default_1$u = ChevronLeft.default = void 0; var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); -var _jsxRuntime$u = jsxRuntimeExports; +var _jsxRuntime$u = requireJsxRuntime(); var _default$u = default_1$u = ChevronLeft.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); @@ -25348,7 +25363,7 @@ Object.defineProperty(ChevronRight, "__esModule", { }); var default_1$t = ChevronRight.default = void 0; var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); -var _jsxRuntime$t = jsxRuntimeExports; +var _jsxRuntime$t = requireJsxRuntime(); var _default$t = default_1$t = ChevronRight.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); @@ -25361,7 +25376,7 @@ Object.defineProperty(ClearAll, "__esModule", { }); var default_1$s = ClearAll.default = void 0; var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); -var _jsxRuntime$s = jsxRuntimeExports; +var _jsxRuntime$s = requireJsxRuntime(); var _default$s = default_1$s = ClearAll.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); @@ -25374,7 +25389,7 @@ Object.defineProperty(Close, "__esModule", { }); var default_1$r = Close.default = void 0; var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); -var _jsxRuntime$r = jsxRuntimeExports; +var _jsxRuntime$r = requireJsxRuntime(); var _default$r = default_1$r = Close.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); @@ -25387,7 +25402,7 @@ Object.defineProperty(ContentCopy, "__esModule", { }); var default_1$q = ContentCopy.default = void 0; var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); -var _jsxRuntime$q = jsxRuntimeExports; +var _jsxRuntime$q = requireJsxRuntime(); var _default$q = default_1$q = ContentCopy.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); @@ -25400,7 +25415,7 @@ Object.defineProperty(DensityLarge, "__esModule", { }); var default_1$p = DensityLarge.default = void 0; var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); -var _jsxRuntime$p = jsxRuntimeExports; +var _jsxRuntime$p = requireJsxRuntime(); var _default$p = default_1$p = DensityLarge.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); @@ -25413,7 +25428,7 @@ Object.defineProperty(DensityMedium, "__esModule", { }); var default_1$o = DensityMedium.default = void 0; var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); -var _jsxRuntime$o = jsxRuntimeExports; +var _jsxRuntime$o = requireJsxRuntime(); var _default$o = default_1$o = DensityMedium.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); @@ -25426,7 +25441,7 @@ Object.defineProperty(DensitySmall, "__esModule", { }); var default_1$n = DensitySmall.default = void 0; var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); -var _jsxRuntime$n = jsxRuntimeExports; +var _jsxRuntime$n = requireJsxRuntime(); var _default$n = default_1$n = DensitySmall.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); @@ -25439,7 +25454,7 @@ Object.defineProperty(DragHandle, "__esModule", { }); var default_1$m = DragHandle.default = void 0; var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); -var _jsxRuntime$m = jsxRuntimeExports; +var _jsxRuntime$m = requireJsxRuntime(); var _default$m = default_1$m = DragHandle.default = (0, _createSvgIcon$m.default)(/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); @@ -25452,7 +25467,7 @@ Object.defineProperty(DynamicFeed, "__esModule", { }); var default_1$l = DynamicFeed.default = void 0; var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); -var _jsxRuntime$l = jsxRuntimeExports; +var _jsxRuntime$l = requireJsxRuntime(); var _default$l = default_1$l = DynamicFeed.default = (0, _createSvgIcon$l.default)([/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { @@ -25467,7 +25482,7 @@ Object.defineProperty(Edit, "__esModule", { }); var default_1$k = Edit.default = void 0; var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); -var _jsxRuntime$k = jsxRuntimeExports; +var _jsxRuntime$k = requireJsxRuntime(); var _default$k = default_1$k = Edit.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); @@ -25480,7 +25495,7 @@ Object.defineProperty(ExpandMore, "__esModule", { }); var default_1$j = ExpandMore.default = void 0; var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); -var _jsxRuntime$j = jsxRuntimeExports; +var _jsxRuntime$j = requireJsxRuntime(); var _default$j = default_1$j = ExpandMore.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); @@ -25493,7 +25508,7 @@ Object.defineProperty(FilterAlt, "__esModule", { }); var default_1$i = FilterAlt.default = void 0; var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); -var _jsxRuntime$i = jsxRuntimeExports; +var _jsxRuntime$i = requireJsxRuntime(); var _default$i = default_1$i = FilterAlt.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); @@ -25506,7 +25521,7 @@ Object.defineProperty(FilterList, "__esModule", { }); var default_1$h = FilterList.default = void 0; var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); -var _jsxRuntime$h = jsxRuntimeExports; +var _jsxRuntime$h = requireJsxRuntime(); var _default$h = default_1$h = FilterList.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); @@ -25519,7 +25534,7 @@ Object.defineProperty(FilterListOff, "__esModule", { }); var default_1$g = FilterListOff.default = void 0; var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); -var _jsxRuntime$g = jsxRuntimeExports; +var _jsxRuntime$g = requireJsxRuntime(); var _default$g = default_1$g = FilterListOff.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); @@ -25532,7 +25547,7 @@ Object.defineProperty(FirstPage, "__esModule", { }); var default_1$f = FirstPage.default = void 0; var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); -var _jsxRuntime$f = jsxRuntimeExports; +var _jsxRuntime$f = requireJsxRuntime(); var _default$f = default_1$f = FirstPage.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); @@ -25545,7 +25560,7 @@ Object.defineProperty(Fullscreen, "__esModule", { }); var default_1$e = Fullscreen.default = void 0; var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); -var _jsxRuntime$e = jsxRuntimeExports; +var _jsxRuntime$e = requireJsxRuntime(); var _default$e = default_1$e = Fullscreen.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); @@ -25558,7 +25573,7 @@ Object.defineProperty(FullscreenExit, "__esModule", { }); var default_1$d = FullscreenExit.default = void 0; var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); -var _jsxRuntime$d = jsxRuntimeExports; +var _jsxRuntime$d = requireJsxRuntime(); var _default$d = default_1$d = FullscreenExit.default = (0, _createSvgIcon$d.default)(/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); @@ -25571,7 +25586,7 @@ Object.defineProperty(KeyboardDoubleArrowDown, "__esModule", { }); var default_1$c = KeyboardDoubleArrowDown.default = void 0; var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); -var _jsxRuntime$c = jsxRuntimeExports; +var _jsxRuntime$c = requireJsxRuntime(); var _default$c = default_1$c = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$c.default)([/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { @@ -25586,7 +25601,7 @@ Object.defineProperty(LastPage, "__esModule", { }); var default_1$b = LastPage.default = void 0; var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); -var _jsxRuntime$b = jsxRuntimeExports; +var _jsxRuntime$b = requireJsxRuntime(); var _default$b = default_1$b = LastPage.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); @@ -25599,7 +25614,7 @@ Object.defineProperty(MoreHoriz, "__esModule", { }); var default_1$a = MoreHoriz.default = void 0; var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); -var _jsxRuntime$a = jsxRuntimeExports; +var _jsxRuntime$a = requireJsxRuntime(); var _default$a = default_1$a = MoreHoriz.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); @@ -25612,7 +25627,7 @@ Object.defineProperty(MoreVert, "__esModule", { }); var default_1$9 = MoreVert.default = void 0; var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); -var _jsxRuntime$9 = jsxRuntimeExports; +var _jsxRuntime$9 = requireJsxRuntime(); var _default$9 = default_1$9 = MoreVert.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); @@ -25625,7 +25640,7 @@ Object.defineProperty(PushPin, "__esModule", { }); var default_1$8 = PushPin.default = void 0; var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); -var _jsxRuntime$8 = jsxRuntimeExports; +var _jsxRuntime$8 = requireJsxRuntime(); var _default$8 = default_1$8 = PushPin.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" @@ -25639,7 +25654,7 @@ Object.defineProperty(RestartAlt, "__esModule", { }); var default_1$7 = RestartAlt.default = void 0; var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); -var _jsxRuntime$7 = jsxRuntimeExports; +var _jsxRuntime$7 = requireJsxRuntime(); var _default$7 = default_1$7 = RestartAlt.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); @@ -25652,7 +25667,7 @@ Object.defineProperty(Save, "__esModule", { }); var default_1$6 = Save.default = void 0; var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); -var _jsxRuntime$6 = jsxRuntimeExports; +var _jsxRuntime$6 = requireJsxRuntime(); var _default$6 = default_1$6 = Save.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); @@ -25665,7 +25680,7 @@ Object.defineProperty(Search, "__esModule", { }); var default_1$5 = Search.default = void 0; var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); -var _jsxRuntime$5 = jsxRuntimeExports; +var _jsxRuntime$5 = requireJsxRuntime(); var _default$5 = default_1$5 = Search.default = (0, _createSvgIcon$5.default)(/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); @@ -25678,7 +25693,7 @@ Object.defineProperty(SearchOff, "__esModule", { }); var default_1$4 = SearchOff.default = void 0; var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); -var _jsxRuntime$4 = jsxRuntimeExports; +var _jsxRuntime$4 = requireJsxRuntime(); var _default$4 = default_1$4 = SearchOff.default = (0, _createSvgIcon$4.default)([/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { @@ -25693,7 +25708,7 @@ Object.defineProperty(Sort, "__esModule", { }); var default_1$3 = Sort.default = void 0; var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); -var _jsxRuntime$3 = jsxRuntimeExports; +var _jsxRuntime$3 = requireJsxRuntime(); var _default$3 = default_1$3 = Sort.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); @@ -25706,7 +25721,7 @@ Object.defineProperty(SyncAlt, "__esModule", { }); var default_1$2 = SyncAlt.default = void 0; var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); -var _jsxRuntime$2 = jsxRuntimeExports; +var _jsxRuntime$2 = requireJsxRuntime(); var _default$2 = default_1$2 = SyncAlt.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); @@ -25719,7 +25734,7 @@ Object.defineProperty(ViewColumn, "__esModule", { }); var default_1$1 = ViewColumn.default = void 0; var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); -var _jsxRuntime$1 = jsxRuntimeExports; +var _jsxRuntime$1 = requireJsxRuntime(); var _default$1 = default_1$1 = ViewColumn.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); @@ -25732,7 +25747,7 @@ Object.defineProperty(VisibilityOff, "__esModule", { }); var default_1 = VisibilityOff.default = void 0; var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); -var _jsxRuntime = jsxRuntimeExports; +var _jsxRuntime = requireJsxRuntime(); var _default = default_1 = VisibilityOff.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); @@ -26089,8 +26104,8 @@ class Virtualizer { this.getFurthestMeasurement = (measurements, index2) => { const furthestMeasurementsFound = /* @__PURE__ */ new Map(); const furthestMeasurements = /* @__PURE__ */ new Map(); - for (let m2 = index2 - 1; m2 >= 0; m2--) { - const measurement = measurements[m2]; + for (let m = index2 - 1; m >= 0; m--) { + const measurement = measurements[m]; if (furthestMeasurementsFound.has(measurement.lane)) { continue; } @@ -26238,8 +26253,8 @@ class Virtualizer { () => [this.getIndexes(), this.getMeasurements()], (indexes, measurements) => { const virtualItems = []; - for (let k2 = 0, len = indexes.length; k2 < len; k2++) { - const i = indexes[k2]; + for (let k = 0, len = indexes.length; k < len; k++) { + const i = indexes[k]; const measurement = measurements[i]; virtualItems.push(measurement); } @@ -26366,7 +26381,7 @@ class Virtualizer { end2 = this.options.paddingStart; } else { end2 = this.options.lanes === 1 ? (_a2 = (_a = measurements[measurements.length - 1]) == null ? void 0 : _a.end) != null ? _a2 : 0 : Math.max( - ...measurements.slice(-this.options.lanes).map((m2) => m2.end) + ...measurements.slice(-this.options.lanes).map((m) => m.end) ); } return end2 - this.options.scrollMargin + this.options.paddingEnd; @@ -50645,8 +50660,8 @@ const getMinutesNumbers = ({ getClockNumberText, selectedId }) => { - const f2 = utils2.formatNumber; - return [[5, f2("05")], [10, f2("10")], [15, f2("15")], [20, f2("20")], [25, f2("25")], [30, f2("30")], [35, f2("35")], [40, f2("40")], [45, f2("45")], [50, f2("50")], [55, f2("55")], [0, f2("00")]].map(([numberValue, label], index2) => { + const f = utils2.formatNumber; + return [[5, f("05")], [10, f("10")], [15, f("15")], [20, f("20")], [25, f("25")], [30, f("30")], [35, f("35")], [40, f("40")], [45, f("45")], [50, f("50")], [55, f("55")], [0, f("00")]].map(([numberValue, label], index2) => { const selected = numberValue === value; return /* @__PURE__ */ jsxRuntimeExports.jsx(ClockNumber, { label, @@ -59810,12 +59825,12 @@ const MRT_FilterFns = Object.assign(Object.assign({}, filterFns), { }); function __rest(s, e) { var t = {}; - for (var p2 in s) if (Object.prototype.hasOwnProperty.call(s, p2) && e.indexOf(p2) < 0) - t[p2] = s[p2]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p2 = Object.getOwnPropertySymbols(s); i < p2.length; i++) { - if (e.indexOf(p2[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p2[i])) - t[p2[i]] = s[p2[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; } return t; } @@ -62108,7 +62123,7 @@ const MRT_ToolbarAlertBanner = (_a) => { const totalRowCount = rowCount !== null && rowCount !== void 0 ? rowCount : getPrePaginationRowModel().flatRows.length; const selectedRowCount = useMemo(() => manualPagination ? Object.values(rowSelection).filter(Boolean).length : getFilteredSelectedRowModel().rows.length, [rowSelection, totalRowCount, manualPagination]); const selectedAlert = selectedRowCount > 0 ? jsxRuntimeExports.jsxs(Stack, { alignItems: "center", direction: "row", gap: "16px", children: [(_c = (_b = localization.selectedCountOfRowCountRowsSelected) === null || _b === void 0 ? void 0 : _b.replace("{selectedCount}", selectedRowCount.toLocaleString())) === null || _c === void 0 ? void 0 : _c.replace("{rowCount}", totalRowCount.toString()), jsxRuntimeExports.jsx(Button, { onClick: (event) => getMRT_SelectAllHandler({ table })(event, false, true), size: "small", sx: { p: "2px" }, children: localization.clearSelection })] }) : null; - const groupedAlert = grouping.length > 0 ? jsxRuntimeExports.jsxs("span", { children: [localization.groupedBy, " ", grouping.map((columnId, index2) => jsxRuntimeExports.jsxs(Fragment$2, { children: [index2 > 0 ? localization.thenBy : "", jsxRuntimeExports.jsx(Chip, Object.assign({ label: table.getColumn(columnId).columnDef.header, onDelete: () => table.getColumn(columnId).toggleGrouping() }, chipProps))] }, `${index2}-${columnId}`))] }) : null; + const groupedAlert = grouping.length > 0 ? jsxRuntimeExports.jsxs("span", { children: [localization.groupedBy, " ", grouping.map((columnId, index2) => jsxRuntimeExports.jsxs(Fragment, { children: [index2 > 0 ? localization.thenBy : "", jsxRuntimeExports.jsx(Chip, Object.assign({ label: table.getColumn(columnId).columnDef.header, onDelete: () => table.getColumn(columnId).toggleGrouping() }, chipProps))] }, `${index2}-${columnId}`))] }) : null; return jsxRuntimeExports.jsx(Collapse, { in: showAlertBanner || !!selectedAlert || !!groupedAlert, timeout: stackAlertBanner ? 200 : 0, children: jsxRuntimeExports.jsx(Alert, Object.assign({ color: "info", icon: false }, alertProps, { sx: (theme) => { var _a2, _b2; return Object.assign({ "& .MuiAlert-message": { @@ -62725,8 +62740,8 @@ function VxgBasicEntityListPlugin(options) { }; } function buildFilter(query) { - const filter = Object.entries(query).reduce((a, n2) => (n2[0].startsWith("f_") ? a[n2[0].substring(2)] = n2[1] : null, a), {}); - const filterDesc = Object.entries(filter).reduce((a, n2) => a + "~" + n2[0] + "=" + n2[1], ""); + const filter = Object.entries(query).reduce((a, n) => (n[0].startsWith("f_") ? a[n[0].substring(2)] = n[1] : null, a), {}); + const filterDesc = Object.entries(filter).reduce((a, n) => a + "~" + n[0] + "=" + n[1], ""); return { filter, filterDesc }; } Object.assign(VxgBasicEntityListPlugin, { @@ -64665,7 +64680,7 @@ const BasicEntityCheckboxFieldSpecShape = gubu_minExports.Gubu( id: String, name: String, kind: "", - label: gubu_minExports.Default("", String), + label: "", ux: Open$i({ kind: gubu_minExports.Exact("Checkbox"), edit: gubu_minExports.Default(true), @@ -64714,7 +64729,7 @@ const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu( id: String, name: String, kind: "", - label: gubu_minExports.Default(""), + label: "", options: Open$h({ label: { field: gubu_minExports.Default("label") }, value: { field: gubu_minExports.Default("value") }, @@ -64818,19 +64833,19 @@ const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu( id: String, name: String, kind: "", - label: gubu_minExports.Default("", String), + label: "", ux: Open$g({ kind: gubu_minExports.Exact("Slider"), edit: gubu_minExports.Default(true), step: gubu_minExports.Default(1), min: gubu_minExports.Default(0), max: gubu_minExports.Default(100), - props: { + props: Open$g({ marks: gubu_minExports.Default({}), valueLabelDisplay: gubu_minExports.Exact("on", "auto", "off").Default("auto"), direction: gubu_minExports.Exact("horizontal", "vertical").Default("horizontal"), track: gubu_minExports.Exact("normal", "inverted", "disabled").Default("normal") - } + }) }) }) }), @@ -64889,7 +64904,7 @@ const BasicEntityRadioGroupFieldSpecShape = gubu_minExports.Gubu( id: String, name: String, kind: "", - label: gubu_minExports.Default("", String), + llabel: "", ux: Open$f({ kind: gubu_minExports.Exact("RadioGroup"), edit: gubu_minExports.Default(true), @@ -64982,7 +64997,7 @@ const BasicEntityTextBoxFieldSpecShape = gubu_minExports.Gubu( id: String, name: String, kind: "", - label: gubu_minExports.Default("", String), + label: "", ux: Open$e({ kind: gubu_minExports.Exact("TextBox"), edit: gubu_minExports.Default(true), @@ -65023,7 +65038,7 @@ const BasicEntityTextFieldSpecShape = gubu_minExports.Gubu( id: String, name: String, kind: "", - label: gubu_minExports.Default("", String), + label: "", ux: Open$d({ kind: gubu_minExports.Exact("Text"), edit: gubu_minExports.Default(true), @@ -65062,7 +65077,7 @@ const BasicEntityDateFieldSpecShape = gubu_minExports.Gubu( id: String, name: String, kind: "", - label: gubu_minExports.Default("", String), + label: "", ux: Open$c({ kind: gubu_minExports.Exact("Date"), edit: gubu_minExports.Default(true), @@ -65099,7 +65114,7 @@ const BasicEntityTimeFieldSpecShape = gubu_minExports.Gubu( id: String, name: String, kind: "", - label: gubu_minExports.Default("", String), + label: "", ux: Open$b({ kind: gubu_minExports.Exact("Time"), edit: gubu_minExports.Default(true), @@ -65136,7 +65151,7 @@ const BasicEntityDateTimeFieldSpecShape = gubu_minExports.Gubu( id: String, name: String, kind: "", - label: gubu_minExports.Default("", String), + label: "", ux: Open$a({ kind: gubu_minExports.Exact("DateTime"), edit: gubu_minExports.Default(true), @@ -65173,7 +65188,7 @@ const BasicEntityRatingFieldSpecShape = gubu_minExports.Gubu( id: String, name: String, kind: "", - label: gubu_minExports.Default("", String), + label: "", ux: Open$9({ kind: gubu_minExports.Exact("Rating"), edit: gubu_minExports.Default(true), @@ -65219,7 +65234,7 @@ const BasicEntityButtonFieldSpecShape = gubu_minExports.Gubu( id: String, name: String, kind: "", - label: "", + label: String, ux: Open$8({ kind: gubu_minExports.Exact("Button"), edit: gubu_minExports.Default(true), @@ -65260,7 +65275,12 @@ const BasicEntityButtonGroupFieldSpecShape = gubu_minExports.Gubu( id: String, name: String, kind: "", - label: String, + label: "", + options: Open$7({ + label: { field: "label" }, + value: { field: "value" }, + ents: Open$7({}) + }), ux: Open$7({ kind: gubu_minExports.Exact("ButtonGroup"), edit: gubu_minExports.Default(true), @@ -65301,8 +65321,8 @@ const BasicEntityFieldSpecShape = gubu_minExports.Gubu( field: Open$6({ id: String, name: String, - kind: String, - label: gubu_minExports.Default("", String), + kind: "", + label: "", ux: Open$6({ kind: gubu_minExports.Exact( "Text", @@ -65697,7 +65717,7 @@ function VxgBasicLedPlugin(options) { "aim:app,on:BasicLed,save:item", function(msg) { return __async(this, null, function* () { - const data = Object.entries(spec.def.edit.field).filter((n2) => false !== n2[1].ux.edit).reduce((a, n2) => (a[n2[0]] = msg.data[n2[0]], a), {}); + const data = Object.entries(spec.def.edit.field).filter((n) => false !== n[1].ux.edit).reduce((a, n) => (a[n[0]] = msg.data[n[0]], a), {}); const item = yield seneca.entity(entCanon).save$(data); navigate("/view/" + name + "/edit/" + item.id); }); @@ -65881,13 +65901,13 @@ function BasicSide(props) { const sections = vmap(nav.section, { active: vmap.FILTER, name: vmap.COPY, - items: (_2, p2) => vmap(p2.self.item, { + items: (_2, p) => vmap(p.self.item, { active: vmap.FILTER, name: vmap.COPY, view: vmap.COPY, - title: vmap.FILTER((_22, p22) => { + title: vmap.FILTER((_22, p2) => { var _a; - return (_a = viewMap[p22.self.view]) == null ? void 0 : _a.title; + return (_a = viewMap[p2.self.view]) == null ? void 0 : _a.title; }) }) }); @@ -65908,7 +65928,7 @@ function BasicSide(props) { }) }, spec.mui.Drawer), { children: sections.map( - (section) => /* @__PURE__ */ jsxRuntimeExports.jsxs(Fragment$2, { children: [ + (section) => /* @__PURE__ */ jsxRuntimeExports.jsxs(Fragment, { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx( List$1, { @@ -66051,8 +66071,8 @@ var patrun_min = patrun_min$1.exports; var e = { exports: {} }; (function(t2) { (function() { - !function(n3) { - "object" == typeof e.exports ? e.exports = n3() : ("undefined" != typeof window ? window : void 0 !== t2 ? t2 : "undefined" != typeof self ? self : this).Gex = n3(); + !function(n2) { + "object" == typeof e.exports ? e.exports = n2() : ("undefined" != typeof window ? window : void 0 !== t2 ? t2 : "undefined" != typeof self ? self : this).Gex = n2(); }(function() { var e2 = { exports: {} }; Object.defineProperty(e2.exports, "__esModule", { value: true }), e2.exports.Gex = void 0; @@ -66071,8 +66091,8 @@ var patrun_min = patrun_min$1.exports; } match(e3) { e3 = "" + e3; - let t4 = false, n4 = Object.keys(this.gexmap); - for (let r3 = 0; r3 < n4.length && !t4; r3++) t4 = !!this.gexmap[n4[r3]].exec(e3); + let t4 = false, n3 = Object.keys(this.gexmap); + for (let r3 = 0; r3 < n3.length && !t4; r3++) t4 = !!this.gexmap[n3[r3]].exec(e3); return t4; } on(e3) { @@ -66081,12 +66101,12 @@ var patrun_min = patrun_min$1.exports; if ("string" === t4 || "number" === t4 || "boolean" === t4 || e3 instanceof Date || e3 instanceof RegExp) return this.match(e3) ? e3 : null; if (Array.isArray(e3)) { let t5 = []; - for (let n4 = 0; n4 < e3.length; n4++) !this.dodgy(e3[n4]) && this.match(e3[n4]) && t5.push(e3[n4]); + for (let n3 = 0; n3 < e3.length; n3++) !this.dodgy(e3[n3]) && this.match(e3[n3]) && t5.push(e3[n3]); return t5; } { let t5 = {}; - for (let n4 in e3) Object.prototype.hasOwnProperty.call(e3, n4) && this.match(n4) && (t5[n4] = e3[n4]); + for (let n3 in e3) Object.prototype.hasOwnProperty.call(e3, n3) && this.match(n3) && (t5[n3] = e3[n3]); return t5; } } @@ -66112,41 +66132,41 @@ var patrun_min = patrun_min$1.exports; return this.toString(); } } - function n3(e3) { + function n2(e3) { return new t3(e3); } - return e2.exports.Gex = n3, e2.exports = n3, e2.exports.Gex = n3, e2.exports.default = n3, e2.exports; + return e2.exports.Gex = n2, e2.exports = n2, e2.exports.Gex = n2, e2.exports.default = n2, e2.exports; }); }).call(this); }).call(this, "undefined" != typeof commonjsGlobal ? commonjsGlobal : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}), e = e.exports; - var t, n2, r2, s, i, o, l2, u, a, f2 = {}, p2 = this && this.__classPrivateFieldGet || function(e2, t2, n3, r3) { - if ("a" === n3 && !r3) throw new TypeError("Private accessor was defined without a getter"); + var t, n, r2, s, i, o, l, u, a, f = {}, p = this && this.__classPrivateFieldGet || function(e2, t2, n2, r3) { + if ("a" === n2 && !r3) throw new TypeError("Private accessor was defined without a getter"); if ("function" == typeof t2 ? e2 !== t2 || !r3 : !t2.has(e2)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return "m" === n3 ? r3 : "a" === n3 ? r3.call(e2) : r3 ? r3.value : t2.get(e2); + return "m" === n2 ? r3 : "a" === n2 ? r3.call(e2) : r3 ? r3.value : t2.get(e2); }; - Object.defineProperty(f2, "__esModule", { value: true }), f2.IntervalMatcher = f2.GexMatcher = void 0, f2.GexMatcher = class { + Object.defineProperty(f, "__esModule", { value: true }), f.IntervalMatcher = f.GexMatcher = void 0, f.GexMatcher = class { constructor() { } - make(t2, n3) { - if ("string" == typeof n3 && n3.match(/[*?]/)) { - let t3 = (0, e.Gex)(n3); - return { kind: "gex", match: (e2) => null != t3.on(e2), fix: n3, meta: {}, same(e2) { + make(t2, n2) { + if ("string" == typeof n2 && n2.match(/[*?]/)) { + let t3 = (0, e.Gex)(n2); + return { kind: "gex", match: (e2) => null != t3.on(e2), fix: n2, meta: {}, same(e2) { return null != e2 && e2.kind === this.kind && e2.fix === this.fix; } }; } } scan(e2, t2) { - let n3 = e2.filter((e3) => "*" === e3.fix).length > 0; - return { complete: n3, sound: n3, gaps: [], overs: [], why: "no-star" }; + let n2 = e2.filter((e3) => "*" === e3.fix).length > 0; + return { complete: n2, sound: n2, gaps: [], overs: [], why: "no-star" }; } }; const h = new RegExp(["^/s*", "(=*[<>/(/[]?=*)?/s*([-+0-9a-fA-FeEoOxX]+(/.([0-9a-fA-FeEoOxX]+))?)([/)/]]?)(/s*(,|&+|/|+|/./.)/s*(=*[<>]?=*)/s*([-+.0-9a-fA-FeEoOxX]+)/s*([/)/]]?))?/s*$"].join("").replace(/\//g, "\\")); class c { constructor() { - this.kind = "interval", t.set(this, (e2, t2) => function(n3) { - return e2(n3) && t2(n3); - }), n2.set(this, (e2, t2) => function(n3) { - return e2(n3) || t2(n3); + this.kind = "interval", t.set(this, (e2, t2) => function(n2) { + return e2(n2) && t2(n2); + }), n.set(this, (e2, t2) => function(n2) { + return e2(n2) || t2(n2); }), r2.set(this, (e2) => function(e3) { return false; }), s.set(this, (e2) => function(e3) { @@ -66155,7 +66175,7 @@ var patrun_min = patrun_min$1.exports; return t2 > e2; }), o.set(this, (e2) => function(t2) { return t2 >= e2; - }), l2.set(this, (e2) => function(t2) { + }), l.set(this, (e2) => function(t2) { return t2 < e2; }), u.set(this, (e2) => function(t2) { return t2 <= e2; @@ -66163,183 +66183,183 @@ var patrun_min = patrun_min$1.exports; return t2 === e2; }); } - make(e2, f3) { - if ("string" == typeof f3 && f3.match(/[=<>.[()\]]/)) { - let e3 = f3.match(h), d2 = { jo: "and", o0: "err", n0: NaN, o1: "err", n1: NaN }, g2 = (e4) => false; + make(e2, f2) { + if ("string" == typeof f2 && f2.match(/[=<>.[()\]]/)) { + let e3 = f2.match(h), d2 = { jo: "and", o0: "err", n0: NaN, o1: "err", n1: NaN }, g2 = (e4) => false; if (null != e3) { - let h2 = c.normop(e3[1]) || c.normop(e3[5]), m3 = c.normop(e3[8]) || c.normop(e3[10]), v = p2(this, "=" === h2 ? a : "<" === h2 || ")" === h2 ? l2 : "<=" === h2 || "]" === h2 ? u : ">" === h2 || "(" === h2 ? i : ">=" === h2 || "[" === h2 ? o : s, "f"), x = Number(e3[2]), k2 = null == e3[9] ? NaN : Number(e3[9]), y = e3[7], w = null == y ? p2(this, n2, "f") : "&" === y.substring(0, 1) || "," === y.substring(0, 1) ? p2(this, t, "f") : p2(this, n2, "f"); - ".." === y && (w = p2(this, t, "f"), v = p2(this, s, "f") === v ? p2(this, o, "f") : v, m3 = "" === m3 ? "<=" : m3); - let N = p2(this, null == m3 ? r2 : "=" === m3 ? a : "<" === m3 || ")" === m3 ? l2 : "<=" === m3 || "]" === m3 ? u : ">" === m3 ? i : ">=" === m3 ? o : s, "f"); - if (x === k2 && ("=" === h2 && null != m3 ? (k2 = NaN, N = p2(this, r2, "f"), v = m3.includes("<") ? p2(this, u, "f") : m3.includes(">") ? p2(this, o, "f") : m3.includes("=") ? p2(this, a, "f") : p2(this, s, "f")) : "=" === m3 && null != h2 && (k2 = NaN, N = p2(this, r2, "f"), v = h2.includes("<") ? p2(this, u, "f") : h2.includes(">") ? p2(this, o, "f") : p2(this, s, "f"))), p2(this, s, "f") !== v && p2(this, r2, "f") === N && (p2(this, l2, "f") === v || p2(this, u, "f") === v ? (N = v, k2 = x, v = p2(this, o, "f"), x = Number.NEGATIVE_INFINITY, w = p2(this, t, "f")) : p2(this, i, "f") !== v && p2(this, o, "f") !== v || (N = p2(this, u, "f"), k2 = Number.POSITIVE_INFINITY, w = p2(this, t, "f"))), !isNaN(k2) && k2 < x) { - let e4 = N, t2 = k2; - k2 = x, x = t2, ".." !== y && (N = v, v = e4); + let h2 = c.normop(e3[1]) || c.normop(e3[5]), m2 = c.normop(e3[8]) || c.normop(e3[10]), v = p(this, "=" === h2 ? a : "<" === h2 || ")" === h2 ? l : "<=" === h2 || "]" === h2 ? u : ">" === h2 || "(" === h2 ? i : ">=" === h2 || "[" === h2 ? o : s, "f"), x = Number(e3[2]), k = null == e3[9] ? NaN : Number(e3[9]), y = e3[7], w = null == y ? p(this, n, "f") : "&" === y.substring(0, 1) || "," === y.substring(0, 1) ? p(this, t, "f") : p(this, n, "f"); + ".." === y && (w = p(this, t, "f"), v = p(this, s, "f") === v ? p(this, o, "f") : v, m2 = "" === m2 ? "<=" : m2); + let N = p(this, null == m2 ? r2 : "=" === m2 ? a : "<" === m2 || ")" === m2 ? l : "<=" === m2 || "]" === m2 ? u : ">" === m2 ? i : ">=" === m2 ? o : s, "f"); + if (x === k && ("=" === h2 && null != m2 ? (k = NaN, N = p(this, r2, "f"), v = m2.includes("<") ? p(this, u, "f") : m2.includes(">") ? p(this, o, "f") : m2.includes("=") ? p(this, a, "f") : p(this, s, "f")) : "=" === m2 && null != h2 && (k = NaN, N = p(this, r2, "f"), v = h2.includes("<") ? p(this, u, "f") : h2.includes(">") ? p(this, o, "f") : p(this, s, "f"))), p(this, s, "f") !== v && p(this, r2, "f") === N && (p(this, l, "f") === v || p(this, u, "f") === v ? (N = v, k = x, v = p(this, o, "f"), x = Number.NEGATIVE_INFINITY, w = p(this, t, "f")) : p(this, i, "f") !== v && p(this, o, "f") !== v || (N = p(this, u, "f"), k = Number.POSITIVE_INFINITY, w = p(this, t, "f"))), !isNaN(k) && k < x) { + let e4 = N, t2 = k; + k = x, x = t2, ".." !== y && (N = v, v = e4); } - let b = v(x), O = N(k2), j = w(b, O); - return d2 = { jo: j.name, o0: b.name, n0: x, o1: O.name, n1: k2 }, g2 = (e4) => { - let t2 = false, n3 = parseFloat(e4); - return isNaN(n3) || (t2 = j(n3)), t2; - }, { kind: "interval", fix: f3, meta: d2, match: g2, same(e4) { + let b = v(x), O = N(k), j = w(b, O); + return d2 = { jo: j.name, o0: b.name, n0: x, o1: O.name, n1: k }, g2 = (e4) => { + let t2 = false, n2 = parseFloat(e4); + return isNaN(n2) || (t2 = j(n2)), t2; + }, { kind: "interval", fix: f2, meta: d2, match: g2, same(e4) { return null != e4 && e4.kind === this.kind && e4.meta.jo === this.meta.jo && e4.meta.o0 === this.meta.o0 && e4.meta.n0 === this.meta.n0 && e4.meta.o1 === this.meta.o1 && e4.meta.n1 === this.meta.n1; } }; } } } scan(e2, t2) { - let n3 = { complete: false, sound: false, gaps: [], overs: [], lower: null, upper: null }, r3 = Number.NEGATIVE_INFINITY, s2 = Number.POSITIVE_INFINITY, i2 = this.half_intervals(e2); + let n2 = { complete: false, sound: false, gaps: [], overs: [], lower: null, upper: null }, r3 = Number.NEGATIVE_INFINITY, s2 = Number.POSITIVE_INFINITY, i2 = this.half_intervals(e2); i2.reduce((e3, t3) => { - let n4 = "eq" === t3.o, s3 = "lt" === t3.o, i3 = "lte" === t3.o, o3 = "gt" === t3.o, l3 = "gte" === t3.o, u2 = t3.n; + let n3 = "eq" === t3.o, s3 = "lt" === t3.o, i3 = "lte" === t3.o, o3 = "gt" === t3.o, l2 = "gte" === t3.o, u2 = t3.n; if (null == e3.lower) { let s4 = { n: r3, o: "gte" }; - e3.lower = s4, e3.upper = t3, r3 == u2 && l3 || (o3 || l3 ? e3.gaps.push([s4, { n: u2, o: o3 ? "lte" : "lt", m: 0 }]) : n4 && e3.gaps.push([s4, { n: u2, o: "lte", m: 1 }])); + e3.lower = s4, e3.upper = t3, r3 == u2 && l2 || (o3 || l2 ? e3.gaps.push([s4, { n: u2, o: o3 ? "lte" : "lt", m: 0 }]) : n3 && e3.gaps.push([s4, { n: u2, o: "lte", m: 1 }])); } else { - let r4 = "eq" === e3.upper.o, a2 = "lt" === e3.upper.o, f3 = "lte" === e3.upper.o, p3 = (e3.upper.o, e3.upper.o, e3.upper.n), h2 = e3.upper; - u2 === p3 ? a2 && (l3 || n4) || (f3 || r4) && o3 || (r4 || a2 || f3) && e3.gaps.push([{ n: p3, o: r4 || f3 ? "gt" : "gte", m: 2, d: { u: h2, h: t3 } }, { n: u2, o: n4 || l3 ? "lt" : "lte", m: 3 }]) : p3 < u2 ? s3 || i3 || (r4 || a2 || f3) && e3.gaps.push([{ n: p3, o: r4 || f3 ? "gt" : "gte", m: 4 }, { n: u2, o: n4 || l3 ? "lt" : "lte", m: 5 }]) : e3.overs.push([{ n: u2, o: n4 || l3 ? "gte" : "gt", m: 10 }, { n: p3, o: r4 || f3 ? "lte" : "lt", m: 11 }]), e3.upper = t3; + let r4 = "eq" === e3.upper.o, a2 = "lt" === e3.upper.o, f2 = "lte" === e3.upper.o, p2 = (e3.upper.o, e3.upper.o, e3.upper.n), h2 = e3.upper; + u2 === p2 ? a2 && (l2 || n3) || (f2 || r4) && o3 || (r4 || a2 || f2) && e3.gaps.push([{ n: p2, o: r4 || f2 ? "gt" : "gte", m: 2, d: { u: h2, h: t3 } }, { n: u2, o: n3 || l2 ? "lt" : "lte", m: 3 }]) : p2 < u2 ? s3 || i3 || (r4 || a2 || f2) && e3.gaps.push([{ n: p2, o: r4 || f2 ? "gt" : "gte", m: 4 }, { n: u2, o: n3 || l2 ? "lt" : "lte", m: 5 }]) : e3.overs.push([{ n: u2, o: n3 || l2 ? "gte" : "gt", m: 10 }, { n: p2, o: r4 || f2 ? "lte" : "lt", m: 11 }]), e3.upper = t3; } return e3; - }, n3); + }, n2); let o2 = 0 < i2.length && i2[i2.length - 1]; - return o2 && s2 !== o2.n && "gt" !== o2.o && "gte" !== o2.o && n3.gaps.push([{ n: o2.n, o: "eq" === o2.o || "lte" === o2.o ? "gt" : "gte", m: 6 }, { n: s2, o: "lte", m: 7 }]), n3.complete = 0 === n3.gaps.length, n3.sound = 0 === n3.overs.length, n3; + return o2 && s2 !== o2.n && "gt" !== o2.o && "gte" !== o2.o && n2.gaps.push([{ n: o2.n, o: "eq" === o2.o || "lte" === o2.o ? "gt" : "gte", m: 6 }, { n: s2, o: "lte", m: 7 }]), n2.complete = 0 === n2.gaps.length, n2.sound = 0 === n2.overs.length, n2; } half_intervals(e2) { let t2 = []; for (let r3 of e2) t2.push([{ n: r3.meta.n0, o: r3.meta.o0 }, { n: r3.meta.n1, o: r3.meta.o1 }]); - var n3 = ["lt", "lte", "eq", "gte", "gt"]; + var n2 = ["lt", "lte", "eq", "gte", "gt"]; return t2.map((e3) => [isNaN(e3[0].n) || null == e3[0].n ? null : e3[0], isNaN(e3[1].n) || null == e3[1].n ? null : e3[1]].filter((e4) => null != e4)).sort((e3, t3) => { if (e3[0].n < t3[0].n) return -1; if (t3[0].n < e3[0].n) return 1; - var r3 = n3.indexOf(e3[0].o), s2 = n3.indexOf(t3[0].o); + var r3 = n2.indexOf(e3[0].o), s2 = n2.indexOf(t3[0].o); if (r3 < s2) return -1; if (s2 < r3) return 1; if (e3[1].n < t3[1].n) return -1; if (t3[1].n < e3[1].n) return 1; - var i2 = n3.indexOf(e3[1].o), o2 = n3.indexOf(t3[1].o); + var i2 = n2.indexOf(e3[1].o), o2 = n2.indexOf(t3[1].o); return i2 < o2 ? -1 : o2 < i2 ? 1 : 0; }).reduce((e3, t3) => e3.concat(...t3), []); } } - f2.IntervalMatcher = c, t = /* @__PURE__ */ new WeakMap(), n2 = /* @__PURE__ */ new WeakMap(), r2 = /* @__PURE__ */ new WeakMap(), s = /* @__PURE__ */ new WeakMap(), i = /* @__PURE__ */ new WeakMap(), o = /* @__PURE__ */ new WeakMap(), l2 = /* @__PURE__ */ new WeakMap(), u = /* @__PURE__ */ new WeakMap(), a = /* @__PURE__ */ new WeakMap(), c.normop = (e2) => null == e2 ? null : ((e2.match(/([<>\(\)\[\]])/) || [])[1] || "") + ((e2.match(/(=)/) || [])[1] || ""); + f.IntervalMatcher = c, t = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap(), r2 = /* @__PURE__ */ new WeakMap(), s = /* @__PURE__ */ new WeakMap(), i = /* @__PURE__ */ new WeakMap(), o = /* @__PURE__ */ new WeakMap(), l = /* @__PURE__ */ new WeakMap(), u = /* @__PURE__ */ new WeakMap(), a = /* @__PURE__ */ new WeakMap(), c.normop = (e2) => null == e2 ? null : ((e2.match(/([<>\(\)\[\]])/) || [])[1] || "") + ((e2.match(/(=)/) || [])[1] || ""); var d = { exports: {} }; function g(t2) { - var n3 = {}, r3 = {}; + var n2 = {}, r3 = {}; let s2 = []; - return (t2 = t2 || {}).gex && s2.push(new f2.GexMatcher()), t2.interval && s2.push(new f2.IntervalMatcher()), n3.top = function() { + return (t2 = t2 || {}).gex && s2.push(new f.GexMatcher()), t2.interval && s2.push(new f.IntervalMatcher()), n2.top = function() { return r3; - }, n3.add = function(e2, i2) { + }, n2.add = function(e2, i2) { e2 = __spreadValues({}, e2); - var o2 = "function" == typeof t2 ? t2.call(n3, e2, i2) : null, l3 = Object.keys(e2).filter((t3) => null != e2[t3]).sort(); - l3.forEach(function(t3) { + var o2 = "function" == typeof t2 ? t2.call(n2, e2, i2) : null, l2 = Object.keys(e2).filter((t3) => null != e2[t3]).sort(); + l2.forEach(function(t3) { e2[t3] = String(e2[t3]); }); - for (var u2, a2 = r3, f3 = 0; f3 < l3.length; f3++) { - var p3 = l3[f3], h2 = e2[p3]; - let t3 = s2.reduce((e3, t4) => e3 || t4.make(p3, h2), void 0); - if ((u2 = a2.v) && p3 == a2.k) if (t3) { - var c2 = (g2 = a2.g = a2.g || {})[p3] = g2[p3] || []; + for (var u2, a2 = r3, f2 = 0; f2 < l2.length; f2++) { + var p2 = l2[f2], h2 = e2[p2]; + let t3 = s2.reduce((e3, t4) => e3 || t4.make(p2, h2), void 0); + if ((u2 = a2.v) && p2 == a2.k) if (t3) { + var c2 = (g2 = a2.g = a2.g || {})[p2] = g2[p2] || []; t3 = c2.find((e3) => e3.same(t3)) || (c2.push(t3), t3), a2 = t3.keymap || (t3.keymap = {}); } else a2 = u2[h2] || (u2[h2] = {}); - else if (a2.k) if (p3 < a2.k) { + else if (a2.k) if (p2 < a2.k) { var d2 = a2.s; - g2 = a2.g, a2.s = { k: a2.k, v: a2.v }, d2 && (a2.s.s = d2), g2 && (a2.s.g = g2), a2.g && (a2.g = {}), a2.k = p3, a2.v = {}, t3 ? (c2 = (g2 = a2.g = a2.g || {})[p3] = g2[p3] || [], t3 = c2.find((e3) => e3.same(t3)) || (c2.push(t3), t3), a2 = t3.keymap || (t3.keymap = {})) : a2 = a2.v[h2] = {}; - } else a2 = a2.s || (a2.s = {}), f3--; - else if (a2.k = p3, a2.v = {}, t3) { + g2 = a2.g, a2.s = { k: a2.k, v: a2.v }, d2 && (a2.s.s = d2), g2 && (a2.s.g = g2), a2.g && (a2.g = {}), a2.k = p2, a2.v = {}, t3 ? (c2 = (g2 = a2.g = a2.g || {})[p2] = g2[p2] || [], t3 = c2.find((e3) => e3.same(t3)) || (c2.push(t3), t3), a2 = t3.keymap || (t3.keymap = {})) : a2 = a2.v[h2] = {}; + } else a2 = a2.s || (a2.s = {}), f2--; + else if (a2.k = p2, a2.v = {}, t3) { var g2; - c2 = (g2 = a2.g = a2.g || {})[p3] = g2[p3] || []; + c2 = (g2 = a2.g = a2.g || {})[p2] = g2[p2] || []; t3 = c2.find((e3) => e3.same(t3)) || (c2.push(t3), t3), a2 = t3.keymap || (t3.keymap = {}); } else a2 = a2.v[h2] = {}; } - return void 0 !== i2 && a2 && (a2.d = i2, o2 && (a2.f = "function" == typeof o2 ? o2 : o2.find, a2.r = "function" == typeof o2.remove ? o2.remove : void 0)), n3; - }, n3.findexact = function(e2) { - return n3.find(e2, true); - }, n3.find = function(e2, t3, s3) { + return void 0 !== i2 && a2 && (a2.d = i2, o2 && (a2.f = "function" == typeof o2 ? o2 : o2.find, a2.r = "function" == typeof o2.remove ? o2.remove : void 0)), n2; + }, n2.findexact = function(e2) { + return n2.find(e2, true); + }, n2.find = function(e2, t3, s3) { if (null == e2) return null; - var i2 = r3, o2 = void 0 === r3.d ? null : r3.d, l3 = r3.f, u2 = null, a2 = [], f3 = {}, p3 = Object.keys(e2).length, h2 = []; + var i2 = r3, o2 = void 0 === r3.d ? null : r3.d, l2 = r3.f, u2 = null, a2 = [], f2 = {}, p2 = Object.keys(e2).length, h2 = []; void 0 !== r3.d && h2.push(r3.d); do { if (u2 = i2.k, i2.v) { var c2 = e2[u2], d2 = i2.v[c2]; if (!d2 && i2.g && i2.g[u2]) { - for (var g2 = i2.g[u2], m3 = 0; m3 < g2.length; m3++) if (g2[m3].match(c2)) { - d2 = g2[m3].keymap; + for (var g2 = i2.g[u2], m2 = 0; m2 < g2.length; m2++) if (g2[m2].match(c2)) { + d2 = g2[m2].keymap; break; } } - d2 ? (f3[u2] = true, i2.s && a2.push(i2.s), o2 = void 0 === d2.d ? t3 ? null : o2 : d2.d, s3 && void 0 !== d2.d && h2.push(d2.d), l3 = d2.f, i2 = d2) : i2 = i2.s; + d2 ? (f2[u2] = true, i2.s && a2.push(i2.s), o2 = void 0 === d2.d ? t3 ? null : o2 : d2.d, s3 && void 0 !== d2.d && h2.push(d2.d), l2 = d2.f, i2 = d2) : i2 = i2.s; } else i2 = null; null == i2 && 0 < a2.length && (null == o2 || s3 && !t3) && (i2 = a2.pop()); } while (i2); - return t3 ? Object.keys(f3).length !== p3 && (o2 = null) : null == o2 && void 0 !== r3.d && (o2 = r3.d), l3 && (o2 = l3.call(n3, e2, o2)), s3 ? h2 : o2; - }, n3.remove = function(e2) { - var t3, n4 = r3, s3 = null, i2 = []; + return t3 ? Object.keys(f2).length !== p2 && (o2 = null) : null == o2 && void 0 !== r3.d && (o2 = r3.d), l2 && (o2 = l2.call(n2, e2, o2)), s3 ? h2 : o2; + }, n2.remove = function(e2) { + var t3, n3 = r3, s3 = null, i2 = []; do { - if (t3 = n4.k, n4.v || n4.g) { - if (n4.v) { - var o2 = n4.v[e2[t3]]; - o2 && i2.push({ km: n4, v: e2[t3] }); + if (t3 = n3.k, n3.v || n3.g) { + if (n3.v) { + var o2 = n3.v[e2[t3]]; + o2 && i2.push({ km: n3, v: e2[t3] }); } - if (null == o2 && n4.g) { - let r4 = n4.g[t3] || []; + if (null == o2 && n3.g) { + let r4 = n3.g[t3] || []; for (let s4 = 0; s4 < r4.length; s4++) if (r4[s4].fix === e2[t3]) { - i2.push({ km: n4, v: e2[t3], mv: r4[s4] }), o2 = r4[s4].keymap; + i2.push({ km: n3, v: e2[t3], mv: r4[s4] }), o2 = r4[s4].keymap; break; } } - o2 ? (s3 = o2.d, n4 = o2) : n4 = n4.s; - } else n4 = null; - } while (n4); + o2 ? (s3 = o2.d, n3 = o2) : n3 = n3.s; + } else n3 = null; + } while (n3); if (void 0 !== s3) { - var l3 = i2[i2.length - 1]; - if (l3 && l3.km && l3.km.v) { - var u2 = l3.km.v[l3.v] || l3.mv && l3.mv.keymap; + var l2 = i2[i2.length - 1]; + if (l2 && l2.km && l2.km.v) { + var u2 = l2.km.v[l2.v] || l2.mv && l2.mv.keymap; !u2 || u2.r && !u2.r(e2, u2.d) || delete u2.d; } } - }, n3.list = function(t3, n4) { + }, n2.list = function(t3, n3) { t3 = t3 || {}; var s3 = []; - return r3.d && s3.push({ match: {}, data: r3.d, find: r3.f }), function r4(s4, i2, o2, l3) { + return r3.d && s3.push({ match: {}, data: r3.d, find: r3.f }), function r4(s4, i2, o2, l2) { if (s4.v) { - var u2, a2 = s4.k, f3 = (0, e.Gex)(t3 ? null == t3[a2] ? n4 ? null : "*" : t3[a2] : "*"), p3 = __spreadValues({}, i2), h2 = __spreadValues({}, o2); - for (var c2 in s4.v) if (c2 === t3[a2] || !n4 && null == t3[a2] || f3.on(c2)) { - var d2 = __spreadValues({}, p3); + var u2, a2 = s4.k, f2 = (0, e.Gex)(t3 ? null == t3[a2] ? n3 ? null : "*" : t3[a2] : "*"), p2 = __spreadValues({}, i2), h2 = __spreadValues({}, o2); + for (var c2 in s4.v) if (c2 === t3[a2] || !n3 && null == t3[a2] || f2.on(c2)) { + var d2 = __spreadValues({}, p2); d2[a2] = c2; var g2 = __spreadValues({}, h2); - delete g2[a2], u2 = s4.v[c2], 0 === Object.keys(g2).length && u2 && u2.d && l3.push({ match: d2, data: u2.d, find: u2.f }), u2 && null != u2.v && r4(u2, __spreadValues({}, d2), __spreadValues({}, g2), l3); + delete g2[a2], u2 = s4.v[c2], 0 === Object.keys(g2).length && u2 && u2.d && l2.push({ match: d2, data: u2.d, find: u2.f }), u2 && null != u2.v && r4(u2, __spreadValues({}, d2), __spreadValues({}, g2), l2); } - (u2 = s4.s) && r4(u2, __spreadValues({}, p3), __spreadValues({}, h2), l3); + (u2 = s4.s) && r4(u2, __spreadValues({}, p2), __spreadValues({}, h2), l2); } }(r3, {}, __spreadValues({}, t3), s3), s3; - }, n3.toString = function(e2, t3) { - var n4 = true === e2 || !!t3, s3 = "function" == typeof e2 ? e2 : function(e3) { + }, n2.toString = function(e2, t3) { + var n3 = true === e2 || !!t3, s3 = "function" == typeof e2 ? e2 : function(e3) { return "function" == typeof e3 ? "<" + e3.name + ">" : "<" + e3 + ">"; }; function i2(e3, t4) { - for (var n5 = 0; n5 < t4; n5++) e3.push(" "); + for (var n4 = 0; n4 < t4; n4++) e3.push(" "); } - var o2 = [], l3 = []; - return function e3(t4, n5, r4, l4) { + var o2 = [], l2 = []; + return function e3(t4, n4, r4, l3) { var u2; - if (void 0 !== t4.d && (n5.push(" " + s3(t4.d)), o2.push(l4.join(", ") + " -> " + s3(t4.d))), t4.k && (n5.push("\n"), i2(n5, r4), n5.push(t4.k + ":")), (t4.v || t4.s || t4.g) && r4++, t4.v) for (var a2 = Object.keys(t4.v).sort(), f3 = 0; f3 < a2.length; f3++) { - var p3 = a2[f3]; - n5.push("\n"), i2(n5, r4), n5.push(p3 + " ->"), (u2 = l4.slice()).push(t4.k + "=" + p3), e3(t4.v[p3], n5, r4 + 1, u2); + if (void 0 !== t4.d && (n4.push(" " + s3(t4.d)), o2.push(l3.join(", ") + " -> " + s3(t4.d))), t4.k && (n4.push("\n"), i2(n4, r4), n4.push(t4.k + ":")), (t4.v || t4.s || t4.g) && r4++, t4.v) for (var a2 = Object.keys(t4.v).sort(), f2 = 0; f2 < a2.length; f2++) { + var p2 = a2[f2]; + n4.push("\n"), i2(n4, r4), n4.push(p2 + " ->"), (u2 = l3.slice()).push(t4.k + "=" + p2), e3(t4.v[p2], n4, r4 + 1, u2); } - if (t4.g) for (a2 = Object.keys(t4.g).sort(), f3 = 0; f3 < a2.length; f3++) for (var h2 = t4.g[a2[f3]], c2 = 0; c2 < h2.length; c2++) { + if (t4.g) for (a2 = Object.keys(t4.g).sort(), f2 = 0; f2 < a2.length; f2++) for (var h2 = t4.g[a2[f2]], c2 = 0; c2 < h2.length; c2++) { var d2 = h2[c2]; - n5.push("\n"), i2(n5, r4), n5.push(d2.fix + " ~>"), (u2 = l4.slice()).push(t4.k + "~" + d2.fix), e3(d2.keymap, n5, r4 + 1, u2); + n4.push("\n"), i2(n4, r4), n4.push(d2.fix + " ~>"), (u2 = l3.slice()).push(t4.k + "~" + d2.fix), e3(d2.keymap, n4, r4 + 1, u2); } - t4.s && (n5.push("\n"), i2(n5, r4), n5.push("|"), u2 = l4.slice(), e3(t4.s, n5, r4 + 1, u2)); - }(r3, l3, 0, []), n4 ? l3.join("") : o2.join("\n"); - }, n3.inspect = n3.toString, n3.toJSON = function(e2) { + t4.s && (n4.push("\n"), i2(n4, r4), n4.push("|"), u2 = l3.slice(), e3(t4.s, n4, r4 + 1, u2)); + }(r3, l2, 0, []), n3 ? l2.join("") : o2.join("\n"); + }, n2.inspect = n2.toString, n2.toJSON = function(e2) { return JSON.stringify(r3, function(e3, t3) { return "function" == typeof t3 ? "[Function]" : t3; }, e2); - }, n3; + }, n2; } - function m2(e2) { + function m(e2) { return new g(e2); } return Object.defineProperty(d.exports, "__esModule", { value: true }), d.exports.Gex = void 0, d.exports.Patrun = g, Object.defineProperty(d.exports, "Gex", { enumerable: true, get: function() { return e.Gex; - } }), d.exports = m2, d.exports.Patrun = g, d.exports.Gex = e.Gex, d.exports.default = m2, d = d.exports; + } }), d.exports = m, d.exports.Patrun = g, d.exports.Gex = e.Gex, d.exports.default = m, d = d.exports; }); })(patrun_min$1, patrun_min$1.exports); var patrun_minExports = patrun_min$1.exports; @@ -66452,9 +66472,9 @@ function requireLexer() { } let pnt = lex.pnt; let fwd = lex.src.substring(pnt.sI); - let m2 = fwd.match(fixed); - if (m2) { - let msrc = m2[1]; + let m = fwd.match(fixed); + if (m) { + let msrc = m[1]; let mlen = msrc.length; if (0 < mlen) { let tkn = void 0; @@ -66491,13 +66511,13 @@ function requireLexer() { let oc = "o" === rule.state ? 0 : 1; for (let valueMatcher of valueMatchers) { if (valueMatcher.match instanceof RegExp) { - let m2 = fwd.match(valueMatcher.match); - if (m2) { - let msrc = m2[0]; + let m = fwd.match(valueMatcher.match); + if (m) { + let msrc = m[0]; let mlen = msrc.length; if (0 < mlen) { let tkn = void 0; - let val = valueMatcher.val ? valueMatcher.val(m2) : msrc; + let val = valueMatcher.val ? valueMatcher.val(m) : msrc; tkn = lex.token("#VL", val, msrc, pnt); pnt.sI += mlen; pnt.cI += mlen; @@ -66516,9 +66536,9 @@ function requireLexer() { continue; } if (tokenMatcher instanceof RegExp) { - let m2 = fwd.match(tokenMatcher); - if (m2) { - let msrc = m2[0]; + let m = fwd.match(tokenMatcher); + if (m) { + let msrc = m[0]; let mlen = msrc.length; if (0 < mlen) { let tkn = void 0; @@ -66652,10 +66672,10 @@ function requireLexer() { let fwd = lex.src.substring(pnt.sI); let def = cfg.value.def; let defre = cfg.value.defre; - let m2 = fwd.match(ender); - if (m2) { - let msrc = m2[1]; - let tsrc = m2[2]; + let m = fwd.match(ender); + if (m) { + let msrc = m[1]; + let tsrc = m[2]; let out = void 0; if (null != msrc) { let mlen = msrc.length; @@ -66735,10 +66755,10 @@ function requireLexer() { let pnt = lex.pnt; let fwd = lex.src.substring(pnt.sI); let valdef = cfg.value.def; - let m2 = fwd.match(ender); - if (m2) { - let msrc = m2[1]; - let tsrc = m2[9]; + let m = fwd.match(ender); + if (m) { + let msrc = m[1]; + let tsrc = m[9]; let out = void 0; let included = true; if (null != msrc && (included = !cfg.number.exclude || !msrc.match(cfg.number.exclude))) { @@ -66807,10 +66827,10 @@ function requireLexer() { let { sI, rI, cI } = pnt; let srclen = src.length; if (quoteMap[src[sI]]) { - const q2 = src[sI]; + const q = src[sI]; const qI = sI; const qrI = rI; - const isMultiLine = multiChars[q2]; + const isMultiLine = multiChars[q]; ++sI; ++cI; let s = []; @@ -66819,7 +66839,7 @@ function requireLexer() { cI++; let c = src[sI]; rs = void 0; - if (q2 === c) { + if (q === c) { sI++; break; } else if (escChar === c) { @@ -66879,7 +66899,7 @@ function requireLexer() { cI++; } else { let bI = sI; - let qc = q2.charCodeAt(0); + let qc = q.charCodeAt(0); let cc = src.charCodeAt(sI); while ((!hasReplace || void 0 === (rs = replaceCodeMap[cc])) && sI < srclen && 32 <= cc && qc !== cc && escCharCode !== cc) { cc = src.charCodeAt(++sI); @@ -66907,7 +66927,7 @@ function requireLexer() { } } } - if (src[sI - 1] !== q2 || pnt.sI === sI - 1) { + if (src[sI - 1] !== q || pnt.sI === sI - 1) { if (mcfg.abandon) { return void 0; } @@ -67102,9 +67122,9 @@ function requireUtility() { utility.isarr = isarr; const defprop = Object.defineProperty; utility.defprop = defprop; - const omap = (o, f2) => { + const omap = (o, f) => { return Object.entries(o || {}).reduce((o2, e) => { - let me = f2 ? f2(e) : e; + let me = f ? f(e) : e; if (void 0 === me[0]) { delete o2[e[0]]; } else { @@ -67231,7 +67251,7 @@ function requireUtility() { tin, (matcher.tin$ = +tin, matcher) ]); - const tokenSet = opts.tokenSet ? Object.keys(opts.tokenSet).reduce((a, n2) => (a[n2] = opts.tokenSet[n2].filter((x) => null != x).map((n3) => t(n3)), a), {}) : {}; + const tokenSet = opts.tokenSet ? Object.keys(opts.tokenSet).reduce((a, n) => (a[n] = opts.tokenSet[n].filter((x) => null != x).map((n2) => t(n2)), a), {}) : {}; cfg.tokenSet = cfg.tokenSet || {}; entries(tokenSet).map((entry) => { let name = entry[0]; @@ -67259,7 +67279,7 @@ function requireUtility() { }; cfg.text = { lex: !!((_q = opts.text) === null || _q === void 0 ? void 0 : _q.lex), - modify: (((_r = cfg.text) === null || _r === void 0 ? void 0 : _r.modify) || []).concat([(_s = opts.text) === null || _s === void 0 ? void 0 : _s.modify].flat()).filter((m2) => null != m2), + modify: (((_r = cfg.text) === null || _r === void 0 ? void 0 : _r.modify) || []).concat([(_s = opts.text) === null || _s === void 0 ? void 0 : _s.modify].flat()).filter((m) => null != m), check: (_t7 = opts.text) === null || _t7 === void 0 ? void 0 : _t7.check }; cfg.number = { @@ -67339,7 +67359,7 @@ function requireUtility() { list.push(matcher); } return list; - }, []).filter((m2) => null != m2 && false !== m2 && -1 < +m2.order).sort((a, b) => a.order - b.order) : [] + }, []).filter((m) => null != m && false !== m && -1 < +m.order).sort((a, b) => a.order - b.order) : [] }; cfg.parse = { prepare: values2((_19 = opts.parse) === null || _19 === void 0 ? void 0 : _19.prepare) @@ -67399,10 +67419,10 @@ function requireUtility() { } utility.mesc = mesc; function regexp(flags, ...parts) { - return new RegExp(parts.map((p2) => p2.esc ? ( + return new RegExp(parts.map((p) => p.esc ? ( //p.replace(/[-\\|\]{}()[^$+*?.!=]/g, '\\$&') - escre(p2.toString()) - ) : p2).join(types_12.EMPTY), null == flags ? "" : flags); + escre(p.toString()) + ) : p).join(types_12.EMPTY), null == flags ? "" : flags); } utility.regexp = regexp; function escre(s) { @@ -67417,8 +67437,8 @@ function requireUtility() { let over_iso = null != over && (S.object === typeof over || over_isf); let over_ctor; if (base_iso && over_iso && !over_isf && Array.isArray(base) === Array.isArray(over)) { - for (let k2 in over) { - base[k2] = deep(base[k2], over[k2]); + for (let k in over) { + base[k] = deep(base[k], over[k]); } } else { base = void 0 === over ? base : over_isf ? over : over_iso ? S.function === typeof (over_ctor = over.constructor) && S.Object !== over_ctor.name && S.Array !== over_ctor.name ? over : deep(Array.isArray(over) ? [] : {}, over) : over; @@ -67484,7 +67504,7 @@ function requireUtility() { errinject((cfg.hint[code] || ((_c = (_b = details.use) === null || _b === void 0 ? void 0 : _b.err) === null || _c === void 0 ? void 0 : _c.message) || cfg.hint.unknown || "").trim().split("\n").map((s) => " " + s).join("\n"), code, details, token2, rule, ctx), "", " \x1B[2mhttps://jsonic.senecajs.org\x1B[0m", - " \x1B[2m--internal: rule=" + rule.name + "~" + rule.state + "; token=" + tokenize2(token2.tin, ctx.cfg) + (null == token2.why ? "" : "~" + token2.why) + "; plugins=" + ctx.plgn().map((p2) => p2.name).join(",") + "--\x1B[0m\n" + " \x1B[2m--internal: rule=" + rule.name + "~" + rule.state + "; token=" + tokenize2(token2.tin, ctx.cfg) + (null == token2.why ? "" : "~" + token2.why) + "; plugins=" + ctx.plgn().map((p) => p.name).join(",") + "--\x1B[0m\n" ].join("\n"); let desc = { internal: { @@ -67579,13 +67599,13 @@ function requireUtility() { } utility.clone = clone; function charset(...parts) { - return null == parts ? {} : parts.filter((p2) => false !== p2).map((p2) => "object" === typeof p2 ? keys(p2).join(types_12.EMPTY) : p2).join(types_12.EMPTY).split(types_12.EMPTY).reduce((a, c) => (a[c] = c.charCodeAt(0), a), {}); + return null == parts ? {} : parts.filter((p) => false !== p).map((p) => "object" === typeof p ? keys(p).join(types_12.EMPTY) : p).join(types_12.EMPTY).split(types_12.EMPTY).reduce((a, c) => (a[c] = c.charCodeAt(0), a), {}); } utility.charset = charset; function clean(o) { - for (let p2 in o) { - if (null == o[p2]) { - delete o[p2]; + for (let p in o) { + if (null == o[p]) { + delete o[p]; } } return o; @@ -67971,8 +67991,8 @@ const defaults = { } }; defaults_2 = defaults$1.defaults = defaults; -function make_hint(d = (t, r2 = "replace") => t[r2](/[A-Z]/g, (m2) => " " + m2.toLowerCase())[r2](/[~%][a-z]/g, (m2) => ("~" == m2[0] ? " " : "") + m2[1].toUpperCase()), s = "~sinceTheErrorIsUnknown,ThisIsProbablyABugInsideJsonic\nitself,OrAPlugin.~pleaseConsiderPostingAGithubIssue -Thanks!\n\n~code: $code,~details: \n$details|~theCharacter(s) $srcWereNotExpectedAtThisPointAsTheyDoNot\nmatchTheExpectedSyntax,EvenUnderTheRelaxedJsonicRules.~ifIt\nisNotObviouslyWrong,TheActualSyntaxErrorMayBeElsewhere.~try\ncommentingOutLargerAreasAroundThisPointUntilYouGetNoErrors,\nthenRemoveTheCommentsInSmallSectionsUntilYouFindThe\noffendingSyntax.~n%o%t%e:~alsoCheckIfAnyPluginsYouAreUsing\nexpectDifferentSyntaxInThisCase.|~theEscapeSequence $srcDoesNotEncodeAValidUnicodeCodePoint\nnumber.~youMayNeedToValidateYourStringDataManuallyUsingTest\ncodeToSeeHow~javaScriptWillInterpretIt.~alsoConsiderThatYour\ndataMayHaveBecomeCorrupted,OrTheEscapeSequenceHasNotBeen\ngeneratedCorrectly.|~theEscapeSequence $srcDoesNotEncodeAValid~a%s%c%i%iCharacter.~you\nmayNeedToValidateYourStringDataManuallyUsingTestCodeToSee\nhow~javaScriptWillInterpretIt.~alsoConsiderThatYourDataMay\nhaveBecomeCorrupted,OrTheEscapeSequenceHasNotBeenGenerated\ncorrectly.|~stringValuesCannotContainUnprintableCharacters (characterCodes\nbelow 32).~theCharacter $srcIsUnprintable.~youMayNeedToRemove\ntheseCharactersFromYourSourceData.~alsoCheckThatItHasNot\nbecomeCorrupted.|~thisStringHasNoEndQuote.|~thisCommentIsNeverClosed.|~noRuleNamed $rulenameIsDefined.~thisIsProbablyAnErrorInThe\ngrammarOfAPlugin.".split("|")) { - return "unknown|unexpected|invalid_unicode|invalid_ascii|unprintable|unterminated_string|unterminated_comment|unknown_rule".split("|").reduce((a, n2, i) => (a[n2] = d(s[i]), a), {}); +function make_hint(d = (t, r2 = "replace") => t[r2](/[A-Z]/g, (m) => " " + m.toLowerCase())[r2](/[~%][a-z]/g, (m) => ("~" == m[0] ? " " : "") + m[1].toUpperCase()), s = "~sinceTheErrorIsUnknown,ThisIsProbablyABugInsideJsonic\nitself,OrAPlugin.~pleaseConsiderPostingAGithubIssue -Thanks!\n\n~code: $code,~details: \n$details|~theCharacter(s) $srcWereNotExpectedAtThisPointAsTheyDoNot\nmatchTheExpectedSyntax,EvenUnderTheRelaxedJsonicRules.~ifIt\nisNotObviouslyWrong,TheActualSyntaxErrorMayBeElsewhere.~try\ncommentingOutLargerAreasAroundThisPointUntilYouGetNoErrors,\nthenRemoveTheCommentsInSmallSectionsUntilYouFindThe\noffendingSyntax.~n%o%t%e:~alsoCheckIfAnyPluginsYouAreUsing\nexpectDifferentSyntaxInThisCase.|~theEscapeSequence $srcDoesNotEncodeAValidUnicodeCodePoint\nnumber.~youMayNeedToValidateYourStringDataManuallyUsingTest\ncodeToSeeHow~javaScriptWillInterpretIt.~alsoConsiderThatYour\ndataMayHaveBecomeCorrupted,OrTheEscapeSequenceHasNotBeen\ngeneratedCorrectly.|~theEscapeSequence $srcDoesNotEncodeAValid~a%s%c%i%iCharacter.~you\nmayNeedToValidateYourStringDataManuallyUsingTestCodeToSee\nhow~javaScriptWillInterpretIt.~alsoConsiderThatYourDataMay\nhaveBecomeCorrupted,OrTheEscapeSequenceHasNotBeenGenerated\ncorrectly.|~stringValuesCannotContainUnprintableCharacters (characterCodes\nbelow 32).~theCharacter $srcIsUnprintable.~youMayNeedToRemove\ntheseCharactersFromYourSourceData.~alsoCheckThatItHasNot\nbecomeCorrupted.|~thisStringHasNoEndQuote.|~thisCommentIsNeverClosed.|~noRuleNamed $rulenameIsDefined.~thisIsProbablyAnErrorInThe\ngrammarOfAPlugin.".split("|")) { + return "unknown|unexpected|invalid_unicode|invalid_ascii|unprintable|unterminated_string|unterminated_comment|unknown_rule".split("|").reduce((a, n, i) => (a[n] = d(s[i]), a), {}); } var parser$1 = {}; var rules = {}; @@ -68850,7 +68870,7 @@ function grammar(jsonic2) { } ], { append: true, delete: [0, 1] }); }); - jsonic2.rule("elem", (rs, p2) => { + jsonic2.rule("elem", (rs, p) => { rs.open([ // Empty commas insert null elements. // Note that close consumes a comma, so b:2 works. @@ -68869,7 +68889,7 @@ function grammar(jsonic2) { }, { s: [KEY, CL], - e: p2.cfg.list.property ? void 0 : (_r, ctx) => ctx.t0, + e: p.cfg.list.property ? void 0 : (_r, ctx) => ctx.t0, p: "val", n: { pk: 1, dmap: 1 }, u: { done: true, pair: true, list: true }, @@ -69129,9 +69149,9 @@ var jsonic = jsonic$1.exports; } (0, utility_12.defprop)(jsonic2, "internal", { value: () => internal }); if (parent) { - for (let k2 in parent) { - if (void 0 === jsonic2[k2]) { - jsonic2[k2] = parent[k2]; + for (let k in parent) { + if (void 0 === jsonic2[k]) { + jsonic2[k] = parent[k]; } } jsonic2.parent = parent; @@ -69214,8 +69234,8 @@ class Vxg { const mm = Jsonic(match2); const ms = Array.isArray(match2) ? match2 : Object.keys(mm).map((x) => mm[x]); let found = null; - for (const m2 of ms) { - const pat = this.config.allow.modify(__spreadValues({}, m2 || {})); + for (const m of ms) { + const pat = this.config.allow.modify(__spreadValues({}, m || {})); found = this.match.allow.find(pat); if (found) { break; diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index 5aec71b..a3d3876 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -57,20 +57,20 @@ var __async = (__this, __arguments, generator) => { }; function _interopNamespaceDefault(e) { - const n2 = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } }); + const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } }); if (e) { - for (const k2 in e) { - if (k2 !== "default") { - const d = Object.getOwnPropertyDescriptor(e, k2); - Object.defineProperty(n2, k2, d.get ? d : { + for (const k in e) { + if (k !== "default") { + const d = Object.getOwnPropertyDescriptor(e, k); + Object.defineProperty(n, k, d.get ? d : { enumerable: true, - get: () => e[k2] + get: () => e[k] }); } } } - n2.default = e; - return Object.freeze(n2); + n.default = e; + return Object.freeze(n); } const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React$1); const ReactDOM__namespace = /* @__PURE__ */ _interopNamespaceDefault(ReactDOM); @@ -78,31 +78,31 @@ var __async = (__this, __arguments, generator) => { function getDefaultExportFromCjs(x) { return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x; } - function getDefaultExportFromNamespaceIfPresent(n2) { - return n2 && Object.prototype.hasOwnProperty.call(n2, "default") ? n2["default"] : n2; + function getDefaultExportFromNamespaceIfPresent(n) { + return n && Object.prototype.hasOwnProperty.call(n, "default") ? n["default"] : n; } - function getDefaultExportFromNamespaceIfNotNamed(n2) { - return n2 && Object.prototype.hasOwnProperty.call(n2, "default") && Object.keys(n2).length === 1 ? n2["default"] : n2; + function getDefaultExportFromNamespaceIfNotNamed(n) { + return n && Object.prototype.hasOwnProperty.call(n, "default") && Object.keys(n).length === 1 ? n["default"] : n; } - function getAugmentedNamespace(n2) { - if (n2.__esModule) return n2; - var f2 = n2.default; - if (typeof f2 == "function") { + function getAugmentedNamespace(n) { + if (n.__esModule) return n; + var f = n.default; + if (typeof f == "function") { var a = function a2() { if (this instanceof a2) { - return Reflect.construct(f2, arguments, this.constructor); + return Reflect.construct(f, arguments, this.constructor); } - return f2.apply(this, arguments); + return f.apply(this, arguments); }; - a.prototype = f2.prototype; + a.prototype = f.prototype; } else a = {}; Object.defineProperty(a, "__esModule", { value: true }); - Object.keys(n2).forEach(function(k2) { - var d = Object.getOwnPropertyDescriptor(n2, k2); - Object.defineProperty(a, k2, d.get ? d : { + Object.keys(n).forEach(function(k) { + var d = Object.getOwnPropertyDescriptor(n, k); + Object.defineProperty(a, k, d.get ? d : { enumerable: true, get: function() { - return n2[k2]; + return n[k]; } }); }); @@ -119,20 +119,26 @@ var __async = (__this, __arguments, generator) => { * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ - "use strict"; - var f = React$1, k = Symbol.for("react.element"), l = Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, n = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: true, ref: true, __self: true, __source: true }; - function q(c, a, g) { - var b, d = {}, e = null, h = null; - void 0 !== g && (e = "" + g); - void 0 !== a.key && (e = "" + a.key); - void 0 !== a.ref && (h = a.ref); - for (b in a) m.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]); - if (c && c.defaultProps) for (b in a = c.defaultProps, a) void 0 === d[b] && (d[b] = a[b]); - return { $$typeof: k, type: c, key: e, ref: h, props: d, _owner: n.current }; - } - var Fragment$1 = reactJsxRuntime_production_min.Fragment = l; - var jsx = reactJsxRuntime_production_min.jsx = q; - var jsxs = reactJsxRuntime_production_min.jsxs = q; + var hasRequiredReactJsxRuntime_production_min; + function requireReactJsxRuntime_production_min() { + if (hasRequiredReactJsxRuntime_production_min) return reactJsxRuntime_production_min; + hasRequiredReactJsxRuntime_production_min = 1; + "use strict"; + var f = React$1, k = Symbol.for("react.element"), l = Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, n = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: true, ref: true, __self: true, __source: true }; + function q(c, a, g) { + var b, d = {}, e = null, h = null; + void 0 !== g && (e = "" + g); + void 0 !== a.key && (e = "" + a.key); + void 0 !== a.ref && (h = a.ref); + for (b in a) m.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]); + if (c && c.defaultProps) for (b in a = c.defaultProps, a) void 0 === d[b] && (d[b] = a[b]); + return { $$typeof: k, type: c, key: e, ref: h, props: d, _owner: n.current }; + } + reactJsxRuntime_production_min.Fragment = l; + reactJsxRuntime_production_min.jsx = q; + reactJsxRuntime_production_min.jsxs = q; + return reactJsxRuntime_production_min; + } var reactJsxRuntime_development = {}; /** * @license React @@ -143,905 +149,914 @@ var __async = (__this, __arguments, generator) => { * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ - var jsxs_1; - var jsx_1; - var Fragment; - "use strict"; - if (process.env.NODE_ENV !== "production") { - (function() { - "use strict"; - var React2 = React$1; - var REACT_ELEMENT_TYPE = Symbol.for("react.element"); - var REACT_PORTAL_TYPE = Symbol.for("react.portal"); - var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); - var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"); - var REACT_PROFILER_TYPE = Symbol.for("react.profiler"); - var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); - var REACT_CONTEXT_TYPE = Symbol.for("react.context"); - var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"); - var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"); - var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"); - var REACT_MEMO_TYPE = Symbol.for("react.memo"); - var REACT_LAZY_TYPE = Symbol.for("react.lazy"); - var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"); - var MAYBE_ITERATOR_SYMBOL = Symbol.iterator; - var FAUX_ITERATOR_SYMBOL = "@@iterator"; - function getIteratorFn(maybeIterable) { - if (maybeIterable === null || typeof maybeIterable !== "object") { + var hasRequiredReactJsxRuntime_development; + function requireReactJsxRuntime_development() { + if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development; + hasRequiredReactJsxRuntime_development = 1; + "use strict"; + if (process.env.NODE_ENV !== "production") { + (function() { + "use strict"; + var React2 = React$1; + var REACT_ELEMENT_TYPE = Symbol.for("react.element"); + var REACT_PORTAL_TYPE = Symbol.for("react.portal"); + var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); + var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"); + var REACT_PROFILER_TYPE = Symbol.for("react.profiler"); + var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); + var REACT_CONTEXT_TYPE = Symbol.for("react.context"); + var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"); + var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"); + var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"); + var REACT_MEMO_TYPE = Symbol.for("react.memo"); + var REACT_LAZY_TYPE = Symbol.for("react.lazy"); + var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"); + var MAYBE_ITERATOR_SYMBOL = Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = "@@iterator"; + function getIteratorFn(maybeIterable) { + if (maybeIterable === null || typeof maybeIterable !== "object") { + return null; + } + var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; + if (typeof maybeIterator === "function") { + return maybeIterator; + } return null; } - var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; - if (typeof maybeIterator === "function") { - return maybeIterator; - } - return null; - } - var ReactSharedInternals = React2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; - function error(format) { - { + var ReactSharedInternals = React2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; + function error(format) { { - for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { - args[_key2 - 1] = arguments[_key2]; + { + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; + } + printWarning("error", format, args); } - printWarning("error", format, args); } } - } - function printWarning(level, format, args) { - { - var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame2.getStackAddendum(); - if (stack !== "") { - format += "%s"; - args = args.concat([stack]); + function printWarning(level, format, args) { + { + var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame; + var stack = ReactDebugCurrentFrame2.getStackAddendum(); + if (stack !== "") { + format += "%s"; + args = args.concat([stack]); + } + var argsWithFormat = args.map(function(item) { + return String(item); + }); + argsWithFormat.unshift("Warning: " + format); + Function.prototype.apply.call(console[level], console, argsWithFormat); } - var argsWithFormat = args.map(function(item) { - return String(item); - }); - argsWithFormat.unshift("Warning: " + format); - Function.prototype.apply.call(console[level], console, argsWithFormat); } - } - var enableScopeAPI = false; - var enableCacheElement = false; - var enableTransitionTracing = false; - var enableLegacyHidden = false; - var enableDebugTracing = false; - var REACT_MODULE_REFERENCE; - { - REACT_MODULE_REFERENCE = Symbol.for("react.module.reference"); - } - function isValidElementType(type) { - if (typeof type === "string" || typeof type === "function") { - return true; - } - if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) { - return true; + var enableScopeAPI = false; + var enableCacheElement = false; + var enableTransitionTracing = false; + var enableLegacyHidden = false; + var enableDebugTracing = false; + var REACT_MODULE_REFERENCE; + { + REACT_MODULE_REFERENCE = Symbol.for("react.module.reference"); } - if (typeof type === "object" && type !== null) { - if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object - // types supported by any Flight configuration anywhere since - // we don't know which Flight build this will end up being used - // with. - type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) { + function isValidElementType(type) { + if (typeof type === "string" || typeof type === "function") { return true; } + if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) { + return true; + } + if (typeof type === "object" && type !== null) { + if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object + // types supported by any Flight configuration anywhere since + // we don't know which Flight build this will end up being used + // with. + type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) { + return true; + } + } + return false; } - return false; - } - function getWrappedName2(outerType, innerType, wrapperName) { - var displayName = outerType.displayName; - if (displayName) { - return displayName; + function getWrappedName2(outerType, innerType, wrapperName) { + var displayName = outerType.displayName; + if (displayName) { + return displayName; + } + var functionName = innerType.displayName || innerType.name || ""; + return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName; } - var functionName = innerType.displayName || innerType.name || ""; - return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName; - } - function getContextName(type) { - return type.displayName || "Context"; - } - function getComponentNameFromType(type) { - if (type == null) { - return null; + function getContextName(type) { + return type.displayName || "Context"; } - { - if (typeof type.tag === "number") { - error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."); + function getComponentNameFromType(type) { + if (type == null) { + return null; + } + { + if (typeof type.tag === "number") { + error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."); + } } + if (typeof type === "function") { + return type.displayName || type.name || null; + } + if (typeof type === "string") { + return type; + } + switch (type) { + case REACT_FRAGMENT_TYPE: + return "Fragment"; + case REACT_PORTAL_TYPE: + return "Portal"; + case REACT_PROFILER_TYPE: + return "Profiler"; + case REACT_STRICT_MODE_TYPE: + return "StrictMode"; + case REACT_SUSPENSE_TYPE: + return "Suspense"; + case REACT_SUSPENSE_LIST_TYPE: + return "SuspenseList"; + } + if (typeof type === "object") { + switch (type.$$typeof) { + case REACT_CONTEXT_TYPE: + var context = type; + return getContextName(context) + ".Consumer"; + case REACT_PROVIDER_TYPE: + var provider = type; + return getContextName(provider._context) + ".Provider"; + case REACT_FORWARD_REF_TYPE: + return getWrappedName2(type, type.render, "ForwardRef"); + case REACT_MEMO_TYPE: + var outerName = type.displayName || null; + if (outerName !== null) { + return outerName; + } + return getComponentNameFromType(type.type) || "Memo"; + case REACT_LAZY_TYPE: { + var lazyComponent = type; + var payload = lazyComponent._payload; + var init2 = lazyComponent._init; + try { + return getComponentNameFromType(init2(payload)); + } catch (x) { + return null; + } + } + } + } + return null; } - if (typeof type === "function") { - return type.displayName || type.name || null; + var assign2 = Object.assign; + var disabledDepth = 0; + var prevLog; + var prevInfo; + var prevWarn; + var prevError; + var prevGroup; + var prevGroupCollapsed; + var prevGroupEnd; + function disabledLog() { + } + disabledLog.__reactDisabledLog = true; + function disableLogs() { + { + if (disabledDepth === 0) { + prevLog = console.log; + prevInfo = console.info; + prevWarn = console.warn; + prevError = console.error; + prevGroup = console.group; + prevGroupCollapsed = console.groupCollapsed; + prevGroupEnd = console.groupEnd; + var props = { + configurable: true, + enumerable: true, + value: disabledLog, + writable: true + }; + Object.defineProperties(console, { + info: props, + log: props, + warn: props, + error: props, + group: props, + groupCollapsed: props, + groupEnd: props + }); + } + disabledDepth++; + } } - if (typeof type === "string") { - return type; + function reenableLogs() { + { + disabledDepth--; + if (disabledDepth === 0) { + var props = { + configurable: true, + enumerable: true, + writable: true + }; + Object.defineProperties(console, { + log: assign2({}, props, { + value: prevLog + }), + info: assign2({}, props, { + value: prevInfo + }), + warn: assign2({}, props, { + value: prevWarn + }), + error: assign2({}, props, { + value: prevError + }), + group: assign2({}, props, { + value: prevGroup + }), + groupCollapsed: assign2({}, props, { + value: prevGroupCollapsed + }), + groupEnd: assign2({}, props, { + value: prevGroupEnd + }) + }); + } + if (disabledDepth < 0) { + error("disabledDepth fell below zero. This is a bug in React. Please file an issue."); + } + } } - switch (type) { - case REACT_FRAGMENT_TYPE: - return "Fragment"; - case REACT_PORTAL_TYPE: - return "Portal"; - case REACT_PROFILER_TYPE: - return "Profiler"; - case REACT_STRICT_MODE_TYPE: - return "StrictMode"; - case REACT_SUSPENSE_TYPE: - return "Suspense"; - case REACT_SUSPENSE_LIST_TYPE: - return "SuspenseList"; - } - if (typeof type === "object") { - switch (type.$$typeof) { - case REACT_CONTEXT_TYPE: - var context = type; - return getContextName(context) + ".Consumer"; - case REACT_PROVIDER_TYPE: - var provider = type; - return getContextName(provider._context) + ".Provider"; - case REACT_FORWARD_REF_TYPE: - return getWrappedName2(type, type.render, "ForwardRef"); - case REACT_MEMO_TYPE: - var outerName = type.displayName || null; - if (outerName !== null) { - return outerName; - } - return getComponentNameFromType(type.type) || "Memo"; - case REACT_LAZY_TYPE: { - var lazyComponent = type; - var payload = lazyComponent._payload; - var init2 = lazyComponent._init; + var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; + var prefix2; + function describeBuiltInComponentFrame(name, source, ownerFn) { + { + if (prefix2 === void 0) { try { - return getComponentNameFromType(init2(payload)); + throw Error(); } catch (x) { - return null; + var match2 = x.stack.trim().match(/\n( *(at )?)/); + prefix2 = match2 && match2[1] || ""; } } + return "\n" + prefix2 + name; } } - return null; - } - var assign2 = Object.assign; - var disabledDepth = 0; - var prevLog; - var prevInfo; - var prevWarn; - var prevError; - var prevGroup; - var prevGroupCollapsed; - var prevGroupEnd; - function disabledLog() { - } - disabledLog.__reactDisabledLog = true; - function disableLogs() { + var reentry = false; + var componentFrameCache; { - if (disabledDepth === 0) { - prevLog = console.log; - prevInfo = console.info; - prevWarn = console.warn; - prevError = console.error; - prevGroup = console.group; - prevGroupCollapsed = console.groupCollapsed; - prevGroupEnd = console.groupEnd; - var props = { - configurable: true, - enumerable: true, - value: disabledLog, - writable: true - }; - Object.defineProperties(console, { - info: props, - log: props, - warn: props, - error: props, - group: props, - groupCollapsed: props, - groupEnd: props - }); - } - disabledDepth++; + var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map; + componentFrameCache = new PossiblyWeakMap(); } - } - function reenableLogs() { - { - disabledDepth--; - if (disabledDepth === 0) { - var props = { - configurable: true, - enumerable: true, - writable: true - }; - Object.defineProperties(console, { - log: assign2({}, props, { - value: prevLog - }), - info: assign2({}, props, { - value: prevInfo - }), - warn: assign2({}, props, { - value: prevWarn - }), - error: assign2({}, props, { - value: prevError - }), - group: assign2({}, props, { - value: prevGroup - }), - groupCollapsed: assign2({}, props, { - value: prevGroupCollapsed - }), - groupEnd: assign2({}, props, { - value: prevGroupEnd - }) - }); - } - if (disabledDepth < 0) { - error("disabledDepth fell below zero. This is a bug in React. Please file an issue."); + function describeNativeComponentFrame(fn, construct) { + if (!fn || reentry) { + return ""; } - } - } - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; - var prefix2; - function describeBuiltInComponentFrame(name, source, ownerFn) { - { - if (prefix2 === void 0) { - try { - throw Error(); - } catch (x) { - var match2 = x.stack.trim().match(/\n( *(at )?)/); - prefix2 = match2 && match2[1] || ""; + { + var frame = componentFrameCache.get(fn); + if (frame !== void 0) { + return frame; } } - return "\n" + prefix2 + name; - } - } - var reentry = false; - var componentFrameCache; - { - var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map; - componentFrameCache = new PossiblyWeakMap(); - } - function describeNativeComponentFrame(fn, construct) { - if (!fn || reentry) { - return ""; - } - { - var frame = componentFrameCache.get(fn); - if (frame !== void 0) { - return frame; + var control; + reentry = true; + var previousPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + var previousDispatcher; + { + previousDispatcher = ReactCurrentDispatcher.current; + ReactCurrentDispatcher.current = null; + disableLogs(); } - } - var control; - reentry = true; - var previousPrepareStackTrace = Error.prepareStackTrace; - Error.prepareStackTrace = void 0; - var previousDispatcher; - { - previousDispatcher = ReactCurrentDispatcher.current; - ReactCurrentDispatcher.current = null; - disableLogs(); - } - try { - if (construct) { - var Fake = function() { - throw Error(); - }; - Object.defineProperty(Fake.prototype, "props", { - set: function() { + try { + if (construct) { + var Fake = function() { throw Error(); + }; + Object.defineProperty(Fake.prototype, "props", { + set: function() { + throw Error(); + } + }); + if (typeof Reflect === "object" && Reflect.construct) { + try { + Reflect.construct(Fake, []); + } catch (x) { + control = x; + } + Reflect.construct(fn, [], Fake); + } else { + try { + Fake.call(); + } catch (x) { + control = x; + } + fn.call(Fake.prototype); } - }); - if (typeof Reflect === "object" && Reflect.construct) { - try { - Reflect.construct(Fake, []); - } catch (x) { - control = x; - } - Reflect.construct(fn, [], Fake); } else { try { - Fake.call(); + throw Error(); } catch (x) { control = x; } - fn.call(Fake.prototype); - } - } else { - try { - throw Error(); - } catch (x) { - control = x; - } - fn(); - } - } catch (sample) { - if (sample && control && typeof sample.stack === "string") { - var sampleLines = sample.stack.split("\n"); - var controlLines = control.stack.split("\n"); - var s = sampleLines.length - 1; - var c = controlLines.length - 1; - while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { - c--; + fn(); } - for (; s >= 1 && c >= 0; s--, c--) { - if (sampleLines[s] !== controlLines[c]) { - if (s !== 1 || c !== 1) { - do { - s--; - c--; - if (c < 0 || sampleLines[s] !== controlLines[c]) { - var _frame = "\n" + sampleLines[s].replace(" at new ", " at "); - if (fn.displayName && _frame.includes("")) { - _frame = _frame.replace("", fn.displayName); - } - { - if (typeof fn === "function") { - componentFrameCache.set(fn, _frame); + } catch (sample) { + if (sample && control && typeof sample.stack === "string") { + var sampleLines = sample.stack.split("\n"); + var controlLines = control.stack.split("\n"); + var s = sampleLines.length - 1; + var c = controlLines.length - 1; + while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { + c--; + } + for (; s >= 1 && c >= 0; s--, c--) { + if (sampleLines[s] !== controlLines[c]) { + if (s !== 1 || c !== 1) { + do { + s--; + c--; + if (c < 0 || sampleLines[s] !== controlLines[c]) { + var _frame = "\n" + sampleLines[s].replace(" at new ", " at "); + if (fn.displayName && _frame.includes("")) { + _frame = _frame.replace("", fn.displayName); + } + { + if (typeof fn === "function") { + componentFrameCache.set(fn, _frame); + } } + return _frame; } - return _frame; - } - } while (s >= 1 && c >= 0); + } while (s >= 1 && c >= 0); + } + break; } - break; } } + } finally { + reentry = false; + { + ReactCurrentDispatcher.current = previousDispatcher; + reenableLogs(); + } + Error.prepareStackTrace = previousPrepareStackTrace; } - } finally { - reentry = false; + var name = fn ? fn.displayName || fn.name : ""; + var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ""; { - ReactCurrentDispatcher.current = previousDispatcher; - reenableLogs(); - } - Error.prepareStackTrace = previousPrepareStackTrace; - } - var name = fn ? fn.displayName || fn.name : ""; - var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ""; - { - if (typeof fn === "function") { - componentFrameCache.set(fn, syntheticFrame); + if (typeof fn === "function") { + componentFrameCache.set(fn, syntheticFrame); + } } + return syntheticFrame; } - return syntheticFrame; - } - function describeFunctionComponentFrame(fn, source, ownerFn) { - { - return describeNativeComponentFrame(fn, false); - } - } - function shouldConstruct(Component) { - var prototype = Component.prototype; - return !!(prototype && prototype.isReactComponent); - } - function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { - if (type == null) { - return ""; - } - if (typeof type === "function") { + function describeFunctionComponentFrame(fn, source, ownerFn) { { - return describeNativeComponentFrame(type, shouldConstruct(type)); + return describeNativeComponentFrame(fn, false); } } - if (typeof type === "string") { - return describeBuiltInComponentFrame(type); + function shouldConstruct(Component) { + var prototype = Component.prototype; + return !!(prototype && prototype.isReactComponent); } - switch (type) { - case REACT_SUSPENSE_TYPE: - return describeBuiltInComponentFrame("Suspense"); - case REACT_SUSPENSE_LIST_TYPE: - return describeBuiltInComponentFrame("SuspenseList"); - } - if (typeof type === "object") { - switch (type.$$typeof) { - case REACT_FORWARD_REF_TYPE: - return describeFunctionComponentFrame(type.render); - case REACT_MEMO_TYPE: - return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn); - case REACT_LAZY_TYPE: { - var lazyComponent = type; - var payload = lazyComponent._payload; - var init2 = lazyComponent._init; - try { - return describeUnknownElementTypeFrameInDEV(init2(payload), source, ownerFn); - } catch (x) { + function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { + if (type == null) { + return ""; + } + if (typeof type === "function") { + { + return describeNativeComponentFrame(type, shouldConstruct(type)); + } + } + if (typeof type === "string") { + return describeBuiltInComponentFrame(type); + } + switch (type) { + case REACT_SUSPENSE_TYPE: + return describeBuiltInComponentFrame("Suspense"); + case REACT_SUSPENSE_LIST_TYPE: + return describeBuiltInComponentFrame("SuspenseList"); + } + if (typeof type === "object") { + switch (type.$$typeof) { + case REACT_FORWARD_REF_TYPE: + return describeFunctionComponentFrame(type.render); + case REACT_MEMO_TYPE: + return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn); + case REACT_LAZY_TYPE: { + var lazyComponent = type; + var payload = lazyComponent._payload; + var init2 = lazyComponent._init; + try { + return describeUnknownElementTypeFrameInDEV(init2(payload), source, ownerFn); + } catch (x) { + } } } } + return ""; } - return ""; - } - var hasOwnProperty = Object.prototype.hasOwnProperty; - var loggedTypeFailures = {}; - var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; - function setCurrentlyValidatingElement(element) { - { - if (element) { - var owner = element._owner; - var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); - ReactDebugCurrentFrame.setExtraStackFrame(stack); - } else { - ReactDebugCurrentFrame.setExtraStackFrame(null); + var hasOwnProperty = Object.prototype.hasOwnProperty; + var loggedTypeFailures = {}; + var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + function setCurrentlyValidatingElement(element) { + { + if (element) { + var owner = element._owner; + var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); + ReactDebugCurrentFrame.setExtraStackFrame(stack); + } else { + ReactDebugCurrentFrame.setExtraStackFrame(null); + } } } - } - function checkPropTypes(typeSpecs, values2, location, componentName, element) { - { - var has2 = Function.call.bind(hasOwnProperty); - for (var typeSpecName in typeSpecs) { - if (has2(typeSpecs, typeSpecName)) { - var error$1 = void 0; - try { - if (typeof typeSpecs[typeSpecName] !== "function") { - var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); - err.name = "Invariant Violation"; - throw err; + function checkPropTypes(typeSpecs, values2, location, componentName, element) { + { + var has2 = Function.call.bind(hasOwnProperty); + for (var typeSpecName in typeSpecs) { + if (has2(typeSpecs, typeSpecName)) { + var error$1 = void 0; + try { + if (typeof typeSpecs[typeSpecName] !== "function") { + var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); + err.name = "Invariant Violation"; + throw err; + } + error$1 = typeSpecs[typeSpecName](values2, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); + } catch (ex) { + error$1 = ex; + } + if (error$1 && !(error$1 instanceof Error)) { + setCurrentlyValidatingElement(element); + error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1); + setCurrentlyValidatingElement(null); + } + if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) { + loggedTypeFailures[error$1.message] = true; + setCurrentlyValidatingElement(element); + error("Failed %s type: %s", location, error$1.message); + setCurrentlyValidatingElement(null); } - error$1 = typeSpecs[typeSpecName](values2, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); - } catch (ex) { - error$1 = ex; - } - if (error$1 && !(error$1 instanceof Error)) { - setCurrentlyValidatingElement(element); - error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1); - setCurrentlyValidatingElement(null); - } - if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) { - loggedTypeFailures[error$1.message] = true; - setCurrentlyValidatingElement(element); - error("Failed %s type: %s", location, error$1.message); - setCurrentlyValidatingElement(null); } } } } - } - var isArrayImpl = Array.isArray; - function isArray(a) { - return isArrayImpl(a); - } - function typeName(value) { - { - var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag; - var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object"; - return type; - } - } - function willCoercionThrow(value) { - { - try { - testStringCoercion(value); - return false; - } catch (e) { - return true; - } + var isArrayImpl = Array.isArray; + function isArray(a) { + return isArrayImpl(a); } - } - function testStringCoercion(value) { - return "" + value; - } - function checkKeyStringCoercion(value) { - { - if (willCoercionThrow(value)) { - error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value)); - return testStringCoercion(value); + function typeName(value) { + { + var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag; + var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object"; + return type; } } - } - var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; - var RESERVED_PROPS = { - key: true, - ref: true, - __self: true, - __source: true - }; - var specialPropKeyWarningShown; - var specialPropRefWarningShown; - var didWarnAboutStringRefs; - { - didWarnAboutStringRefs = {}; - } - function hasValidRef(config2) { - { - if (hasOwnProperty.call(config2, "ref")) { - var getter = Object.getOwnPropertyDescriptor(config2, "ref").get; - if (getter && getter.isReactWarning) { + function willCoercionThrow(value) { + { + try { + testStringCoercion(value); return false; + } catch (e) { + return true; } } } - return config2.ref !== void 0; - } - function hasValidKey(config2) { - { - if (hasOwnProperty.call(config2, "key")) { - var getter = Object.getOwnPropertyDescriptor(config2, "key").get; - if (getter && getter.isReactWarning) { - return false; + function testStringCoercion(value) { + return "" + value; + } + function checkKeyStringCoercion(value) { + { + if (willCoercionThrow(value)) { + error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value)); + return testStringCoercion(value); } } } - return config2.key !== void 0; - } - function warnIfStringRefCannotBeAutoConverted(config2, self2) { + var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; + var RESERVED_PROPS = { + key: true, + ref: true, + __self: true, + __source: true + }; + var specialPropKeyWarningShown; + var specialPropRefWarningShown; + var didWarnAboutStringRefs; { - if (typeof config2.ref === "string" && ReactCurrentOwner.current && self2 && ReactCurrentOwner.current.stateNode !== self2) { - var componentName = getComponentNameFromType(ReactCurrentOwner.current.type); - if (!didWarnAboutStringRefs[componentName]) { - error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config2.ref); - didWarnAboutStringRefs[componentName] = true; + didWarnAboutStringRefs = {}; + } + function hasValidRef(config2) { + { + if (hasOwnProperty.call(config2, "ref")) { + var getter = Object.getOwnPropertyDescriptor(config2, "ref").get; + if (getter && getter.isReactWarning) { + return false; + } } } + return config2.ref !== void 0; } - } - function defineKeyPropWarningGetter(props, displayName) { - { - var warnAboutAccessingKey = function() { - if (!specialPropKeyWarningShown) { - specialPropKeyWarningShown = true; - error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); + function hasValidKey(config2) { + { + if (hasOwnProperty.call(config2, "key")) { + var getter = Object.getOwnPropertyDescriptor(config2, "key").get; + if (getter && getter.isReactWarning) { + return false; + } } - }; - warnAboutAccessingKey.isReactWarning = true; - Object.defineProperty(props, "key", { - get: warnAboutAccessingKey, - configurable: true - }); + } + return config2.key !== void 0; } - } - function defineRefPropWarningGetter(props, displayName) { - { - var warnAboutAccessingRef = function() { - if (!specialPropRefWarningShown) { - specialPropRefWarningShown = true; - error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); + function warnIfStringRefCannotBeAutoConverted(config2, self2) { + { + if (typeof config2.ref === "string" && ReactCurrentOwner.current && self2 && ReactCurrentOwner.current.stateNode !== self2) { + var componentName = getComponentNameFromType(ReactCurrentOwner.current.type); + if (!didWarnAboutStringRefs[componentName]) { + error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config2.ref); + didWarnAboutStringRefs[componentName] = true; + } } - }; - warnAboutAccessingRef.isReactWarning = true; - Object.defineProperty(props, "ref", { - get: warnAboutAccessingRef, - configurable: true - }); + } } - } - var ReactElement = function(type, key, ref, self2, source, owner, props) { - var element = { - // This tag allows us to uniquely identify this as a React Element - $$typeof: REACT_ELEMENT_TYPE, - // Built-in properties that belong on the element - type, - key, - ref, - props, - // Record the component responsible for creating this element. - _owner: owner - }; - { - element._store = {}; - Object.defineProperty(element._store, "validated", { - configurable: false, - enumerable: false, - writable: true, - value: false - }); - Object.defineProperty(element, "_self", { - configurable: false, - enumerable: false, - writable: false, - value: self2 - }); - Object.defineProperty(element, "_source", { - configurable: false, - enumerable: false, - writable: false, - value: source - }); - if (Object.freeze) { - Object.freeze(element.props); - Object.freeze(element); + function defineKeyPropWarningGetter(props, displayName) { + { + var warnAboutAccessingKey = function() { + if (!specialPropKeyWarningShown) { + specialPropKeyWarningShown = true; + error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); + } + }; + warnAboutAccessingKey.isReactWarning = true; + Object.defineProperty(props, "key", { + get: warnAboutAccessingKey, + configurable: true + }); } } - return element; - }; - function jsxDEV(type, config2, maybeKey, source, self2) { - { - var propName; - var props = {}; - var key = null; - var ref = null; - if (maybeKey !== void 0) { - { - checkKeyStringCoercion(maybeKey); - } - key = "" + maybeKey; + function defineRefPropWarningGetter(props, displayName) { + { + var warnAboutAccessingRef = function() { + if (!specialPropRefWarningShown) { + specialPropRefWarningShown = true; + error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); + } + }; + warnAboutAccessingRef.isReactWarning = true; + Object.defineProperty(props, "ref", { + get: warnAboutAccessingRef, + configurable: true + }); } - if (hasValidKey(config2)) { - { - checkKeyStringCoercion(config2.key); + } + var ReactElement = function(type, key, ref, self2, source, owner, props) { + var element = { + // This tag allows us to uniquely identify this as a React Element + $$typeof: REACT_ELEMENT_TYPE, + // Built-in properties that belong on the element + type, + key, + ref, + props, + // Record the component responsible for creating this element. + _owner: owner + }; + { + element._store = {}; + Object.defineProperty(element._store, "validated", { + configurable: false, + enumerable: false, + writable: true, + value: false + }); + Object.defineProperty(element, "_self", { + configurable: false, + enumerable: false, + writable: false, + value: self2 + }); + Object.defineProperty(element, "_source", { + configurable: false, + enumerable: false, + writable: false, + value: source + }); + if (Object.freeze) { + Object.freeze(element.props); + Object.freeze(element); } - key = "" + config2.key; } - if (hasValidRef(config2)) { - ref = config2.ref; - warnIfStringRefCannotBeAutoConverted(config2, self2); - } - for (propName in config2) { - if (hasOwnProperty.call(config2, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { - props[propName] = config2[propName]; + return element; + }; + function jsxDEV(type, config2, maybeKey, source, self2) { + { + var propName; + var props = {}; + var key = null; + var ref = null; + if (maybeKey !== void 0) { + { + checkKeyStringCoercion(maybeKey); + } + key = "" + maybeKey; } - } - if (type && type.defaultProps) { - var defaultProps2 = type.defaultProps; - for (propName in defaultProps2) { - if (props[propName] === void 0) { - props[propName] = defaultProps2[propName]; + if (hasValidKey(config2)) { + { + checkKeyStringCoercion(config2.key); } + key = "" + config2.key; } - } - if (key || ref) { - var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type; - if (key) { - defineKeyPropWarningGetter(props, displayName); + if (hasValidRef(config2)) { + ref = config2.ref; + warnIfStringRefCannotBeAutoConverted(config2, self2); } - if (ref) { - defineRefPropWarningGetter(props, displayName); + for (propName in config2) { + if (hasOwnProperty.call(config2, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + props[propName] = config2[propName]; + } + } + if (type && type.defaultProps) { + var defaultProps2 = type.defaultProps; + for (propName in defaultProps2) { + if (props[propName] === void 0) { + props[propName] = defaultProps2[propName]; + } + } + } + if (key || ref) { + var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type; + if (key) { + defineKeyPropWarningGetter(props, displayName); + } + if (ref) { + defineRefPropWarningGetter(props, displayName); + } } + return ReactElement(type, key, ref, self2, source, ReactCurrentOwner.current, props); } - return ReactElement(type, key, ref, self2, source, ReactCurrentOwner.current, props); } - } - var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner; - var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; - function setCurrentlyValidatingElement$1(element) { - { - if (element) { - var owner = element._owner; - var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); - ReactDebugCurrentFrame$1.setExtraStackFrame(stack); - } else { - ReactDebugCurrentFrame$1.setExtraStackFrame(null); + var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner; + var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; + function setCurrentlyValidatingElement$1(element) { + { + if (element) { + var owner = element._owner; + var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); + ReactDebugCurrentFrame$1.setExtraStackFrame(stack); + } else { + ReactDebugCurrentFrame$1.setExtraStackFrame(null); + } } } - } - var propTypesMisspellWarningShown; - { - propTypesMisspellWarningShown = false; - } - function isValidElement(object) { + var propTypesMisspellWarningShown; { - return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; + propTypesMisspellWarningShown = false; } - } - function getDeclarationErrorAddendum() { - { - if (ReactCurrentOwner$1.current) { - var name = getComponentNameFromType(ReactCurrentOwner$1.current.type); - if (name) { - return "\n\nCheck the render method of `" + name + "`."; - } + function isValidElement(object) { + { + return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; } - return ""; } - } - function getSourceInfoErrorAddendum(source) { - { - if (source !== void 0) { - var fileName = source.fileName.replace(/^.*[\\\/]/, ""); - var lineNumber = source.lineNumber; - return "\n\nCheck your code at " + fileName + ":" + lineNumber + "."; + function getDeclarationErrorAddendum() { + { + if (ReactCurrentOwner$1.current) { + var name = getComponentNameFromType(ReactCurrentOwner$1.current.type); + if (name) { + return "\n\nCheck the render method of `" + name + "`."; + } + } + return ""; } - return ""; } - } - var ownerHasKeyUseWarning = {}; - function getCurrentComponentErrorInfo(parentType) { - { - var info = getDeclarationErrorAddendum(); - if (!info) { - var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name; - if (parentName) { - info = "\n\nCheck the top-level render call using <" + parentName + ">."; + function getSourceInfoErrorAddendum(source) { + { + if (source !== void 0) { + var fileName = source.fileName.replace(/^.*[\\\/]/, ""); + var lineNumber = source.lineNumber; + return "\n\nCheck your code at " + fileName + ":" + lineNumber + "."; } + return ""; } - return info; } - } - function validateExplicitKey(element, parentType) { - { - if (!element._store || element._store.validated || element.key != null) { - return; - } - element._store.validated = true; - var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); - if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { - return; - } - ownerHasKeyUseWarning[currentComponentErrorInfo] = true; - var childOwner = ""; - if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) { - childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + "."; + var ownerHasKeyUseWarning = {}; + function getCurrentComponentErrorInfo(parentType) { + { + var info = getDeclarationErrorAddendum(); + if (!info) { + var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name; + if (parentName) { + info = "\n\nCheck the top-level render call using <" + parentName + ">."; + } + } + return info; } - setCurrentlyValidatingElement$1(element); - error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner); - setCurrentlyValidatingElement$1(null); } - } - function validateChildKeys(node2, parentType) { - { - if (typeof node2 !== "object") { - return; - } - if (isArray(node2)) { - for (var i = 0; i < node2.length; i++) { - var child = node2[i]; - if (isValidElement(child)) { - validateExplicitKey(child, parentType); - } + function validateExplicitKey(element, parentType) { + { + if (!element._store || element._store.validated || element.key != null) { + return; } - } else if (isValidElement(node2)) { - if (node2._store) { - node2._store.validated = true; + element._store.validated = true; + var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); + if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { + return; } - } else if (node2) { - var iteratorFn = getIteratorFn(node2); - if (typeof iteratorFn === "function") { - if (iteratorFn !== node2.entries) { - var iterator = iteratorFn.call(node2); - var step; - while (!(step = iterator.next()).done) { - if (isValidElement(step.value)) { - validateExplicitKey(step.value, parentType); + ownerHasKeyUseWarning[currentComponentErrorInfo] = true; + var childOwner = ""; + if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) { + childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + "."; + } + setCurrentlyValidatingElement$1(element); + error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner); + setCurrentlyValidatingElement$1(null); + } + } + function validateChildKeys(node2, parentType) { + { + if (typeof node2 !== "object") { + return; + } + if (isArray(node2)) { + for (var i = 0; i < node2.length; i++) { + var child = node2[i]; + if (isValidElement(child)) { + validateExplicitKey(child, parentType); + } + } + } else if (isValidElement(node2)) { + if (node2._store) { + node2._store.validated = true; + } + } else if (node2) { + var iteratorFn = getIteratorFn(node2); + if (typeof iteratorFn === "function") { + if (iteratorFn !== node2.entries) { + var iterator = iteratorFn.call(node2); + var step; + while (!(step = iterator.next()).done) { + if (isValidElement(step.value)) { + validateExplicitKey(step.value, parentType); + } } } } } } } - } - function validatePropTypes(element) { - { - var type = element.type; - if (type === null || type === void 0 || typeof type === "string") { - return; - } - var propTypes2; - if (typeof type === "function") { - propTypes2 = type.propTypes; - } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here. - // Inner props are checked in the reconciler. - type.$$typeof === REACT_MEMO_TYPE)) { - propTypes2 = type.propTypes; - } else { - return; - } - if (propTypes2) { - var name = getComponentNameFromType(type); - checkPropTypes(propTypes2, element.props, "prop", name, element); - } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) { - propTypesMisspellWarningShown = true; - var _name = getComponentNameFromType(type); - error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown"); - } - if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) { - error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); + function validatePropTypes(element) { + { + var type = element.type; + if (type === null || type === void 0 || typeof type === "string") { + return; + } + var propTypes2; + if (typeof type === "function") { + propTypes2 = type.propTypes; + } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here. + // Inner props are checked in the reconciler. + type.$$typeof === REACT_MEMO_TYPE)) { + propTypes2 = type.propTypes; + } else { + return; + } + if (propTypes2) { + var name = getComponentNameFromType(type); + checkPropTypes(propTypes2, element.props, "prop", name, element); + } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) { + propTypesMisspellWarningShown = true; + var _name = getComponentNameFromType(type); + error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown"); + } + if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) { + error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); + } } } - } - function validateFragmentProps(fragment) { - { - var keys = Object.keys(fragment.props); - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - if (key !== "children" && key !== "key") { + function validateFragmentProps(fragment) { + { + var keys = Object.keys(fragment.props); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (key !== "children" && key !== "key") { + setCurrentlyValidatingElement$1(fragment); + error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key); + setCurrentlyValidatingElement$1(null); + break; + } + } + if (fragment.ref !== null) { setCurrentlyValidatingElement$1(fragment); - error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key); + error("Invalid attribute `ref` supplied to `React.Fragment`."); setCurrentlyValidatingElement$1(null); - break; } } - if (fragment.ref !== null) { - setCurrentlyValidatingElement$1(fragment); - error("Invalid attribute `ref` supplied to `React.Fragment`."); - setCurrentlyValidatingElement$1(null); - } } - } - var didWarnAboutKeySpread = {}; - function jsxWithValidation(type, props, key, isStaticChildren, source, self2) { - { - var validType = isValidElementType(type); - if (!validType) { - var info = ""; - if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) { - info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."; - } - var sourceInfo = getSourceInfoErrorAddendum(source); - if (sourceInfo) { - info += sourceInfo; - } else { - info += getDeclarationErrorAddendum(); + var didWarnAboutKeySpread = {}; + function jsxWithValidation(type, props, key, isStaticChildren, source, self2) { + { + var validType = isValidElementType(type); + if (!validType) { + var info = ""; + if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) { + info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."; + } + var sourceInfo = getSourceInfoErrorAddendum(source); + if (sourceInfo) { + info += sourceInfo; + } else { + info += getDeclarationErrorAddendum(); + } + var typeString; + if (type === null) { + typeString = "null"; + } else if (isArray(type)) { + typeString = "array"; + } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) { + typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />"; + info = " Did you accidentally export a JSX literal instead of a component?"; + } else { + typeString = typeof type; + } + error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info); } - var typeString; - if (type === null) { - typeString = "null"; - } else if (isArray(type)) { - typeString = "array"; - } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) { - typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />"; - info = " Did you accidentally export a JSX literal instead of a component?"; - } else { - typeString = typeof type; + var element = jsxDEV(type, props, key, source, self2); + if (element == null) { + return element; } - error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info); - } - var element = jsxDEV(type, props, key, source, self2); - if (element == null) { - return element; - } - if (validType) { - var children = props.children; - if (children !== void 0) { - if (isStaticChildren) { - if (isArray(children)) { - for (var i = 0; i < children.length; i++) { - validateChildKeys(children[i], type); - } - if (Object.freeze) { - Object.freeze(children); + if (validType) { + var children = props.children; + if (children !== void 0) { + if (isStaticChildren) { + if (isArray(children)) { + for (var i = 0; i < children.length; i++) { + validateChildKeys(children[i], type); + } + if (Object.freeze) { + Object.freeze(children); + } + } else { + error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."); } } else { - error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."); + validateChildKeys(children, type); } - } else { - validateChildKeys(children, type); } } - } - { - if (hasOwnProperty.call(props, "key")) { - var componentName = getComponentNameFromType(type); - var keys = Object.keys(props).filter(function(k2) { - return k2 !== "key"; - }); - var beforeExample = keys.length > 0 ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}"; - if (!didWarnAboutKeySpread[componentName + beforeExample]) { - var afterExample = keys.length > 0 ? "{" + keys.join(": ..., ") + ": ...}" : "{}"; - error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName); - didWarnAboutKeySpread[componentName + beforeExample] = true; + { + if (hasOwnProperty.call(props, "key")) { + var componentName = getComponentNameFromType(type); + var keys = Object.keys(props).filter(function(k) { + return k !== "key"; + }); + var beforeExample = keys.length > 0 ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}"; + if (!didWarnAboutKeySpread[componentName + beforeExample]) { + var afterExample = keys.length > 0 ? "{" + keys.join(": ..., ") + ": ...}" : "{}"; + error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName); + didWarnAboutKeySpread[componentName + beforeExample] = true; + } } } + if (type === REACT_FRAGMENT_TYPE) { + validateFragmentProps(element); + } else { + validatePropTypes(element); + } + return element; } - if (type === REACT_FRAGMENT_TYPE) { - validateFragmentProps(element); - } else { - validatePropTypes(element); - } - return element; } - } - function jsxWithValidationStatic(type, props, key) { - { - return jsxWithValidation(type, props, key, true); + function jsxWithValidationStatic(type, props, key) { + { + return jsxWithValidation(type, props, key, true); + } } - } - function jsxWithValidationDynamic(type, props, key) { - { - return jsxWithValidation(type, props, key, false); + function jsxWithValidationDynamic(type, props, key) { + { + return jsxWithValidation(type, props, key, false); + } } - } - var jsx2 = jsxWithValidationDynamic; - var jsxs2 = jsxWithValidationStatic; - Fragment = reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE; - jsx_1 = reactJsxRuntime_development.jsx = jsx2; - jsxs_1 = reactJsxRuntime_development.jsxs = jsxs2; - })(); + var jsx = jsxWithValidationDynamic; + var jsxs = jsxWithValidationStatic; + reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE; + reactJsxRuntime_development.jsx = jsx; + reactJsxRuntime_development.jsxs = jsxs; + })(); + } + return reactJsxRuntime_development; } - var jsxRuntime = jsxRuntime$2.exports; - "use strict"; - if (process.env.NODE_ENV === "production") { - jsxRuntime$2.exports = reactJsxRuntime_production_min; - } else { - jsxRuntime$2.exports = reactJsxRuntime_development; + var jsxRuntime$1 = jsxRuntime$2.exports; + var hasRequiredJsxRuntime; + function requireJsxRuntime() { + if (hasRequiredJsxRuntime) return jsxRuntime$2.exports; + hasRequiredJsxRuntime = 1; + "use strict"; + if (process.env.NODE_ENV === "production") { + jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); + } else { + jsxRuntime$2.exports = requireReactJsxRuntime_development(); + } + return jsxRuntime$2.exports; } - var jsxRuntimeExports = jsxRuntime$2.exports; - const jsxRuntime$1 = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); + var jsxRuntimeExports = requireJsxRuntime(); + const jsxRuntime = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); var gubu_min$2 = { exports: {} }; var gubu_min = gubu_min$2.exports; (function(module2, exports3) { @@ -1054,10 +1069,10 @@ var __async = (__this, __arguments, generator) => { }(function() { var e = {}, t = {}; Object.defineProperty(t, "__esModule", { value: true }), t.Gubu = void 0; - const n2 = Symbol.for("gubu$"), r2 = { gubu$: n2, v$: "8.3.0" }, l2 = /^[A-Z]/, { toString: i } = Object.prototype, o = "gubu", s = "name", u = "nan", a = "never", c = "number", f2 = "required", p2 = "array", h = "function", v = "object", d = "string", g = "boolean", y = "undefined", m2 = "any", b = "list", $ = "instance", k2 = "null", x = "type", I = "closed", w = "shape", S = "check", j = "regexp", N = "String", O = "Number", V = "Boolean", A = "Object", R = "Array", D = "Function", E = "Value", C = "Above", G = "All", T = "Any", B = "Below", J = "Check", W = "Child", M = "Exact", F = "Max", P = "Min", z = "One", L = "Open", _2 = "Required", q2 = "Some", H = " for property ", U = '"$PATH"', K = '"$VALUE"', Z = { [N]: String, [O]: Number, [V]: Boolean, [A]: Object, [R]: Array, ["Symbol"]: Symbol, [D]: Function }, Q = (e2) => Object.keys(e2), X = (e2, t2, n3) => Object.defineProperty(e2, t2, n3), Y = (e2) => Array.isArray(e2), ee = (e2) => JSON.parse(e2), te = (e2, t2) => JSON.stringify(e2, t2); + const n = Symbol.for("gubu$"), r2 = { gubu$: n, v$: "8.3.0" }, l = /^[A-Z]/, { toString: i } = Object.prototype, o = "gubu", s = "name", u = "nan", a = "never", c = "number", f = "required", p = "array", h = "function", v = "object", d = "string", g = "boolean", y = "undefined", m = "any", b = "list", $ = "instance", k = "null", x = "type", I = "closed", w = "shape", S = "check", j = "regexp", N = "String", O = "Number", V = "Boolean", A = "Object", R = "Array", D = "Function", E = "Value", C = "Above", G = "All", T = "Any", B = "Below", J = "Check", W = "Child", M = "Exact", F = "Max", P = "Min", z = "One", L = "Open", _2 = "Required", q = "Some", H = " for property ", U = '"$PATH"', K = '"$VALUE"', Z = { [N]: String, [O]: Number, [V]: Boolean, [A]: Object, [R]: Array, ["Symbol"]: Symbol, [D]: Function }, Q = (e2) => Object.keys(e2), X = (e2, t2, n2) => Object.defineProperty(e2, t2, n2), Y = (e2) => Array.isArray(e2), ee = (e2) => JSON.parse(e2), te = (e2, t2) => JSON.stringify(e2, t2); class ne { - constructor(e2, t2, n3, r3) { - this.match = false, this.dI = 0, this.nI = 2, this.cI = -1, this.pI = 0, this.sI = -1, this.valType = a, this.isRoot = false, this.key = "", this.type = a, this.stop = true, this.nextSibling = true, this.fromDflt = false, this.ignoreVal = void 0, this.curerr = [], this.err = [], this.parents = [], this.keys = [], this.ancestors = [], this.path = [], this.root = e2, this.vals = [e2, -1], this.node = t2, this.nodes = [t2, -1], this.ctx = n3 || {}, this.match = !!r3; + constructor(e2, t2, n2, r3) { + this.match = false, this.dI = 0, this.nI = 2, this.cI = -1, this.pI = 0, this.sI = -1, this.valType = a, this.isRoot = false, this.key = "", this.type = a, this.stop = true, this.nextSibling = true, this.fromDflt = false, this.ignoreVal = void 0, this.curerr = [], this.err = [], this.parents = [], this.keys = [], this.ancestors = [], this.path = [], this.root = e2, this.vals = [e2, -1], this.node = t2, this.nodes = [t2, -1], this.ctx = n2 || {}, this.match = !!r3; } next() { this.stop = false, this.fromDflt = false, this.ignoreVal = void 0, this.isRoot = 0 === this.pI, this.check = void 0; @@ -1070,9 +1085,9 @@ var __async = (__this, __arguments, generator) => { } } class re extends TypeError { - constructor(e2, t2, n3, r3) { - var l3; - super((t2 = null == t2 || t2.startsWith("G$") ? "" : t2 + ": ") + n3.map((e3) => e3.text).join("\n")), this.gubu = true, this.name = "GubuError", this.code = e2, this.gname = t2, this.desc = () => ({ name: "GubuError", code: e2, err: n3, ctx: r3 }), this.stack = null === (l3 = this.stack) || void 0 === l3 ? void 0 : l3.replace(/.*\/gubu\/gubu\.[tj]s.*\n/g, ""), this.props = n3.map((e3) => { + constructor(e2, t2, n2, r3) { + var l2; + super((t2 = null == t2 || t2.startsWith("G$") ? "" : t2 + ": ") + n2.map((e3) => e3.text).join("\n")), this.gubu = true, this.name = "GubuError", this.code = e2, this.gname = t2, this.desc = () => ({ name: "GubuError", code: e2, err: n2, ctx: r3 }), this.stack = null === (l2 = this.stack) || void 0 === l2 ? void 0 : l2.replace(/.*\/gubu\/gubu\.[tj]s.*\n/g, ""), this.props = n2.map((e3) => { var t3; return { path: e3.path, what: e3.why, type: null === (t3 = e3.node) || void 0 === t3 ? void 0 : t3.t, value: e3.value }; }); @@ -1083,47 +1098,47 @@ var __async = (__this, __arguments, generator) => { } const le = { Array: true, BigInt: true, Boolean: true, Function: true, Number: true, Object: true, String: true, Symbol: true }, ie = { string: "", number: 0, boolean: false, object: {}, array: [], symbol: Symbol(""), bigint: BigInt(0), null: null, regexp: /.*/ }; function oe(e2, t2, o2) { - var s2, a2, f3, g2; + var s2, a2, f2, g2; if (ue === e2) e2 = void 0; else if (null != e2 && (null === (s2 = e2.$) || void 0 === s2 ? void 0 : s2.gubu$)) { - if (n2 === e2.$.gubu$) return e2.d = null == t2 ? e2.d : t2, e2; + if (n === e2.$.gubu$) return e2.d = null == t2 ? e2.d : t2, e2; if (true === e2.$.gubu$) { let r3 = __spreadValues({}, e2); - return r3.$ = __spreadProps(__spreadValues({ v$: "8.3.0" }, r3.$), { gubu$: n2 }), r3.v = null != r3.v && v === typeof r3.v ? __spreadValues({}, r3.v) : r3.v, r3.t = r3.t || typeof r3.v, h === r3.t && le[r3.v.name] && (r3.t = r3.v.name.toLowerCase(), r3.v = Qe(ie[r3.t]), r3.f = r3.v), r3.r = !!r3.r, r3.p = !!r3.p, r3.d = null == t2 ? null == r3.d ? -1 : r3.d : t2, r3.b = r3.b || [], r3.a = r3.a || [], r3.u = r3.u || {}, r3.m = r3.m || o2 || {}, r3; + return r3.$ = __spreadProps(__spreadValues({ v$: "8.3.0" }, r3.$), { gubu$: n }), r3.v = null != r3.v && v === typeof r3.v ? __spreadValues({}, r3.v) : r3.v, r3.t = r3.t || typeof r3.v, h === r3.t && le[r3.v.name] && (r3.t = r3.v.name.toLowerCase(), r3.v = Qe(ie[r3.t]), r3.f = r3.v), r3.r = !!r3.r, r3.p = !!r3.p, r3.d = null == t2 ? null == r3.d ? -1 : r3.d : t2, r3.b = r3.b || [], r3.a = r3.a || [], r3.u = r3.u || {}, r3.m = r3.m || o2 || {}, r3; } } - let b2 = null === e2 ? k2 : typeof e2; - b2 = y === b2 ? m2 : b2; + let b2 = null === e2 ? k : typeof e2; + b2 = y === b2 ? m : b2; let x2, I2 = e2, w2 = I2, S2 = false, N2 = {}, O2 = [], V2 = []; - if (v === b2) w2 = void 0, Y(I2) ? (b2 = p2, 1 === I2.length && (x2 = I2[0], I2 = [])) : null != I2 && Function !== I2.constructor && Object !== I2.constructor && null != I2.constructor ? ("[object RegExp]" === i.call(I2) ? (b2 = j, S2 = true) : (b2 = $, N2.n = I2.constructor.name, N2.i = I2.constructor), w2 = I2) : 0 === Q(I2).length && (x2 = ye()); + if (v === b2) w2 = void 0, Y(I2) ? (b2 = p, 1 === I2.length && (x2 = I2[0], I2 = [])) : null != I2 && Function !== I2.constructor && Object !== I2.constructor && null != I2.constructor ? ("[object RegExp]" === i.call(I2) ? (b2 = j, S2 = true) : (b2 = $, N2.n = I2.constructor.name, N2.i = I2.constructor), w2 = I2) : 0 === Q(I2).length && (x2 = ye()); else if (h === b2) if (le[e2.name]) b2 = e2.name.toLowerCase(), S2 = true, I2 = Qe(ie[b2]), w2 = I2, A === e2.name && (x2 = ye()); else if (I2.gubu === r2 || true === (null === (a2 = I2.$) || void 0 === a2 ? void 0 : a2.gubu)) { let e3 = I2.node ? I2.node() : I2; b2 = e3.t, I2 = e3.v, w2 = I2, S2 = e3.r, N2 = __spreadValues({}, e3.u), O2 = [...e3.a], V2 = [...e3.b]; - } else D === I2.constructor.name && l2.test(I2.name) && (b2 = $, S2 = true, N2.n = null === (g2 = null === (f3 = I2.prototype) || void 0 === f3 ? void 0 : f3.constructor) || void 0 === g2 ? void 0 : g2.name, N2.i = I2); + } else D === I2.constructor.name && l.test(I2.name) && (b2 = $, S2 = true, N2.n = null === (g2 = null === (f2 = I2.prototype) || void 0 === f2 ? void 0 : f2.constructor) || void 0 === g2 ? void 0 : g2.name, N2.i = I2); else c === b2 && isNaN(I2) ? b2 = u : d === b2 && "" === I2 && (N2.empty = true); - let R2 = null == I2 || v !== b2 && p2 !== b2 ? I2 : __spreadValues({}, I2); + let R2 = null == I2 || v !== b2 && p !== b2 ? I2 : __spreadValues({}, I2); return { $: r2, t: b2, v: R2, f: w2, n: null != R2 && v === typeof R2 ? Q(R2).length : 0, c: x2, r: S2, p: false, d: null == t2 ? -1 : t2, k: [], e: true, u: N2, a: O2, b: V2, m: o2 || {}, [Symbol.for("nodejs.util.inspect.custom")]() { const e3 = __spreadValues({}, this); return delete e3.$, JSON.stringify(e3, (e4, t3) => "function" != typeof t3 || Ye[t3.name] ? t3 : t3.name).replace(/"/g, "").replace(/,/g, " "); } }; } function se(e2, t2) { - var n3; + var n2; const r3 = [[{}, "root", e2, t2]]; - for (let l3 = 0; l3 < r3.length; l3++) { - const e3 = r3[l3], t3 = e3[0][e3[1]] = oe(e3[2], e3[3]); - void 0 !== t3.c && ((null === (n3 = t3.c.$) || void 0 === n3 ? void 0 : n3.gubu$) || r3.push([t3, "c", t3.c, t3.d])); + for (let l2 = 0; l2 < r3.length; l2++) { + const e3 = r3[l2], t3 = e3[0][e3[1]] = oe(e3[2], e3[3]); + void 0 !== t3.c && ((null === (n2 = t3.c.$) || void 0 === n2 ? void 0 : n2.gubu$) || r3.push([t3, "c", t3.c, t3.d])); let i2 = typeof t3.v; v === i2 && null != t3.v && Object.entries(t3.v).map((e4) => { - var n4; - (null === (n4 = e4[1].$) || void 0 === n4 ? void 0 : n4.gubu$) || r3.push([t3.v, e4[0], e4[1], t3.d + 1]); + var n3; + (null === (n3 = e4[1].$) || void 0 === n3 ? void 0 : n3.gubu$) || r3.push([t3.v, e4[0], e4[1], t3.d + 1]); }); } return r3[0][0].root; } - function ue(t2, l3) { - const i2 = null == l3 ? {} : l3; + function ue(t2, l2) { + const i2 = null == l2 ? {} : l2; i2.name = null == i2.name ? "G$" + ("" + Math.random()).substring(2, 8) : "" + i2.name; let o2 = i2.meta = i2.meta || {}; o2.active = true === o2.active || false, o2.suffix = d == typeof o2.suffix ? o2.suffix : "$$"; @@ -1132,95 +1147,95 @@ var __async = (__this, __arguments, generator) => { let u2 = i2.valexpr = i2.valexpr || {}; u2.active = true === u2.active, u2.keymark = d == typeof u2.keymark ? u2.keymark : o2.suffix; let c2, h2 = oe(t2, 0), g2 = ""; - function N2(e2, t3, n3) { - var r3, l4, c3; - const g3 = null === (r3 = null == t3 ? void 0 : t3.skip) || void 0 === r3 ? void 0 : r3.depth, N3 = Array.isArray(null === (l4 = null == t3 ? void 0 : t3.skip) || void 0 === l4 ? void 0 : l4.depth) ? t3.skip.depth : null, O3 = Array.isArray(null === (c3 = null == t3 ? void 0 : t3.skip) || void 0 === c3 ? void 0 : c3.keys) ? t3.skip.keys : null, V2 = new ne(e2, h2, t3, n3); + function N2(e2, t3, n2) { + var r3, l3, c3; + const g3 = null === (r3 = null == t3 ? void 0 : t3.skip) || void 0 === r3 ? void 0 : r3.depth, N3 = Array.isArray(null === (l3 = null == t3 ? void 0 : t3.skip) || void 0 === l3 ? void 0 : l3.depth) ? t3.skip.depth : null, O3 = Array.isArray(null === (c3 = null == t3 ? void 0 : t3.skip) || void 0 === c3 ? void 0 : c3.keys) ? t3.skip.keys : null, V2 = new ne(e2, h2, t3, n2); for (; V2.next(), !V2.stop; ) { - let t4 = V2.node, n4 = false, r4 = false, l5 = !!(t4.d === g3 || N3 && N3.includes(t4.d) || O3 && 1 === t4.d && O3.includes(V2.key)) || t4.p; + let t4 = V2.node, n3 = false, r4 = false, l4 = !!(t4.d === g3 || N3 && N3.includes(t4.d) || O3 && 1 === t4.d && O3.includes(V2.key)) || t4.p; if (0 < t4.b.length) for (let e3 = 0; e3 < t4.b.length; e3++) { - let l6 = fe(t4.b[e3], V2); - t4 = V2.node, void 0 !== l6.done && (n4 = l6.done), r4 = r4 || !!l6.fatal; + let l5 = fe(t4.b[e3], V2); + t4 = V2.node, void 0 !== l5.done && (n3 = l5.done), r4 = r4 || !!l5.fatal; } - if (!n4) { - let n5 = true, r5 = void 0 === V2.val; + if (!n3) { + let n4 = true, r5 = void 0 === V2.val; if (a === V2.type) V2.curerr.push(Ue(a, V2, 1070)); else if (v === V2.type) { let e3; - if (void 0 !== t4.c && (t4.c = se(t4.c, 1 + V2.dI)), t4.r && r5 ? (V2.ignoreVal = true, V2.curerr.push(Ue(f2, V2, 1010))) : r5 || null !== V2.val && v === V2.valType && !Y(V2.val) ? !l5 && r5 && void 0 !== t4.f ? (V2.updateVal(t4.f), V2.fromDflt = true, e3 = V2.val, n5 = false) : l5 && r5 || (V2.updateVal(V2.val || (V2.fromDflt = true, {})), e3 = V2.val) : (V2.curerr.push(Ue(x, V2, 1020)), e3 = Y(V2.val) ? V2.val : {}), n5 && (e3 = null == e3 && false === V2.ctx.err ? {} : e3, null != e3)) { + if (void 0 !== t4.c && (t4.c = se(t4.c, 1 + V2.dI)), t4.r && r5 ? (V2.ignoreVal = true, V2.curerr.push(Ue(f, V2, 1010))) : r5 || null !== V2.val && v === V2.valType && !Y(V2.val) ? !l4 && r5 && void 0 !== t4.f ? (V2.updateVal(t4.f), V2.fromDflt = true, e3 = V2.val, n4 = false) : l4 && r5 || (V2.updateVal(V2.val || (V2.fromDflt = true, {})), e3 = V2.val) : (V2.curerr.push(Ue(x, V2, 1020)), e3 = Y(V2.val) ? V2.val : {}), n4 && (e3 = null == e3 && false === V2.ctx.err ? {} : e3, null != e3)) { V2.ctx.log && V2.ctx.log("so", V2); - let n6 = false, r6 = Q(t4.v), l6 = V2.nI; + let n5 = false, r6 = Q(t4.v), l5 = V2.nI; if (0 < r6.length) { - n6 = true, V2.pI = l6; - for (let n7 = 0; n7 < r6.length; n7++) { - let l7, i5 = r6[n7]; + n5 = true, V2.pI = l5; + for (let n6 = 0; n6 < r6.length; n6++) { + let l6, i5 = r6[n6]; if (o2.active && i5.endsWith(o2.suffix)) { - if (l7 = { short: "" }, d === typeof t4.v[i5] ? l7.short = t4.v[i5] : l7 = __spreadValues(__spreadValues({}, l7), t4.v[i5]), delete t4.v[i5], n7++, r6.length <= n7) break; - if (r6[n7] !== i5.substring(0, i5.length - o2.suffix.length)) throw new Error("Invalid meta key: " + i5); - i5 = r6[n7]; + if (l6 = { short: "" }, d === typeof t4.v[i5] ? l6.short = t4.v[i5] : l6 = __spreadValues(__spreadValues({}, l6), t4.v[i5]), delete t4.v[i5], n6++, r6.length <= n6) break; + if (r6[n6] !== i5.substring(0, i5.length - o2.suffix.length)) throw new Error("Invalid meta key: " + i5); + i5 = r6[n6]; } let a2 = i5, c4 = t4.v[i5]; if (s2.active) { let e4 = /^\s*("(\\.|[^"\\])*"|[^\s]+):\s*(.*?)\s*$/.exec(i5); - e4 && (a2 = e4[1], c4 = ae({ src: e4[3], d: 1 + V2.dI, meta: l7 }, c4), delete t4.v[i5]); + e4 && (a2 = e4[1], c4 = ae({ src: e4[3], d: 1 + V2.dI, meta: l6 }, c4), delete t4.v[i5]); } if (u2.active && i5.startsWith(u2.keymark)) { if (i5 === u2.keymark) { - let e4 = ae({ src: c4, d: 1 + V2.dI, meta: l7, ancestors: V2.ancestors, node: t4 }, t4); + let e4 = ae({ src: c4, d: 1 + V2.dI, meta: l6, ancestors: V2.ancestors, node: t4 }, t4); Object.assign(t4, e4); } else t4.m.$$ = t4.m.$$ || {}, t4.m.$$[i5.substring(u2.keymark.length)] = t4.v[i5]; delete t4.v[i5]; continue; } - let f3 = oe(c4, 1 + V2.dI, l7); - t4.v[a2] = f3, t4.k.includes(a2) || t4.k.push(a2), V2.nodes[V2.nI] = f3, V2.vals[V2.nI] = e3[a2], V2.parents[V2.nI] = e3, V2.keys[V2.nI] = a2, V2.nI++; + let f2 = oe(c4, 1 + V2.dI, l6); + t4.v[a2] = f2, t4.k.includes(a2) || t4.k.push(a2), V2.nodes[V2.nI] = f2, V2.vals[V2.nI] = e3[a2], V2.parents[V2.nI] = e3, V2.keys[V2.nI] = a2, V2.nI++; } } let i4 = Q(e3).filter((e4) => void 0 === t4.v[e4]); if (0 < i4.length) if (void 0 === t4.c) V2.ignoreVal = true, V2.curerr.push(Ue(I, V2, 1100, void 0, { k: i4 })); else { - n6 = true, V2.pI = l6; - for (let n7 of i4) { + n5 = true, V2.pI = l5; + for (let n6 of i4) { let r7 = t4.c = oe(t4.c, 1 + V2.dI); - V2.nodes[V2.nI] = r7, V2.vals[V2.nI] = e3[n7], V2.parents[V2.nI] = e3, V2.keys[V2.nI] = n7, V2.nI++; + V2.nodes[V2.nI] = r7, V2.vals[V2.nI] = e3[n6], V2.parents[V2.nI] = e3, V2.keys[V2.nI] = n6, V2.nI++; } } - n6 ? (V2.dI++, V2.nodes[V2.nI] = V2.sI, V2.parents[V2.nI] = e3, V2.nextSibling = false, V2.nI++) : V2.ctx.log && V2.ctx.log("eo", V2); + n5 ? (V2.dI++, V2.nodes[V2.nI] = V2.sI, V2.parents[V2.nI] = e3, V2.nextSibling = false, V2.nI++) : V2.ctx.log && V2.ctx.log("eo", V2); } - } else if (p2 === V2.type) if (t4.r && r5) V2.ignoreVal = true, V2.curerr.push(Ue(f2, V2, 1030)); + } else if (p === V2.type) if (t4.r && r5) V2.ignoreVal = true, V2.curerr.push(Ue(f, V2, 1030)); else if (r5 || Y(V2.val)) { - if (!l5 && r5 && void 0 !== t4.f) V2.updateVal(t4.f), V2.fromDflt = true; - else if (!l5 || null != V2.val) { + if (!l4 && r5 && void 0 !== t4.f) V2.updateVal(t4.f), V2.fromDflt = true; + else if (!l4 || null != V2.val) { V2.updateVal(V2.val || (V2.fromDflt = true, [])); - let n6 = void 0 !== t4.c, r6 = 0 < V2.val.length, l6 = Q(t4.v).filter((e3) => !isNaN(+e3)), i4 = 0 < l6.length; - if (n6 && (t4.c = se(t4.c, 1 + V2.dI)), V2.ctx.log && V2.ctx.log("sa", V2), r6 || i4) { + let n5 = void 0 !== t4.c, r6 = 0 < V2.val.length, l5 = Q(t4.v).filter((e3) => !isNaN(+e3)), i4 = 0 < l5.length; + if (n5 && (t4.c = se(t4.c, 1 + V2.dI)), V2.ctx.log && V2.ctx.log("sa", V2), r6 || i4) { V2.pI = V2.nI; let e3 = 0; - if (i4) if (l6.length < V2.val.length && !n6) V2.ignoreVal = true, V2.curerr.push(Ue(I, V2, 1090, void 0, { k: l6.length })); - else for (; e3 < l6.length; e3++) { - let n7 = t4.v[e3] = oe(t4.v[e3], 1 + V2.dI); - V2.nodes[V2.nI] = n7, V2.vals[V2.nI] = V2.val[e3], V2.parents[V2.nI] = V2.val, V2.keys[V2.nI] = "" + e3, V2.nI++; + if (i4) if (l5.length < V2.val.length && !n5) V2.ignoreVal = true, V2.curerr.push(Ue(I, V2, 1090, void 0, { k: l5.length })); + else for (; e3 < l5.length; e3++) { + let n6 = t4.v[e3] = oe(t4.v[e3], 1 + V2.dI); + V2.nodes[V2.nI] = n6, V2.vals[V2.nI] = V2.val[e3], V2.parents[V2.nI] = V2.val, V2.keys[V2.nI] = "" + e3, V2.nI++; } - if (n6 && r6) { - let n7 = t4.c; - for (; e3 < V2.val.length; e3++) V2.nodes[V2.nI] = n7, V2.vals[V2.nI] = V2.val[e3], V2.parents[V2.nI] = V2.val, V2.keys[V2.nI] = "" + e3, V2.nI++; + if (n5 && r6) { + let n6 = t4.c; + for (; e3 < V2.val.length; e3++) V2.nodes[V2.nI] = n6, V2.vals[V2.nI] = V2.val[e3], V2.parents[V2.nI] = V2.val, V2.keys[V2.nI] = "" + e3, V2.nI++; } V2.ignoreVal || (V2.dI++, V2.nodes[V2.nI] = V2.sI, V2.parents[V2.nI] = V2.val, V2.nextSibling = false, V2.nI++); - } else V2.ctx.log && n6 && null == e2 && V2.ctx.log("kv", __spreadProps(__spreadValues({}, V2), { key: 0, val: t4.c })), V2.ctx.log && V2.ctx.log("ea", V2); + } else V2.ctx.log && n5 && null == e2 && V2.ctx.log("kv", __spreadProps(__spreadValues({}, V2), { key: 0, val: t4.c })), V2.ctx.log && V2.ctx.log("ea", V2); } } else V2.curerr.push(Ue(x, V2, 1040)); else if (j === V2.type) r5 && !t4.r ? V2.ignoreVal = true : d !== V2.valType ? (V2.ignoreVal = true, V2.curerr.push(Ue(x, V2, 1045))) : V2.val.match(t4.v) || (V2.ignoreVal = true, V2.curerr.push(Ue(j, V2, 1045))); - else if (m2 === V2.type || b === V2.type || S === V2.type || void 0 === V2.val || V2.type === V2.valType || $ === V2.type && t4.u.i && V2.val instanceof t4.u.i || k2 === V2.type && null === V2.val) if (void 0 === V2.val) { + else if (m === V2.type || b === V2.type || S === V2.type || void 0 === V2.val || V2.type === V2.valType || $ === V2.type && t4.u.i && V2.val instanceof t4.u.i || k === V2.type && null === V2.val) if (void 0 === V2.val) { let e3 = V2.path[V2.dI]; - l5 || !t4.r || y === V2.type && V2.parent.hasOwnProperty(e3) ? void 0 !== t4.f && !l5 || y === V2.type ? (V2.updateVal(t4.f), V2.fromDflt = true) : m2 === V2.type && (V2.ignoreVal = void 0 === V2.ignoreVal || V2.ignoreVal) : (V2.ignoreVal = true, V2.curerr.push(Ue(f2, V2, 1060))), V2.ctx.log && V2.ctx.log("kv", V2); - } else d !== V2.type || "" !== V2.val || t4.u.empty || V2.curerr.push(Ue(f2, V2, 1080)), V2.ctx.log && V2.ctx.log("kv", V2); + l4 || !t4.r || y === V2.type && V2.parent.hasOwnProperty(e3) ? void 0 !== t4.f && !l4 || y === V2.type ? (V2.updateVal(t4.f), V2.fromDflt = true) : m === V2.type && (V2.ignoreVal = void 0 === V2.ignoreVal || V2.ignoreVal) : (V2.ignoreVal = true, V2.curerr.push(Ue(f, V2, 1060))), V2.ctx.log && V2.ctx.log("kv", V2); + } else d !== V2.type || "" !== V2.val || t4.u.empty || V2.curerr.push(Ue(f, V2, 1080)), V2.ctx.log && V2.ctx.log("kv", V2); else V2.curerr.push(Ue(x, V2, 1050)); } if (0 < t4.a.length) for (let e3 = 0; e3 < t4.a.length; e3++) { - let l6 = fe(t4.a[e3], V2); - t4 = V2.node, void 0 !== l6.done && (n4 = l6.done), r4 = r4 || !!l6.fatal; + let l5 = fe(t4.a[e3], V2); + t4 = V2.node, void 0 !== l5.done && (n3 = l5.done), r4 = r4 || !!l5.fatal; } - let i3 = l5 ? false !== V2.ignoreVal : !!V2.ignoreVal; - !V2.match && null != V2.parent && !n4 && !i3 && (V2.parent[V2.key] = V2.val), V2.nextSibling && (V2.pI = V2.sI), (V2.node.e || r4) && V2.err.push(...V2.curerr); + let i3 = l4 ? false !== V2.ignoreVal : !!V2.ignoreVal; + !V2.match && null != V2.parent && !n3 && !i3 && (V2.parent[V2.key] = V2.val), V2.nextSibling && (V2.pI = V2.sI), (V2.node.e || r4) && V2.err.push(...V2.curerr); } if (0 < V2.err.length) { if (Y(V2.ctx.err)) V2.ctx.err.push(...V2.err); @@ -1232,38 +1247,38 @@ var __async = (__this, __arguments, generator) => { return N2(e2, t3, false); } return O2.valid = function(e2, t3) { - let n3 = t3 || {}; - return n3.err = n3.err || [], N2(e2, n3, false), 0 === n3.err.length; + let n2 = t3 || {}; + return n2.err = n2.err || [], N2(e2, n2, false), 0 === n2.err.length; }, O2.match = (e2, t3) => N2(e2, t3 = t3 || {}, true), O2.error = (e2, t3) => { - let n3 = t3 || {}; - return n3.err = n3.err || [], N2(e2, n3, false), n3.err; + let n2 = t3 || {}; + return n2.err = n2.err || [], N2(e2, n2, false), n2.err; }, O2.spec = () => { O2(void 0, { err: false }); - const e2 = Ze(h2, (e3, t3) => n2 === t3 || t3, false, true); + const e2 = Ze(h2, (e3, t3) => n === t3 || t3, false, true); return ee(e2); }, O2.node = () => (O2.spec(), h2), O2.stringify = (...e2) => { const t3 = O2.jsonify(); return "" === g2 ? g2 = "string" == typeof t3 ? t3.replace(/^"(.*)"$/, "$1") : JSON.stringify(t3, ...e2) : g2; - }, O2.jsonify = () => null == c2 ? c2 = Ke(O2.node()) : c2, O2.toString = () => (g2 = he("" === g2 ? Ze(null == h2 || !h2.$ || n2 !== h2.$.gubu$ && true !== h2.$.gubu$ ? h2 : h2.v, null, true) : g2), `[Gubu ${i2.name} ${g2}]`), e.inspect && e.inspect.custom && (O2[e.inspect.custom] = O2.toString), O2.gubu = r2, O2.spec(), O2; + }, O2.jsonify = () => null == c2 ? c2 = Ke(O2.node()) : c2, O2.toString = () => (g2 = he("" === g2 ? Ze(null == h2 || !h2.$ || n !== h2.$.gubu$ && true !== h2.$.gubu$ ? h2 : h2.v, null, true) : g2), `[Gubu ${i2.name} ${g2}]`), e.inspect && e.inspect.custom && (O2[e.inspect.custom] = O2.toString), O2.gubu = r2, O2.spec(), O2; } function ae(e2, t2) { - var n3, r3; - let l3, i2 = false; + var n2, r3; + let l2, i2 = false; "string" == typeof e2 && (e2 = { src: e2 }), e2.keymark = e2.keymark || "$$"; - const o2 = null === (n3 = null == t2 ? void 0 : t2.$) || void 0 === n3 ? void 0 : n3.gubu$; + const o2 = null === (n2 = null == t2 ? void 0 : t2.$) || void 0 === n2 ? void 0 : n2.gubu$; if (e2.i = e2.i || 0, null == e2.tokens) { - l3 = null != e2.val ? oe(e2.val, (e2.d || 0) + 1, e2.meta) : void 0, i2 = true, e2.tokens = []; - let n4 = /\s*,?\s*([)(\.]|"(\\.|[^"\\])*"|\/(\\.|[^\/\\])*\/[a-z]?|[^)(,.\s]+)\s*/g, r4 = null; - for (; r4 = n4.exec(e2.src); ) e2.tokens.push(r4[1]); + l2 = null != e2.val ? oe(e2.val, (e2.d || 0) + 1, e2.meta) : void 0, i2 = true, e2.tokens = []; + let n3 = /\s*,?\s*([)(\.]|"(\\.|[^"\\])*"|\/(\\.|[^\/\\])*\/[a-z]?|[^)(,.\s]+)\s*/g, r4 = null; + for (; r4 = n3.exec(e2.src); ) e2.tokens.push(r4[1]); if (!o2) { - let n5 = 0, r5 = false; - for (; n5 < e2.tokens.length; n5++) if (")" == e2.tokens[n5]) { + let n4 = 0, r5 = false; + for (; n4 < e2.tokens.length; n4++) if (")" == e2.tokens[n4]) { r5 = true; break; } - if ((r5 || n5 === e2.tokens.length) && void 0 !== t2) { - let l4 = "token_" + e2.d + "_" + e2.i; - e2.refs = e2.refs || {}, e2.refs[l4] = t2, r5 ? e2.tokens.splice(n5, 0, e2.keymark + l4) : e2.tokens.push("(", e2.keymark + l4, ")"); + if ((r5 || n4 === e2.tokens.length) && void 0 !== t2) { + let l3 = "token_" + e2.d + "_" + e2.i; + e2.refs = e2.refs || {}, e2.refs[l3] = t2, r5 ? e2.tokens.splice(n4, 0, e2.keymark + l3) : e2.tokens.push("(", e2.keymark + l3, ")"); } } } @@ -1297,49 +1312,49 @@ var __async = (__this, __arguments, generator) => { } e2.i++; } - return l3 = o2 ? u2.call(t2, ...a2) : u2.call(void 0, ...a2), "." === e2.tokens[e2.i] ? (e2.i++, l3 = ae(e2, l3)) : i2 && e2.i < e2.tokens.length && (l3 = ae(e2, l3)), l3; + return l2 = o2 ? u2.call(t2, ...a2) : u2.call(void 0, ...a2), "." === e2.tokens[e2.i] ? (e2.i++, l2 = ae(e2, l2)) : i2 && e2.i < e2.tokens.length && (l2 = ae(e2, l2)), l2; } - function ce(e2, t2 = {}, n3 = true) { + function ce(e2, t2 = {}, n2 = true) { let r3; - const l3 = Array.isArray(e2) ? "array" : null === e2 ? "null" : typeof e2; - return "string" === l3 ? r3 = ae(e2) : "number" === l3 || "boolean" === l3 ? r3 = e2 : v === l3 ? r3 = Object.entries(e2).reduce((e3, n4) => { + const l2 = Array.isArray(e2) ? "array" : null === e2 ? "null" : typeof e2; + return "string" === l2 ? r3 = ae(e2) : "number" === l2 || "boolean" === l2 ? r3 = e2 : v === l2 ? r3 = Object.entries(e2).reduce((e3, n3) => { var r4; - return e3[n4[0]] = ((null === (r4 = t2.valexpr) || void 0 === r4 ? void 0 : r4.keymark) || "$$") === n4[0] ? n4[1] : ce(n4[1], t2, false), e3; - }, {}) : p2 === l3 && (r3 = e2.map((e3) => ce(e3, t2, false))), n3 ? (t2.valexpr = t2.valexpr || {}, t2.valexpr.active = true, et(r3, t2)) : r3; + return e3[n3[0]] = ((null === (r4 = t2.valexpr) || void 0 === r4 ? void 0 : r4.keymark) || "$$") === n3[0] ? n3[1] : ce(n3[1], t2, false), e3; + }, {}) : p === l2 && (r3 = e2.map((e3) => ce(e3, t2, false))), n2 ? (t2.valexpr = t2.valexpr || {}, t2.valexpr.active = true, et(r3, t2)) : r3; } function fe(e2, t2) { - var n3; - let r3, l3 = {}, i2 = false; + var n2; + let r3, l2 = {}, i2 = false; try { - i2 = !(void 0 !== t2.val || !(null === (n3 = e2.gubu$) || void 0 === n3 ? void 0 : n3.Check)) || (t2.check = e2, e2(t2.val, l3, t2)); + i2 = !(void 0 !== t2.val || !(null === (n2 = e2.gubu$) || void 0 === n2 ? void 0 : n2.Check)) || (t2.check = e2, e2(t2.val, l2, t2)); } catch (s2) { r3 = s2; } - let o2 = Y(l3.err) ? 0 < l3.err.length : null != l3.err; + let o2 = Y(l2.err) ? 0 < l2.err.length : null != l2.err; if (!i2 || o2) { - if (void 0 === t2.val && (t2.node.p || !t2.node.r) && true !== l3.done) return delete l3.err, l3; - let n4 = l3.why || S, i3 = pe(t2); - if (d === typeof l3.err) t2.curerr.push(He(t2, l3.err)); - else if (v === typeof l3.err) t2.curerr.push(...[l3.err].flat().filter((e3) => null != e3).map((e3) => (e3.path = null == e3.path ? i3 : e3.path, e3.mark = null == e3.mark ? 2010 : e3.mark, e3))); + if (void 0 === t2.val && (t2.node.p || !t2.node.r) && true !== l2.done) return delete l2.err, l2; + let n3 = l2.why || S, i3 = pe(t2); + if (d === typeof l2.err) t2.curerr.push(He(t2, l2.err)); + else if (v === typeof l2.err) t2.curerr.push(...[l2.err].flat().filter((e3) => null != e3).map((e3) => (e3.path = null == e3.path ? i3 : e3.path, e3.mark = null == e3.mark ? 2010 : e3.mark, e3))); else { - let l4 = e2.name; - null != l4 && "" != l4 || (l4 = he(e2.toString().replace(/[ \t\r\n]+/g, " "))), t2.curerr.push(Ue(n4, t2, 1045, void 0, { thrown: r3 }, l4)); + let l3 = e2.name; + null != l3 && "" != l3 || (l3 = he(e2.toString().replace(/[ \t\r\n]+/g, " "))), t2.curerr.push(Ue(n3, t2, 1045, void 0, { thrown: r3 }, l3)); } - l3.done = null == l3.done || l3.done; + l2.done = null == l2.done || l2.done; } - return l3.hasOwnProperty("uval") ? (t2.updateVal(l3.uval), t2.ignoreVal = false) : void 0 === l3.val || Number.isNaN(l3.val) || (t2.updateVal(l3.val), t2.ignoreVal = false), void 0 !== l3.node && (t2.node = l3.node), void 0 !== l3.type && (t2.type = l3.type), l3; + return l2.hasOwnProperty("uval") ? (t2.updateVal(l2.uval), t2.ignoreVal = false) : void 0 === l2.val || Number.isNaN(l2.val) || (t2.updateVal(l2.val), t2.ignoreVal = false), void 0 !== l2.node && (t2.node = l2.node), void 0 !== l2.type && (t2.type = l2.type), l2; } function pe(e2) { return e2.path.slice(1, e2.dI + 1).filter((e3) => null != e3).join("."); } function he(e2, t2) { - let n3 = String(e2), r3 = null == t2 || isNaN(t2) ? 30 : t2 < 0 ? 0 : ~~t2, l3 = null == e2 ? 0 : n3.length, i2 = null == e2 ? "" : n3.substring(0, l3); - return i2 = r3 < l3 ? i2.substring(0, r3 - 3) + "..." : i2, i2.substring(0, r3); + let n2 = String(e2), r3 = null == t2 || isNaN(t2) ? 30 : t2 < 0 ? 0 : ~~t2, l2 = null == e2 ? 0 : n2.length, i2 = null == e2 ? "" : n2.substring(0, l2); + return i2 = r3 < l2 ? i2.substring(0, r3 - 3) + "..." : i2, i2.substring(0, r3); } const ve = function(e2) { var t2; - let n3 = qe(this, e2); - return n3.r = true, n3.p = false, void 0 === e2 ? (n3.f = void 0, 1 === arguments.length && (n3.t = y, n3.v = void 0)) : (null === (t2 = null == this ? void 0 : this.$) || void 0 === t2 ? void 0 : t2.gubu$) && (n3.f = void 0), n3; + let n2 = qe(this, e2); + return n2.r = true, n2.p = false, void 0 === e2 ? (n2.f = void 0, 1 === arguments.length && (n2.t = y, n2.v = void 0)) : (null === (t2 = null == this ? void 0 : this.$) || void 0 === t2 ? void 0 : t2.gubu$) && (n2.f = void 0), n2; }, de = function(e2) { let t2 = qe(this, e2); return t2.c = ye(), t2; @@ -1348,30 +1363,30 @@ var __async = (__this, __arguments, generator) => { return t2.r = false, void 0 === e2 && 1 === arguments.length && (t2.t = y, t2.v = void 0), t2; }, ye = function(e2) { let t2 = qe(this, e2); - return t2.t = m2, void 0 !== e2 && (t2.v = e2, t2.f = e2), t2; + return t2.t = m, void 0 !== e2 && (t2.v = e2, t2.f = e2), t2; }, me = function(e2, t2) { - let n3 = qe(this, t2); - return n3.z = e2, n3; + let n2 = qe(this, t2); + return n2.z = e2, n2; }, be = function(e2) { let t2 = qe(this, e2); return t2.r = false, t2.p = true, t2; }, $e = function(e2) { let t2 = qe(this, e2); - return t2.r = false, t2.p = true, t2.e = false, t2.a.push(function(e3, t3, n3) { - return 0 < n3.curerr.length && (t3.uval = void 0, t3.done = false), true; + return t2.r = false, t2.p = true, t2.e = false, t2.a.push(function(e3, t3, n2) { + return 0 < n2.curerr.length && (t3.uval = void 0, t3.done = false), true; }), t2; }, ke = function(e2) { let t2 = qe(this); return t2.t = h, t2.v = e2, t2.f = e2, t2; }, xe = function(e2, t2) { - let n3 = qe(this, e2); - if (void 0 !== t2 && (n3 = qe(n3, t2)), n3.r = false, n3.f = e2, void 0 === t2) { - h === typeof e2 && le[e2.name] && (n3.t = e2.name.toLowerCase(), n3.f = Qe(ie[n3.t])); + let n2 = qe(this, e2); + if (void 0 !== t2 && (n2 = qe(n2, t2)), n2.r = false, n2.f = e2, void 0 === t2) { + h === typeof e2 && le[e2.name] && (n2.t = e2.name.toLowerCase(), n2.f = Qe(ie[n2.t])); } else { const e3 = oe(t2); - n3.t = e3.t; + n2.t = e3.t; } - return n3.p = false, n3; + return n2.p = false, n2; }, Ie = function(e2) { let t2 = qe(this, e2); return t2.u.empty = true, t2; @@ -1379,259 +1394,259 @@ var __async = (__this, __arguments, generator) => { let t2 = qe(this, e2); return t2.t = a, t2; }, Se = function(e2, t2) { - let n3 = qe(this), r3 = c === typeof e2; - n3.t = d, r3 && null == t2 && (n3 = oe([])); - let l3 = null; - return h === typeof e2 && (l3 = e2, n3 = ye()), n3.b.push(function(n4, i2, o2) { - if (l3) i2.val = l3(o2.path, o2); + let n2 = qe(this), r3 = c === typeof e2; + n2.t = d, r3 && null == t2 && (n2 = oe([])); + let l2 = null; + return h === typeof e2 && (l2 = e2, n2 = ye()), n2.b.push(function(n3, i2, o2) { + if (l2) i2.val = l2(o2.path, o2); else if (r3) { - let n5 = e2; - i2.val = o2.path.slice(o2.path.length - 1 - (0 <= n5 ? n5 : 0), o2.path.length - 1 + (0 <= n5 ? 0 : 1)), d === typeof t2 && (i2.val = i2.val.join(t2)); + let n4 = e2; + i2.val = o2.path.slice(o2.path.length - 1 - (0 <= n4 ? n4 : 0), o2.path.length - 1 + (0 <= n4 ? 0 : 1)), d === typeof t2 && (i2.val = i2.val.join(t2)); } else null == e2 && (i2.val = o2.path[o2.path.length - 2]); return true; - }), n3; + }), n2; }, je = function(...e2) { const t2 = qe(this); t2.t = b, t2.r = true; - const n3 = e2.map((e3) => et(e3)); - t2.u.list = n3.map((e3) => e3.node()); - const r3 = function(t3, r4, l3) { + const n2 = e2.map((e3) => et(e3)); + t2.u.list = n2.map((e3) => e3.node()); + const r3 = function(t3, r4, l2) { let i2 = true; - for (let e3 of n3) { - let n4 = __spreadProps(__spreadValues({}, l3.ctx), { err: [] }); - e3(t3, n4), 0 < n4.err.length && (i2 = false); + for (let e3 of n2) { + let n3 = __spreadProps(__spreadValues({}, l2.ctx), { err: [] }); + e3(t3, n3), 0 < n3.err.length && (i2 = false); } - return i2 || (r4.why = G, r4.err = [He(l3, E + " " + K + H + U + " does not satisfy all of: " + e2.map((e3) => Ze(e3, null, true)).join(", "))]), i2; + return i2 || (r4.why = G, r4.err = [He(l2, E + " " + K + H + U + " does not satisfy all of: " + e2.map((e3) => Ze(e3, null, true)).join(", "))]), i2; }; return r3.n = G, r3.a = e2, t2.b.push(r3), t2; }, Ne = function(...e2) { let t2 = qe(this); t2.t = b, t2.r = true; - let n3 = e2.map((e3) => et(e3)); - t2.u.list = n3.map((e3) => e3.node()); - const r3 = function(t3, r4, l3) { + let n2 = e2.map((e3) => et(e3)); + t2.u.list = n2.map((e3) => e3.node()); + const r3 = function(t3, r4, l2) { let i2 = false; - for (let e3 of n3) { - let n4 = __spreadProps(__spreadValues({}, l3.ctx), { err: [] }), o2 = e3.match(t3, n4); - o2 && (r4.val = e3(t3, n4)), i2 || (i2 = o2); + for (let e3 of n2) { + let n3 = __spreadProps(__spreadValues({}, l2.ctx), { err: [] }), o2 = e3.match(t3, n3); + o2 && (r4.val = e3(t3, n3)), i2 || (i2 = o2); } - return i2 || (r4.why = q2, r4.err = [He(l3, E + " " + K + H + U + " does not satisfy any of: " + e2.map((e3) => Ze(e3, null, true)).join(", "))]), i2; + return i2 || (r4.why = q, r4.err = [He(l2, E + " " + K + H + U + " does not satisfy any of: " + e2.map((e3) => Ze(e3, null, true)).join(", "))]), i2; }; - return r3.n = q2, r3.a = e2, t2.b.push(r3), t2; + return r3.n = q, r3.a = e2, t2.b.push(r3), t2; }, Oe = function(...e2) { let t2 = qe(this); t2.t = b, t2.r = true; - let n3 = e2.map((e3) => et(e3)); - t2.u.list = n3.map((e3) => e3.node()); - const r3 = function(t3, r4, l3) { + let n2 = e2.map((e3) => et(e3)); + t2.u.list = n2.map((e3) => e3.node()); + const r3 = function(t3, r4, l2) { let i2 = 0; - for (let e3 of n3) { - let n4 = __spreadProps(__spreadValues({}, l3.ctx), { err: [] }); - if (e3.match(t3, n4)) { - i2++, r4.val = e3(t3, n4); + for (let e3 of n2) { + let n3 = __spreadProps(__spreadValues({}, l2.ctx), { err: [] }); + if (e3.match(t3, n3)) { + i2++, r4.val = e3(t3, n3); break; } } - return 1 !== i2 && (r4.why = z, r4.err = [He(l3, E + " " + K + H + U + " does not satisfy one of: " + e2.map((e3) => Ze(e3, null, true)).join(", "))]), true; + return 1 !== i2 && (r4.why = z, r4.err = [He(l2, E + " " + K + H + U + " does not satisfy one of: " + e2.map((e3) => Ze(e3, null, true)).join(", "))]), true; }; return r3.n = z, r3.a = e2, t2.b.push(r3), t2; }, Ve = function(...e2) { - const t2 = qe(this), n3 = function(t3, n4, r3) { - for (let l3 = 0; l3 < e2.length; l3++) if (t3 === e2[l3]) return true; + const t2 = qe(this), n2 = function(t3, n3, r3) { + for (let l2 = 0; l2 < e2.length; l2++) if (t3 === e2[l2]) return true; if (r3.node.hasOwnProperty("f") && void 0 === t3) { const t4 = r3.node.f; - for (let n5 = 0; n5 < e2.length; n5++) if (t4 === e2[n5]) return true; + for (let n4 = 0; n4 < e2.length; n4++) if (t4 === e2[n4]) return true; } - return n4.err = He(r3, E + " " + K + H + U + " must be exactly one of: " + e2.map((e3) => Ze(e3, null, true)).join(", ")), n4.done = true, false; + return n3.err = He(r3, E + " " + K + H + U + " must be exactly one of: " + e2.map((e3) => Ze(e3, null, true)).join(", ")), n3.done = true, false; }; - return n3.n = M, n3.a = e2, n3.s = () => M + "(" + e2.map((e3) => Ze(e3, null, true)).join(",") + ")", t2.b.push(n3), t2; + return n2.n = M, n2.a = e2, n2.s = () => M + "(" + e2.map((e3) => Ze(e3, null, true)).join(",") + ")", t2.b.push(n2), t2; }, Ae = function(e2, t2) { - let n3 = qe(this, t2); - return n3.b.push(e2), n3; + let n2 = qe(this, t2); + return n2.b.push(e2), n2; }, Re = function(e2, t2) { - let n3 = qe(this, t2); - return n3.a.push(e2), n3; + let n2 = qe(this, t2); + return n2.a.push(e2), n2; }, De = function(e2, t2) { - let n3 = qe(this, t2); - if (n3.r = true, h === typeof e2) { + let n2 = qe(this, t2); + if (n2.r = true, h === typeof e2) { let t3 = e2; - t3.gubu$ = t3.gubu$ || {}, t3.gubu$.Check = true, t3.s = () => J + "(" + Ze(e2, null, true) + ")", n3.b.push(e2), n3.t = S; + t3.gubu$ = t3.gubu$ || {}, t3.gubu$.Check = true, t3.s = () => J + "(" + Ze(e2, null, true) + ")", n2.b.push(e2), n2.t = S; } else if (v === typeof e2) { if (Object.prototype.toString.call(e2).includes("RegExp")) { let t3 = (t4) => null != t4 && !Number.isNaN(t4) && !!String(t4).match(e2); - X(t3, s, { value: String(e2) }), X(t3, "gubu$", { value: { Check: true } }), t3.s = () => J + "(" + Ze(e2, null, true) + ")", n3.b.push(t3), n3.t = S; + X(t3, s, { value: String(e2) }), X(t3, "gubu$", { value: { Check: true } }), t3.s = () => J + "(" + Ze(e2, null, true) + ")", n2.b.push(t3), n2.t = S; } - } else d === typeof e2 && (n3.t = e2); + } else d === typeof e2 && (n2.t = e2); if (void 0 !== t2) { const e3 = oe(t2); - n3.t = e3.t; + n2.t = e3.t; } - return n3; + return n2; }, Ee = function(e2) { let t2 = qe(this, e2); - return p2 === t2.t && void 0 !== t2.c && 0 === t2.n && (t2.v = [t2.c]), t2.c = void 0, t2; + return p === t2.t && void 0 !== t2.c && 0 === t2.n && (t2.v = [t2.c]), t2.c = void 0, t2; }, Ce = function(e2, t2) { - let n3 = qe(this, t2), r3 = d === typeof e2 ? e2 : (v === typeof e2 && e2 || {}).name; - return null != r3 && "" != r3 && n3.b.push(function(e3, t3, n4) { - return (n4.ctx.ref = n4.ctx.ref || {})[r3] = n4.node, true; - }), n3; + let n2 = qe(this, t2), r3 = d === typeof e2 ? e2 : (v === typeof e2 && e2 || {}).name; + return null != r3 && "" != r3 && n2.b.push(function(e3, t3, n3) { + return (n3.ctx.ref = n3.ctx.ref || {})[r3] = n3.node, true; + }), n2; }, Ge = function(e2, t2) { - let n3 = qe(this, t2), r3 = v === typeof e2 && e2 || {}, l3 = d === typeof e2 ? e2 : r3.name, i2 = !!r3.fill; - return null != l3 && "" != l3 && n3.b.push(function(e3, t3, n4) { + let n2 = qe(this, t2), r3 = v === typeof e2 && e2 || {}, l2 = d === typeof e2 ? e2 : r3.name, i2 = !!r3.fill; + return null != l2 && "" != l2 && n2.b.push(function(e3, t3, n3) { if (void 0 !== e3 || i2) { - let e4 = n4.ctx.ref = n4.ctx.ref || {}; - if (void 0 !== e4[l3]) { - let n5 = __spreadValues({}, e4[l3]); - n5.t = n5.t || a, t3.node = n5, t3.type = n5.t; + let e4 = n3.ctx.ref = n3.ctx.ref || {}; + if (void 0 !== e4[l2]) { + let n4 = __spreadValues({}, e4[l2]); + n4.t = n4.t || a, t3.node = n4, t3.type = n4.t; } } return true; - }), n3; + }), n2; }, Te = function(e2, t2) { - let n3 = qe(this, t2), r3 = v === typeof e2 && e2 || {}, l3 = d === typeof e2 ? e2 : r3.name, i2 = g === typeof r3.keep ? r3.keep : void 0, o2 = Y(r3.claim) ? r3.claim : []; - if (null != l3 && "" != l3) { - let e3 = (e4, t4, n4) => { + let n2 = qe(this, t2), r3 = v === typeof e2 && e2 || {}, l2 = d === typeof e2 ? e2 : r3.name, i2 = g === typeof r3.keep ? r3.keep : void 0, o2 = Y(r3.claim) ? r3.claim : []; + if (null != l2 && "" != l2) { + let e3 = (e4, t4, n3) => { if (void 0 === e4 && 0 < o2.length) { - n4.ctx.Rename = n4.ctx.Rename || {}, n4.ctx.Rename.fromDflt = n4.ctx.Rename.fromDflt || {}; + n3.ctx.Rename = n3.ctx.Rename || {}, n3.ctx.Rename.fromDflt = n3.ctx.Rename.fromDflt || {}; for (let e5 of o2) { - let r4 = n4.ctx.Rename.fromDflt[e5] || {}; - if (void 0 !== n4.parent[e5] && !r4.yes) { - t4.val = n4.parent[e5], n4.match || (n4.parent[l3] = t4.val), t4.node = r4.node; - for (let e6 = 0; e6 < n4.err.length; e6++) n4.err[e6].k === r4.key && (n4.err.splice(e6, 1), e6--); + let r4 = n3.ctx.Rename.fromDflt[e5] || {}; + if (void 0 !== n3.parent[e5] && !r4.yes) { + t4.val = n3.parent[e5], n3.match || (n3.parent[l2] = t4.val), t4.node = r4.node; + for (let e6 = 0; e6 < n3.err.length; e6++) n3.err[e6].k === r4.key && (n3.err.splice(e6, 1), e6--); if (i2) { - let t5 = n4.cI + 1; - n4.nodes.splice(t5, 0, oe(r4.dval)), n4.vals.splice(t5, 0, void 0), n4.parents.splice(t5, 0, n4.parent), n4.keys.splice(t5, 0, e5), n4.nI++, n4.pI++; - } else delete n4.parent[e5]; + let t5 = n3.cI + 1; + n3.nodes.splice(t5, 0, oe(r4.dval)), n3.vals.splice(t5, 0, void 0), n3.parents.splice(t5, 0, n3.parent), n3.keys.splice(t5, 0, e5), n3.nI++, n3.pI++; + } else delete n3.parent[e5]; break; } } - void 0 === t4.val && (t4.val = n4.node.v); + void 0 === t4.val && (t4.val = n3.node.v); } return true; }; - X(e3, s, { value: "Rename:" + l3 }), n3.b.push(e3); - let t3 = (e4, t4, n4) => (n4.parent[l3] = e4, n4.match || i2 || n4.key === l3 || Y(n4.parent) && false !== i2 || (delete n4.parent[n4.key], t4.done = true), n4.ctx.Rename = n4.ctx.Rename || {}, n4.ctx.Rename.fromDflt = n4.ctx.Rename.fromDflt || {}, n4.ctx.Rename.fromDflt[l3] = { yes: n4.fromDflt, key: n4.key, dval: n4.node.v, node: n4.node }, true); - X(t3, s, { value: "Rename:" + l3 }), n3.a.push(t3); + X(e3, s, { value: "Rename:" + l2 }), n2.b.push(e3); + let t3 = (e4, t4, n3) => (n3.parent[l2] = e4, n3.match || i2 || n3.key === l2 || Y(n3.parent) && false !== i2 || (delete n3.parent[n3.key], t4.done = true), n3.ctx.Rename = n3.ctx.Rename || {}, n3.ctx.Rename.fromDflt = n3.ctx.Rename.fromDflt || {}, n3.ctx.Rename.fromDflt[l2] = { yes: n3.fromDflt, key: n3.key, dval: n3.node.v, node: n3.node }, true); + X(t3, s, { value: "Rename:" + l2 }), n2.a.push(t3); } - return n3; + return n2; }, Be = function(e2, t2) { - let n3 = qe(this, t2); - return n3.c = oe(e2), void 0 === n3.v && (n3.t = "object", n3.v = {}, n3.f = {}), n3; + let n2 = qe(this, t2); + return n2.c = oe(e2), void 0 === n2.v && (n2.t = "object", n2.v = {}, n2.f = {}), n2; }, Je = function(e2, t2) { - let n3 = qe(this, t2 || []); - return n3.t = "array", n3.c = oe(e2), n3.m = n3.m || {}, n3.m.rest = true, n3; + let n2 = qe(this, t2 || []); + return n2.t = "array", n2.c = oe(e2), n2.m = n2.m || {}, n2.m.rest = true, n2; }, We = function(e2, t2) { - let n3 = oe(Z[e2]), r3 = qe(this, t2); - return r3 !== n3 && (r3.t = n3.t, r3.r = n3.r, r3.p = n3.p, r3.v = n3.v), r3; + let n2 = oe(Z[e2]), r3 = qe(this, t2); + return r3 !== n2 && (r3.t = n2.t, r3.r = n2.r, r3.p = n2.p, r3.v = n2.v), r3; }; - function Me(e2, t2, n3, r3, l3) { - let i2 = qe(e2, n3); + function Me(e2, t2, n2, r3, l2) { + let i2 = qe(e2, n2); t2 = +t2; - let o2 = function(e3, n4, r4) { - return l3(function(e4) { + let o2 = function(e3, n3, r4) { + return l2(function(e4) { return c === typeof e4 ? e4 : c === typeof (null == e4 ? void 0 : e4.length) ? e4.length : null != e4 && v === typeof e4 ? Q(e4).length : NaN; - }(e3), t2, e3, n4, r4); + }(e3), t2, e3, n3, r4); }; return Object.defineProperty(o2, s, { value: r3 }), o2.n = r3, o2.a = [t2], o2.s = () => r3 + "(" + t2 + ")", o2[Symbol.for("nodejs.util.inspect.custom")] = o2.s(), o2.toJSON = () => o2.s(), i2.b.push(o2), i2; } const Fe = function(e2, t2) { - return Me(this, e2, t2, P, (e3, t3, n3, r3, l3) => { + return Me(this, e2, t2, P, (e3, t3, n2, r3, l2) => { if (t3 <= e3) return true; - l3.checkargs = { min: 1 }; - let i2 = c === typeof n3 ? "" : "length "; - return r3.err = He(l3, E + " " + K + H + U + ` must be a minimum ${i2}of ${t3} (was ${e3}).`), false; + l2.checkargs = { min: 1 }; + let i2 = c === typeof n2 ? "" : "length "; + return r3.err = He(l2, E + " " + K + H + U + ` must be a minimum ${i2}of ${t3} (was ${e3}).`), false; }); }, Pe = function(e2, t2) { - return Me(this, e2, t2, F, (e3, t3, n3, r3, l3) => { + return Me(this, e2, t2, F, (e3, t3, n2, r3, l2) => { if (e3 <= t3) return true; - let i2 = c === typeof n3 ? "" : "length "; - return r3.err = He(l3, E + " " + K + H + U + ` must be a maximum ${i2}of ${t3} (was ${e3}).`), false; + let i2 = c === typeof n2 ? "" : "length "; + return r3.err = He(l2, E + " " + K + H + U + ` must be a maximum ${i2}of ${t3} (was ${e3}).`), false; }); }, ze = function(e2, t2) { - return Me(this, e2, t2, C, (e3, t3, n3, r3, l3) => { + return Me(this, e2, t2, C, (e3, t3, n2, r3, l2) => { if (t3 < e3) return true; - let i2 = c === typeof n3 ? "be" : "have length"; - return r3.err = He(l3, E + " " + K + H + U + ` must ${i2} above ${t3} (was ${e3}).`), false; + let i2 = c === typeof n2 ? "be" : "have length"; + return r3.err = He(l2, E + " " + K + H + U + ` must ${i2} above ${t3} (was ${e3}).`), false; }); }, Le = function(e2, t2) { - return Me(this, e2, t2, B, (e3, t3, n3, r3, l3) => { + return Me(this, e2, t2, B, (e3, t3, n2, r3, l2) => { if (e3 < t3) return true; - let i2 = c === typeof n3 ? "be" : "have length"; - return r3.err = He(l3, E + " " + K + H + U + ` must ${i2} below ${t3} (was ${e3}).`), false; + let i2 = c === typeof n2 ? "be" : "have length"; + return r3.err = He(l2, E + " " + K + H + U + ` must ${i2} below ${t3} (was ${e3}).`), false; }); }, _e = function(e2, t2) { - return Me(this, e2, t2, B, (e3, t3, n3, r3, l3) => { + return Me(this, e2, t2, B, (e3, t3, n2, r3, l2) => { if (t3 === e3) return true; - let i2 = c === typeof n3 ? "" : " in length"; - return r3.err = He(l3, E + " " + K + H + U + ` must be exactly ${t3}${i2} (was ${e3}).`), false; + let i2 = c === typeof n2 ? "" : " in length"; + return r3.err = He(l2, E + " " + K + H + U + ` must be exactly ${t3}${i2} (was ${e3}).`), false; }); }; function qe(e2, t2) { - let n3, r3 = null != e2 && (e2.window === e2 || e2.global === e2); - if (void 0 !== e2 && !r3 || void 0 === t2) if (void 0 === e2 || r3) n3 = oe(void 0); + let n2, r3 = null != e2 && (e2.window === e2 || e2.global === e2); + if (void 0 !== e2 && !r3 || void 0 === t2) if (void 0 === e2 || r3) n2 = oe(void 0); else if (void 0 !== t2) { - n3 = oe(t2); + n2 = oe(t2); let r4 = oe(e2); - void 0 === n3.v && "list" !== n3.t && (n3.v = r4.v, n3.t = r4.t), ["f", "r", "p", "c", "e", "z"].map((e3) => n3[e3] = void 0 !== r4[e3] ? r4[e3] : n3[e3]), n3.u = Object.assign(__spreadValues({}, r4.u), n3.u), n3.m = Object.assign(__spreadValues({}, r4.m), n3.m), n3.a = r4.a.concat(n3.a), n3.b = r4.b.concat(n3.b); - } else n3 = oe(e2); - else n3 = oe(t2); - return n3.Above ? n3 : Object.assign(n3, { Above: ze, After: Re, Any: ye, Before: Ae, Below: Le, Check: De, Child: Be, Closed: Ee, Default: xe, Define: Ce, Empty: Ie, Exact: Ve, Fault: me, Ignore: $e, Len: _e, Max: Pe, Min: Fe, Never: we, Open: de, Refer: Ge, Rename: Te, Required: ve, Rest: Je, Skip: be, Type: We }); + void 0 === n2.v && "list" !== n2.t && (n2.v = r4.v, n2.t = r4.t), ["f", "r", "p", "c", "e", "z"].map((e3) => n2[e3] = void 0 !== r4[e3] ? r4[e3] : n2[e3]), n2.u = Object.assign(__spreadValues({}, r4.u), n2.u), n2.m = Object.assign(__spreadValues({}, r4.m), n2.m), n2.a = r4.a.concat(n2.a), n2.b = r4.b.concat(n2.b); + } else n2 = oe(e2); + else n2 = oe(t2); + return n2.Above ? n2 : Object.assign(n2, { Above: ze, After: Re, Any: ye, Before: Ae, Below: Le, Check: De, Child: Be, Closed: Ee, Default: xe, Define: Ce, Empty: Ie, Exact: Ve, Fault: me, Ignore: $e, Len: _e, Max: Pe, Min: Fe, Never: we, Open: de, Refer: Ge, Rename: Te, Required: ve, Rest: Je, Skip: be, Type: We }); } - function He(e2, t2, n3, r3) { - return Ue(n3 || S, e2, 4e3, t2, r3); + function He(e2, t2, n2, r3) { + return Ue(n2 || S, e2, 4e3, t2, r3); } - function Ue(e2, t2, n3, r3, l3, i2) { + function Ue(e2, t2, n2, r3, l2, i2) { var o2; - let s2 = { key: t2.key, type: t2.node.t, node: t2.node, value: t2.val, path: pe(t2), why: e2, check: (null === (o2 = t2.check) || void 0 === o2 ? void 0 : o2.name) || "none", args: t2.checkargs || {}, mark: n3, text: "", use: l3 || {} }, u2 = he((void 0 === t2.val ? y : Ze(t2.val)).replace(/"/g, "")); + let s2 = { key: t2.key, type: t2.node.t, node: t2.node, value: t2.val, path: pe(t2), why: e2, check: (null === (o2 = t2.check) || void 0 === o2 ? void 0 : o2.name) || "none", args: t2.checkargs || {}, mark: n2, text: "", use: l2 || {} }, u2 = he((void 0 === t2.val ? y : Ze(t2.val)).replace(/"/g, "")); if (null == (r3 = r3 || t2.node.z) || "" === r3) { - let n4 = u2.startsWith("[") ? p2 : u2.startsWith("{") ? v : null == t2.val || c === typeof t2.val && isNaN(t2.val) ? "value" : typeof t2.val, r4 = u2.startsWith("[") || Y(t2.parents[t2.pI]) ? "index" : "property", o3 = "is", h2 = null == l3 ? void 0 : l3.k; - h2 = Y(h2) ? (r4 = 1 < h2.length ? (o3 = "are", "properties") : r4, h2.join(", ")) : h2, s2.text = "Validation failed for " + (0 < s2.path.length ? `${r4} "${s2.path}" with ` : "") + `${n4} "${u2}" because ` + (x === e2 ? $ === t2.node.t ? `the ${n4} is not an instance of ${t2.node.u.n}` : `the ${n4} is not of type ${j === t2.node.t ? d : t2.node.t}` : f2 === e2 ? "" === t2.val ? "an empty string is not allowed" : `the ${n4} is required` : "closed" === e2 ? `the ${r4} "${h2}" ${o3} not allowed` : j === e2 ? "the string did not match " + t2.node.v : a === e2 ? "no value is allowed" : `check "${null == i2 ? e2 : i2}" failed`) + (s2.use.thrown ? " (threw: " + s2.use.thrown.message + ")" : "."); + let n3 = u2.startsWith("[") ? p : u2.startsWith("{") ? v : null == t2.val || c === typeof t2.val && isNaN(t2.val) ? "value" : typeof t2.val, r4 = u2.startsWith("[") || Y(t2.parents[t2.pI]) ? "index" : "property", o3 = "is", h2 = null == l2 ? void 0 : l2.k; + h2 = Y(h2) ? (r4 = 1 < h2.length ? (o3 = "are", "properties") : r4, h2.join(", ")) : h2, s2.text = "Validation failed for " + (0 < s2.path.length ? `${r4} "${s2.path}" with ` : "") + `${n3} "${u2}" because ` + (x === e2 ? $ === t2.node.t ? `the ${n3} is not an instance of ${t2.node.u.n}` : `the ${n3} is not of type ${j === t2.node.t ? d : t2.node.t}` : f === e2 ? "" === t2.val ? "an empty string is not allowed" : `the ${n3} is required` : "closed" === e2 ? `the ${r4} "${h2}" ${o3} not allowed` : j === e2 ? "the string did not match " + t2.node.v : a === e2 ? "no value is allowed" : `check "${null == i2 ? e2 : i2}" failed`) + (s2.use.thrown ? " (threw: " + s2.use.thrown.message + ")" : "."); } else s2.text = r3.replace(/\$VALUE/g, u2).replace(/\$PATH/g, s2.path); return s2; } function Ke(e2) { var t2; - let n3 = e2.t; + let n2 = e2.t; const r3 = { number: O, string: N, boolean: V }; - if (r3[n3]) { + if (r3[n2]) { let t3 = ""; - return e2.r && (t3 += r3[n3]), "" === t3 && (t3 = JSON.stringify(e2.v)), t3 += e2.b.map((t4) => t4.s ? "." + t4.s(e2) : "").join(""), t3; + return e2.r && (t3 += r3[n2]), "" === t3 && (t3 = JSON.stringify(e2.v)), t3 += e2.b.map((t4) => t4.s ? "." + t4.s(e2) : "").join(""), t3; } - if (m2 === n3) { - let n4 = ""; - return e2.r && (n4 += _2), m2 == (null === (t2 = e2.c) || void 0 === t2 ? void 0 : t2.t) && (n4 += ("" === n4 ? "" : ".") + L), n4 += e2.b.map((t3) => t3.s ? "." + t3.s(e2) : "").join(""), n4.startsWith(".") && (n4 = n4.slice(1)), "" === n4 && (n4 = T), n4; + if (m === n2) { + let n3 = ""; + return e2.r && (n3 += _2), m == (null === (t2 = e2.c) || void 0 === t2 ? void 0 : t2.t) && (n3 += ("" === n3 ? "" : ".") + L), n3 += e2.b.map((t3) => t3.s ? "." + t3.s(e2) : "").join(""), n3.startsWith(".") && (n3 = n3.slice(1)), "" === n3 && (n3 = T), n3; } - if (S === n3) { + if (S === n2) { let t3 = ""; return t3 += e2.b.map((t4) => t4.s ? "." + t4.s(e2) : "").join(""), t3.startsWith(".") && (t3 = t3.slice(1)), t3; } - if (v === n3) { + if (v === n2) { let t3 = {}; - for (let n4 in e2.v) t3[n4] = Ke(e2.v[n4]); + for (let n3 in e2.v) t3[n3] = Ke(e2.v[n3]); return void 0 !== e2.c && (r3[e2.c.t] ? t3.$$ = W + "(" + r3[e2.c.t] + ")" : "any" === e2.c.t ? t3.$$ = L : (t3.$$ = W + "($$child)", t3.$$child = Ke(e2.c))), 0 < e2.b.length && (void 0 === t3.$$ && (t3.$$ = ""), t3.$$ += e2.b.map((t4) => t4.s ? "." + t4.s(e2) : "").join(""), t3.$$.startsWith(".") && (t3.$$ = t3.$$.slice(1))), t3.$$ && 1 === Object.keys(t3).length && t3.$$.startsWith(W) ? t3.$$ : t3; } - if (b === n3) { - let t3 = {}, n4 = 0, r4 = e2.u.list.map((e3) => Ke(e3)).map((e3, r5) => v === typeof e3 ? (t3[r5 = "$$ref" + n4++] = e3, r5) : e3), l3 = (e2.b[0].n || e2.b[0].name) + "(" + r4.join(",") + ")"; - return 0 === n4 ? l3 : __spreadValues({ $$: l3 }, t3); + if (b === n2) { + let t3 = {}, n3 = 0, r4 = e2.u.list.map((e3) => Ke(e3)).map((e3, r5) => v === typeof e3 ? (t3[r5 = "$$ref" + n3++] = e3, r5) : e3), l2 = (e2.b[0].n || e2.b[0].name) + "(" + r4.join(",") + ")"; + return 0 === n3 ? l2 : __spreadValues({ $$: l2 }, t3); } - if (p2 === n3) { + if (p === n2) { let t3 = []; - return void 0 !== e2.c ? t3[0] = Ke(e2.c) : t3 = Object.keys(e2.v).reduce((t4, n4) => (t4[+n4] = e2.v[n4], t4), []).map((e3) => Ke(e3)), t3; + return void 0 !== e2.c ? t3[0] = Ke(e2.c) : t3 = Object.keys(e2.v).reduce((t4, n3) => (t4[+n3] = e2.v[n3], t4), []).map((e3) => Ke(e3)), t3; } - if (j === n3) return e2.v.toString(); + if (j === n2) return e2.v.toString(); } - function Ze(e2, t2, r3, l3) { + function Ze(e2, t2, r3, l2) { let o2; - if (!l3 && e2 && e2.$ && (n2 === e2.$.gubu$ || true === e2.$.gubu$)) return e2 = JSON.stringify(Ke(e2)), r3 && (e2 = "string" == typeof e2 ? e2.replace(/\\/g, "").replace(/"/g, "") : ""), e2; + if (!l2 && e2 && e2.$ && (n === e2.$.gubu$ || true === e2.$.gubu$)) return e2 = JSON.stringify(Ke(e2)), r3 && (e2 = "string" == typeof e2 ? e2.replace(/\\/g, "").replace(/"/g, "") : ""), e2; try { o2 = te(e2, (e3, o3) => { var s2, u2, a2; if (t2 && (o3 = t2(e3, o3)), null != o3 && v === typeof o3 && o3.constructor && A !== o3.constructor.name && R !== o3.constructor.name) o3 = "[object RegExp]" === i.call(o3) || h === typeof o3.toString ? o3.toString() : o3.constructor.name; - else if (l3 || n2 !== (null === (s2 = null == o3 ? void 0 : o3.$) || void 0 === s2 ? void 0 : s2.gubu$)) if (h === typeof o3) o3 = h === typeof ue[o3.name] && isNaN(+e3) ? void 0 : null != o3.name && "" !== o3.name ? o3.name : he(o3.toString().replace(/[ \t\r\n]+/g, " ")); + else if (l2 || n !== (null === (s2 = null == o3 ? void 0 : o3.$) || void 0 === s2 ? void 0 : s2.gubu$)) if (h === typeof o3) o3 = h === typeof ue[o3.name] && isNaN(+e3) ? void 0 : null != o3.name && "" !== o3.name ? o3.name : he(o3.toString().replace(/[ \t\r\n]+/g, " ")); else if ("bigint" == typeof o3) o3 = String(o3.toString()); else { if (Number.isNaN(o3)) return "NaN"; - true === l3 || true !== (null === (u2 = null == o3 ? void 0 : o3.$) || void 0 === u2 ? void 0 : u2.gubu$) && n2 !== (null === (a2 = null == o3 ? void 0 : o3.$) || void 0 === a2 ? void 0 : a2.gubu$) || (o3 = JSON.stringify(Ke(o3))); + true === l2 || true !== (null === (u2 = null == o3 ? void 0 : o3.$) || void 0 === u2 ? void 0 : u2.gubu$) && n !== (null === (a2 = null == o3 ? void 0 : o3.$) || void 0 === a2 ? void 0 : a2.gubu$) || (o3 = JSON.stringify(Ke(o3))); } else "number" === o3.t || "string" === o3.t || "boolean" === o3.t ? o3 = o3.v : (o3 = Ke(o3), o3 = JSON.stringify(o3), r3 && (o3 = "string" == typeof o3 ? o3.replace(/\\/g, "").replace(/"/g, "") : "")); return o3; @@ -1650,34 +1665,34 @@ var __async = (__this, __arguments, generator) => { const et = ue; t.Gubu = et; function tt(e2) { - return function(t2, n3, r3) { - let l3 = false; - d === typeof t2 && (l3 = true, r3 = n3, n3 = t2); - const i2 = et(r3 = r3 || n3, { name: e2 + (n3 = d === typeof n3 ? " (" + n3 + ")" : "") }), o2 = i2.node(), s2 = o2.k; - let u2 = t2, a2 = {}, c2 = 0, f3 = 0; + return function(t2, n2, r3) { + let l2 = false; + d === typeof t2 && (l2 = true, r3 = n2, n2 = t2); + const i2 = et(r3 = r3 || n2, { name: e2 + (n2 = d === typeof n2 ? " (" + n2 + ")" : "") }), o2 = i2.node(), s2 = o2.k; + let u2 = t2, a2 = {}, c2 = 0, f2 = 0; for (; c2 < s2.length; c2++) { let e3 = o2.v[s2[c2]]; - e3.p && (e3 = o2.v[s2[c2]] = ((t3) => Re(function(e4, n4, r4) { + e3.p && (e3 = o2.v[s2[c2]] = ((t3) => Re(function(e4, n3, r4) { if (0 < r4.curerr.length) { - f3++; + f2++; for (let e5 = s2.length - 1; e5 > t3; e5--) o2.v[s2[e5]].m.rest ? a2[s2[e5]].splice(o2.v[s2[e5]].m.rest_pos + t3 - e5, 0, a2[s2[e5 - 1]]) : (r4.vals[r4.pI + e5 - t3] = r4.vals[r4.pI + e5 - t3 - 1], a2[s2[e5]] = a2[s2[e5 - 1]]); - n4.uval = void 0, n4.done = false; + n3.uval = void 0, n3.done = false; } return true; - }, e3))(c2), e3.e = false), c2 !== s2.length - 1 || o2.v[s2[c2]].m.rest || (o2.v[s2[c2]] = Re(function(e4, t3, n4) { - return !(s2.length - f3 < u2.length && (0 === n4.curerr.length && (t3.err = `Too many arguments for type signature (was ${u2.length}, expected ${s2.length - f3})`), t3.fatal = true, 1)); + }, e3))(c2), e3.e = false), c2 !== s2.length - 1 || o2.v[s2[c2]].m.rest || (o2.v[s2[c2]] = Re(function(e4, t3, n3) { + return !(s2.length - f2 < u2.length && (0 === n3.curerr.length && (t3.err = `Too many arguments for type signature (was ${u2.length}, expected ${s2.length - f2})`), t3.fatal = true, 1)); }, o2.v[s2[c2]])); } - function p3(e3) { + function p2(e3) { for (let t3 = 0; t3 < s2.length; t3++) { - let n4 = o2.v[s2[t3]]; - n4.m.rest ? (a2[s2[t3]] = [...e3].slice(t3), n4.m.rest_pos = a2[s2[t3]].length) : a2[s2[t3]] = e3[t3]; + let n3 = o2.v[s2[t3]]; + n3.m.rest ? (a2[s2[t3]] = [...e3].slice(t3), n3.m.rest_pos = a2[s2[t3]].length) : a2[s2[t3]] = e3[t3]; } return a2; } - return l3 ? function(e3) { - return u2 = e3, a2 = {}, c2 = 0, f3 = 0, i2(p3(e3)); - } : i2(p3(t2)); + return l2 ? function(e3) { + return u2 = e3, a2 = {}, c2 = 0, f2 = 0, i2(p2(e3)); + } : i2(p2(t2)); }; } const { Gubu: nt } = t; @@ -1686,31 +1701,31 @@ var __async = (__this, __arguments, generator) => { })(gubu_min$2, gubu_min$2.exports); var gubu_minExports = gubu_min$2.exports; const gubu_min$1 = /* @__PURE__ */ getDefaultExportFromCjs(gubu_minExports); - function cmap(o, p2) { - return Object.entries(o).reduce((r2, n2, _2) => (_2 = Object.entries(p2).reduce((s, m2) => cmap.FILTER === s ? s : (s[m2[0]] = // transfom(val,key,current,parentkey,parent) - "function" === typeof m2[1] ? m2[1](n2[1][m2[0]], { - skey: m2[0], - self: n2[1], - key: n2[0], + function cmap(o, p) { + return Object.entries(o).reduce((r2, n, _2) => (_2 = Object.entries(p).reduce((s, m) => cmap.FILTER === s ? s : (s[m[0]] = // transfom(val,key,current,parentkey,parent) + "function" === typeof m[1] ? m[1](n[1][m[0]], { + skey: m[0], + self: n[1], + key: n[0], parent: o - }) : m2[1], cmap.FILTER === s[m2[0]] ? cmap.FILTER : s), {}), cmap.FILTER === _2 ? 0 : r2[n2[0]] = _2, r2), {}); + }) : m[1], cmap.FILTER === s[m[0]] ? cmap.FILTER : s), {}), cmap.FILTER === _2 ? 0 : r2[n[0]] = _2, r2), {}); } cmap.COPY = (x) => x; - cmap.FILTER = (x) => "function" === typeof x ? (y, p2, _2) => (_2 = x(y, p2), Array.isArray(_2) ? !_2[0] ? _2[1] : cmap.FILTER : _2) : x ? x : cmap.FILTER; - cmap.KEY = (_2, p2) => p2.key; - function vmap(o, p2) { - return Object.entries(o).reduce((r2, n2, _2) => (_2 = Object.entries(p2).reduce((s, m2) => vmap.FILTER === s ? s : (s[m2[0]] = // transfom(val,key,current,parentkey,parent) + cmap.FILTER = (x) => "function" === typeof x ? (y, p, _2) => (_2 = x(y, p), Array.isArray(_2) ? !_2[0] ? _2[1] : cmap.FILTER : _2) : x ? x : cmap.FILTER; + cmap.KEY = (_2, p) => p.key; + function vmap(o, p) { + return Object.entries(o).reduce((r2, n, _2) => (_2 = Object.entries(p).reduce((s, m) => vmap.FILTER === s ? s : (s[m[0]] = // transfom(val,key,current,parentkey,parent) // 'function' === typeof m[1] ? m[1](n[1][m[0]], m[0], n[1], n[0], o) : m[1] - "function" === typeof m2[1] ? m2[1](n2[1][m2[0]], { - skey: m2[0], - self: n2[1], - key: n2[0], + "function" === typeof m[1] ? m[1](n[1][m[0]], { + skey: m[0], + self: n[1], + key: n[0], parent: o - }) : m2[1], vmap.FILTER === s[m2[0]] ? vmap.FILTER : s), {}), vmap.FILTER === _2 ? 0 : r2.push(_2), r2), []); + }) : m[1], vmap.FILTER === s[m[0]] ? vmap.FILTER : s), {}), vmap.FILTER === _2 ? 0 : r2.push(_2), r2), []); } vmap.COPY = (x) => x; - vmap.FILTER = (x) => "function" === typeof x ? (y, p2, _2) => (_2 = x(y, p2), Array.isArray(_2) ? !_2[0] ? _2[1] : vmap.FILTER : _2) : x ? x : vmap.FILTER; - vmap.KEY = (_2, p2) => p2.key; + vmap.FILTER = (x) => "function" === typeof x ? (y, p, _2) => (_2 = x(y, p), Array.isArray(_2) ? !_2[0] ? _2[1] : vmap.FILTER : _2) : x ? x : vmap.FILTER; + vmap.KEY = (_2, p) => p.key; function searchParamsToObject(searchParams) { let params = /* @__PURE__ */ Object.create(null); for (let [key, value] of searchParams.entries()) { @@ -1742,8 +1757,8 @@ var __async = (__this, __arguments, generator) => { }); function setPath(msg, meta) { return __async(this, null, function* () { - const q2 = Object.entries(msg.query).reduce((s, n2) => s + ("" === s ? "?" : "") + (encodeURIComponent(n2[0]) + "=" + encodeURIComponent(n2[1])), ""); - const path = "/view/" + msg.view + q2; + const q = Object.entries(msg.query).reduce((s, n) => s + ("" === s ? "?" : "") + (encodeURIComponent(n[0]) + "=" + encodeURIComponent(n[1])), ""); + const path = "/view/" + msg.view + q; msg.navigate(path); }); } @@ -1796,19 +1811,19 @@ var __async = (__this, __arguments, generator) => { function _objectWithoutPropertiesLoose(r2, e) { if (null == r2) return {}; var t = {}; - for (var n2 in r2) if ({}.hasOwnProperty.call(r2, n2)) { - if (e.includes(n2)) continue; - t[n2] = r2[n2]; + for (var n in r2) if ({}.hasOwnProperty.call(r2, n)) { + if (e.includes(n)) continue; + t[n] = r2[n]; } return t; } function _extends$1() { - return _extends$1 = Object.assign ? Object.assign.bind() : function(n2) { + return _extends$1 = Object.assign ? Object.assign.bind() : function(n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; - for (var r2 in t) ({}).hasOwnProperty.call(t, r2) && (n2[r2] = t[r2]); + for (var r2 in t) ({}).hasOwnProperty.call(t, r2) && (n[r2] = t[r2]); } - return n2; + return n; }, _extends$1.apply(null, arguments); } var propTypes$1 = { exports: {} }; @@ -1827,24 +1842,24 @@ var __async = (__this, __arguments, generator) => { if (hasRequiredReactIs_production_min$1) return reactIs_production_min$1; hasRequiredReactIs_production_min$1 = 1; "use strict"; - var b = "function" === typeof Symbol && Symbol.for, c = b ? Symbol.for("react.element") : 60103, d = b ? Symbol.for("react.portal") : 60106, e = b ? Symbol.for("react.fragment") : 60107, f2 = b ? Symbol.for("react.strict_mode") : 60108, g = b ? Symbol.for("react.profiler") : 60114, h = b ? Symbol.for("react.provider") : 60109, k2 = b ? Symbol.for("react.context") : 60110, l2 = b ? Symbol.for("react.async_mode") : 60111, m2 = b ? Symbol.for("react.concurrent_mode") : 60111, n2 = b ? Symbol.for("react.forward_ref") : 60112, p2 = b ? Symbol.for("react.suspense") : 60113, q2 = b ? Symbol.for("react.suspense_list") : 60120, r2 = b ? Symbol.for("react.memo") : 60115, t = b ? Symbol.for("react.lazy") : 60116, v = b ? Symbol.for("react.block") : 60121, w = b ? Symbol.for("react.fundamental") : 60117, x = b ? Symbol.for("react.responder") : 60118, y = b ? Symbol.for("react.scope") : 60119; + var b = "function" === typeof Symbol && Symbol.for, c = b ? Symbol.for("react.element") : 60103, d = b ? Symbol.for("react.portal") : 60106, e = b ? Symbol.for("react.fragment") : 60107, f = b ? Symbol.for("react.strict_mode") : 60108, g = b ? Symbol.for("react.profiler") : 60114, h = b ? Symbol.for("react.provider") : 60109, k = b ? Symbol.for("react.context") : 60110, l = b ? Symbol.for("react.async_mode") : 60111, m = b ? Symbol.for("react.concurrent_mode") : 60111, n = b ? Symbol.for("react.forward_ref") : 60112, p = b ? Symbol.for("react.suspense") : 60113, q = b ? Symbol.for("react.suspense_list") : 60120, r2 = b ? Symbol.for("react.memo") : 60115, t = b ? Symbol.for("react.lazy") : 60116, v = b ? Symbol.for("react.block") : 60121, w = b ? Symbol.for("react.fundamental") : 60117, x = b ? Symbol.for("react.responder") : 60118, y = b ? Symbol.for("react.scope") : 60119; function z(a) { if ("object" === typeof a && null !== a) { var u = a.$$typeof; switch (u) { case c: switch (a = a.type, a) { - case l2: - case m2: + case l: + case m: case e: case g: - case f2: - case p2: + case f: + case p: return a; default: switch (a = a && a.$$typeof, a) { - case k2: - case n2: + case k: + case n: case t: case r2: case h: @@ -1859,27 +1874,27 @@ var __async = (__this, __arguments, generator) => { } } function A(a) { - return z(a) === m2; + return z(a) === m; } - reactIs_production_min$1.AsyncMode = l2; - reactIs_production_min$1.ConcurrentMode = m2; - reactIs_production_min$1.ContextConsumer = k2; + reactIs_production_min$1.AsyncMode = l; + reactIs_production_min$1.ConcurrentMode = m; + reactIs_production_min$1.ContextConsumer = k; reactIs_production_min$1.ContextProvider = h; reactIs_production_min$1.Element = c; - reactIs_production_min$1.ForwardRef = n2; + reactIs_production_min$1.ForwardRef = n; reactIs_production_min$1.Fragment = e; reactIs_production_min$1.Lazy = t; reactIs_production_min$1.Memo = r2; reactIs_production_min$1.Portal = d; reactIs_production_min$1.Profiler = g; - reactIs_production_min$1.StrictMode = f2; - reactIs_production_min$1.Suspense = p2; + reactIs_production_min$1.StrictMode = f; + reactIs_production_min$1.Suspense = p; reactIs_production_min$1.isAsyncMode = function(a) { - return A(a) || z(a) === l2; + return A(a) || z(a) === l; }; reactIs_production_min$1.isConcurrentMode = A; reactIs_production_min$1.isContextConsumer = function(a) { - return z(a) === k2; + return z(a) === k; }; reactIs_production_min$1.isContextProvider = function(a) { return z(a) === h; @@ -1888,7 +1903,7 @@ var __async = (__this, __arguments, generator) => { return "object" === typeof a && null !== a && a.$$typeof === c; }; reactIs_production_min$1.isForwardRef = function(a) { - return z(a) === n2; + return z(a) === n; }; reactIs_production_min$1.isFragment = function(a) { return z(a) === e; @@ -1906,13 +1921,13 @@ var __async = (__this, __arguments, generator) => { return z(a) === g; }; reactIs_production_min$1.isStrictMode = function(a) { - return z(a) === f2; + return z(a) === f; }; reactIs_production_min$1.isSuspense = function(a) { - return z(a) === p2; + return z(a) === p; }; reactIs_production_min$1.isValidElementType = function(a) { - return "string" === typeof a || "function" === typeof a || a === e || a === m2 || a === g || a === f2 || a === p2 || a === q2 || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r2 || a.$$typeof === h || a.$$typeof === k2 || a.$$typeof === n2 || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v); + return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r2 || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v); }; reactIs_production_min$1.typeOf = z; return reactIs_production_min$1; @@ -1996,7 +2011,7 @@ var __async = (__this, __arguments, generator) => { var ContextProvider = REACT_PROVIDER_TYPE; var Element2 = REACT_ELEMENT_TYPE; var ForwardRef = REACT_FORWARD_REF_TYPE; - var Fragment2 = REACT_FRAGMENT_TYPE; + var Fragment = REACT_FRAGMENT_TYPE; var Lazy = REACT_LAZY_TYPE; var Memo = REACT_MEMO_TYPE; var Portal2 = REACT_PORTAL_TYPE; @@ -2055,7 +2070,7 @@ var __async = (__this, __arguments, generator) => { reactIs_development$1.ContextProvider = ContextProvider; reactIs_development$1.Element = Element2; reactIs_development$1.ForwardRef = ForwardRef; - reactIs_development$1.Fragment = Fragment2; + reactIs_development$1.Fragment = Fragment; reactIs_development$1.Lazy = Lazy; reactIs_development$1.Memo = Memo; reactIs_development$1.Portal = Portal2; @@ -2128,8 +2143,8 @@ var __async = (__this, __arguments, generator) => { for (var i = 0; i < 10; i++) { test2["_" + String.fromCharCode(i)] = i; } - var order2 = Object.getOwnPropertyNames(test2).map(function(n2) { - return test2[n2]; + var order2 = Object.getOwnPropertyNames(test2).map(function(n) { + return test2[n]; }); if (order2.join("") !== "0123456789") { return false; @@ -2764,17 +2779,17 @@ var __async = (__this, __arguments, generator) => { var propTypesExports = propTypes$1.exports; const PropTypes = /* @__PURE__ */ getDefaultExportFromCjs(propTypesExports); function r(e) { - var t, f2, n2 = ""; - if ("string" == typeof e || "number" == typeof e) n2 += e; + var t, f, n = ""; + if ("string" == typeof e || "number" == typeof e) n += e; else if ("object" == typeof e) if (Array.isArray(e)) { var o = e.length; - for (t = 0; t < o; t++) e[t] && (f2 = r(e[t])) && (n2 && (n2 += " "), n2 += f2); - } else for (f2 in e) e[f2] && (n2 && (n2 += " "), n2 += f2); - return n2; + for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f); + } else for (f in e) e[f] && (n && (n += " "), n += f); + return n; } function clsx() { - for (var e, t, f2 = 0, n2 = "", o = arguments.length; f2 < o; f2++) (e = arguments[f2]) && (t = r(e)) && (n2 && (n2 += " "), n2 += t); - return n2; + for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t); + return n; } function composeClasses(slots, getUtilityClass, classes = void 0) { const output = {}; @@ -2819,12 +2834,12 @@ var __async = (__this, __arguments, generator) => { hasRequired_extends = 1; (function(module2) { function _extends3() { - return module2.exports = _extends3 = Object.assign ? Object.assign.bind() : function(n2) { + return module2.exports = _extends3 = Object.assign ? Object.assign.bind() : function(n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; - for (var r2 in t) ({}).hasOwnProperty.call(t, r2) && (n2[r2] = t[r2]); + for (var r2 in t) ({}).hasOwnProperty.call(t, r2) && (n[r2] = t[r2]); } - return n2; + return n; }, module2.exports.__esModule = true, module2.exports["default"] = module2.exports, _extends3.apply(null, arguments); } module2.exports = _extends3, module2.exports.__esModule = true, module2.exports["default"] = module2.exports; @@ -2841,9 +2856,9 @@ var __async = (__this, __arguments, generator) => { function _objectWithoutPropertiesLoose3(r2, e) { if (null == r2) return {}; var t = {}; - for (var n2 in r2) if ({}.hasOwnProperty.call(r2, n2)) { - if (e.includes(n2)) continue; - t[n2] = r2[n2]; + for (var n in r2) if ({}.hasOwnProperty.call(r2, n)) { + if (e.includes(n)) continue; + t[n] = r2[n]; } return t; } @@ -3246,10 +3261,10 @@ var __async = (__this, __arguments, generator) => { var post = offset2 - 1; var rule = offset2 === 0 ? rules2 : [""]; var size = sizeof(rule); - for (var i = 0, j = 0, k2 = 0; i < index2; ++i) + for (var i = 0, j = 0, k = 0; i < index2; ++i) for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x) if (z = trim(j > 0 ? rule[x] + " " + y : replace(y, /&\f/g, rule[x]))) - props[k2++] = z; + props[k++] = z; return node(value, root, parent, offset2 === 0 ? RULESET : type, props, children, length2); } function comment(value, root, parent) { @@ -3381,8 +3396,8 @@ var __async = (__this, __arguments, generator) => { break; case 5152: case 5920: - return replace(value, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(_2, a, b, c, d, e, f2) { - return MS + a + ":" + b + f2 + (c ? MS + a + "-span:" + (d ? e : +e - +b) + f2 : "") + value; + return replace(value, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(_2, a, b, c, d, e, f) { + return MS + a + ":" + b + f + (c ? MS + a + "-span:" + (d ? e : +e - +b) + f : "") + value; }); case 4949: if (charat(value, length2 + 6) === 121) @@ -3594,9 +3609,9 @@ var __async = (__this, __arguments, generator) => { var points = []; var rules2 = getRules(value, points); var parentRules = parent.props; - for (var i = 0, k2 = 0; i < rules2.length; i++) { - for (var j = 0; j < parentRules.length; j++, k2++) { - element.props[k2] = points[i] ? rules2[i].replace(/&\f/g, parentRules[j]) : parentRules[j] + " " + rules2[i]; + for (var i = 0, k = 0; i < rules2.length; i++) { + for (var j = 0; j < parentRules.length; j++, k++) { + element.props[k] = points[i] ? rules2[i].replace(/&\f/g, parentRules[j]) : parentRules[j] + " " + rules2[i]; } } }; @@ -3994,7 +4009,7 @@ var __async = (__this, __arguments, generator) => { if (hasRequiredReactIs_production_min) return reactIs_production_min; hasRequiredReactIs_production_min = 1; "use strict"; - var b = Symbol.for("react.element"), c = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), e = Symbol.for("react.strict_mode"), f2 = Symbol.for("react.profiler"), g = Symbol.for("react.provider"), h = Symbol.for("react.context"), k2 = Symbol.for("react.server_context"), l2 = Symbol.for("react.forward_ref"), m2 = Symbol.for("react.suspense"), n2 = Symbol.for("react.suspense_list"), p2 = Symbol.for("react.memo"), q2 = Symbol.for("react.lazy"), t = Symbol.for("react.offscreen"), u; + var b = Symbol.for("react.element"), c = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), e = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), g = Symbol.for("react.provider"), h = Symbol.for("react.context"), k = Symbol.for("react.server_context"), l = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), n = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), q = Symbol.for("react.lazy"), t = Symbol.for("react.offscreen"), u; u = Symbol.for("react.module.reference"); function v(a) { if ("object" === typeof a && null !== a) { @@ -4003,18 +4018,18 @@ var __async = (__this, __arguments, generator) => { case b: switch (a = a.type, a) { case d: - case f2: + case f: case e: - case m2: - case n2: + case m: + case n: return a; default: switch (a = a && a.$$typeof, a) { - case k2: + case k: case h: - case l2: - case q2: - case p2: + case l: + case q: + case p: case g: return a; default: @@ -4029,15 +4044,15 @@ var __async = (__this, __arguments, generator) => { reactIs_production_min.ContextConsumer = h; reactIs_production_min.ContextProvider = g; reactIs_production_min.Element = b; - reactIs_production_min.ForwardRef = l2; + reactIs_production_min.ForwardRef = l; reactIs_production_min.Fragment = d; - reactIs_production_min.Lazy = q2; - reactIs_production_min.Memo = p2; + reactIs_production_min.Lazy = q; + reactIs_production_min.Memo = p; reactIs_production_min.Portal = c; - reactIs_production_min.Profiler = f2; + reactIs_production_min.Profiler = f; reactIs_production_min.StrictMode = e; - reactIs_production_min.Suspense = m2; - reactIs_production_min.SuspenseList = n2; + reactIs_production_min.Suspense = m; + reactIs_production_min.SuspenseList = n; reactIs_production_min.isAsyncMode = function() { return false; }; @@ -4054,34 +4069,34 @@ var __async = (__this, __arguments, generator) => { return "object" === typeof a && null !== a && a.$$typeof === b; }; reactIs_production_min.isForwardRef = function(a) { - return v(a) === l2; + return v(a) === l; }; reactIs_production_min.isFragment = function(a) { return v(a) === d; }; reactIs_production_min.isLazy = function(a) { - return v(a) === q2; + return v(a) === q; }; reactIs_production_min.isMemo = function(a) { - return v(a) === p2; + return v(a) === p; }; reactIs_production_min.isPortal = function(a) { return v(a) === c; }; reactIs_production_min.isProfiler = function(a) { - return v(a) === f2; + return v(a) === f; }; reactIs_production_min.isStrictMode = function(a) { return v(a) === e; }; reactIs_production_min.isSuspense = function(a) { - return v(a) === m2; + return v(a) === m; }; reactIs_production_min.isSuspenseList = function(a) { - return v(a) === n2; + return v(a) === n; }; reactIs_production_min.isValidElementType = function(a) { - return "string" === typeof a || "function" === typeof a || a === d || a === f2 || a === e || a === m2 || a === n2 || a === t || "object" === typeof a && null !== a && (a.$$typeof === q2 || a.$$typeof === p2 || a.$$typeof === g || a.$$typeof === h || a.$$typeof === l2 || a.$$typeof === u || void 0 !== a.getModuleId) ? true : false; + return "string" === typeof a || "function" === typeof a || a === d || a === f || a === e || a === m || a === n || a === t || "object" === typeof a && null !== a && (a.$$typeof === q || a.$$typeof === p || a.$$typeof === g || a.$$typeof === h || a.$$typeof === l || a.$$typeof === u || void 0 !== a.getModuleId) ? true : false; }; reactIs_production_min.typeOf = v; return reactIs_production_min; @@ -4182,7 +4197,7 @@ var __async = (__this, __arguments, generator) => { var ContextProvider = REACT_PROVIDER_TYPE; var Element2 = REACT_ELEMENT_TYPE; var ForwardRef = REACT_FORWARD_REF_TYPE; - var Fragment2 = REACT_FRAGMENT_TYPE; + var Fragment = REACT_FRAGMENT_TYPE; var Lazy = REACT_LAZY_TYPE; var Memo = REACT_MEMO_TYPE; var Portal2 = REACT_PORTAL_TYPE; @@ -4250,7 +4265,7 @@ var __async = (__this, __arguments, generator) => { reactIs_development.ContextProvider = ContextProvider; reactIs_development.Element = Element2; reactIs_development.ForwardRef = ForwardRef; - reactIs_development.Fragment = Fragment2; + reactIs_development.Fragment = Fragment; reactIs_development.Lazy = Lazy; reactIs_development.Memo = Memo; reactIs_development.Portal = Portal2; @@ -5521,12 +5536,12 @@ var __async = (__this, __arguments, generator) => { if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache$1(r2); if (t && t.has(e)) return t.get(e); - var n2 = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; + var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; - i && (i.get || i.set) ? Object.defineProperty(n2, u, i) : n2[u] = e[u]; + i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } - return n2.default = e, t && t.set(e, n2), n2; + return n.default = e, t && t.set(e, n), n; } function isEmpty$3(obj) { return Object.keys(obj).length === 0; @@ -5834,10 +5849,10 @@ var __async = (__this, __arguments, generator) => { const re = new RegExp(`.{1,${color2.length >= 6 ? 2 : 1}}`, "g"); let colors = color2.match(re); if (colors && colors[0].length === 1) { - colors = colors.map((n2) => n2 + n2); + colors = colors.map((n) => n + n); } - return colors ? `rgb${colors.length === 4 ? "a" : ""}(${colors.map((n2, index2) => { - return index2 < 3 ? parseInt(n2, 16) : Math.round(parseInt(n2, 16) / 255 * 1e3) / 1e3; + return colors ? `rgb${colors.length === 4 ? "a" : ""}(${colors.map((n, index2) => { + return index2 < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1e3) / 1e3; }).join(", ")})` : ""; } function intToHex$1(int) { @@ -5904,7 +5919,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg values: values2 } = color2; if (type.indexOf("rgb") !== -1) { - values2 = values2.map((n2, i) => i < 3 ? parseInt(n2, 10) : n2); + values2 = values2.map((n, i) => i < 3 ? parseInt(n, 10) : n); } else if (type.indexOf("hsl") !== -1) { values2[1] = `${values2[1]}%`; values2[2] = `${values2[2]}%`; @@ -5923,7 +5938,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg const { values: values2 } = decomposeColor$1(color2); - return `#${values2.map((n2, i) => intToHex$1(i === 3 ? Math.round(255 * n2) : n2)).join("")}`; + return `#${values2.map((n, i) => intToHex$1(i === 3 ? Math.round(255 * n) : n)).join("")}`; } function hslToRgb$1(color2) { color2 = decomposeColor$1(color2); @@ -5932,11 +5947,11 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg } = color2; const h = values2[0]; const s = values2[1] / 100; - const l2 = values2[2] / 100; - const a = s * Math.min(l2, 1 - l2); - const f2 = (n2, k2 = (n2 + h / 30) % 12) => l2 - a * Math.max(Math.min(k2 - 3, 9 - k2, 1), -1); + const l = values2[2] / 100; + const a = s * Math.min(l, 1 - l); + const f = (n, k = (n + h / 30) % 12) => l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1); let type = "rgb"; - const rgb = [Math.round(f2(0) * 255), Math.round(f2(8) * 255), Math.round(f2(4) * 255)]; + const rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)]; if (color2.type === "hsla") { type += "a"; rgb.push(values2[3]); @@ -7495,10 +7510,10 @@ Please use another name.` : formatMuiErrorMessage$1(18)); const re = new RegExp(`.{1,${color2.length >= 6 ? 2 : 1}}`, "g"); let colors = color2.match(re); if (colors && colors[0].length === 1) { - colors = colors.map((n2) => n2 + n2); + colors = colors.map((n) => n + n); } - return colors ? `rgb${colors.length === 4 ? "a" : ""}(${colors.map((n2, index2) => { - return index2 < 3 ? parseInt(n2, 16) : Math.round(parseInt(n2, 16) / 255 * 1e3) / 1e3; + return colors ? `rgb${colors.length === 4 ? "a" : ""}(${colors.map((n, index2) => { + return index2 < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1e3) / 1e3; }).join(", ")})` : ""; } function intToHex(int) { @@ -7563,7 +7578,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg values: values2 } = color2; if (type.indexOf("rgb") !== -1) { - values2 = values2.map((n2, i) => i < 3 ? parseInt(n2, 10) : n2); + values2 = values2.map((n, i) => i < 3 ? parseInt(n, 10) : n); } else if (type.indexOf("hsl") !== -1) { values2[1] = `${values2[1]}%`; values2[2] = `${values2[2]}%`; @@ -7582,7 +7597,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg const { values: values2 } = decomposeColor(color2); - return `#${values2.map((n2, i) => intToHex(i === 3 ? Math.round(255 * n2) : n2)).join("")}`; + return `#${values2.map((n, i) => intToHex(i === 3 ? Math.round(255 * n) : n)).join("")}`; } function hslToRgb(color2) { color2 = decomposeColor(color2); @@ -7591,11 +7606,11 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg } = color2; const h = values2[0]; const s = values2[1] / 100; - const l2 = values2[2] / 100; - const a = s * Math.min(l2, 1 - l2); - const f2 = (n2, k2 = (n2 + h / 30) % 12) => l2 - a * Math.max(Math.min(k2 - 3, 9 - k2, 1), -1); + const l = values2[2] / 100; + const a = s * Math.min(l, 1 - l); + const f = (n, k = (n + h / 30) % 12) => l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1); let type = "rgb"; - const rgb = [Math.round(f2(0) * 255), Math.round(f2(8) * 255), Math.round(f2(4) * 255)]; + const rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)]; if (color2.type === "hsla") { type += "a"; rgb.push(values2[3]); @@ -9031,18 +9046,18 @@ try { } const assignNestedKeys = (obj, keys, value, arrayKeys = []) => { let temp = obj; - keys.forEach((k2, index2) => { + keys.forEach((k, index2) => { if (index2 === keys.length - 1) { if (Array.isArray(temp)) { - temp[Number(k2)] = value; + temp[Number(k)] = value; } else if (temp && typeof temp === "object") { - temp[k2] = value; + temp[k] = value; } } else if (temp && typeof temp === "object") { - if (!temp[k2]) { - temp[k2] = arrayKeys.includes(k2) ? [] : {}; + if (!temp[k]) { + temp[k] = arrayKeys.includes(k) ? [] : {}; } - temp = temp[k2]; + temp = temp[k]; } }); }; @@ -10768,9 +10783,9 @@ try { const { head } = basicHeadSpec; const tools = vmap2(head.tool, { active: vmap2.FILTER, - name: vmap2.FILTER((_2, p2) => { + name: vmap2.FILTER((_2, p) => { var _a; - return [(_a = basicHeadSpec.tool[p2.key]) == null ? void 0 : _a.active, p2.key]; + return [(_a = basicHeadSpec.tool[p.key]) == null ? void 0 : _a.active, p.key]; }), align: vmap2.COPY }).map((t) => __spreadValues(__spreadValues({}, basicHeadSpec.tool[t.name]), t)); @@ -15343,8 +15358,8 @@ try { return children; } var values = Object.values || function(obj) { - return Object.keys(obj).map(function(k2) { - return obj[k2]; + return Object.keys(obj).map(function(k) { + return obj[k]; }); }; var defaultProps = { @@ -16985,9 +17000,9 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` : for return `linear-gradient(rgba(255 255 255 / ${overlay}), rgba(255 255 255 / ${overlay}))`; }); function assignNode(obj, keys) { - keys.forEach((k2) => { - if (!obj[k2]) { - obj[k2] = {}; + keys.forEach((k) => { + if (!obj[k]) { + obj[k] = {}; } }); } @@ -17565,12 +17580,12 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r2); if (t && t.has(e)) return t.get(e); - var n2 = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; + var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; - i && (i.get || i.set) ? Object.defineProperty(n2, u, i) : n2[u] = e[u]; + i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } - return n2.default = e, t && t.set(e, n2), n2; + return n.default = e, t && t.set(e, n), n; } function isObjectEmpty(obj) { return Object.keys(obj).length === 0; @@ -18834,8 +18849,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha popper: listScrollParents(popper2) }; var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers2, state.options.modifiers))); - state.orderedModifiers = orderedModifiers.filter(function(m2) { - return m2.enabled; + state.orderedModifiers = orderedModifiers.filter(function(m) { + return m.enabled; }); runModifierEffects(); return instance.update(); @@ -22604,7 +22619,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha return offset2; } function getTransformOriginValue(transformOrigin) { - return [transformOrigin.horizontal, transformOrigin.vertical].map((n2) => typeof n2 === "number" ? `${n2}px` : n2).join(" "); + return [transformOrigin.horizontal, transformOrigin.vertical].map((n) => typeof n === "number" ? `${n}px` : n).join(" "); } function resolveAnchorEl(anchorEl) { return typeof anchorEl === "function" ? anchorEl() : anchorEl; @@ -25308,7 +25323,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$x = ArrowDownward.default = void 0; var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); - var _jsxRuntime$x = jsxRuntimeExports; + var _jsxRuntime$x = requireJsxRuntime(); var _default$x = default_1$x = ArrowDownward.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); @@ -25321,7 +25336,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$w = ArrowRight.default = void 0; var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); - var _jsxRuntime$w = jsxRuntimeExports; + var _jsxRuntime$w = requireJsxRuntime(); var _default$w = default_1$w = ArrowRight.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); @@ -25334,7 +25349,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$v = Cancel.default = void 0; var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); - var _jsxRuntime$v = jsxRuntimeExports; + var _jsxRuntime$v = requireJsxRuntime(); var _default$v = default_1$v = Cancel.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); @@ -25347,7 +25362,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$u = ChevronLeft.default = void 0; var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); - var _jsxRuntime$u = jsxRuntimeExports; + var _jsxRuntime$u = requireJsxRuntime(); var _default$u = default_1$u = ChevronLeft.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); @@ -25360,7 +25375,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$t = ChevronRight.default = void 0; var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); - var _jsxRuntime$t = jsxRuntimeExports; + var _jsxRuntime$t = requireJsxRuntime(); var _default$t = default_1$t = ChevronRight.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); @@ -25373,7 +25388,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$s = ClearAll.default = void 0; var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); - var _jsxRuntime$s = jsxRuntimeExports; + var _jsxRuntime$s = requireJsxRuntime(); var _default$s = default_1$s = ClearAll.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); @@ -25386,7 +25401,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$r = Close.default = void 0; var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); - var _jsxRuntime$r = jsxRuntimeExports; + var _jsxRuntime$r = requireJsxRuntime(); var _default$r = default_1$r = Close.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); @@ -25399,7 +25414,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$q = ContentCopy.default = void 0; var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); - var _jsxRuntime$q = jsxRuntimeExports; + var _jsxRuntime$q = requireJsxRuntime(); var _default$q = default_1$q = ContentCopy.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); @@ -25412,7 +25427,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$p = DensityLarge.default = void 0; var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); - var _jsxRuntime$p = jsxRuntimeExports; + var _jsxRuntime$p = requireJsxRuntime(); var _default$p = default_1$p = DensityLarge.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); @@ -25425,7 +25440,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$o = DensityMedium.default = void 0; var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); - var _jsxRuntime$o = jsxRuntimeExports; + var _jsxRuntime$o = requireJsxRuntime(); var _default$o = default_1$o = DensityMedium.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); @@ -25438,7 +25453,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$n = DensitySmall.default = void 0; var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); - var _jsxRuntime$n = jsxRuntimeExports; + var _jsxRuntime$n = requireJsxRuntime(); var _default$n = default_1$n = DensitySmall.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); @@ -25451,7 +25466,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$m = DragHandle.default = void 0; var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); - var _jsxRuntime$m = jsxRuntimeExports; + var _jsxRuntime$m = requireJsxRuntime(); var _default$m = default_1$m = DragHandle.default = (0, _createSvgIcon$m.default)(/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); @@ -25464,7 +25479,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$l = DynamicFeed.default = void 0; var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); - var _jsxRuntime$l = jsxRuntimeExports; + var _jsxRuntime$l = requireJsxRuntime(); var _default$l = default_1$l = DynamicFeed.default = (0, _createSvgIcon$l.default)([/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { @@ -25479,7 +25494,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$k = Edit.default = void 0; var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); - var _jsxRuntime$k = jsxRuntimeExports; + var _jsxRuntime$k = requireJsxRuntime(); var _default$k = default_1$k = Edit.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); @@ -25492,7 +25507,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$j = ExpandMore.default = void 0; var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); - var _jsxRuntime$j = jsxRuntimeExports; + var _jsxRuntime$j = requireJsxRuntime(); var _default$j = default_1$j = ExpandMore.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); @@ -25505,7 +25520,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$i = FilterAlt.default = void 0; var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); - var _jsxRuntime$i = jsxRuntimeExports; + var _jsxRuntime$i = requireJsxRuntime(); var _default$i = default_1$i = FilterAlt.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); @@ -25518,7 +25533,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$h = FilterList.default = void 0; var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); - var _jsxRuntime$h = jsxRuntimeExports; + var _jsxRuntime$h = requireJsxRuntime(); var _default$h = default_1$h = FilterList.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); @@ -25531,7 +25546,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$g = FilterListOff.default = void 0; var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); - var _jsxRuntime$g = jsxRuntimeExports; + var _jsxRuntime$g = requireJsxRuntime(); var _default$g = default_1$g = FilterListOff.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); @@ -25544,7 +25559,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$f = FirstPage.default = void 0; var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); - var _jsxRuntime$f = jsxRuntimeExports; + var _jsxRuntime$f = requireJsxRuntime(); var _default$f = default_1$f = FirstPage.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); @@ -25557,7 +25572,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$e = Fullscreen.default = void 0; var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); - var _jsxRuntime$e = jsxRuntimeExports; + var _jsxRuntime$e = requireJsxRuntime(); var _default$e = default_1$e = Fullscreen.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); @@ -25570,7 +25585,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$d = FullscreenExit.default = void 0; var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); - var _jsxRuntime$d = jsxRuntimeExports; + var _jsxRuntime$d = requireJsxRuntime(); var _default$d = default_1$d = FullscreenExit.default = (0, _createSvgIcon$d.default)(/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); @@ -25583,7 +25598,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$c = KeyboardDoubleArrowDown.default = void 0; var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); - var _jsxRuntime$c = jsxRuntimeExports; + var _jsxRuntime$c = requireJsxRuntime(); var _default$c = default_1$c = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$c.default)([/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { @@ -25598,7 +25613,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$b = LastPage.default = void 0; var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); - var _jsxRuntime$b = jsxRuntimeExports; + var _jsxRuntime$b = requireJsxRuntime(); var _default$b = default_1$b = LastPage.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); @@ -25611,7 +25626,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$a = MoreHoriz.default = void 0; var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); - var _jsxRuntime$a = jsxRuntimeExports; + var _jsxRuntime$a = requireJsxRuntime(); var _default$a = default_1$a = MoreHoriz.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); @@ -25624,7 +25639,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$9 = MoreVert.default = void 0; var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); - var _jsxRuntime$9 = jsxRuntimeExports; + var _jsxRuntime$9 = requireJsxRuntime(); var _default$9 = default_1$9 = MoreVert.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); @@ -25637,7 +25652,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$8 = PushPin.default = void 0; var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); - var _jsxRuntime$8 = jsxRuntimeExports; + var _jsxRuntime$8 = requireJsxRuntime(); var _default$8 = default_1$8 = PushPin.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" @@ -25651,7 +25666,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$7 = RestartAlt.default = void 0; var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); - var _jsxRuntime$7 = jsxRuntimeExports; + var _jsxRuntime$7 = requireJsxRuntime(); var _default$7 = default_1$7 = RestartAlt.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); @@ -25664,7 +25679,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$6 = Save.default = void 0; var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); - var _jsxRuntime$6 = jsxRuntimeExports; + var _jsxRuntime$6 = requireJsxRuntime(); var _default$6 = default_1$6 = Save.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); @@ -25677,7 +25692,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$5 = Search.default = void 0; var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); - var _jsxRuntime$5 = jsxRuntimeExports; + var _jsxRuntime$5 = requireJsxRuntime(); var _default$5 = default_1$5 = Search.default = (0, _createSvgIcon$5.default)(/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); @@ -25690,7 +25705,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$4 = SearchOff.default = void 0; var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); - var _jsxRuntime$4 = jsxRuntimeExports; + var _jsxRuntime$4 = requireJsxRuntime(); var _default$4 = default_1$4 = SearchOff.default = (0, _createSvgIcon$4.default)([/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { @@ -25705,7 +25720,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$3 = Sort.default = void 0; var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); - var _jsxRuntime$3 = jsxRuntimeExports; + var _jsxRuntime$3 = requireJsxRuntime(); var _default$3 = default_1$3 = Sort.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); @@ -25718,7 +25733,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$2 = SyncAlt.default = void 0; var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); - var _jsxRuntime$2 = jsxRuntimeExports; + var _jsxRuntime$2 = requireJsxRuntime(); var _default$2 = default_1$2 = SyncAlt.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); @@ -25731,7 +25746,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$1 = ViewColumn.default = void 0; var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); - var _jsxRuntime$1 = jsxRuntimeExports; + var _jsxRuntime$1 = requireJsxRuntime(); var _default$1 = default_1$1 = ViewColumn.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); @@ -25744,7 +25759,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1 = VisibilityOff.default = void 0; var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); - var _jsxRuntime = jsxRuntimeExports; + var _jsxRuntime = requireJsxRuntime(); var _default = default_1 = VisibilityOff.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); @@ -26101,8 +26116,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha this.getFurthestMeasurement = (measurements, index2) => { const furthestMeasurementsFound = /* @__PURE__ */ new Map(); const furthestMeasurements = /* @__PURE__ */ new Map(); - for (let m2 = index2 - 1; m2 >= 0; m2--) { - const measurement = measurements[m2]; + for (let m = index2 - 1; m >= 0; m--) { + const measurement = measurements[m]; if (furthestMeasurementsFound.has(measurement.lane)) { continue; } @@ -26250,8 +26265,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha () => [this.getIndexes(), this.getMeasurements()], (indexes, measurements) => { const virtualItems = []; - for (let k2 = 0, len = indexes.length; k2 < len; k2++) { - const i = indexes[k2]; + for (let k = 0, len = indexes.length; k < len; k++) { + const i = indexes[k]; const measurement = measurements[i]; virtualItems.push(measurement); } @@ -26378,7 +26393,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha end2 = this.options.paddingStart; } else { end2 = this.options.lanes === 1 ? (_a2 = (_a = measurements[measurements.length - 1]) == null ? void 0 : _a.end) != null ? _a2 : 0 : Math.max( - ...measurements.slice(-this.options.lanes).map((m2) => m2.end) + ...measurements.slice(-this.options.lanes).map((m) => m.end) ); } return end2 - this.options.scrollMargin + this.options.paddingEnd; @@ -50657,8 +50672,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha getClockNumberText, selectedId }) => { - const f2 = utils2.formatNumber; - return [[5, f2("05")], [10, f2("10")], [15, f2("15")], [20, f2("20")], [25, f2("25")], [30, f2("30")], [35, f2("35")], [40, f2("40")], [45, f2("45")], [50, f2("50")], [55, f2("55")], [0, f2("00")]].map(([numberValue, label], index2) => { + const f = utils2.formatNumber; + return [[5, f("05")], [10, f("10")], [15, f("15")], [20, f("20")], [25, f("25")], [30, f("30")], [35, f("35")], [40, f("40")], [45, f("45")], [50, f("50")], [55, f("55")], [0, f("00")]].map(([numberValue, label], index2) => { const selected = numberValue === value; return /* @__PURE__ */ jsxRuntimeExports.jsx(ClockNumber, { label, @@ -59822,12 +59837,12 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); function __rest(s, e) { var t = {}; - for (var p2 in s) if (Object.prototype.hasOwnProperty.call(s, p2) && e.indexOf(p2) < 0) - t[p2] = s[p2]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p2 = Object.getOwnPropertySymbols(s); i < p2.length; i++) { - if (e.indexOf(p2[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p2[i])) - t[p2[i]] = s[p2[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; } return t; } @@ -62737,8 +62752,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }; } function buildFilter(query) { - const filter = Object.entries(query).reduce((a, n2) => (n2[0].startsWith("f_") ? a[n2[0].substring(2)] = n2[1] : null, a), {}); - const filterDesc = Object.entries(filter).reduce((a, n2) => a + "~" + n2[0] + "=" + n2[1], ""); + const filter = Object.entries(query).reduce((a, n) => (n[0].startsWith("f_") ? a[n[0].substring(2)] = n[1] : null, a), {}); + const filterDesc = Object.entries(filter).reduce((a, n) => a + "~" + n[0] + "=" + n[1], ""); return { filter, filterDesc }; } Object.assign(VxgBasicEntityListPlugin, { @@ -64677,7 +64692,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha id: String, name: String, kind: "", - label: gubu_minExports.Default("", String), + label: "", ux: Open$i({ kind: gubu_minExports.Exact("Checkbox"), edit: gubu_minExports.Default(true), @@ -64726,7 +64741,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha id: String, name: String, kind: "", - label: gubu_minExports.Default(""), + label: "", options: Open$h({ label: { field: gubu_minExports.Default("label") }, value: { field: gubu_minExports.Default("value") }, @@ -64830,19 +64845,19 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha id: String, name: String, kind: "", - label: gubu_minExports.Default("", String), + label: "", ux: Open$g({ kind: gubu_minExports.Exact("Slider"), edit: gubu_minExports.Default(true), step: gubu_minExports.Default(1), min: gubu_minExports.Default(0), max: gubu_minExports.Default(100), - props: { + props: Open$g({ marks: gubu_minExports.Default({}), valueLabelDisplay: gubu_minExports.Exact("on", "auto", "off").Default("auto"), direction: gubu_minExports.Exact("horizontal", "vertical").Default("horizontal"), track: gubu_minExports.Exact("normal", "inverted", "disabled").Default("normal") - } + }) }) }) }), @@ -64901,7 +64916,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha id: String, name: String, kind: "", - label: gubu_minExports.Default("", String), + llabel: "", ux: Open$f({ kind: gubu_minExports.Exact("RadioGroup"), edit: gubu_minExports.Default(true), @@ -64994,7 +65009,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha id: String, name: String, kind: "", - label: gubu_minExports.Default("", String), + label: "", ux: Open$e({ kind: gubu_minExports.Exact("TextBox"), edit: gubu_minExports.Default(true), @@ -65035,7 +65050,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha id: String, name: String, kind: "", - label: gubu_minExports.Default("", String), + label: "", ux: Open$d({ kind: gubu_minExports.Exact("Text"), edit: gubu_minExports.Default(true), @@ -65074,7 +65089,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha id: String, name: String, kind: "", - label: gubu_minExports.Default("", String), + label: "", ux: Open$c({ kind: gubu_minExports.Exact("Date"), edit: gubu_minExports.Default(true), @@ -65111,7 +65126,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha id: String, name: String, kind: "", - label: gubu_minExports.Default("", String), + label: "", ux: Open$b({ kind: gubu_minExports.Exact("Time"), edit: gubu_minExports.Default(true), @@ -65148,7 +65163,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha id: String, name: String, kind: "", - label: gubu_minExports.Default("", String), + label: "", ux: Open$a({ kind: gubu_minExports.Exact("DateTime"), edit: gubu_minExports.Default(true), @@ -65185,7 +65200,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha id: String, name: String, kind: "", - label: gubu_minExports.Default("", String), + label: "", ux: Open$9({ kind: gubu_minExports.Exact("Rating"), edit: gubu_minExports.Default(true), @@ -65231,7 +65246,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha id: String, name: String, kind: "", - label: "", + label: String, ux: Open$8({ kind: gubu_minExports.Exact("Button"), edit: gubu_minExports.Default(true), @@ -65272,7 +65287,12 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha id: String, name: String, kind: "", - label: String, + label: "", + options: Open$7({ + label: { field: "label" }, + value: { field: "value" }, + ents: Open$7({}) + }), ux: Open$7({ kind: gubu_minExports.Exact("ButtonGroup"), edit: gubu_minExports.Default(true), @@ -65313,8 +65333,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha field: Open$6({ id: String, name: String, - kind: String, - label: gubu_minExports.Default("", String), + kind: "", + label: "", ux: Open$6({ kind: gubu_minExports.Exact( "Text", @@ -65709,7 +65729,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha "aim:app,on:BasicLed,save:item", function(msg) { return __async(this, null, function* () { - const data = Object.entries(spec.def.edit.field).filter((n2) => false !== n2[1].ux.edit).reduce((a, n2) => (a[n2[0]] = msg.data[n2[0]], a), {}); + const data = Object.entries(spec.def.edit.field).filter((n) => false !== n[1].ux.edit).reduce((a, n) => (a[n[0]] = msg.data[n[0]], a), {}); const item = yield seneca.entity(entCanon).save$(data); navigate("/view/" + name + "/edit/" + item.id); }); @@ -65893,13 +65913,13 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const sections = vmap(nav.section, { active: vmap.FILTER, name: vmap.COPY, - items: (_2, p2) => vmap(p2.self.item, { + items: (_2, p) => vmap(p.self.item, { active: vmap.FILTER, name: vmap.COPY, view: vmap.COPY, - title: vmap.FILTER((_22, p22) => { + title: vmap.FILTER((_22, p2) => { var _a; - return (_a = viewMap[p22.self.view]) == null ? void 0 : _a.title; + return (_a = viewMap[p2.self.view]) == null ? void 0 : _a.title; }) }) }); @@ -66063,8 +66083,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha var e = { exports: {} }; (function(t2) { (function() { - !function(n3) { - "object" == typeof e.exports ? e.exports = n3() : ("undefined" != typeof window ? window : void 0 !== t2 ? t2 : "undefined" != typeof self ? self : this).Gex = n3(); + !function(n2) { + "object" == typeof e.exports ? e.exports = n2() : ("undefined" != typeof window ? window : void 0 !== t2 ? t2 : "undefined" != typeof self ? self : this).Gex = n2(); }(function() { var e2 = { exports: {} }; Object.defineProperty(e2.exports, "__esModule", { value: true }), e2.exports.Gex = void 0; @@ -66083,8 +66103,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } match(e3) { e3 = "" + e3; - let t4 = false, n4 = Object.keys(this.gexmap); - for (let r3 = 0; r3 < n4.length && !t4; r3++) t4 = !!this.gexmap[n4[r3]].exec(e3); + let t4 = false, n3 = Object.keys(this.gexmap); + for (let r3 = 0; r3 < n3.length && !t4; r3++) t4 = !!this.gexmap[n3[r3]].exec(e3); return t4; } on(e3) { @@ -66093,12 +66113,12 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha if ("string" === t4 || "number" === t4 || "boolean" === t4 || e3 instanceof Date || e3 instanceof RegExp) return this.match(e3) ? e3 : null; if (Array.isArray(e3)) { let t5 = []; - for (let n4 = 0; n4 < e3.length; n4++) !this.dodgy(e3[n4]) && this.match(e3[n4]) && t5.push(e3[n4]); + for (let n3 = 0; n3 < e3.length; n3++) !this.dodgy(e3[n3]) && this.match(e3[n3]) && t5.push(e3[n3]); return t5; } { let t5 = {}; - for (let n4 in e3) Object.prototype.hasOwnProperty.call(e3, n4) && this.match(n4) && (t5[n4] = e3[n4]); + for (let n3 in e3) Object.prototype.hasOwnProperty.call(e3, n3) && this.match(n3) && (t5[n3] = e3[n3]); return t5; } } @@ -66124,41 +66144,41 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha return this.toString(); } } - function n3(e3) { + function n2(e3) { return new t3(e3); } - return e2.exports.Gex = n3, e2.exports = n3, e2.exports.Gex = n3, e2.exports.default = n3, e2.exports; + return e2.exports.Gex = n2, e2.exports = n2, e2.exports.Gex = n2, e2.exports.default = n2, e2.exports; }); }).call(this); }).call(this, "undefined" != typeof commonjsGlobal ? commonjsGlobal : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}), e = e.exports; - var t, n2, r2, s, i, o, l2, u, a, f2 = {}, p2 = this && this.__classPrivateFieldGet || function(e2, t2, n3, r3) { - if ("a" === n3 && !r3) throw new TypeError("Private accessor was defined without a getter"); + var t, n, r2, s, i, o, l, u, a, f = {}, p = this && this.__classPrivateFieldGet || function(e2, t2, n2, r3) { + if ("a" === n2 && !r3) throw new TypeError("Private accessor was defined without a getter"); if ("function" == typeof t2 ? e2 !== t2 || !r3 : !t2.has(e2)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return "m" === n3 ? r3 : "a" === n3 ? r3.call(e2) : r3 ? r3.value : t2.get(e2); + return "m" === n2 ? r3 : "a" === n2 ? r3.call(e2) : r3 ? r3.value : t2.get(e2); }; - Object.defineProperty(f2, "__esModule", { value: true }), f2.IntervalMatcher = f2.GexMatcher = void 0, f2.GexMatcher = class { + Object.defineProperty(f, "__esModule", { value: true }), f.IntervalMatcher = f.GexMatcher = void 0, f.GexMatcher = class { constructor() { } - make(t2, n3) { - if ("string" == typeof n3 && n3.match(/[*?]/)) { - let t3 = (0, e.Gex)(n3); - return { kind: "gex", match: (e2) => null != t3.on(e2), fix: n3, meta: {}, same(e2) { + make(t2, n2) { + if ("string" == typeof n2 && n2.match(/[*?]/)) { + let t3 = (0, e.Gex)(n2); + return { kind: "gex", match: (e2) => null != t3.on(e2), fix: n2, meta: {}, same(e2) { return null != e2 && e2.kind === this.kind && e2.fix === this.fix; } }; } } scan(e2, t2) { - let n3 = e2.filter((e3) => "*" === e3.fix).length > 0; - return { complete: n3, sound: n3, gaps: [], overs: [], why: "no-star" }; + let n2 = e2.filter((e3) => "*" === e3.fix).length > 0; + return { complete: n2, sound: n2, gaps: [], overs: [], why: "no-star" }; } }; const h = new RegExp(["^/s*", "(=*[<>/(/[]?=*)?/s*([-+0-9a-fA-FeEoOxX]+(/.([0-9a-fA-FeEoOxX]+))?)([/)/]]?)(/s*(,|&+|/|+|/./.)/s*(=*[<>]?=*)/s*([-+.0-9a-fA-FeEoOxX]+)/s*([/)/]]?))?/s*$"].join("").replace(/\//g, "\\")); class c { constructor() { - this.kind = "interval", t.set(this, (e2, t2) => function(n3) { - return e2(n3) && t2(n3); - }), n2.set(this, (e2, t2) => function(n3) { - return e2(n3) || t2(n3); + this.kind = "interval", t.set(this, (e2, t2) => function(n2) { + return e2(n2) && t2(n2); + }), n.set(this, (e2, t2) => function(n2) { + return e2(n2) || t2(n2); }), r2.set(this, (e2) => function(e3) { return false; }), s.set(this, (e2) => function(e3) { @@ -66167,7 +66187,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha return t2 > e2; }), o.set(this, (e2) => function(t2) { return t2 >= e2; - }), l2.set(this, (e2) => function(t2) { + }), l.set(this, (e2) => function(t2) { return t2 < e2; }), u.set(this, (e2) => function(t2) { return t2 <= e2; @@ -66175,183 +66195,183 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha return t2 === e2; }); } - make(e2, f3) { - if ("string" == typeof f3 && f3.match(/[=<>.[()\]]/)) { - let e3 = f3.match(h), d2 = { jo: "and", o0: "err", n0: NaN, o1: "err", n1: NaN }, g2 = (e4) => false; + make(e2, f2) { + if ("string" == typeof f2 && f2.match(/[=<>.[()\]]/)) { + let e3 = f2.match(h), d2 = { jo: "and", o0: "err", n0: NaN, o1: "err", n1: NaN }, g2 = (e4) => false; if (null != e3) { - let h2 = c.normop(e3[1]) || c.normop(e3[5]), m3 = c.normop(e3[8]) || c.normop(e3[10]), v = p2(this, "=" === h2 ? a : "<" === h2 || ")" === h2 ? l2 : "<=" === h2 || "]" === h2 ? u : ">" === h2 || "(" === h2 ? i : ">=" === h2 || "[" === h2 ? o : s, "f"), x = Number(e3[2]), k2 = null == e3[9] ? NaN : Number(e3[9]), y = e3[7], w = null == y ? p2(this, n2, "f") : "&" === y.substring(0, 1) || "," === y.substring(0, 1) ? p2(this, t, "f") : p2(this, n2, "f"); - ".." === y && (w = p2(this, t, "f"), v = p2(this, s, "f") === v ? p2(this, o, "f") : v, m3 = "" === m3 ? "<=" : m3); - let N = p2(this, null == m3 ? r2 : "=" === m3 ? a : "<" === m3 || ")" === m3 ? l2 : "<=" === m3 || "]" === m3 ? u : ">" === m3 ? i : ">=" === m3 ? o : s, "f"); - if (x === k2 && ("=" === h2 && null != m3 ? (k2 = NaN, N = p2(this, r2, "f"), v = m3.includes("<") ? p2(this, u, "f") : m3.includes(">") ? p2(this, o, "f") : m3.includes("=") ? p2(this, a, "f") : p2(this, s, "f")) : "=" === m3 && null != h2 && (k2 = NaN, N = p2(this, r2, "f"), v = h2.includes("<") ? p2(this, u, "f") : h2.includes(">") ? p2(this, o, "f") : p2(this, s, "f"))), p2(this, s, "f") !== v && p2(this, r2, "f") === N && (p2(this, l2, "f") === v || p2(this, u, "f") === v ? (N = v, k2 = x, v = p2(this, o, "f"), x = Number.NEGATIVE_INFINITY, w = p2(this, t, "f")) : p2(this, i, "f") !== v && p2(this, o, "f") !== v || (N = p2(this, u, "f"), k2 = Number.POSITIVE_INFINITY, w = p2(this, t, "f"))), !isNaN(k2) && k2 < x) { - let e4 = N, t2 = k2; - k2 = x, x = t2, ".." !== y && (N = v, v = e4); + let h2 = c.normop(e3[1]) || c.normop(e3[5]), m2 = c.normop(e3[8]) || c.normop(e3[10]), v = p(this, "=" === h2 ? a : "<" === h2 || ")" === h2 ? l : "<=" === h2 || "]" === h2 ? u : ">" === h2 || "(" === h2 ? i : ">=" === h2 || "[" === h2 ? o : s, "f"), x = Number(e3[2]), k = null == e3[9] ? NaN : Number(e3[9]), y = e3[7], w = null == y ? p(this, n, "f") : "&" === y.substring(0, 1) || "," === y.substring(0, 1) ? p(this, t, "f") : p(this, n, "f"); + ".." === y && (w = p(this, t, "f"), v = p(this, s, "f") === v ? p(this, o, "f") : v, m2 = "" === m2 ? "<=" : m2); + let N = p(this, null == m2 ? r2 : "=" === m2 ? a : "<" === m2 || ")" === m2 ? l : "<=" === m2 || "]" === m2 ? u : ">" === m2 ? i : ">=" === m2 ? o : s, "f"); + if (x === k && ("=" === h2 && null != m2 ? (k = NaN, N = p(this, r2, "f"), v = m2.includes("<") ? p(this, u, "f") : m2.includes(">") ? p(this, o, "f") : m2.includes("=") ? p(this, a, "f") : p(this, s, "f")) : "=" === m2 && null != h2 && (k = NaN, N = p(this, r2, "f"), v = h2.includes("<") ? p(this, u, "f") : h2.includes(">") ? p(this, o, "f") : p(this, s, "f"))), p(this, s, "f") !== v && p(this, r2, "f") === N && (p(this, l, "f") === v || p(this, u, "f") === v ? (N = v, k = x, v = p(this, o, "f"), x = Number.NEGATIVE_INFINITY, w = p(this, t, "f")) : p(this, i, "f") !== v && p(this, o, "f") !== v || (N = p(this, u, "f"), k = Number.POSITIVE_INFINITY, w = p(this, t, "f"))), !isNaN(k) && k < x) { + let e4 = N, t2 = k; + k = x, x = t2, ".." !== y && (N = v, v = e4); } - let b = v(x), O = N(k2), j = w(b, O); - return d2 = { jo: j.name, o0: b.name, n0: x, o1: O.name, n1: k2 }, g2 = (e4) => { - let t2 = false, n3 = parseFloat(e4); - return isNaN(n3) || (t2 = j(n3)), t2; - }, { kind: "interval", fix: f3, meta: d2, match: g2, same(e4) { + let b = v(x), O = N(k), j = w(b, O); + return d2 = { jo: j.name, o0: b.name, n0: x, o1: O.name, n1: k }, g2 = (e4) => { + let t2 = false, n2 = parseFloat(e4); + return isNaN(n2) || (t2 = j(n2)), t2; + }, { kind: "interval", fix: f2, meta: d2, match: g2, same(e4) { return null != e4 && e4.kind === this.kind && e4.meta.jo === this.meta.jo && e4.meta.o0 === this.meta.o0 && e4.meta.n0 === this.meta.n0 && e4.meta.o1 === this.meta.o1 && e4.meta.n1 === this.meta.n1; } }; } } } scan(e2, t2) { - let n3 = { complete: false, sound: false, gaps: [], overs: [], lower: null, upper: null }, r3 = Number.NEGATIVE_INFINITY, s2 = Number.POSITIVE_INFINITY, i2 = this.half_intervals(e2); + let n2 = { complete: false, sound: false, gaps: [], overs: [], lower: null, upper: null }, r3 = Number.NEGATIVE_INFINITY, s2 = Number.POSITIVE_INFINITY, i2 = this.half_intervals(e2); i2.reduce((e3, t3) => { - let n4 = "eq" === t3.o, s3 = "lt" === t3.o, i3 = "lte" === t3.o, o3 = "gt" === t3.o, l3 = "gte" === t3.o, u2 = t3.n; + let n3 = "eq" === t3.o, s3 = "lt" === t3.o, i3 = "lte" === t3.o, o3 = "gt" === t3.o, l2 = "gte" === t3.o, u2 = t3.n; if (null == e3.lower) { let s4 = { n: r3, o: "gte" }; - e3.lower = s4, e3.upper = t3, r3 == u2 && l3 || (o3 || l3 ? e3.gaps.push([s4, { n: u2, o: o3 ? "lte" : "lt", m: 0 }]) : n4 && e3.gaps.push([s4, { n: u2, o: "lte", m: 1 }])); + e3.lower = s4, e3.upper = t3, r3 == u2 && l2 || (o3 || l2 ? e3.gaps.push([s4, { n: u2, o: o3 ? "lte" : "lt", m: 0 }]) : n3 && e3.gaps.push([s4, { n: u2, o: "lte", m: 1 }])); } else { - let r4 = "eq" === e3.upper.o, a2 = "lt" === e3.upper.o, f3 = "lte" === e3.upper.o, p3 = (e3.upper.o, e3.upper.o, e3.upper.n), h2 = e3.upper; - u2 === p3 ? a2 && (l3 || n4) || (f3 || r4) && o3 || (r4 || a2 || f3) && e3.gaps.push([{ n: p3, o: r4 || f3 ? "gt" : "gte", m: 2, d: { u: h2, h: t3 } }, { n: u2, o: n4 || l3 ? "lt" : "lte", m: 3 }]) : p3 < u2 ? s3 || i3 || (r4 || a2 || f3) && e3.gaps.push([{ n: p3, o: r4 || f3 ? "gt" : "gte", m: 4 }, { n: u2, o: n4 || l3 ? "lt" : "lte", m: 5 }]) : e3.overs.push([{ n: u2, o: n4 || l3 ? "gte" : "gt", m: 10 }, { n: p3, o: r4 || f3 ? "lte" : "lt", m: 11 }]), e3.upper = t3; + let r4 = "eq" === e3.upper.o, a2 = "lt" === e3.upper.o, f2 = "lte" === e3.upper.o, p2 = (e3.upper.o, e3.upper.o, e3.upper.n), h2 = e3.upper; + u2 === p2 ? a2 && (l2 || n3) || (f2 || r4) && o3 || (r4 || a2 || f2) && e3.gaps.push([{ n: p2, o: r4 || f2 ? "gt" : "gte", m: 2, d: { u: h2, h: t3 } }, { n: u2, o: n3 || l2 ? "lt" : "lte", m: 3 }]) : p2 < u2 ? s3 || i3 || (r4 || a2 || f2) && e3.gaps.push([{ n: p2, o: r4 || f2 ? "gt" : "gte", m: 4 }, { n: u2, o: n3 || l2 ? "lt" : "lte", m: 5 }]) : e3.overs.push([{ n: u2, o: n3 || l2 ? "gte" : "gt", m: 10 }, { n: p2, o: r4 || f2 ? "lte" : "lt", m: 11 }]), e3.upper = t3; } return e3; - }, n3); + }, n2); let o2 = 0 < i2.length && i2[i2.length - 1]; - return o2 && s2 !== o2.n && "gt" !== o2.o && "gte" !== o2.o && n3.gaps.push([{ n: o2.n, o: "eq" === o2.o || "lte" === o2.o ? "gt" : "gte", m: 6 }, { n: s2, o: "lte", m: 7 }]), n3.complete = 0 === n3.gaps.length, n3.sound = 0 === n3.overs.length, n3; + return o2 && s2 !== o2.n && "gt" !== o2.o && "gte" !== o2.o && n2.gaps.push([{ n: o2.n, o: "eq" === o2.o || "lte" === o2.o ? "gt" : "gte", m: 6 }, { n: s2, o: "lte", m: 7 }]), n2.complete = 0 === n2.gaps.length, n2.sound = 0 === n2.overs.length, n2; } half_intervals(e2) { let t2 = []; for (let r3 of e2) t2.push([{ n: r3.meta.n0, o: r3.meta.o0 }, { n: r3.meta.n1, o: r3.meta.o1 }]); - var n3 = ["lt", "lte", "eq", "gte", "gt"]; + var n2 = ["lt", "lte", "eq", "gte", "gt"]; return t2.map((e3) => [isNaN(e3[0].n) || null == e3[0].n ? null : e3[0], isNaN(e3[1].n) || null == e3[1].n ? null : e3[1]].filter((e4) => null != e4)).sort((e3, t3) => { if (e3[0].n < t3[0].n) return -1; if (t3[0].n < e3[0].n) return 1; - var r3 = n3.indexOf(e3[0].o), s2 = n3.indexOf(t3[0].o); + var r3 = n2.indexOf(e3[0].o), s2 = n2.indexOf(t3[0].o); if (r3 < s2) return -1; if (s2 < r3) return 1; if (e3[1].n < t3[1].n) return -1; if (t3[1].n < e3[1].n) return 1; - var i2 = n3.indexOf(e3[1].o), o2 = n3.indexOf(t3[1].o); + var i2 = n2.indexOf(e3[1].o), o2 = n2.indexOf(t3[1].o); return i2 < o2 ? -1 : o2 < i2 ? 1 : 0; }).reduce((e3, t3) => e3.concat(...t3), []); } } - f2.IntervalMatcher = c, t = /* @__PURE__ */ new WeakMap(), n2 = /* @__PURE__ */ new WeakMap(), r2 = /* @__PURE__ */ new WeakMap(), s = /* @__PURE__ */ new WeakMap(), i = /* @__PURE__ */ new WeakMap(), o = /* @__PURE__ */ new WeakMap(), l2 = /* @__PURE__ */ new WeakMap(), u = /* @__PURE__ */ new WeakMap(), a = /* @__PURE__ */ new WeakMap(), c.normop = (e2) => null == e2 ? null : ((e2.match(/([<>\(\)\[\]])/) || [])[1] || "") + ((e2.match(/(=)/) || [])[1] || ""); + f.IntervalMatcher = c, t = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap(), r2 = /* @__PURE__ */ new WeakMap(), s = /* @__PURE__ */ new WeakMap(), i = /* @__PURE__ */ new WeakMap(), o = /* @__PURE__ */ new WeakMap(), l = /* @__PURE__ */ new WeakMap(), u = /* @__PURE__ */ new WeakMap(), a = /* @__PURE__ */ new WeakMap(), c.normop = (e2) => null == e2 ? null : ((e2.match(/([<>\(\)\[\]])/) || [])[1] || "") + ((e2.match(/(=)/) || [])[1] || ""); var d = { exports: {} }; function g(t2) { - var n3 = {}, r3 = {}; + var n2 = {}, r3 = {}; let s2 = []; - return (t2 = t2 || {}).gex && s2.push(new f2.GexMatcher()), t2.interval && s2.push(new f2.IntervalMatcher()), n3.top = function() { + return (t2 = t2 || {}).gex && s2.push(new f.GexMatcher()), t2.interval && s2.push(new f.IntervalMatcher()), n2.top = function() { return r3; - }, n3.add = function(e2, i2) { + }, n2.add = function(e2, i2) { e2 = __spreadValues({}, e2); - var o2 = "function" == typeof t2 ? t2.call(n3, e2, i2) : null, l3 = Object.keys(e2).filter((t3) => null != e2[t3]).sort(); - l3.forEach(function(t3) { + var o2 = "function" == typeof t2 ? t2.call(n2, e2, i2) : null, l2 = Object.keys(e2).filter((t3) => null != e2[t3]).sort(); + l2.forEach(function(t3) { e2[t3] = String(e2[t3]); }); - for (var u2, a2 = r3, f3 = 0; f3 < l3.length; f3++) { - var p3 = l3[f3], h2 = e2[p3]; - let t3 = s2.reduce((e3, t4) => e3 || t4.make(p3, h2), void 0); - if ((u2 = a2.v) && p3 == a2.k) if (t3) { - var c2 = (g2 = a2.g = a2.g || {})[p3] = g2[p3] || []; + for (var u2, a2 = r3, f2 = 0; f2 < l2.length; f2++) { + var p2 = l2[f2], h2 = e2[p2]; + let t3 = s2.reduce((e3, t4) => e3 || t4.make(p2, h2), void 0); + if ((u2 = a2.v) && p2 == a2.k) if (t3) { + var c2 = (g2 = a2.g = a2.g || {})[p2] = g2[p2] || []; t3 = c2.find((e3) => e3.same(t3)) || (c2.push(t3), t3), a2 = t3.keymap || (t3.keymap = {}); } else a2 = u2[h2] || (u2[h2] = {}); - else if (a2.k) if (p3 < a2.k) { + else if (a2.k) if (p2 < a2.k) { var d2 = a2.s; - g2 = a2.g, a2.s = { k: a2.k, v: a2.v }, d2 && (a2.s.s = d2), g2 && (a2.s.g = g2), a2.g && (a2.g = {}), a2.k = p3, a2.v = {}, t3 ? (c2 = (g2 = a2.g = a2.g || {})[p3] = g2[p3] || [], t3 = c2.find((e3) => e3.same(t3)) || (c2.push(t3), t3), a2 = t3.keymap || (t3.keymap = {})) : a2 = a2.v[h2] = {}; - } else a2 = a2.s || (a2.s = {}), f3--; - else if (a2.k = p3, a2.v = {}, t3) { + g2 = a2.g, a2.s = { k: a2.k, v: a2.v }, d2 && (a2.s.s = d2), g2 && (a2.s.g = g2), a2.g && (a2.g = {}), a2.k = p2, a2.v = {}, t3 ? (c2 = (g2 = a2.g = a2.g || {})[p2] = g2[p2] || [], t3 = c2.find((e3) => e3.same(t3)) || (c2.push(t3), t3), a2 = t3.keymap || (t3.keymap = {})) : a2 = a2.v[h2] = {}; + } else a2 = a2.s || (a2.s = {}), f2--; + else if (a2.k = p2, a2.v = {}, t3) { var g2; - c2 = (g2 = a2.g = a2.g || {})[p3] = g2[p3] || []; + c2 = (g2 = a2.g = a2.g || {})[p2] = g2[p2] || []; t3 = c2.find((e3) => e3.same(t3)) || (c2.push(t3), t3), a2 = t3.keymap || (t3.keymap = {}); } else a2 = a2.v[h2] = {}; } - return void 0 !== i2 && a2 && (a2.d = i2, o2 && (a2.f = "function" == typeof o2 ? o2 : o2.find, a2.r = "function" == typeof o2.remove ? o2.remove : void 0)), n3; - }, n3.findexact = function(e2) { - return n3.find(e2, true); - }, n3.find = function(e2, t3, s3) { + return void 0 !== i2 && a2 && (a2.d = i2, o2 && (a2.f = "function" == typeof o2 ? o2 : o2.find, a2.r = "function" == typeof o2.remove ? o2.remove : void 0)), n2; + }, n2.findexact = function(e2) { + return n2.find(e2, true); + }, n2.find = function(e2, t3, s3) { if (null == e2) return null; - var i2 = r3, o2 = void 0 === r3.d ? null : r3.d, l3 = r3.f, u2 = null, a2 = [], f3 = {}, p3 = Object.keys(e2).length, h2 = []; + var i2 = r3, o2 = void 0 === r3.d ? null : r3.d, l2 = r3.f, u2 = null, a2 = [], f2 = {}, p2 = Object.keys(e2).length, h2 = []; void 0 !== r3.d && h2.push(r3.d); do { if (u2 = i2.k, i2.v) { var c2 = e2[u2], d2 = i2.v[c2]; if (!d2 && i2.g && i2.g[u2]) { - for (var g2 = i2.g[u2], m3 = 0; m3 < g2.length; m3++) if (g2[m3].match(c2)) { - d2 = g2[m3].keymap; + for (var g2 = i2.g[u2], m2 = 0; m2 < g2.length; m2++) if (g2[m2].match(c2)) { + d2 = g2[m2].keymap; break; } } - d2 ? (f3[u2] = true, i2.s && a2.push(i2.s), o2 = void 0 === d2.d ? t3 ? null : o2 : d2.d, s3 && void 0 !== d2.d && h2.push(d2.d), l3 = d2.f, i2 = d2) : i2 = i2.s; + d2 ? (f2[u2] = true, i2.s && a2.push(i2.s), o2 = void 0 === d2.d ? t3 ? null : o2 : d2.d, s3 && void 0 !== d2.d && h2.push(d2.d), l2 = d2.f, i2 = d2) : i2 = i2.s; } else i2 = null; null == i2 && 0 < a2.length && (null == o2 || s3 && !t3) && (i2 = a2.pop()); } while (i2); - return t3 ? Object.keys(f3).length !== p3 && (o2 = null) : null == o2 && void 0 !== r3.d && (o2 = r3.d), l3 && (o2 = l3.call(n3, e2, o2)), s3 ? h2 : o2; - }, n3.remove = function(e2) { - var t3, n4 = r3, s3 = null, i2 = []; + return t3 ? Object.keys(f2).length !== p2 && (o2 = null) : null == o2 && void 0 !== r3.d && (o2 = r3.d), l2 && (o2 = l2.call(n2, e2, o2)), s3 ? h2 : o2; + }, n2.remove = function(e2) { + var t3, n3 = r3, s3 = null, i2 = []; do { - if (t3 = n4.k, n4.v || n4.g) { - if (n4.v) { - var o2 = n4.v[e2[t3]]; - o2 && i2.push({ km: n4, v: e2[t3] }); + if (t3 = n3.k, n3.v || n3.g) { + if (n3.v) { + var o2 = n3.v[e2[t3]]; + o2 && i2.push({ km: n3, v: e2[t3] }); } - if (null == o2 && n4.g) { - let r4 = n4.g[t3] || []; + if (null == o2 && n3.g) { + let r4 = n3.g[t3] || []; for (let s4 = 0; s4 < r4.length; s4++) if (r4[s4].fix === e2[t3]) { - i2.push({ km: n4, v: e2[t3], mv: r4[s4] }), o2 = r4[s4].keymap; + i2.push({ km: n3, v: e2[t3], mv: r4[s4] }), o2 = r4[s4].keymap; break; } } - o2 ? (s3 = o2.d, n4 = o2) : n4 = n4.s; - } else n4 = null; - } while (n4); + o2 ? (s3 = o2.d, n3 = o2) : n3 = n3.s; + } else n3 = null; + } while (n3); if (void 0 !== s3) { - var l3 = i2[i2.length - 1]; - if (l3 && l3.km && l3.km.v) { - var u2 = l3.km.v[l3.v] || l3.mv && l3.mv.keymap; + var l2 = i2[i2.length - 1]; + if (l2 && l2.km && l2.km.v) { + var u2 = l2.km.v[l2.v] || l2.mv && l2.mv.keymap; !u2 || u2.r && !u2.r(e2, u2.d) || delete u2.d; } } - }, n3.list = function(t3, n4) { + }, n2.list = function(t3, n3) { t3 = t3 || {}; var s3 = []; - return r3.d && s3.push({ match: {}, data: r3.d, find: r3.f }), function r4(s4, i2, o2, l3) { + return r3.d && s3.push({ match: {}, data: r3.d, find: r3.f }), function r4(s4, i2, o2, l2) { if (s4.v) { - var u2, a2 = s4.k, f3 = (0, e.Gex)(t3 ? null == t3[a2] ? n4 ? null : "*" : t3[a2] : "*"), p3 = __spreadValues({}, i2), h2 = __spreadValues({}, o2); - for (var c2 in s4.v) if (c2 === t3[a2] || !n4 && null == t3[a2] || f3.on(c2)) { - var d2 = __spreadValues({}, p3); + var u2, a2 = s4.k, f2 = (0, e.Gex)(t3 ? null == t3[a2] ? n3 ? null : "*" : t3[a2] : "*"), p2 = __spreadValues({}, i2), h2 = __spreadValues({}, o2); + for (var c2 in s4.v) if (c2 === t3[a2] || !n3 && null == t3[a2] || f2.on(c2)) { + var d2 = __spreadValues({}, p2); d2[a2] = c2; var g2 = __spreadValues({}, h2); - delete g2[a2], u2 = s4.v[c2], 0 === Object.keys(g2).length && u2 && u2.d && l3.push({ match: d2, data: u2.d, find: u2.f }), u2 && null != u2.v && r4(u2, __spreadValues({}, d2), __spreadValues({}, g2), l3); + delete g2[a2], u2 = s4.v[c2], 0 === Object.keys(g2).length && u2 && u2.d && l2.push({ match: d2, data: u2.d, find: u2.f }), u2 && null != u2.v && r4(u2, __spreadValues({}, d2), __spreadValues({}, g2), l2); } - (u2 = s4.s) && r4(u2, __spreadValues({}, p3), __spreadValues({}, h2), l3); + (u2 = s4.s) && r4(u2, __spreadValues({}, p2), __spreadValues({}, h2), l2); } }(r3, {}, __spreadValues({}, t3), s3), s3; - }, n3.toString = function(e2, t3) { - var n4 = true === e2 || !!t3, s3 = "function" == typeof e2 ? e2 : function(e3) { + }, n2.toString = function(e2, t3) { + var n3 = true === e2 || !!t3, s3 = "function" == typeof e2 ? e2 : function(e3) { return "function" == typeof e3 ? "<" + e3.name + ">" : "<" + e3 + ">"; }; function i2(e3, t4) { - for (var n5 = 0; n5 < t4; n5++) e3.push(" "); + for (var n4 = 0; n4 < t4; n4++) e3.push(" "); } - var o2 = [], l3 = []; - return function e3(t4, n5, r4, l4) { + var o2 = [], l2 = []; + return function e3(t4, n4, r4, l3) { var u2; - if (void 0 !== t4.d && (n5.push(" " + s3(t4.d)), o2.push(l4.join(", ") + " -> " + s3(t4.d))), t4.k && (n5.push("\n"), i2(n5, r4), n5.push(t4.k + ":")), (t4.v || t4.s || t4.g) && r4++, t4.v) for (var a2 = Object.keys(t4.v).sort(), f3 = 0; f3 < a2.length; f3++) { - var p3 = a2[f3]; - n5.push("\n"), i2(n5, r4), n5.push(p3 + " ->"), (u2 = l4.slice()).push(t4.k + "=" + p3), e3(t4.v[p3], n5, r4 + 1, u2); + if (void 0 !== t4.d && (n4.push(" " + s3(t4.d)), o2.push(l3.join(", ") + " -> " + s3(t4.d))), t4.k && (n4.push("\n"), i2(n4, r4), n4.push(t4.k + ":")), (t4.v || t4.s || t4.g) && r4++, t4.v) for (var a2 = Object.keys(t4.v).sort(), f2 = 0; f2 < a2.length; f2++) { + var p2 = a2[f2]; + n4.push("\n"), i2(n4, r4), n4.push(p2 + " ->"), (u2 = l3.slice()).push(t4.k + "=" + p2), e3(t4.v[p2], n4, r4 + 1, u2); } - if (t4.g) for (a2 = Object.keys(t4.g).sort(), f3 = 0; f3 < a2.length; f3++) for (var h2 = t4.g[a2[f3]], c2 = 0; c2 < h2.length; c2++) { + if (t4.g) for (a2 = Object.keys(t4.g).sort(), f2 = 0; f2 < a2.length; f2++) for (var h2 = t4.g[a2[f2]], c2 = 0; c2 < h2.length; c2++) { var d2 = h2[c2]; - n5.push("\n"), i2(n5, r4), n5.push(d2.fix + " ~>"), (u2 = l4.slice()).push(t4.k + "~" + d2.fix), e3(d2.keymap, n5, r4 + 1, u2); + n4.push("\n"), i2(n4, r4), n4.push(d2.fix + " ~>"), (u2 = l3.slice()).push(t4.k + "~" + d2.fix), e3(d2.keymap, n4, r4 + 1, u2); } - t4.s && (n5.push("\n"), i2(n5, r4), n5.push("|"), u2 = l4.slice(), e3(t4.s, n5, r4 + 1, u2)); - }(r3, l3, 0, []), n4 ? l3.join("") : o2.join("\n"); - }, n3.inspect = n3.toString, n3.toJSON = function(e2) { + t4.s && (n4.push("\n"), i2(n4, r4), n4.push("|"), u2 = l3.slice(), e3(t4.s, n4, r4 + 1, u2)); + }(r3, l2, 0, []), n3 ? l2.join("") : o2.join("\n"); + }, n2.inspect = n2.toString, n2.toJSON = function(e2) { return JSON.stringify(r3, function(e3, t3) { return "function" == typeof t3 ? "[Function]" : t3; }, e2); - }, n3; + }, n2; } - function m2(e2) { + function m(e2) { return new g(e2); } return Object.defineProperty(d.exports, "__esModule", { value: true }), d.exports.Gex = void 0, d.exports.Patrun = g, Object.defineProperty(d.exports, "Gex", { enumerable: true, get: function() { return e.Gex; - } }), d.exports = m2, d.exports.Patrun = g, d.exports.Gex = e.Gex, d.exports.default = m2, d = d.exports; + } }), d.exports = m, d.exports.Patrun = g, d.exports.Gex = e.Gex, d.exports.default = m, d = d.exports; }); })(patrun_min$1, patrun_min$1.exports); var patrun_minExports = patrun_min$1.exports; @@ -66464,9 +66484,9 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } let pnt = lex.pnt; let fwd = lex.src.substring(pnt.sI); - let m2 = fwd.match(fixed); - if (m2) { - let msrc = m2[1]; + let m = fwd.match(fixed); + if (m) { + let msrc = m[1]; let mlen = msrc.length; if (0 < mlen) { let tkn = void 0; @@ -66503,13 +66523,13 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha let oc = "o" === rule.state ? 0 : 1; for (let valueMatcher of valueMatchers) { if (valueMatcher.match instanceof RegExp) { - let m2 = fwd.match(valueMatcher.match); - if (m2) { - let msrc = m2[0]; + let m = fwd.match(valueMatcher.match); + if (m) { + let msrc = m[0]; let mlen = msrc.length; if (0 < mlen) { let tkn = void 0; - let val = valueMatcher.val ? valueMatcher.val(m2) : msrc; + let val = valueMatcher.val ? valueMatcher.val(m) : msrc; tkn = lex.token("#VL", val, msrc, pnt); pnt.sI += mlen; pnt.cI += mlen; @@ -66528,9 +66548,9 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha continue; } if (tokenMatcher instanceof RegExp) { - let m2 = fwd.match(tokenMatcher); - if (m2) { - let msrc = m2[0]; + let m = fwd.match(tokenMatcher); + if (m) { + let msrc = m[0]; let mlen = msrc.length; if (0 < mlen) { let tkn = void 0; @@ -66664,10 +66684,10 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha let fwd = lex.src.substring(pnt.sI); let def = cfg.value.def; let defre = cfg.value.defre; - let m2 = fwd.match(ender); - if (m2) { - let msrc = m2[1]; - let tsrc = m2[2]; + let m = fwd.match(ender); + if (m) { + let msrc = m[1]; + let tsrc = m[2]; let out = void 0; if (null != msrc) { let mlen = msrc.length; @@ -66747,10 +66767,10 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha let pnt = lex.pnt; let fwd = lex.src.substring(pnt.sI); let valdef = cfg.value.def; - let m2 = fwd.match(ender); - if (m2) { - let msrc = m2[1]; - let tsrc = m2[9]; + let m = fwd.match(ender); + if (m) { + let msrc = m[1]; + let tsrc = m[9]; let out = void 0; let included = true; if (null != msrc && (included = !cfg.number.exclude || !msrc.match(cfg.number.exclude))) { @@ -66819,10 +66839,10 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha let { sI, rI, cI } = pnt; let srclen = src.length; if (quoteMap[src[sI]]) { - const q2 = src[sI]; + const q = src[sI]; const qI = sI; const qrI = rI; - const isMultiLine = multiChars[q2]; + const isMultiLine = multiChars[q]; ++sI; ++cI; let s = []; @@ -66831,7 +66851,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha cI++; let c = src[sI]; rs = void 0; - if (q2 === c) { + if (q === c) { sI++; break; } else if (escChar === c) { @@ -66891,7 +66911,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha cI++; } else { let bI = sI; - let qc = q2.charCodeAt(0); + let qc = q.charCodeAt(0); let cc = src.charCodeAt(sI); while ((!hasReplace || void 0 === (rs = replaceCodeMap[cc])) && sI < srclen && 32 <= cc && qc !== cc && escCharCode !== cc) { cc = src.charCodeAt(++sI); @@ -66919,7 +66939,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } } } - if (src[sI - 1] !== q2 || pnt.sI === sI - 1) { + if (src[sI - 1] !== q || pnt.sI === sI - 1) { if (mcfg.abandon) { return void 0; } @@ -67114,9 +67134,9 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha utility.isarr = isarr; const defprop = Object.defineProperty; utility.defprop = defprop; - const omap = (o, f2) => { + const omap = (o, f) => { return Object.entries(o || {}).reduce((o2, e) => { - let me = f2 ? f2(e) : e; + let me = f ? f(e) : e; if (void 0 === me[0]) { delete o2[e[0]]; } else { @@ -67243,7 +67263,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha tin, (matcher.tin$ = +tin, matcher) ]); - const tokenSet = opts.tokenSet ? Object.keys(opts.tokenSet).reduce((a, n2) => (a[n2] = opts.tokenSet[n2].filter((x) => null != x).map((n3) => t(n3)), a), {}) : {}; + const tokenSet = opts.tokenSet ? Object.keys(opts.tokenSet).reduce((a, n) => (a[n] = opts.tokenSet[n].filter((x) => null != x).map((n2) => t(n2)), a), {}) : {}; cfg.tokenSet = cfg.tokenSet || {}; entries(tokenSet).map((entry) => { let name = entry[0]; @@ -67271,7 +67291,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }; cfg.text = { lex: !!((_q = opts.text) === null || _q === void 0 ? void 0 : _q.lex), - modify: (((_r = cfg.text) === null || _r === void 0 ? void 0 : _r.modify) || []).concat([(_s = opts.text) === null || _s === void 0 ? void 0 : _s.modify].flat()).filter((m2) => null != m2), + modify: (((_r = cfg.text) === null || _r === void 0 ? void 0 : _r.modify) || []).concat([(_s = opts.text) === null || _s === void 0 ? void 0 : _s.modify].flat()).filter((m) => null != m), check: (_t7 = opts.text) === null || _t7 === void 0 ? void 0 : _t7.check }; cfg.number = { @@ -67351,7 +67371,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha list.push(matcher); } return list; - }, []).filter((m2) => null != m2 && false !== m2 && -1 < +m2.order).sort((a, b) => a.order - b.order) : [] + }, []).filter((m) => null != m && false !== m && -1 < +m.order).sort((a, b) => a.order - b.order) : [] }; cfg.parse = { prepare: values2((_19 = opts.parse) === null || _19 === void 0 ? void 0 : _19.prepare) @@ -67411,10 +67431,10 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } utility.mesc = mesc; function regexp(flags, ...parts) { - return new RegExp(parts.map((p2) => p2.esc ? ( + return new RegExp(parts.map((p) => p.esc ? ( //p.replace(/[-\\|\]{}()[^$+*?.!=]/g, '\\$&') - escre(p2.toString()) - ) : p2).join(types_12.EMPTY), null == flags ? "" : flags); + escre(p.toString()) + ) : p).join(types_12.EMPTY), null == flags ? "" : flags); } utility.regexp = regexp; function escre(s) { @@ -67429,8 +67449,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha let over_iso = null != over && (S.object === typeof over || over_isf); let over_ctor; if (base_iso && over_iso && !over_isf && Array.isArray(base) === Array.isArray(over)) { - for (let k2 in over) { - base[k2] = deep(base[k2], over[k2]); + for (let k in over) { + base[k] = deep(base[k], over[k]); } } else { base = void 0 === over ? base : over_isf ? over : over_iso ? S.function === typeof (over_ctor = over.constructor) && S.Object !== over_ctor.name && S.Array !== over_ctor.name ? over : deep(Array.isArray(over) ? [] : {}, over) : over; @@ -67496,7 +67516,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha errinject((cfg.hint[code] || ((_c = (_b = details.use) === null || _b === void 0 ? void 0 : _b.err) === null || _c === void 0 ? void 0 : _c.message) || cfg.hint.unknown || "").trim().split("\n").map((s) => " " + s).join("\n"), code, details, token2, rule, ctx), "", " \x1B[2mhttps://jsonic.senecajs.org\x1B[0m", - " \x1B[2m--internal: rule=" + rule.name + "~" + rule.state + "; token=" + tokenize2(token2.tin, ctx.cfg) + (null == token2.why ? "" : "~" + token2.why) + "; plugins=" + ctx.plgn().map((p2) => p2.name).join(",") + "--\x1B[0m\n" + " \x1B[2m--internal: rule=" + rule.name + "~" + rule.state + "; token=" + tokenize2(token2.tin, ctx.cfg) + (null == token2.why ? "" : "~" + token2.why) + "; plugins=" + ctx.plgn().map((p) => p.name).join(",") + "--\x1B[0m\n" ].join("\n"); let desc = { internal: { @@ -67591,13 +67611,13 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } utility.clone = clone; function charset(...parts) { - return null == parts ? {} : parts.filter((p2) => false !== p2).map((p2) => "object" === typeof p2 ? keys(p2).join(types_12.EMPTY) : p2).join(types_12.EMPTY).split(types_12.EMPTY).reduce((a, c) => (a[c] = c.charCodeAt(0), a), {}); + return null == parts ? {} : parts.filter((p) => false !== p).map((p) => "object" === typeof p ? keys(p).join(types_12.EMPTY) : p).join(types_12.EMPTY).split(types_12.EMPTY).reduce((a, c) => (a[c] = c.charCodeAt(0), a), {}); } utility.charset = charset; function clean(o) { - for (let p2 in o) { - if (null == o[p2]) { - delete o[p2]; + for (let p in o) { + if (null == o[p]) { + delete o[p]; } } return o; @@ -67983,8 +68003,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } }; defaults_2 = defaults$1.defaults = defaults; - function make_hint(d = (t, r2 = "replace") => t[r2](/[A-Z]/g, (m2) => " " + m2.toLowerCase())[r2](/[~%][a-z]/g, (m2) => ("~" == m2[0] ? " " : "") + m2[1].toUpperCase()), s = "~sinceTheErrorIsUnknown,ThisIsProbablyABugInsideJsonic\nitself,OrAPlugin.~pleaseConsiderPostingAGithubIssue -Thanks!\n\n~code: $code,~details: \n$details|~theCharacter(s) $srcWereNotExpectedAtThisPointAsTheyDoNot\nmatchTheExpectedSyntax,EvenUnderTheRelaxedJsonicRules.~ifIt\nisNotObviouslyWrong,TheActualSyntaxErrorMayBeElsewhere.~try\ncommentingOutLargerAreasAroundThisPointUntilYouGetNoErrors,\nthenRemoveTheCommentsInSmallSectionsUntilYouFindThe\noffendingSyntax.~n%o%t%e:~alsoCheckIfAnyPluginsYouAreUsing\nexpectDifferentSyntaxInThisCase.|~theEscapeSequence $srcDoesNotEncodeAValidUnicodeCodePoint\nnumber.~youMayNeedToValidateYourStringDataManuallyUsingTest\ncodeToSeeHow~javaScriptWillInterpretIt.~alsoConsiderThatYour\ndataMayHaveBecomeCorrupted,OrTheEscapeSequenceHasNotBeen\ngeneratedCorrectly.|~theEscapeSequence $srcDoesNotEncodeAValid~a%s%c%i%iCharacter.~you\nmayNeedToValidateYourStringDataManuallyUsingTestCodeToSee\nhow~javaScriptWillInterpretIt.~alsoConsiderThatYourDataMay\nhaveBecomeCorrupted,OrTheEscapeSequenceHasNotBeenGenerated\ncorrectly.|~stringValuesCannotContainUnprintableCharacters (characterCodes\nbelow 32).~theCharacter $srcIsUnprintable.~youMayNeedToRemove\ntheseCharactersFromYourSourceData.~alsoCheckThatItHasNot\nbecomeCorrupted.|~thisStringHasNoEndQuote.|~thisCommentIsNeverClosed.|~noRuleNamed $rulenameIsDefined.~thisIsProbablyAnErrorInThe\ngrammarOfAPlugin.".split("|")) { - return "unknown|unexpected|invalid_unicode|invalid_ascii|unprintable|unterminated_string|unterminated_comment|unknown_rule".split("|").reduce((a, n2, i) => (a[n2] = d(s[i]), a), {}); + function make_hint(d = (t, r2 = "replace") => t[r2](/[A-Z]/g, (m) => " " + m.toLowerCase())[r2](/[~%][a-z]/g, (m) => ("~" == m[0] ? " " : "") + m[1].toUpperCase()), s = "~sinceTheErrorIsUnknown,ThisIsProbablyABugInsideJsonic\nitself,OrAPlugin.~pleaseConsiderPostingAGithubIssue -Thanks!\n\n~code: $code,~details: \n$details|~theCharacter(s) $srcWereNotExpectedAtThisPointAsTheyDoNot\nmatchTheExpectedSyntax,EvenUnderTheRelaxedJsonicRules.~ifIt\nisNotObviouslyWrong,TheActualSyntaxErrorMayBeElsewhere.~try\ncommentingOutLargerAreasAroundThisPointUntilYouGetNoErrors,\nthenRemoveTheCommentsInSmallSectionsUntilYouFindThe\noffendingSyntax.~n%o%t%e:~alsoCheckIfAnyPluginsYouAreUsing\nexpectDifferentSyntaxInThisCase.|~theEscapeSequence $srcDoesNotEncodeAValidUnicodeCodePoint\nnumber.~youMayNeedToValidateYourStringDataManuallyUsingTest\ncodeToSeeHow~javaScriptWillInterpretIt.~alsoConsiderThatYour\ndataMayHaveBecomeCorrupted,OrTheEscapeSequenceHasNotBeen\ngeneratedCorrectly.|~theEscapeSequence $srcDoesNotEncodeAValid~a%s%c%i%iCharacter.~you\nmayNeedToValidateYourStringDataManuallyUsingTestCodeToSee\nhow~javaScriptWillInterpretIt.~alsoConsiderThatYourDataMay\nhaveBecomeCorrupted,OrTheEscapeSequenceHasNotBeenGenerated\ncorrectly.|~stringValuesCannotContainUnprintableCharacters (characterCodes\nbelow 32).~theCharacter $srcIsUnprintable.~youMayNeedToRemove\ntheseCharactersFromYourSourceData.~alsoCheckThatItHasNot\nbecomeCorrupted.|~thisStringHasNoEndQuote.|~thisCommentIsNeverClosed.|~noRuleNamed $rulenameIsDefined.~thisIsProbablyAnErrorInThe\ngrammarOfAPlugin.".split("|")) { + return "unknown|unexpected|invalid_unicode|invalid_ascii|unprintable|unterminated_string|unterminated_comment|unknown_rule".split("|").reduce((a, n, i) => (a[n] = d(s[i]), a), {}); } var parser$1 = {}; var rules = {}; @@ -68862,7 +68882,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } ], { append: true, delete: [0, 1] }); }); - jsonic2.rule("elem", (rs, p2) => { + jsonic2.rule("elem", (rs, p) => { rs.open([ // Empty commas insert null elements. // Note that close consumes a comma, so b:2 works. @@ -68881,7 +68901,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }, { s: [KEY, CL], - e: p2.cfg.list.property ? void 0 : (_r, ctx) => ctx.t0, + e: p.cfg.list.property ? void 0 : (_r, ctx) => ctx.t0, p: "val", n: { pk: 1, dmap: 1 }, u: { done: true, pair: true, list: true }, @@ -69141,9 +69161,9 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } (0, utility_12.defprop)(jsonic2, "internal", { value: () => internal }); if (parent) { - for (let k2 in parent) { - if (void 0 === jsonic2[k2]) { - jsonic2[k2] = parent[k2]; + for (let k in parent) { + if (void 0 === jsonic2[k]) { + jsonic2[k] = parent[k]; } } jsonic2.parent = parent; @@ -69226,8 +69246,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const mm = Jsonic(match2); const ms = Array.isArray(match2) ? match2 : Object.keys(mm).map((x) => mm[x]); let found = null; - for (const m2 of ms) { - const pat = this.config.allow.modify(__spreadValues({}, m2 || {})); + for (const m of ms) { + const pat = this.config.allow.modify(__spreadValues({}, m || {})); found = this.match.allow.find(pat); if (found) { break; diff --git a/src/lib/BasicEntityAutocompleteField.tsx b/src/lib/BasicEntityAutocompleteField.tsx index d871bbb..d359732 100644 --- a/src/lib/BasicEntityAutocompleteField.tsx +++ b/src/lib/BasicEntityAutocompleteField.tsx @@ -14,8 +14,8 @@ const BasicEntityAutocompleteFieldSpecShape = Gubu( field: Open({ id: String, name: String, - kind: Skip(String), - label: Default(''), + kind: '', + label: '', options: Open({ label: { field: Default('label') }, value: { field: Default('value') }, diff --git a/src/lib/BasicEntityButtonField.tsx b/src/lib/BasicEntityButtonField.tsx index a8e96cc..4c6948c 100644 --- a/src/lib/BasicEntityButtonField.tsx +++ b/src/lib/BasicEntityButtonField.tsx @@ -14,8 +14,8 @@ const BasicEntityButtonFieldSpecShape = Gubu( field: Open({ id: String, name: String, - kind: Skip(String), - label: Default('', String), + kind: '', + label: String, ux: Open({ kind: Exact('Button'), edit: Default(true), diff --git a/src/lib/BasicEntityButtonGroupField.tsx b/src/lib/BasicEntityButtonGroupField.tsx index bb3f65c..d680cd6 100644 --- a/src/lib/BasicEntityButtonGroupField.tsx +++ b/src/lib/BasicEntityButtonGroupField.tsx @@ -15,7 +15,12 @@ const BasicEntityButtonGroupFieldSpecShape = Gubu( id: String, name: String, kind: '', - label: String, + label: '', + options: Open({ + label: { field: 'label' }, + value: { field: 'value' }, + ents: Open({}), + }), ux: Open({ kind: Exact('ButtonGroup'), edit: Default(true), diff --git a/src/lib/BasicEntityCheckboxField.tsx b/src/lib/BasicEntityCheckboxField.tsx index 18c03fc..39ff1f1 100644 --- a/src/lib/BasicEntityCheckboxField.tsx +++ b/src/lib/BasicEntityCheckboxField.tsx @@ -14,8 +14,8 @@ const BasicEntityCheckboxFieldSpecShape = Gubu( field: Open({ id: String, name: String, - kind: Skip(String), - label: Default('', String), + kind: '', + label: '', ux: Open({ kind: Exact('Checkbox'), edit: Default(true), diff --git a/src/lib/BasicEntityDateField.tsx b/src/lib/BasicEntityDateField.tsx index 0601af4..cddb87c 100644 --- a/src/lib/BasicEntityDateField.tsx +++ b/src/lib/BasicEntityDateField.tsx @@ -12,8 +12,8 @@ const BasicEntityDateFieldSpecShape = Gubu( field: Open({ id: String, name: String, - kind: Skip(String), - label: Default('', String), + kind: '', + label: '', ux: Open({ kind: Exact('Date'), edit: Default(true), diff --git a/src/lib/BasicEntityDateTimeField.tsx b/src/lib/BasicEntityDateTimeField.tsx index 41632d0..a87039b 100644 --- a/src/lib/BasicEntityDateTimeField.tsx +++ b/src/lib/BasicEntityDateTimeField.tsx @@ -12,8 +12,8 @@ const BasicEntityDateTimeFieldSpecShape = Gubu( field: Open({ id: String, name: String, - kind: Skip(String), - label: Default('', String), + kind: '', + label: '', ux: Open({ kind: Exact('DateTime'), edit: Default(true), diff --git a/src/lib/BasicEntityField.tsx b/src/lib/BasicEntityField.tsx index ae392bb..a347bb2 100644 --- a/src/lib/BasicEntityField.tsx +++ b/src/lib/BasicEntityField.tsx @@ -24,8 +24,8 @@ const BasicEntityFieldSpecShape = Gubu( field: Open({ id: String, name: String, - kind: Skip(String), - label: Default('', String), + kind: '', + label: '', ux: Open({ kind: Exact( 'Text', diff --git a/src/lib/BasicEntityRadioGroupField.tsx b/src/lib/BasicEntityRadioGroupField.tsx index 3a83534..7dd6474 100644 --- a/src/lib/BasicEntityRadioGroupField.tsx +++ b/src/lib/BasicEntityRadioGroupField.tsx @@ -14,8 +14,8 @@ const BasicEntityRadioGroupFieldSpecShape = Gubu( field: Open({ id: String, name: String, - kind: Skip(String), - label: Default('', String), + kind: '', + llabel: '', ux: Open({ kind: Exact('RadioGroup'), edit: Default(true), diff --git a/src/lib/BasicEntityRatingField.tsx b/src/lib/BasicEntityRatingField.tsx index 5654658..e329d11 100644 --- a/src/lib/BasicEntityRatingField.tsx +++ b/src/lib/BasicEntityRatingField.tsx @@ -14,8 +14,8 @@ const BasicEntityRatingFieldSpecShape = Gubu( field: Open({ id: String, name: String, - kind: Skip(String), - label: Default('', String), + kind: '', + label: '', ux: Open({ kind: Exact('Rating'), edit: Default(true), diff --git a/src/lib/BasicEntitySliderField.tsx b/src/lib/BasicEntitySliderField.tsx index 8b1c761..254bb2b 100644 --- a/src/lib/BasicEntitySliderField.tsx +++ b/src/lib/BasicEntitySliderField.tsx @@ -14,20 +14,20 @@ const BasicEntitySliderFieldSpecShape = Gubu( field: Open({ id: String, name: String, - kind: Skip(String), - label: Default('', String), + kind: '', + label: '', ux: Open({ kind: Exact('Slider'), edit: Default(true), step: Default(1), min: Default(0), max: Default(100), - props: { + props: Open({ marks: Default({}), valueLabelDisplay: Exact('on', 'auto', 'off').Default('auto'), direction: Exact('horizontal', 'vertical').Default('horizontal'), track: Exact('normal', 'inverted', 'disabled').Default('normal'), - }, + }), }), }), }), diff --git a/src/lib/BasicEntityTextBoxField.tsx b/src/lib/BasicEntityTextBoxField.tsx index f9a4b81..89d92f0 100644 --- a/src/lib/BasicEntityTextBoxField.tsx +++ b/src/lib/BasicEntityTextBoxField.tsx @@ -12,8 +12,8 @@ const BasicEntityTextBoxFieldSpecShape = Gubu( field: Open({ id: String, name: String, - kind: Skip(String), - label: Default('', String), + kind: '', + label: '', ux: Open({ kind: Exact('TextBox'), edit: Default(true), diff --git a/src/lib/BasicEntityTextField.tsx b/src/lib/BasicEntityTextField.tsx index 4d8fce9..bb6222f 100644 --- a/src/lib/BasicEntityTextField.tsx +++ b/src/lib/BasicEntityTextField.tsx @@ -13,8 +13,8 @@ const BasicEntityTextFieldSpecShape = Gubu( field: Open({ id: String, name: String, - kind: Skip(String), - label: Default('', String), + kind: '', + label: '', ux: Open({ kind: Exact('Text'), edit: Default(true), diff --git a/src/lib/BasicEntityTimeField.tsx b/src/lib/BasicEntityTimeField.tsx index 3dbc9fd..79a40fd 100644 --- a/src/lib/BasicEntityTimeField.tsx +++ b/src/lib/BasicEntityTimeField.tsx @@ -12,8 +12,8 @@ const BasicEntityTimeFieldSpecShape = Gubu( field: Open({ id: String, name: String, - kind: Skip(String), - label: Default('', String), + kind: '', + label: '', ux: Open({ kind: Exact('Time'), edit: Default(true), From 389206ee818a9986c6f267d6824b1b40ad91c5f0 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Sun, 28 Jul 2024 23:32:02 +0100 Subject: [PATCH 050/122] Add BasicEntitySelectField component --- dist/BasicEntitySelectField.d.ts | 2 + dist/voxgig-model-react.es.js | 335 +++++++++++++++++++---------- dist/voxgig-model-react.umd.js | 333 ++++++++++++++++++---------- src/lib/BasicEntityField.tsx | 5 +- src/lib/BasicEntitySelectField.tsx | 133 ++++++++++++ 5 files changed, 578 insertions(+), 230 deletions(-) create mode 100644 dist/BasicEntitySelectField.d.ts create mode 100644 src/lib/BasicEntitySelectField.tsx diff --git a/dist/BasicEntitySelectField.d.ts b/dist/BasicEntitySelectField.d.ts new file mode 100644 index 0000000..4a87de4 --- /dev/null +++ b/dist/BasicEntitySelectField.d.ts @@ -0,0 +1,2 @@ +declare function BasicEntitySelectField(props: any): import("react/jsx-runtime").JSX.Element; +export { BasicEntitySelectField }; diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index 09da789..19e6c3b 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -54,7 +54,7 @@ var __async = (__this, __arguments, generator) => { }; import * as React$1 from "react"; import React__default, { isValidElement, Children, cloneElement, useMemo, useState, useReducer, useRef, useEffect, useCallback, memo as memo$2, Fragment, useLayoutEffect } from "react"; -import { Button as Button$1, Avatar, Menu as Menu$1, MenuItem as MenuItem$1, IconButton as IconButton$1, useTheme as useTheme$5, Box as Box$2, FormControlLabel as FormControlLabel$1, Checkbox as Checkbox$1, Autocomplete as Autocomplete$1, TextField as TextField$1, FormLabel as FormLabel$1, Slider as Slider$1, RadioGroup, Radio as Radio$1, Rating, ButtonGroup, Grid as Grid$1, Toolbar as Toolbar$1, Container as Container$2, Drawer as Drawer$1, List as List$1, ListItem as ListItem$1, ListItemButton as ListItemButton$1, ListItemIcon as ListItemIcon$1, ListItemText as ListItemText$1, Divider as Divider$1, Typography as Typography$1 } from "@mui/material"; +import { Button as Button$1, Avatar, Menu as Menu$1, MenuItem as MenuItem$1, IconButton as IconButton$1, useTheme as useTheme$5, Box as Box$2, FormControlLabel as FormControlLabel$1, Checkbox as Checkbox$1, Autocomplete as Autocomplete$1, TextField as TextField$1, FormLabel as FormLabel$1, Slider as Slider$1, RadioGroup, Radio as Radio$1, Rating, ButtonGroup, FormControl as FormControl$1, InputLabel as InputLabel$1, Select as Select$1, Grid as Grid$1, Toolbar as Toolbar$1, Container as Container$2, Drawer as Drawer$1, List as List$1, ListItem as ListItem$1, ListItemButton as ListItemButton$1, ListItemIcon as ListItemIcon$1, ListItemText as ListItemText$1, Divider as Divider$1, Typography as Typography$1 } from "@mui/material"; import emStyled from "@emotion/styled"; import { CacheProvider, Global, ThemeContext as ThemeContext$1, css, keyframes } from "@emotion/react"; import { useSelector } from "react-redux"; @@ -10588,8 +10588,8 @@ process.env.NODE_ENV !== "production" ? Toolbar.propTypes = { */ variant: PropTypes.oneOfType([PropTypes.oneOf(["dense", "regular"]), PropTypes.string]) } : void 0; -const CMPNAME$o = "BasicAccountTool"; -console.log(CMPNAME$o, "1"); +const CMPNAME$p = "BasicAccountTool"; +console.log(CMPNAME$p, "1"); const { Exact: Exact$2 } = gubu_minExports.Gubu; const BasicAccountToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10599,7 +10599,7 @@ const BasicAccountToolSpecShape = gubu_minExports.Gubu({ attr: {}, sx: {}, style: {} -}, { name: CMPNAME$o }); +}, { name: CMPNAME$p }); function BasicAccountTool(props) { var _a; const { ctx, spec } = props; @@ -10673,8 +10673,8 @@ function stringAvatar(s) { children: `${parts.join("")}` }; } -const CMPNAME$n = "BasicHeadTool"; -console.log(CMPNAME$n, "1"); +const CMPNAME$o = "BasicHeadTool"; +console.log(CMPNAME$o, "1"); const { Exact: Exact$1 } = gubu_minExports.Gubu; const BasicHeadToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10684,7 +10684,7 @@ const BasicHeadToolSpecShape = gubu_minExports.Gubu({ attr: {}, sx: {}, style: {} -}, { name: CMPNAME$n }); +}, { name: CMPNAME$o }); function BasicHeadTool(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -10693,7 +10693,7 @@ function BasicHeadTool(props) { const { name, kind, attr, sx, style: style2 } = basicHeadToolSpec; let tool = /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}); if ("" === kind) { - console.warn(CMPNAME$n, "empty-tool-kind", basicHeadToolSpec); + console.warn(CMPNAME$o, "empty-tool-kind", basicHeadToolSpec); } else if ("logo" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsxs( "div", @@ -10710,7 +10710,7 @@ function BasicHeadTool(props) { { href: "/", style: style2, - className: `vxg-${CMPNAME$n}-logo`, + className: `vxg-${CMPNAME$o}-logo`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: attr.img }) } ), @@ -10742,17 +10742,17 @@ function BasicHeadTool(props) { } else if ("account" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsx(BasicAccountTool, { ctx, spec }); } else { - console.warn(CMPNAME$n, "unknown-tool-kind", kind, basicHeadToolSpec); + console.warn(CMPNAME$o, "unknown-tool-kind", kind, basicHeadToolSpec); } return tool; } -const CMPNAME$m = "BasicHead"; -const { Child: Child$5, Exact, Open: Open$k, Required: Required$1 } = gubu_minExports.Gubu; +const CMPNAME$n = "BasicHead"; +const { Child: Child$5, Exact, Open: Open$l, Required: Required$1 } = gubu_minExports.Gubu; const BasicHeadSpecShape = gubu_minExports.Gubu({ head: { name: String, active: Boolean, - tool: Child$5(Open$k({ + tool: Child$5(Open$l({ align: Exact("left", "right") })) }, @@ -10762,7 +10762,7 @@ const BasicHeadSpecShape = gubu_minExports.Gubu({ AppBar: {}, ToolBar: {} } -}, { name: CMPNAME$m }); +}, { name: CMPNAME$n }); function BasicHead(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -62706,8 +62706,8 @@ const MaterialReactTable = (props) => { } return jsxRuntimeExports.jsx(MRT_TablePaper, { table }); }; -const { Open: Open$j, Child: Child$4 } = gubu_minExports.Gubu; -const Shape$2 = gubu_minExports.Gubu(Open$j({ +const { Open: Open$k, Child: Child$4 } = gubu_minExports.Gubu; +const Shape$2 = gubu_minExports.Gubu(Open$k({ name: String, prefix: String, ent: String, @@ -62752,7 +62752,7 @@ Object.assign(VxgBasicEntityListPlugin, { } }); Object.defineProperty(VxgBasicEntityListPlugin, "name", { value: "VxgBasicEntityListPlugin" }); -const CMPNAME$l = "BasicEntityList"; +const CMPNAME$m = "BasicEntityList"; function BasicEntityList(props) { const { ctx } = props; const { seneca } = ctx(); @@ -64672,23 +64672,23 @@ function useForm(props = {}) { _formControl.current.formState = getProxyFormState(formState, control); return _formControl.current; } -const CMPNAME$k = "BasicEntitySliderField"; -const { Open: Open$i } = gubu_minExports.Gubu; +const CMPNAME$l = "BasicEntitySliderField"; +const { Open: Open$j } = gubu_minExports.Gubu; const BasicEntityCheckboxFieldSpecShape = gubu_minExports.Gubu( - Open$i({ - field: Open$i({ + Open$j({ + field: Open$j({ id: String, name: String, kind: "", label: "", - ux: Open$i({ + ux: Open$j({ kind: gubu_minExports.Exact("Checkbox"), edit: gubu_minExports.Default(true), - props: Open$i({}) + props: Open$j({}) }) }) }), - { name: CMPNAME$k } + { name: CMPNAME$l } ); function BasicEntityCheckboxField(props) { const { spec } = props; @@ -64721,35 +64721,35 @@ function BasicEntityCheckboxField(props) { } ) }), `${field.id}-box`); } -const CMPNAME$j = "BasicEntityAutocompleteField"; -const { Open: Open$h } = gubu_minExports.Gubu; +const CMPNAME$k = "BasicEntityAutocompleteField"; +const { Open: Open$i } = gubu_minExports.Gubu; const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu( - Open$h({ - field: Open$h({ + Open$i({ + field: Open$i({ id: String, name: String, kind: "", label: "", - options: Open$h({ + options: Open$i({ label: { field: gubu_minExports.Default("label") }, value: { field: gubu_minExports.Default("value") }, multiple: gubu_minExports.Default(false), - default: Open$h({}), - ents: Open$h({}) + default: Open$i({}), + ents: Open$i({}) }), - ux: Open$h({ + ux: Open$i({ kind: gubu_minExports.Exact("Autocomplete"), edit: gubu_minExports.Default(true) }) }) }), - { name: CMPNAME$j } + { name: CMPNAME$k } ); function BasicEntityAutocompleteField(props) { const { spec } = props; const basicEntityAutocompleteField = BasicEntityAutocompleteFieldSpecShape(spec); const { control, field } = basicEntityAutocompleteField; - const { resolvedOptions, resolvedDefault } = resolveOptions$1(field.options); + const { resolvedOptions, resolvedDefault } = resolveOptions$2(field.options); return /* @__PURE__ */ jsxRuntimeExports.jsx( Controller, { @@ -64765,7 +64765,7 @@ function BasicEntityAutocompleteField(props) { options: resolvedOptions, isOptionEqualToValue: (opt, val) => opt === val || (opt == null ? void 0 : opt.id) != null && (val == null ? void 0 : val.id) != null && opt.id === val.id || (opt == null ? void 0 : opt.value) != null && (val == null ? void 0 : val.value) != null && opt.value === val.value, getOptionLabel: (option) => option[field.options.label.field], - value: resolveValue(field.options, value), + value: resolveValue$1(field.options, value), onChange: (_2, newVal) => onChange(newVal), renderInput: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx(TextField$1, __spreadProps(__spreadValues({}, params), { label: field.label })) } @@ -64774,7 +64774,7 @@ function BasicEntityAutocompleteField(props) { `${field.id}-controller` ); } -function resolveOptions$1(options) { +function resolveOptions$2(options) { const { multiple, ents, label, value, default: defaultValues } = options; const labelField = label == null ? void 0 : label.field; const valueField = value == null ? void 0 : value.field; @@ -64807,7 +64807,7 @@ function resolveOptions$1(options) { resolvedDefault }; } -function resolveValue(options, val) { +function resolveValue$1(options, val) { const { multiple, ents, label, value } = options; const labelField = label == null ? void 0 : label.field; const valueField = value == null ? void 0 : value.field; @@ -64825,22 +64825,22 @@ function resolveValue(options, val) { return val || []; } } -const CMPNAME$i = "BasicEntitySliderField"; -const { Open: Open$g } = gubu_minExports.Gubu; +const CMPNAME$j = "BasicEntitySliderField"; +const { Open: Open$h } = gubu_minExports.Gubu; const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu( - Open$g({ - field: Open$g({ + Open$h({ + field: Open$h({ id: String, name: String, kind: "", label: "", - ux: Open$g({ + ux: Open$h({ kind: gubu_minExports.Exact("Slider"), edit: gubu_minExports.Default(true), step: gubu_minExports.Default(1), min: gubu_minExports.Default(0), max: gubu_minExports.Default(100), - props: Open$g({ + props: Open$h({ marks: gubu_minExports.Default({}), valueLabelDisplay: gubu_minExports.Exact("on", "auto", "off").Default("auto"), direction: gubu_minExports.Exact("horizontal", "vertical").Default("horizontal"), @@ -64849,7 +64849,7 @@ const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu( }) }) }), - { name: CMPNAME$i } + { name: CMPNAME$j } ); function BasicEntitySliderField(props) { const { spec } = props; @@ -64896,35 +64896,35 @@ function resolveMarks(marks) { } return marks; } -const CMPNAME$h = "BasicEntitySliderField"; -const { Open: Open$f } = gubu_minExports.Gubu; +const CMPNAME$i = "BasicEntitySliderField"; +const { Open: Open$g } = gubu_minExports.Gubu; const BasicEntityRadioGroupFieldSpecShape = gubu_minExports.Gubu( - Open$f({ - field: Open$f({ + Open$g({ + field: Open$g({ id: String, name: String, kind: "", llabel: "", - ux: Open$f({ + ux: Open$g({ kind: gubu_minExports.Exact("RadioGroup"), edit: gubu_minExports.Default(true), direction: gubu_minExports.Exact("row", "column").Default("row") }), - options: Open$f({ + options: Open$g({ label: { field: gubu_minExports.Default("label") }, value: { field: gubu_minExports.Default("value") }, - default: Open$f({}), - ents: Open$f({}) + default: Open$g({}), + ents: Open$g({}) }) }) }), - { name: CMPNAME$h } + { name: CMPNAME$i } ); function BasicEntityRadioGroupField(props) { const { spec } = props; const basicEntityRadioGroupField = BasicEntityRadioGroupFieldSpecShape(spec); const { control, field } = basicEntityRadioGroupField; - const { resolvedOptions, resolvedDefault } = resolveOptions(field.options); + const { resolvedOptions, resolvedDefault } = resolveOptions$1(field.options); return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx(FormLabel$1, { children: field.label }, `${field.id}-label`), /* @__PURE__ */ jsxRuntimeExports.jsx( @@ -64956,7 +64956,7 @@ function BasicEntityRadioGroupField(props) { ) ] }); } -function resolveOptions(options) { +function resolveOptions$1(options) { const { multiple, ents, label, value, default: defaultValues } = options; const labelField = label == null ? void 0 : label.field; const valueField = value == null ? void 0 : value.field; @@ -64989,23 +64989,23 @@ function resolveOptions(options) { resolvedDefault }; } -const CMPNAME$g = "BasicEntityTextBoxField"; -const { Open: Open$e } = gubu_minExports.Gubu; +const CMPNAME$h = "BasicEntityTextBoxField"; +const { Open: Open$f } = gubu_minExports.Gubu; const BasicEntityTextBoxFieldSpecShape = gubu_minExports.Gubu( - Open$e({ - field: Open$e({ + Open$f({ + field: Open$f({ id: String, name: String, kind: "", label: "", - ux: Open$e({ + ux: Open$f({ kind: gubu_minExports.Exact("TextBox"), edit: gubu_minExports.Default(true), - props: Open$e({}) + props: Open$f({}) }) }) }), - { name: CMPNAME$g } + { name: CMPNAME$h } ); function BasicEntityTextBoxField(props) { const { spec } = props; @@ -65030,23 +65030,23 @@ function BasicEntityFieldError(props) { const { err } = props; return err ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-active", children: err.message }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-none" }); } -const CMPNAME$f = "BasicEntityTextField"; -const { Open: Open$d } = gubu_minExports.Gubu; +const CMPNAME$g = "BasicEntityTextField"; +const { Open: Open$e } = gubu_minExports.Gubu; const BasicEntityTextFieldSpecShape = gubu_minExports.Gubu( - Open$d({ - field: Open$d({ + Open$e({ + field: Open$e({ id: String, name: String, kind: "", label: "", - ux: Open$d({ + ux: Open$e({ kind: gubu_minExports.Exact("Text"), edit: gubu_minExports.Default(true), - props: Open$d({}) + props: Open$e({}) }) }) }), - { name: CMPNAME$f } + { name: CMPNAME$g } ); function BasicEntityTextField(props) { const { spec } = props; @@ -65069,23 +65069,23 @@ function BasicEntityTextField(props) { /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, field.id); } -const CMPNAME$e = "BasicEntityDateField"; -const { Open: Open$c } = gubu_minExports.Gubu; +const CMPNAME$f = "BasicEntityDateField"; +const { Open: Open$d } = gubu_minExports.Gubu; const BasicEntityDateFieldSpecShape = gubu_minExports.Gubu( - Open$c({ - field: Open$c({ + Open$d({ + field: Open$d({ id: String, name: String, kind: "", label: "", - ux: Open$c({ + ux: Open$d({ kind: gubu_minExports.Exact("Date"), edit: gubu_minExports.Default(true), - props: Open$c({}) + props: Open$d({}) }) }) }), - { name: CMPNAME$e } + { name: CMPNAME$f } ); function BasicEntityDateField(props) { const { spec } = props; @@ -65106,23 +65106,23 @@ function BasicEntityDateField(props) { }, register(field.name)) ) }, field.id); } -const CMPNAME$d = "BasicEntityTimeField"; -const { Open: Open$b } = gubu_minExports.Gubu; +const CMPNAME$e = "BasicEntityTimeField"; +const { Open: Open$c } = gubu_minExports.Gubu; const BasicEntityTimeFieldSpecShape = gubu_minExports.Gubu( - Open$b({ - field: Open$b({ + Open$c({ + field: Open$c({ id: String, name: String, kind: "", label: "", - ux: Open$b({ + ux: Open$c({ kind: gubu_minExports.Exact("Time"), edit: gubu_minExports.Default(true), - props: Open$b({}) + props: Open$c({}) }) }) }), - { name: CMPNAME$d } + { name: CMPNAME$e } ); function BasicEntityTimeField(props) { const { spec } = props; @@ -65143,23 +65143,23 @@ function BasicEntityTimeField(props) { }, register(field.name)) ) }, field.id); } -const CMPNAME$c = "BasicEntityDateTimeField"; -const { Open: Open$a } = gubu_minExports.Gubu; +const CMPNAME$d = "BasicEntityDateTimeField"; +const { Open: Open$b } = gubu_minExports.Gubu; const BasicEntityDateTimeFieldSpecShape = gubu_minExports.Gubu( - Open$a({ - field: Open$a({ + Open$b({ + field: Open$b({ id: String, name: String, kind: "", label: "", - ux: Open$a({ + ux: Open$b({ kind: gubu_minExports.Exact("DateTime"), edit: gubu_minExports.Default(true), - props: Open$a({}) + props: Open$b({}) }) }) }), - { name: CMPNAME$c } + { name: CMPNAME$d } ); function BasicEntityDateTimeField(props) { const { spec } = props; @@ -65180,24 +65180,24 @@ function BasicEntityDateTimeField(props) { }, register(field.name)) ) }, field.id); } -const CMPNAME$b = "BasicEntitySliderField"; -const { Open: Open$9 } = gubu_minExports.Gubu; +const CMPNAME$c = "BasicEntitySliderField"; +const { Open: Open$a } = gubu_minExports.Gubu; const BasicEntityRatingFieldSpecShape = gubu_minExports.Gubu( - Open$9({ - field: Open$9({ + Open$a({ + field: Open$a({ id: String, name: String, kind: "", label: "", - ux: Open$9({ + ux: Open$a({ kind: gubu_minExports.Exact("Rating"), edit: gubu_minExports.Default(true), precision: 1, - props: Open$9({}) + props: Open$a({}) }) }) }), - { name: CMPNAME$b } + { name: CMPNAME$c } ); function BasicEntityRatingField(props) { const { spec } = props; @@ -65226,23 +65226,23 @@ function BasicEntityRatingField(props) { ) ] }, `${field.id}-div`); } -const CMPNAME$a = "BasicEntitySliderField"; -const { Open: Open$8 } = gubu_minExports.Gubu; +const CMPNAME$b = "BasicEntitySliderField"; +const { Open: Open$9 } = gubu_minExports.Gubu; const BasicEntityButtonFieldSpecShape = gubu_minExports.Gubu( - Open$8({ - field: Open$8({ + Open$9({ + field: Open$9({ id: String, name: String, kind: "", label: String, - ux: Open$8({ + ux: Open$9({ kind: gubu_minExports.Exact("Button"), edit: gubu_minExports.Default(true), - props: Open$8({}) + props: Open$9({}) }) }) }), - { name: CMPNAME$a } + { name: CMPNAME$b } ); function BasicEntityButtonField(props) { const { spec } = props; @@ -65267,28 +65267,28 @@ function BasicEntityButtonField(props) { `${field.id}-controller` ) }, `${field.id}-div`); } -const CMPNAME$9 = "BasicEntitySliderField"; -const { Open: Open$7 } = gubu_minExports.Gubu; +const CMPNAME$a = "BasicEntitySliderField"; +const { Open: Open$8 } = gubu_minExports.Gubu; const BasicEntityButtonGroupFieldSpecShape = gubu_minExports.Gubu( - Open$7({ - field: Open$7({ + Open$8({ + field: Open$8({ id: String, name: String, kind: "", label: "", - options: Open$7({ + options: Open$8({ label: { field: "label" }, value: { field: "value" }, - ents: Open$7({}) + ents: Open$8({}) }), - ux: Open$7({ + ux: Open$8({ kind: gubu_minExports.Exact("ButtonGroup"), edit: gubu_minExports.Default(true), - props: Open$7({}) + props: Open$8({}) }) }) }), - { name: CMPNAME$9 } + { name: CMPNAME$a } ); function BasicEntityButtonGroupField(props) { const { spec } = props; @@ -65314,6 +65314,109 @@ function BasicEntityButtonGroupField(props) { `${field.id}-controller` ) }, `${field.id}-div`); } +const CMPNAME$9 = "BasicEntitySelectField"; +const { Open: Open$7 } = gubu_minExports.Gubu; +const BasicEntitySelectFieldSpecShape = gubu_minExports.Gubu( + Open$7({ + field: Open$7({ + id: String, + name: String, + kind: "", + label: "", + options: Open$7({ + label: { field: gubu_minExports.Default("label") }, + value: { field: gubu_minExports.Default("value") }, + multiple: gubu_minExports.Default(false), + default: Open$7({}), + ents: Open$7({}) + }), + ux: Open$7({ + kind: gubu_minExports.Exact("Select"), + edit: gubu_minExports.Default(true) + }) + }) + }), + { name: CMPNAME$9 } +); +function BasicEntitySelectField(props) { + const { spec } = props; + const basicEntitySelectField = BasicEntitySelectFieldSpecShape(spec); + const { control, field, getValues } = basicEntitySelectField; + const { resolvedOptions, resolvedDefault } = resolveOptions(field.options); + const val = getValues(field.name); + console.log("field", field); + console.log("val", val); + console.log("resolvedDefault", resolvedDefault); + console.log("resolvedOptions", resolvedOptions); + return /* @__PURE__ */ jsxRuntimeExports.jsx( + Controller, + { + name: field.name, + control, + defaultValue: val || "", + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(FormControl$1, { fullWidth: true, children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx(InputLabel$1, { id: `${field.id}-label`, children: field.label }), + /* @__PURE__ */ jsxRuntimeExports.jsx( + Select$1, + { + labelId: `${field.id}-label`, + id: `${field.id}-select`, + value: resolveValue(field.options, value), + multiple: field.options.multiple, + label: field.name, + onChange: (event) => onChange(event.target.value), + children: resolvedOptions.map((opt) => /* @__PURE__ */ jsxRuntimeExports.jsx(MenuItem$1, { value: opt.value, children: opt.label }, opt.value)) + } + ) + ] }) + }, + `${field.id}-controller` + ); +} +function resolveOptions(options) { + const { multiple, ents, label, value, default: defaultValues } = options; + const labelField = label == null ? void 0 : label.field; + const valueField = value == null ? void 0 : value.field; + const resolvedOptions = Object.keys(ents).map((key) => { + var _a; + return { + [labelField]: (_a = ents == null ? void 0 : ents[key]) == null ? void 0 : _a[labelField], + [valueField]: key + }; + }); + let resolvedDefault; + if (multiple === false) { + if (Object.keys(defaultValues).length > 0) { + const firstKey = Object.keys(defaultValues)[0]; + resolvedDefault = { + value: firstKey, + label: defaultValues[firstKey][labelField] + }; + } else { + resolvedDefault = null; + } + } else { + resolvedDefault = Object.keys(defaultValues).map((key) => ({ + label: defaultValues[key].label, + value: key + })); + } + return { + resolvedOptions, + resolvedDefault + }; +} +function resolveValue(options, val) { + const { multiple } = options; + if (multiple) { + if (typeof val === "string") { + return val ? [val] : []; + } + return val || []; + } else { + return val || ""; + } +} const CMPNAME$8 = "BasicEntityField"; const { Open: Open$6 } = gubu_minExports.Gubu; const BasicEntityFieldSpecShape = gubu_minExports.Gubu( @@ -65336,7 +65439,8 @@ const BasicEntityFieldSpecShape = gubu_minExports.Gubu( "RadioGroup", "Rating", "Button", - "ButtonGroup" + "ButtonGroup", + "Select" ), edit: gubu_minExports.Default(true), rows: gubu_minExports.Default(3), @@ -65358,7 +65462,8 @@ const fieldMap = { RadioGroup: BasicEntityRadioGroupField, Rating: BasicEntityRatingField, Button: BasicEntityButtonField, - ButtonGroup: BasicEntityButtonGroupField + ButtonGroup: BasicEntityButtonGroupField, + Select: BasicEntitySelectField }; function BasicEntityField(props) { const { ctx, spec } = props; diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index a3d3876..4b43483 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -10600,8 +10600,8 @@ try { */ variant: PropTypes.oneOfType([PropTypes.oneOf(["dense", "regular"]), PropTypes.string]) } : void 0; - const CMPNAME$o = "BasicAccountTool"; - console.log(CMPNAME$o, "1"); + const CMPNAME$p = "BasicAccountTool"; + console.log(CMPNAME$p, "1"); const { Exact: Exact$2 } = gubu_minExports.Gubu; const BasicAccountToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10611,7 +10611,7 @@ try { attr: {}, sx: {}, style: {} - }, { name: CMPNAME$o }); + }, { name: CMPNAME$p }); function BasicAccountTool(props) { var _a; const { ctx, spec } = props; @@ -10685,8 +10685,8 @@ try { children: `${parts.join("")}` }; } - const CMPNAME$n = "BasicHeadTool"; - console.log(CMPNAME$n, "1"); + const CMPNAME$o = "BasicHeadTool"; + console.log(CMPNAME$o, "1"); const { Exact: Exact$1 } = gubu_minExports.Gubu; const BasicHeadToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10696,7 +10696,7 @@ try { attr: {}, sx: {}, style: {} - }, { name: CMPNAME$n }); + }, { name: CMPNAME$o }); function BasicHeadTool(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -10705,7 +10705,7 @@ try { const { name, kind, attr, sx, style: style2 } = basicHeadToolSpec; let tool = /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}); if ("" === kind) { - console.warn(CMPNAME$n, "empty-tool-kind", basicHeadToolSpec); + console.warn(CMPNAME$o, "empty-tool-kind", basicHeadToolSpec); } else if ("logo" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsxs( "div", @@ -10722,7 +10722,7 @@ try { { href: "/", style: style2, - className: `vxg-${CMPNAME$n}-logo`, + className: `vxg-${CMPNAME$o}-logo`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: attr.img }) } ), @@ -10754,17 +10754,17 @@ try { } else if ("account" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsx(BasicAccountTool, { ctx, spec }); } else { - console.warn(CMPNAME$n, "unknown-tool-kind", kind, basicHeadToolSpec); + console.warn(CMPNAME$o, "unknown-tool-kind", kind, basicHeadToolSpec); } return tool; } - const CMPNAME$m = "BasicHead"; - const { Child: Child$5, Exact, Open: Open$k, Required: Required$1 } = gubu_minExports.Gubu; + const CMPNAME$n = "BasicHead"; + const { Child: Child$5, Exact, Open: Open$l, Required: Required$1 } = gubu_minExports.Gubu; const BasicHeadSpecShape = gubu_minExports.Gubu({ head: { name: String, active: Boolean, - tool: Child$5(Open$k({ + tool: Child$5(Open$l({ align: Exact("left", "right") })) }, @@ -10774,7 +10774,7 @@ try { AppBar: {}, ToolBar: {} } - }, { name: CMPNAME$m }); + }, { name: CMPNAME$n }); function BasicHead(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -62718,8 +62718,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } return jsxRuntimeExports.jsx(MRT_TablePaper, { table }); }; - const { Open: Open$j, Child: Child$4 } = gubu_minExports.Gubu; - const Shape$2 = gubu_minExports.Gubu(Open$j({ + const { Open: Open$k, Child: Child$4 } = gubu_minExports.Gubu; + const Shape$2 = gubu_minExports.Gubu(Open$k({ name: String, prefix: String, ent: String, @@ -62764,7 +62764,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } }); Object.defineProperty(VxgBasicEntityListPlugin, "name", { value: "VxgBasicEntityListPlugin" }); - const CMPNAME$l = "BasicEntityList"; + const CMPNAME$m = "BasicEntityList"; function BasicEntityList(props) { const { ctx } = props; const { seneca } = ctx(); @@ -64684,23 +64684,23 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha _formControl.current.formState = getProxyFormState(formState, control); return _formControl.current; } - const CMPNAME$k = "BasicEntitySliderField"; - const { Open: Open$i } = gubu_minExports.Gubu; + const CMPNAME$l = "BasicEntitySliderField"; + const { Open: Open$j } = gubu_minExports.Gubu; const BasicEntityCheckboxFieldSpecShape = gubu_minExports.Gubu( - Open$i({ - field: Open$i({ + Open$j({ + field: Open$j({ id: String, name: String, kind: "", label: "", - ux: Open$i({ + ux: Open$j({ kind: gubu_minExports.Exact("Checkbox"), edit: gubu_minExports.Default(true), - props: Open$i({}) + props: Open$j({}) }) }) }), - { name: CMPNAME$k } + { name: CMPNAME$l } ); function BasicEntityCheckboxField(props) { const { spec } = props; @@ -64733,35 +64733,35 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } ) }), `${field.id}-box`); } - const CMPNAME$j = "BasicEntityAutocompleteField"; - const { Open: Open$h } = gubu_minExports.Gubu; + const CMPNAME$k = "BasicEntityAutocompleteField"; + const { Open: Open$i } = gubu_minExports.Gubu; const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu( - Open$h({ - field: Open$h({ + Open$i({ + field: Open$i({ id: String, name: String, kind: "", label: "", - options: Open$h({ + options: Open$i({ label: { field: gubu_minExports.Default("label") }, value: { field: gubu_minExports.Default("value") }, multiple: gubu_minExports.Default(false), - default: Open$h({}), - ents: Open$h({}) + default: Open$i({}), + ents: Open$i({}) }), - ux: Open$h({ + ux: Open$i({ kind: gubu_minExports.Exact("Autocomplete"), edit: gubu_minExports.Default(true) }) }) }), - { name: CMPNAME$j } + { name: CMPNAME$k } ); function BasicEntityAutocompleteField(props) { const { spec } = props; const basicEntityAutocompleteField = BasicEntityAutocompleteFieldSpecShape(spec); const { control, field } = basicEntityAutocompleteField; - const { resolvedOptions, resolvedDefault } = resolveOptions$1(field.options); + const { resolvedOptions, resolvedDefault } = resolveOptions$2(field.options); return /* @__PURE__ */ jsxRuntimeExports.jsx( Controller, { @@ -64777,7 +64777,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha options: resolvedOptions, isOptionEqualToValue: (opt, val) => opt === val || (opt == null ? void 0 : opt.id) != null && (val == null ? void 0 : val.id) != null && opt.id === val.id || (opt == null ? void 0 : opt.value) != null && (val == null ? void 0 : val.value) != null && opt.value === val.value, getOptionLabel: (option) => option[field.options.label.field], - value: resolveValue(field.options, value), + value: resolveValue$1(field.options, value), onChange: (_2, newVal) => onChange(newVal), renderInput: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.TextField, __spreadProps(__spreadValues({}, params), { label: field.label })) } @@ -64786,7 +64786,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha `${field.id}-controller` ); } - function resolveOptions$1(options) { + function resolveOptions$2(options) { const { multiple, ents, label, value, default: defaultValues } = options; const labelField = label == null ? void 0 : label.field; const valueField = value == null ? void 0 : value.field; @@ -64819,7 +64819,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha resolvedDefault }; } - function resolveValue(options, val) { + function resolveValue$1(options, val) { const { multiple, ents, label, value } = options; const labelField = label == null ? void 0 : label.field; const valueField = value == null ? void 0 : value.field; @@ -64837,22 +64837,22 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha return val || []; } } - const CMPNAME$i = "BasicEntitySliderField"; - const { Open: Open$g } = gubu_minExports.Gubu; + const CMPNAME$j = "BasicEntitySliderField"; + const { Open: Open$h } = gubu_minExports.Gubu; const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu( - Open$g({ - field: Open$g({ + Open$h({ + field: Open$h({ id: String, name: String, kind: "", label: "", - ux: Open$g({ + ux: Open$h({ kind: gubu_minExports.Exact("Slider"), edit: gubu_minExports.Default(true), step: gubu_minExports.Default(1), min: gubu_minExports.Default(0), max: gubu_minExports.Default(100), - props: Open$g({ + props: Open$h({ marks: gubu_minExports.Default({}), valueLabelDisplay: gubu_minExports.Exact("on", "auto", "off").Default("auto"), direction: gubu_minExports.Exact("horizontal", "vertical").Default("horizontal"), @@ -64861,7 +64861,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }) }) }), - { name: CMPNAME$i } + { name: CMPNAME$j } ); function BasicEntitySliderField(props) { const { spec } = props; @@ -64908,35 +64908,35 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } return marks; } - const CMPNAME$h = "BasicEntitySliderField"; - const { Open: Open$f } = gubu_minExports.Gubu; + const CMPNAME$i = "BasicEntitySliderField"; + const { Open: Open$g } = gubu_minExports.Gubu; const BasicEntityRadioGroupFieldSpecShape = gubu_minExports.Gubu( - Open$f({ - field: Open$f({ + Open$g({ + field: Open$g({ id: String, name: String, kind: "", llabel: "", - ux: Open$f({ + ux: Open$g({ kind: gubu_minExports.Exact("RadioGroup"), edit: gubu_minExports.Default(true), direction: gubu_minExports.Exact("row", "column").Default("row") }), - options: Open$f({ + options: Open$g({ label: { field: gubu_minExports.Default("label") }, value: { field: gubu_minExports.Default("value") }, - default: Open$f({}), - ents: Open$f({}) + default: Open$g({}), + ents: Open$g({}) }) }) }), - { name: CMPNAME$h } + { name: CMPNAME$i } ); function BasicEntityRadioGroupField(props) { const { spec } = props; const basicEntityRadioGroupField = BasicEntityRadioGroupFieldSpecShape(spec); const { control, field } = basicEntityRadioGroupField; - const { resolvedOptions, resolvedDefault } = resolveOptions(field.options); + const { resolvedOptions, resolvedDefault } = resolveOptions$1(field.options); return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx(material.FormLabel, { children: field.label }, `${field.id}-label`), /* @__PURE__ */ jsxRuntimeExports.jsx( @@ -64968,7 +64968,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ) ] }); } - function resolveOptions(options) { + function resolveOptions$1(options) { const { multiple, ents, label, value, default: defaultValues } = options; const labelField = label == null ? void 0 : label.field; const valueField = value == null ? void 0 : value.field; @@ -65001,23 +65001,23 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha resolvedDefault }; } - const CMPNAME$g = "BasicEntityTextBoxField"; - const { Open: Open$e } = gubu_minExports.Gubu; + const CMPNAME$h = "BasicEntityTextBoxField"; + const { Open: Open$f } = gubu_minExports.Gubu; const BasicEntityTextBoxFieldSpecShape = gubu_minExports.Gubu( - Open$e({ - field: Open$e({ + Open$f({ + field: Open$f({ id: String, name: String, kind: "", label: "", - ux: Open$e({ + ux: Open$f({ kind: gubu_minExports.Exact("TextBox"), edit: gubu_minExports.Default(true), - props: Open$e({}) + props: Open$f({}) }) }) }), - { name: CMPNAME$g } + { name: CMPNAME$h } ); function BasicEntityTextBoxField(props) { const { spec } = props; @@ -65042,23 +65042,23 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const { err } = props; return err ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-active", children: err.message }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-none" }); } - const CMPNAME$f = "BasicEntityTextField"; - const { Open: Open$d } = gubu_minExports.Gubu; + const CMPNAME$g = "BasicEntityTextField"; + const { Open: Open$e } = gubu_minExports.Gubu; const BasicEntityTextFieldSpecShape = gubu_minExports.Gubu( - Open$d({ - field: Open$d({ + Open$e({ + field: Open$e({ id: String, name: String, kind: "", label: "", - ux: Open$d({ + ux: Open$e({ kind: gubu_minExports.Exact("Text"), edit: gubu_minExports.Default(true), - props: Open$d({}) + props: Open$e({}) }) }) }), - { name: CMPNAME$f } + { name: CMPNAME$g } ); function BasicEntityTextField(props) { const { spec } = props; @@ -65081,23 +65081,23 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, field.id); } - const CMPNAME$e = "BasicEntityDateField"; - const { Open: Open$c } = gubu_minExports.Gubu; + const CMPNAME$f = "BasicEntityDateField"; + const { Open: Open$d } = gubu_minExports.Gubu; const BasicEntityDateFieldSpecShape = gubu_minExports.Gubu( - Open$c({ - field: Open$c({ + Open$d({ + field: Open$d({ id: String, name: String, kind: "", label: "", - ux: Open$c({ + ux: Open$d({ kind: gubu_minExports.Exact("Date"), edit: gubu_minExports.Default(true), - props: Open$c({}) + props: Open$d({}) }) }) }), - { name: CMPNAME$e } + { name: CMPNAME$f } ); function BasicEntityDateField(props) { const { spec } = props; @@ -65118,23 +65118,23 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }, register(field.name)) ) }, field.id); } - const CMPNAME$d = "BasicEntityTimeField"; - const { Open: Open$b } = gubu_minExports.Gubu; + const CMPNAME$e = "BasicEntityTimeField"; + const { Open: Open$c } = gubu_minExports.Gubu; const BasicEntityTimeFieldSpecShape = gubu_minExports.Gubu( - Open$b({ - field: Open$b({ + Open$c({ + field: Open$c({ id: String, name: String, kind: "", label: "", - ux: Open$b({ + ux: Open$c({ kind: gubu_minExports.Exact("Time"), edit: gubu_minExports.Default(true), - props: Open$b({}) + props: Open$c({}) }) }) }), - { name: CMPNAME$d } + { name: CMPNAME$e } ); function BasicEntityTimeField(props) { const { spec } = props; @@ -65155,23 +65155,23 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }, register(field.name)) ) }, field.id); } - const CMPNAME$c = "BasicEntityDateTimeField"; - const { Open: Open$a } = gubu_minExports.Gubu; + const CMPNAME$d = "BasicEntityDateTimeField"; + const { Open: Open$b } = gubu_minExports.Gubu; const BasicEntityDateTimeFieldSpecShape = gubu_minExports.Gubu( - Open$a({ - field: Open$a({ + Open$b({ + field: Open$b({ id: String, name: String, kind: "", label: "", - ux: Open$a({ + ux: Open$b({ kind: gubu_minExports.Exact("DateTime"), edit: gubu_minExports.Default(true), - props: Open$a({}) + props: Open$b({}) }) }) }), - { name: CMPNAME$c } + { name: CMPNAME$d } ); function BasicEntityDateTimeField(props) { const { spec } = props; @@ -65192,24 +65192,24 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }, register(field.name)) ) }, field.id); } - const CMPNAME$b = "BasicEntitySliderField"; - const { Open: Open$9 } = gubu_minExports.Gubu; + const CMPNAME$c = "BasicEntitySliderField"; + const { Open: Open$a } = gubu_minExports.Gubu; const BasicEntityRatingFieldSpecShape = gubu_minExports.Gubu( - Open$9({ - field: Open$9({ + Open$a({ + field: Open$a({ id: String, name: String, kind: "", label: "", - ux: Open$9({ + ux: Open$a({ kind: gubu_minExports.Exact("Rating"), edit: gubu_minExports.Default(true), precision: 1, - props: Open$9({}) + props: Open$a({}) }) }) }), - { name: CMPNAME$b } + { name: CMPNAME$c } ); function BasicEntityRatingField(props) { const { spec } = props; @@ -65238,23 +65238,23 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ) ] }, `${field.id}-div`); } - const CMPNAME$a = "BasicEntitySliderField"; - const { Open: Open$8 } = gubu_minExports.Gubu; + const CMPNAME$b = "BasicEntitySliderField"; + const { Open: Open$9 } = gubu_minExports.Gubu; const BasicEntityButtonFieldSpecShape = gubu_minExports.Gubu( - Open$8({ - field: Open$8({ + Open$9({ + field: Open$9({ id: String, name: String, kind: "", label: String, - ux: Open$8({ + ux: Open$9({ kind: gubu_minExports.Exact("Button"), edit: gubu_minExports.Default(true), - props: Open$8({}) + props: Open$9({}) }) }) }), - { name: CMPNAME$a } + { name: CMPNAME$b } ); function BasicEntityButtonField(props) { const { spec } = props; @@ -65279,28 +65279,28 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha `${field.id}-controller` ) }, `${field.id}-div`); } - const CMPNAME$9 = "BasicEntitySliderField"; - const { Open: Open$7 } = gubu_minExports.Gubu; + const CMPNAME$a = "BasicEntitySliderField"; + const { Open: Open$8 } = gubu_minExports.Gubu; const BasicEntityButtonGroupFieldSpecShape = gubu_minExports.Gubu( - Open$7({ - field: Open$7({ + Open$8({ + field: Open$8({ id: String, name: String, kind: "", label: "", - options: Open$7({ + options: Open$8({ label: { field: "label" }, value: { field: "value" }, - ents: Open$7({}) + ents: Open$8({}) }), - ux: Open$7({ + ux: Open$8({ kind: gubu_minExports.Exact("ButtonGroup"), edit: gubu_minExports.Default(true), - props: Open$7({}) + props: Open$8({}) }) }) }), - { name: CMPNAME$9 } + { name: CMPNAME$a } ); function BasicEntityButtonGroupField(props) { const { spec } = props; @@ -65326,6 +65326,109 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha `${field.id}-controller` ) }, `${field.id}-div`); } + const CMPNAME$9 = "BasicEntitySelectField"; + const { Open: Open$7 } = gubu_minExports.Gubu; + const BasicEntitySelectFieldSpecShape = gubu_minExports.Gubu( + Open$7({ + field: Open$7({ + id: String, + name: String, + kind: "", + label: "", + options: Open$7({ + label: { field: gubu_minExports.Default("label") }, + value: { field: gubu_minExports.Default("value") }, + multiple: gubu_minExports.Default(false), + default: Open$7({}), + ents: Open$7({}) + }), + ux: Open$7({ + kind: gubu_minExports.Exact("Select"), + edit: gubu_minExports.Default(true) + }) + }) + }), + { name: CMPNAME$9 } + ); + function BasicEntitySelectField(props) { + const { spec } = props; + const basicEntitySelectField = BasicEntitySelectFieldSpecShape(spec); + const { control, field, getValues } = basicEntitySelectField; + const { resolvedOptions, resolvedDefault } = resolveOptions(field.options); + const val = getValues(field.name); + console.log("field", field); + console.log("val", val); + console.log("resolvedDefault", resolvedDefault); + console.log("resolvedOptions", resolvedOptions); + return /* @__PURE__ */ jsxRuntimeExports.jsx( + Controller, + { + name: field.name, + control, + defaultValue: val || "", + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(material.FormControl, { fullWidth: true, children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx(material.InputLabel, { id: `${field.id}-label`, children: field.label }), + /* @__PURE__ */ jsxRuntimeExports.jsx( + material.Select, + { + labelId: `${field.id}-label`, + id: `${field.id}-select`, + value: resolveValue(field.options, value), + multiple: field.options.multiple, + label: field.name, + onChange: (event) => onChange(event.target.value), + children: resolvedOptions.map((opt) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.MenuItem, { value: opt.value, children: opt.label }, opt.value)) + } + ) + ] }) + }, + `${field.id}-controller` + ); + } + function resolveOptions(options) { + const { multiple, ents, label, value, default: defaultValues } = options; + const labelField = label == null ? void 0 : label.field; + const valueField = value == null ? void 0 : value.field; + const resolvedOptions = Object.keys(ents).map((key) => { + var _a; + return { + [labelField]: (_a = ents == null ? void 0 : ents[key]) == null ? void 0 : _a[labelField], + [valueField]: key + }; + }); + let resolvedDefault; + if (multiple === false) { + if (Object.keys(defaultValues).length > 0) { + const firstKey = Object.keys(defaultValues)[0]; + resolvedDefault = { + value: firstKey, + label: defaultValues[firstKey][labelField] + }; + } else { + resolvedDefault = null; + } + } else { + resolvedDefault = Object.keys(defaultValues).map((key) => ({ + label: defaultValues[key].label, + value: key + })); + } + return { + resolvedOptions, + resolvedDefault + }; + } + function resolveValue(options, val) { + const { multiple } = options; + if (multiple) { + if (typeof val === "string") { + return val ? [val] : []; + } + return val || []; + } else { + return val || ""; + } + } const CMPNAME$8 = "BasicEntityField"; const { Open: Open$6 } = gubu_minExports.Gubu; const BasicEntityFieldSpecShape = gubu_minExports.Gubu( @@ -65348,7 +65451,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha "RadioGroup", "Rating", "Button", - "ButtonGroup" + "ButtonGroup", + "Select" ), edit: gubu_minExports.Default(true), rows: gubu_minExports.Default(3), @@ -65370,7 +65474,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha RadioGroup: BasicEntityRadioGroupField, Rating: BasicEntityRatingField, Button: BasicEntityButtonField, - ButtonGroup: BasicEntityButtonGroupField + ButtonGroup: BasicEntityButtonGroupField, + Select: BasicEntitySelectField }; function BasicEntityField(props) { const { ctx, spec } = props; diff --git a/src/lib/BasicEntityField.tsx b/src/lib/BasicEntityField.tsx index a347bb2..fb6060e 100644 --- a/src/lib/BasicEntityField.tsx +++ b/src/lib/BasicEntityField.tsx @@ -15,6 +15,7 @@ import { BasicEntityDateTimeField } from './BasicEntityDateTimeField' import { BasicEntityRatingField } from './BasicEntityRatingField' import { BasicEntityButtonField } from './BasicEntityButtonField' import { BasicEntityButtonGroupField } from './BasicEntityButtonGroupField' +import { BasicEntitySelectField } from './BasicEntitySelectField' const CMPNAME = 'BasicEntityField' @@ -39,7 +40,8 @@ const BasicEntityFieldSpecShape = Gubu( 'RadioGroup', 'Rating', 'Button', - 'ButtonGroup' + 'ButtonGroup', + 'Select' ), edit: Default(true), rows: Default(3), @@ -63,6 +65,7 @@ const fieldMap: any = { Rating: BasicEntityRatingField, Button: BasicEntityButtonField, ButtonGroup: BasicEntityButtonGroupField, + Select: BasicEntitySelectField, } function BasicEntityField(props: any) { diff --git a/src/lib/BasicEntitySelectField.tsx b/src/lib/BasicEntitySelectField.tsx new file mode 100644 index 0000000..452a267 --- /dev/null +++ b/src/lib/BasicEntitySelectField.tsx @@ -0,0 +1,133 @@ +import React from 'react' + +import { + TextField, + Autocomplete, + FormControl, + InputLabel, + Select, + MenuItem, +} from '@mui/material' +import { Controller } from 'react-hook-form' + +import type { Spec } from './basic-types' + +import { Default, Exact, Gubu } from 'gubu' +const CMPNAME = 'BasicEntitySelectField' + +const { Open } = Gubu +const BasicEntitySelectFieldSpecShape = Gubu( + Open({ + field: Open({ + id: String, + name: String, + kind: '', + label: '', + options: Open({ + label: { field: Default('label') }, + value: { field: Default('value') }, + multiple: Default(false), + default: Open({}), + ents: Open({}), + }), + ux: Open({ + kind: Exact('Select'), + edit: Default(true), + }), + }), + }), + { name: CMPNAME } +) + +function BasicEntitySelectField(props: any) { + const { spec } = props + + const basicEntitySelectField: Spec = BasicEntitySelectFieldSpecShape(spec) + const { control, field, getValues } = basicEntitySelectField + const { resolvedOptions, resolvedDefault } = resolveOptions(field.options) + const val = getValues(field.name) + + console.log('field', field) + console.log('val', val) + console.log('resolvedDefault', resolvedDefault) + console.log('resolvedOptions', resolvedOptions) + + return ( + ( + + {field.label} + + + )} + /> + ) +} + +// Returns array of options and default value(s) based on the options object +function resolveOptions(options: any) { + const { multiple, ents, label, value, default: defaultValues } = options + const labelField = label?.field + const valueField = value?.field + + // Array of options + const resolvedOptions = Object.keys(ents).map((key) => ({ + [labelField]: ents?.[key]?.[labelField], + [valueField]: key, + })) + + let resolvedDefault + if (multiple === false) { + if (Object.keys(defaultValues).length > 0) { + const firstKey = Object.keys(defaultValues)[0] + resolvedDefault = { + value: firstKey, + label: defaultValues[firstKey][labelField], + } + } else { + resolvedDefault = null + } + } else { + resolvedDefault = Object.keys(defaultValues).map((key) => ({ + label: defaultValues[key].label, + value: key, + })) + } + + return { + resolvedOptions, + resolvedDefault, + } +} + +function resolveValue(options: any, val: any) { + const { multiple } = options + + if (multiple) { + if (typeof val === 'string') { + return val ? [val] : [] + } + return val || [] + } else { + return val || '' + } +} + +export { BasicEntitySelectField } From 1c813f4c7d06aa3d52e5116c41c3c591a21c1bb7 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Mon, 29 Jul 2024 11:24:55 +0100 Subject: [PATCH 051/122] Add BasicEntityToggleButtonField component --- dist/BasicEntityToggleButtonField.d.ts | 2 + dist/voxgig-model-react.es.js | 388 ++++++++++++++--------- dist/voxgig-model-react.umd.js | 386 +++++++++++++--------- src/lib/BasicEntityField.tsx | 8 +- src/lib/BasicEntityToggleButtonField.tsx | 73 +++++ 5 files changed, 561 insertions(+), 296 deletions(-) create mode 100644 dist/BasicEntityToggleButtonField.d.ts create mode 100644 src/lib/BasicEntityToggleButtonField.tsx diff --git a/dist/BasicEntityToggleButtonField.d.ts b/dist/BasicEntityToggleButtonField.d.ts new file mode 100644 index 0000000..fc5051e --- /dev/null +++ b/dist/BasicEntityToggleButtonField.d.ts @@ -0,0 +1,2 @@ +declare function BasicEntityToggleButtonField(props: any): import("react/jsx-runtime").JSX.Element; +export { BasicEntityToggleButtonField }; diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index 19e6c3b..8df6b4e 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -54,7 +54,7 @@ var __async = (__this, __arguments, generator) => { }; import * as React$1 from "react"; import React__default, { isValidElement, Children, cloneElement, useMemo, useState, useReducer, useRef, useEffect, useCallback, memo as memo$2, Fragment, useLayoutEffect } from "react"; -import { Button as Button$1, Avatar, Menu as Menu$1, MenuItem as MenuItem$1, IconButton as IconButton$1, useTheme as useTheme$5, Box as Box$2, FormControlLabel as FormControlLabel$1, Checkbox as Checkbox$1, Autocomplete as Autocomplete$1, TextField as TextField$1, FormLabel as FormLabel$1, Slider as Slider$1, RadioGroup, Radio as Radio$1, Rating, ButtonGroup, FormControl as FormControl$1, InputLabel as InputLabel$1, Select as Select$1, Grid as Grid$1, Toolbar as Toolbar$1, Container as Container$2, Drawer as Drawer$1, List as List$1, ListItem as ListItem$1, ListItemButton as ListItemButton$1, ListItemIcon as ListItemIcon$1, ListItemText as ListItemText$1, Divider as Divider$1, Typography as Typography$1 } from "@mui/material"; +import { Button as Button$1, Avatar, Menu as Menu$1, MenuItem as MenuItem$1, IconButton as IconButton$1, useTheme as useTheme$5, Box as Box$2, FormControlLabel as FormControlLabel$1, Checkbox as Checkbox$1, Autocomplete as Autocomplete$1, TextField as TextField$1, FormLabel as FormLabel$1, Slider as Slider$1, RadioGroup, Radio as Radio$1, Rating, ButtonGroup, FormControl as FormControl$1, InputLabel as InputLabel$1, Select as Select$1, Switch as Switch$1, ToggleButtonGroup, ToggleButton, Grid as Grid$1, Toolbar as Toolbar$1, Container as Container$2, Drawer as Drawer$1, List as List$1, ListItem as ListItem$1, ListItemButton as ListItemButton$1, ListItemIcon as ListItemIcon$1, ListItemText as ListItemText$1, Divider as Divider$1, Typography as Typography$1 } from "@mui/material"; import emStyled from "@emotion/styled"; import { CacheProvider, Global, ThemeContext as ThemeContext$1, css, keyframes } from "@emotion/react"; import { useSelector } from "react-redux"; @@ -10588,8 +10588,8 @@ process.env.NODE_ENV !== "production" ? Toolbar.propTypes = { */ variant: PropTypes.oneOfType([PropTypes.oneOf(["dense", "regular"]), PropTypes.string]) } : void 0; -const CMPNAME$p = "BasicAccountTool"; -console.log(CMPNAME$p, "1"); +const CMPNAME$r = "BasicAccountTool"; +console.log(CMPNAME$r, "1"); const { Exact: Exact$2 } = gubu_minExports.Gubu; const BasicAccountToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10599,7 +10599,7 @@ const BasicAccountToolSpecShape = gubu_minExports.Gubu({ attr: {}, sx: {}, style: {} -}, { name: CMPNAME$p }); +}, { name: CMPNAME$r }); function BasicAccountTool(props) { var _a; const { ctx, spec } = props; @@ -10673,8 +10673,8 @@ function stringAvatar(s) { children: `${parts.join("")}` }; } -const CMPNAME$o = "BasicHeadTool"; -console.log(CMPNAME$o, "1"); +const CMPNAME$q = "BasicHeadTool"; +console.log(CMPNAME$q, "1"); const { Exact: Exact$1 } = gubu_minExports.Gubu; const BasicHeadToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10684,7 +10684,7 @@ const BasicHeadToolSpecShape = gubu_minExports.Gubu({ attr: {}, sx: {}, style: {} -}, { name: CMPNAME$o }); +}, { name: CMPNAME$q }); function BasicHeadTool(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -10693,7 +10693,7 @@ function BasicHeadTool(props) { const { name, kind, attr, sx, style: style2 } = basicHeadToolSpec; let tool = /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}); if ("" === kind) { - console.warn(CMPNAME$o, "empty-tool-kind", basicHeadToolSpec); + console.warn(CMPNAME$q, "empty-tool-kind", basicHeadToolSpec); } else if ("logo" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsxs( "div", @@ -10710,7 +10710,7 @@ function BasicHeadTool(props) { { href: "/", style: style2, - className: `vxg-${CMPNAME$o}-logo`, + className: `vxg-${CMPNAME$q}-logo`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: attr.img }) } ), @@ -10742,17 +10742,17 @@ function BasicHeadTool(props) { } else if ("account" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsx(BasicAccountTool, { ctx, spec }); } else { - console.warn(CMPNAME$o, "unknown-tool-kind", kind, basicHeadToolSpec); + console.warn(CMPNAME$q, "unknown-tool-kind", kind, basicHeadToolSpec); } return tool; } -const CMPNAME$n = "BasicHead"; -const { Child: Child$5, Exact, Open: Open$l, Required: Required$1 } = gubu_minExports.Gubu; +const CMPNAME$p = "BasicHead"; +const { Child: Child$5, Exact, Open: Open$n, Required: Required$1 } = gubu_minExports.Gubu; const BasicHeadSpecShape = gubu_minExports.Gubu({ head: { name: String, active: Boolean, - tool: Child$5(Open$l({ + tool: Child$5(Open$n({ align: Exact("left", "right") })) }, @@ -10762,7 +10762,7 @@ const BasicHeadSpecShape = gubu_minExports.Gubu({ AppBar: {}, ToolBar: {} } -}, { name: CMPNAME$n }); +}, { name: CMPNAME$p }); function BasicHead(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -62706,8 +62706,8 @@ const MaterialReactTable = (props) => { } return jsxRuntimeExports.jsx(MRT_TablePaper, { table }); }; -const { Open: Open$k, Child: Child$4 } = gubu_minExports.Gubu; -const Shape$2 = gubu_minExports.Gubu(Open$k({ +const { Open: Open$m, Child: Child$4 } = gubu_minExports.Gubu; +const Shape$2 = gubu_minExports.Gubu(Open$m({ name: String, prefix: String, ent: String, @@ -62752,7 +62752,7 @@ Object.assign(VxgBasicEntityListPlugin, { } }); Object.defineProperty(VxgBasicEntityListPlugin, "name", { value: "VxgBasicEntityListPlugin" }); -const CMPNAME$m = "BasicEntityList"; +const CMPNAME$o = "BasicEntityList"; function BasicEntityList(props) { const { ctx } = props; const { seneca } = ctx(); @@ -64672,30 +64672,30 @@ function useForm(props = {}) { _formControl.current.formState = getProxyFormState(formState, control); return _formControl.current; } -const CMPNAME$l = "BasicEntitySliderField"; -const { Open: Open$j } = gubu_minExports.Gubu; +const CMPNAME$n = "BasicEntitySliderField"; +const { Open: Open$l } = gubu_minExports.Gubu; const BasicEntityCheckboxFieldSpecShape = gubu_minExports.Gubu( - Open$j({ - field: Open$j({ + Open$l({ + field: Open$l({ id: String, name: String, kind: "", label: "", - ux: Open$j({ + ux: Open$l({ kind: gubu_minExports.Exact("Checkbox"), edit: gubu_minExports.Default(true), - props: Open$j({}) + props: Open$l({}) }) }) }), - { name: CMPNAME$l } + { name: CMPNAME$n } ); function BasicEntityCheckboxField(props) { const { spec } = props; const basicEntityCheckboxField = BasicEntityCheckboxFieldSpecShape(spec); const { control, field, getValues } = basicEntityCheckboxField; const val = getValues(field.name); - return /* @__PURE__ */ jsxRuntimeExports.jsx(Box$2, __spreadProps(__spreadValues({}, field.ux.props), { children: /* @__PURE__ */ jsxRuntimeExports.jsx( + return /* @__PURE__ */ jsxRuntimeExports.jsx(Box$2, { children: /* @__PURE__ */ jsxRuntimeExports.jsx( FormControlLabel$1, { control: /* @__PURE__ */ jsxRuntimeExports.jsx( @@ -64706,44 +64706,43 @@ function BasicEntityCheckboxField(props) { defaultValue: !!val, render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( Checkbox$1, - { + __spreadValues({ id: field.id, checked: value, onChange, - disabled: !field.ux.edit, - required: field.ux.required || false - } + disabled: !field.ux.edit + }, field.ux.props) ) }, `${field.id}-controller` ), label: field.label } - ) }), `${field.id}-box`); + ) }, `${field.id}-box`); } -const CMPNAME$k = "BasicEntityAutocompleteField"; -const { Open: Open$i } = gubu_minExports.Gubu; +const CMPNAME$m = "BasicEntityAutocompleteField"; +const { Open: Open$k } = gubu_minExports.Gubu; const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu( - Open$i({ - field: Open$i({ + Open$k({ + field: Open$k({ id: String, name: String, kind: "", label: "", - options: Open$i({ + options: Open$k({ label: { field: gubu_minExports.Default("label") }, value: { field: gubu_minExports.Default("value") }, multiple: gubu_minExports.Default(false), - default: Open$i({}), - ents: Open$i({}) + default: Open$k({}), + ents: Open$k({}) }), - ux: Open$i({ + ux: Open$k({ kind: gubu_minExports.Exact("Autocomplete"), edit: gubu_minExports.Default(true) }) }) }), - { name: CMPNAME$k } + { name: CMPNAME$m } ); function BasicEntityAutocompleteField(props) { const { spec } = props; @@ -64825,22 +64824,22 @@ function resolveValue$1(options, val) { return val || []; } } -const CMPNAME$j = "BasicEntitySliderField"; -const { Open: Open$h } = gubu_minExports.Gubu; +const CMPNAME$l = "BasicEntitySliderField"; +const { Open: Open$j } = gubu_minExports.Gubu; const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu( - Open$h({ - field: Open$h({ + Open$j({ + field: Open$j({ id: String, name: String, kind: "", label: "", - ux: Open$h({ + ux: Open$j({ kind: gubu_minExports.Exact("Slider"), edit: gubu_minExports.Default(true), step: gubu_minExports.Default(1), min: gubu_minExports.Default(0), max: gubu_minExports.Default(100), - props: Open$h({ + props: Open$j({ marks: gubu_minExports.Default({}), valueLabelDisplay: gubu_minExports.Exact("on", "auto", "off").Default("auto"), direction: gubu_minExports.Exact("horizontal", "vertical").Default("horizontal"), @@ -64849,7 +64848,7 @@ const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu( }) }) }), - { name: CMPNAME$j } + { name: CMPNAME$l } ); function BasicEntitySliderField(props) { const { spec } = props; @@ -64896,29 +64895,29 @@ function resolveMarks(marks) { } return marks; } -const CMPNAME$i = "BasicEntitySliderField"; -const { Open: Open$g } = gubu_minExports.Gubu; +const CMPNAME$k = "BasicEntitySliderField"; +const { Open: Open$i } = gubu_minExports.Gubu; const BasicEntityRadioGroupFieldSpecShape = gubu_minExports.Gubu( - Open$g({ - field: Open$g({ + Open$i({ + field: Open$i({ id: String, name: String, kind: "", llabel: "", - ux: Open$g({ + ux: Open$i({ kind: gubu_minExports.Exact("RadioGroup"), edit: gubu_minExports.Default(true), direction: gubu_minExports.Exact("row", "column").Default("row") }), - options: Open$g({ + options: Open$i({ label: { field: gubu_minExports.Default("label") }, value: { field: gubu_minExports.Default("value") }, - default: Open$g({}), - ents: Open$g({}) + default: Open$i({}), + ents: Open$i({}) }) }) }), - { name: CMPNAME$i } + { name: CMPNAME$k } ); function BasicEntityRadioGroupField(props) { const { spec } = props; @@ -64989,23 +64988,23 @@ function resolveOptions$1(options) { resolvedDefault }; } -const CMPNAME$h = "BasicEntityTextBoxField"; -const { Open: Open$f } = gubu_minExports.Gubu; +const CMPNAME$j = "BasicEntityTextBoxField"; +const { Open: Open$h } = gubu_minExports.Gubu; const BasicEntityTextBoxFieldSpecShape = gubu_minExports.Gubu( - Open$f({ - field: Open$f({ + Open$h({ + field: Open$h({ id: String, name: String, kind: "", label: "", - ux: Open$f({ + ux: Open$h({ kind: gubu_minExports.Exact("TextBox"), edit: gubu_minExports.Default(true), - props: Open$f({}) + props: Open$h({}) }) }) }), - { name: CMPNAME$h } + { name: CMPNAME$j } ); function BasicEntityTextBoxField(props) { const { spec } = props; @@ -65030,23 +65029,23 @@ function BasicEntityFieldError(props) { const { err } = props; return err ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-active", children: err.message }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-none" }); } -const CMPNAME$g = "BasicEntityTextField"; -const { Open: Open$e } = gubu_minExports.Gubu; +const CMPNAME$i = "BasicEntityTextField"; +const { Open: Open$g } = gubu_minExports.Gubu; const BasicEntityTextFieldSpecShape = gubu_minExports.Gubu( - Open$e({ - field: Open$e({ + Open$g({ + field: Open$g({ id: String, name: String, kind: "", label: "", - ux: Open$e({ + ux: Open$g({ kind: gubu_minExports.Exact("Text"), edit: gubu_minExports.Default(true), - props: Open$e({}) + props: Open$g({}) }) }) }), - { name: CMPNAME$g } + { name: CMPNAME$i } ); function BasicEntityTextField(props) { const { spec } = props; @@ -65069,23 +65068,23 @@ function BasicEntityTextField(props) { /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, field.id); } -const CMPNAME$f = "BasicEntityDateField"; -const { Open: Open$d } = gubu_minExports.Gubu; +const CMPNAME$h = "BasicEntityDateField"; +const { Open: Open$f } = gubu_minExports.Gubu; const BasicEntityDateFieldSpecShape = gubu_minExports.Gubu( - Open$d({ - field: Open$d({ + Open$f({ + field: Open$f({ id: String, name: String, kind: "", label: "", - ux: Open$d({ + ux: Open$f({ kind: gubu_minExports.Exact("Date"), edit: gubu_minExports.Default(true), - props: Open$d({}) + props: Open$f({}) }) }) }), - { name: CMPNAME$f } + { name: CMPNAME$h } ); function BasicEntityDateField(props) { const { spec } = props; @@ -65106,23 +65105,23 @@ function BasicEntityDateField(props) { }, register(field.name)) ) }, field.id); } -const CMPNAME$e = "BasicEntityTimeField"; -const { Open: Open$c } = gubu_minExports.Gubu; +const CMPNAME$g = "BasicEntityTimeField"; +const { Open: Open$e } = gubu_minExports.Gubu; const BasicEntityTimeFieldSpecShape = gubu_minExports.Gubu( - Open$c({ - field: Open$c({ + Open$e({ + field: Open$e({ id: String, name: String, kind: "", label: "", - ux: Open$c({ + ux: Open$e({ kind: gubu_minExports.Exact("Time"), edit: gubu_minExports.Default(true), - props: Open$c({}) + props: Open$e({}) }) }) }), - { name: CMPNAME$e } + { name: CMPNAME$g } ); function BasicEntityTimeField(props) { const { spec } = props; @@ -65143,23 +65142,23 @@ function BasicEntityTimeField(props) { }, register(field.name)) ) }, field.id); } -const CMPNAME$d = "BasicEntityDateTimeField"; -const { Open: Open$b } = gubu_minExports.Gubu; +const CMPNAME$f = "BasicEntityDateTimeField"; +const { Open: Open$d } = gubu_minExports.Gubu; const BasicEntityDateTimeFieldSpecShape = gubu_minExports.Gubu( - Open$b({ - field: Open$b({ + Open$d({ + field: Open$d({ id: String, name: String, kind: "", label: "", - ux: Open$b({ + ux: Open$d({ kind: gubu_minExports.Exact("DateTime"), edit: gubu_minExports.Default(true), - props: Open$b({}) + props: Open$d({}) }) }) }), - { name: CMPNAME$d } + { name: CMPNAME$f } ); function BasicEntityDateTimeField(props) { const { spec } = props; @@ -65180,24 +65179,24 @@ function BasicEntityDateTimeField(props) { }, register(field.name)) ) }, field.id); } -const CMPNAME$c = "BasicEntitySliderField"; -const { Open: Open$a } = gubu_minExports.Gubu; +const CMPNAME$e = "BasicEntitySliderField"; +const { Open: Open$c } = gubu_minExports.Gubu; const BasicEntityRatingFieldSpecShape = gubu_minExports.Gubu( - Open$a({ - field: Open$a({ + Open$c({ + field: Open$c({ id: String, name: String, kind: "", label: "", - ux: Open$a({ + ux: Open$c({ kind: gubu_minExports.Exact("Rating"), edit: gubu_minExports.Default(true), precision: 1, - props: Open$a({}) + props: Open$c({}) }) }) }), - { name: CMPNAME$c } + { name: CMPNAME$e } ); function BasicEntityRatingField(props) { const { spec } = props; @@ -65226,69 +65225,64 @@ function BasicEntityRatingField(props) { ) ] }, `${field.id}-div`); } -const CMPNAME$b = "BasicEntitySliderField"; -const { Open: Open$9 } = gubu_minExports.Gubu; +const CMPNAME$d = "BasicEntitySliderField"; +const { Open: Open$b } = gubu_minExports.Gubu; const BasicEntityButtonFieldSpecShape = gubu_minExports.Gubu( - Open$9({ - field: Open$9({ + Open$b({ + field: Open$b({ id: String, name: String, kind: "", label: String, - ux: Open$9({ + ux: Open$b({ kind: gubu_minExports.Exact("Button"), - edit: gubu_minExports.Default(true), - props: Open$9({}) + edit: true, + variant: "contained", + props: Open$b({}) }) }) }), - { name: CMPNAME$b } + { name: CMPNAME$d } ); function BasicEntityButtonField(props) { const { spec } = props; const basicEntityButtonField = BasicEntityButtonFieldSpecShape(spec); const { control, field } = basicEntityButtonField; return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx( - Controller, - { - name: field.name, - control, - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( - Button$1, - __spreadProps(__spreadValues({ - name: field.name, - value, - onClick: (_2) => onChange(value) - }, field.ux.props), { - children: field.label - }) - ) - }, - `${field.id}-controller` + Button$1, + __spreadProps(__spreadValues({ + variant: field.ux.variant, + disabled: !field.ux.edit, + onClick: () => { + console.log("Button clicked"); + } + }, field.ux.props), { + children: field.label + }) ) }, `${field.id}-div`); } -const CMPNAME$a = "BasicEntitySliderField"; -const { Open: Open$8 } = gubu_minExports.Gubu; +const CMPNAME$c = "BasicEntitySliderField"; +const { Open: Open$a } = gubu_minExports.Gubu; const BasicEntityButtonGroupFieldSpecShape = gubu_minExports.Gubu( - Open$8({ - field: Open$8({ + Open$a({ + field: Open$a({ id: String, name: String, kind: "", label: "", - options: Open$8({ + options: Open$a({ label: { field: "label" }, value: { field: "value" }, - ents: Open$8({}) + ents: Open$a({}) }), - ux: Open$8({ + ux: Open$a({ kind: gubu_minExports.Exact("ButtonGroup"), edit: gubu_minExports.Default(true), - props: Open$8({}) + props: Open$a({}) }) }) }), - { name: CMPNAME$a } + { name: CMPNAME$c } ); function BasicEntityButtonGroupField(props) { const { spec } = props; @@ -65299,44 +65293,43 @@ function BasicEntityButtonGroupField(props) { { name: field.name, control, - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx(ButtonGroup, __spreadProps(__spreadValues({}, field.ux.props), { children: Object.entries(field.options.ents).map(([key, value2]) => { - var _a, _b; - return /* @__PURE__ */ jsxRuntimeExports.jsx( + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx(ButtonGroup, __spreadProps(__spreadValues({}, field.ux.props), { children: Object.entries(field.options.ents).map( + ([key, val]) => /* @__PURE__ */ jsxRuntimeExports.jsx( Button$1, { - onClick: () => onChange(value2), - children: (_b = (_a = field.options.ents) == null ? void 0 : _a[key]) == null ? void 0 : _b[field.options.label.field] + onClick: () => onChange(key), + children: val == null ? void 0 : val[field.options.label.field] }, `${field.id}-${key}` - ); - }) })) + ) + ) })) }, `${field.id}-controller` ) }, `${field.id}-div`); } -const CMPNAME$9 = "BasicEntitySelectField"; -const { Open: Open$7 } = gubu_minExports.Gubu; +const CMPNAME$b = "BasicEntitySelectField"; +const { Open: Open$9 } = gubu_minExports.Gubu; const BasicEntitySelectFieldSpecShape = gubu_minExports.Gubu( - Open$7({ - field: Open$7({ + Open$9({ + field: Open$9({ id: String, name: String, kind: "", label: "", - options: Open$7({ + options: Open$9({ label: { field: gubu_minExports.Default("label") }, value: { field: gubu_minExports.Default("value") }, multiple: gubu_minExports.Default(false), - default: Open$7({}), - ents: Open$7({}) + default: Open$9({}), + ents: Open$9({}) }), - ux: Open$7({ + ux: Open$9({ kind: gubu_minExports.Exact("Select"), edit: gubu_minExports.Default(true) }) }) }), - { name: CMPNAME$9 } + { name: CMPNAME$b } ); function BasicEntitySelectField(props) { const { spec } = props; @@ -65417,6 +65410,101 @@ function resolveValue(options, val) { return val || ""; } } +const CMPNAME$a = "BasicEntitySliderField"; +const { Open: Open$8 } = gubu_minExports.Gubu; +const BasicEntitySwitchFieldSpecShape = gubu_minExports.Gubu( + Open$8({ + field: Open$8({ + id: String, + name: String, + kind: "", + label: "", + ux: Open$8({ + kind: gubu_minExports.Exact("Switch"), + edit: gubu_minExports.Default(true), + props: Open$8({}) + }) + }) + }), + { name: CMPNAME$a } +); +function BasicEntitySwitchField(props) { + const { spec } = props; + const basicEntitySwitchField = BasicEntitySwitchFieldSpecShape(spec); + const { control, field, getValues } = basicEntitySwitchField; + const val = getValues(field.name); + return /* @__PURE__ */ jsxRuntimeExports.jsx(Box$2, { children: /* @__PURE__ */ jsxRuntimeExports.jsx( + FormControlLabel$1, + { + control: /* @__PURE__ */ jsxRuntimeExports.jsx( + Controller, + { + name: field.name, + control, + defaultValue: !!val, + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( + Switch$1, + __spreadValues({ + id: field.id, + checked: value, + onChange, + disabled: !field.ux.edit + }, field.ux.props) + ) + }, + `${field.id}-controller` + ), + label: field.label + } + ) }, `${field.id}-box`); +} +const CMPNAME$9 = "BasicEntitySliderField"; +const { Open: Open$7 } = gubu_minExports.Gubu; +const BasicEntityToggleButtonFieldSpecShape = gubu_minExports.Gubu( + Open$7({ + field: Open$7({ + id: String, + name: String, + kind: "", + label: "", + options: Open$7({ + label: { field: "label" }, + value: { field: "value" }, + ents: Open$7({}) + }), + ux: Open$7({ + kind: gubu_minExports.Exact("ToggleButton"), + edit: gubu_minExports.Default(true), + props: Open$7({}) + }) + }) + }), + { name: CMPNAME$9 } +); +function BasicEntityToggleButtonField(props) { + const { spec } = props; + const basicEntityToggleButtonField = BasicEntityToggleButtonFieldSpecShape(spec); + const { control, field } = basicEntityToggleButtonField; + return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx( + Controller, + { + name: field.name, + control, + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( + ToggleButtonGroup, + __spreadProps(__spreadValues({ + value, + onChange + }, field.ux.props), { + children: Object.entries(field.options.ents).map( + ([key, val]) => /* @__PURE__ */ jsxRuntimeExports.jsx(ToggleButton, { value: key, children: val == null ? void 0 : val[field.options.label.field] }, `${field.id}-${key}`) + ) + }) + ) + }, + `${field.id}-controller` + ) }, `${field.id}-div`); +} const CMPNAME$8 = "BasicEntityField"; const { Open: Open$6 } = gubu_minExports.Gubu; const BasicEntityFieldSpecShape = gubu_minExports.Gubu( @@ -65440,7 +65528,9 @@ const BasicEntityFieldSpecShape = gubu_minExports.Gubu( "Rating", "Button", "ButtonGroup", - "Select" + "Select", + "Switch", + "ToggleButton" ), edit: gubu_minExports.Default(true), rows: gubu_minExports.Default(3), @@ -65463,7 +65553,9 @@ const fieldMap = { Rating: BasicEntityRatingField, Button: BasicEntityButtonField, ButtonGroup: BasicEntityButtonGroupField, - Select: BasicEntitySelectField + Select: BasicEntitySelectField, + Switch: BasicEntitySwitchField, + ToggleButton: BasicEntityToggleButtonField }; function BasicEntityField(props) { const { ctx, spec } = props; diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index 4b43483..f05876d 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -10600,8 +10600,8 @@ try { */ variant: PropTypes.oneOfType([PropTypes.oneOf(["dense", "regular"]), PropTypes.string]) } : void 0; - const CMPNAME$p = "BasicAccountTool"; - console.log(CMPNAME$p, "1"); + const CMPNAME$r = "BasicAccountTool"; + console.log(CMPNAME$r, "1"); const { Exact: Exact$2 } = gubu_minExports.Gubu; const BasicAccountToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10611,7 +10611,7 @@ try { attr: {}, sx: {}, style: {} - }, { name: CMPNAME$p }); + }, { name: CMPNAME$r }); function BasicAccountTool(props) { var _a; const { ctx, spec } = props; @@ -10685,8 +10685,8 @@ try { children: `${parts.join("")}` }; } - const CMPNAME$o = "BasicHeadTool"; - console.log(CMPNAME$o, "1"); + const CMPNAME$q = "BasicHeadTool"; + console.log(CMPNAME$q, "1"); const { Exact: Exact$1 } = gubu_minExports.Gubu; const BasicHeadToolSpecShape = gubu_minExports.Gubu({ name: String, @@ -10696,7 +10696,7 @@ try { attr: {}, sx: {}, style: {} - }, { name: CMPNAME$o }); + }, { name: CMPNAME$q }); function BasicHeadTool(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -10705,7 +10705,7 @@ try { const { name, kind, attr, sx, style: style2 } = basicHeadToolSpec; let tool = /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}); if ("" === kind) { - console.warn(CMPNAME$o, "empty-tool-kind", basicHeadToolSpec); + console.warn(CMPNAME$q, "empty-tool-kind", basicHeadToolSpec); } else if ("logo" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsxs( "div", @@ -10722,7 +10722,7 @@ try { { href: "/", style: style2, - className: `vxg-${CMPNAME$o}-logo`, + className: `vxg-${CMPNAME$q}-logo`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: attr.img }) } ), @@ -10754,17 +10754,17 @@ try { } else if ("account" === kind) { tool = /* @__PURE__ */ jsxRuntimeExports.jsx(BasicAccountTool, { ctx, spec }); } else { - console.warn(CMPNAME$o, "unknown-tool-kind", kind, basicHeadToolSpec); + console.warn(CMPNAME$q, "unknown-tool-kind", kind, basicHeadToolSpec); } return tool; } - const CMPNAME$n = "BasicHead"; - const { Child: Child$5, Exact, Open: Open$l, Required: Required$1 } = gubu_minExports.Gubu; + const CMPNAME$p = "BasicHead"; + const { Child: Child$5, Exact, Open: Open$n, Required: Required$1 } = gubu_minExports.Gubu; const BasicHeadSpecShape = gubu_minExports.Gubu({ head: { name: String, active: Boolean, - tool: Child$5(Open$l({ + tool: Child$5(Open$n({ align: Exact("left", "right") })) }, @@ -10774,7 +10774,7 @@ try { AppBar: {}, ToolBar: {} } - }, { name: CMPNAME$n }); + }, { name: CMPNAME$p }); function BasicHead(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -62718,8 +62718,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } return jsxRuntimeExports.jsx(MRT_TablePaper, { table }); }; - const { Open: Open$k, Child: Child$4 } = gubu_minExports.Gubu; - const Shape$2 = gubu_minExports.Gubu(Open$k({ + const { Open: Open$m, Child: Child$4 } = gubu_minExports.Gubu; + const Shape$2 = gubu_minExports.Gubu(Open$m({ name: String, prefix: String, ent: String, @@ -62764,7 +62764,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } }); Object.defineProperty(VxgBasicEntityListPlugin, "name", { value: "VxgBasicEntityListPlugin" }); - const CMPNAME$m = "BasicEntityList"; + const CMPNAME$o = "BasicEntityList"; function BasicEntityList(props) { const { ctx } = props; const { seneca } = ctx(); @@ -64684,30 +64684,30 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha _formControl.current.formState = getProxyFormState(formState, control); return _formControl.current; } - const CMPNAME$l = "BasicEntitySliderField"; - const { Open: Open$j } = gubu_minExports.Gubu; + const CMPNAME$n = "BasicEntitySliderField"; + const { Open: Open$l } = gubu_minExports.Gubu; const BasicEntityCheckboxFieldSpecShape = gubu_minExports.Gubu( - Open$j({ - field: Open$j({ + Open$l({ + field: Open$l({ id: String, name: String, kind: "", label: "", - ux: Open$j({ + ux: Open$l({ kind: gubu_minExports.Exact("Checkbox"), edit: gubu_minExports.Default(true), - props: Open$j({}) + props: Open$l({}) }) }) }), - { name: CMPNAME$l } + { name: CMPNAME$n } ); function BasicEntityCheckboxField(props) { const { spec } = props; const basicEntityCheckboxField = BasicEntityCheckboxFieldSpecShape(spec); const { control, field, getValues } = basicEntityCheckboxField; const val = getValues(field.name); - return /* @__PURE__ */ jsxRuntimeExports.jsx(material.Box, __spreadProps(__spreadValues({}, field.ux.props), { children: /* @__PURE__ */ jsxRuntimeExports.jsx( + return /* @__PURE__ */ jsxRuntimeExports.jsx(material.Box, { children: /* @__PURE__ */ jsxRuntimeExports.jsx( material.FormControlLabel, { control: /* @__PURE__ */ jsxRuntimeExports.jsx( @@ -64718,44 +64718,43 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha defaultValue: !!val, render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( material.Checkbox, - { + __spreadValues({ id: field.id, checked: value, onChange, - disabled: !field.ux.edit, - required: field.ux.required || false - } + disabled: !field.ux.edit + }, field.ux.props) ) }, `${field.id}-controller` ), label: field.label } - ) }), `${field.id}-box`); + ) }, `${field.id}-box`); } - const CMPNAME$k = "BasicEntityAutocompleteField"; - const { Open: Open$i } = gubu_minExports.Gubu; + const CMPNAME$m = "BasicEntityAutocompleteField"; + const { Open: Open$k } = gubu_minExports.Gubu; const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu( - Open$i({ - field: Open$i({ + Open$k({ + field: Open$k({ id: String, name: String, kind: "", label: "", - options: Open$i({ + options: Open$k({ label: { field: gubu_minExports.Default("label") }, value: { field: gubu_minExports.Default("value") }, multiple: gubu_minExports.Default(false), - default: Open$i({}), - ents: Open$i({}) + default: Open$k({}), + ents: Open$k({}) }), - ux: Open$i({ + ux: Open$k({ kind: gubu_minExports.Exact("Autocomplete"), edit: gubu_minExports.Default(true) }) }) }), - { name: CMPNAME$k } + { name: CMPNAME$m } ); function BasicEntityAutocompleteField(props) { const { spec } = props; @@ -64837,22 +64836,22 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha return val || []; } } - const CMPNAME$j = "BasicEntitySliderField"; - const { Open: Open$h } = gubu_minExports.Gubu; + const CMPNAME$l = "BasicEntitySliderField"; + const { Open: Open$j } = gubu_minExports.Gubu; const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu( - Open$h({ - field: Open$h({ + Open$j({ + field: Open$j({ id: String, name: String, kind: "", label: "", - ux: Open$h({ + ux: Open$j({ kind: gubu_minExports.Exact("Slider"), edit: gubu_minExports.Default(true), step: gubu_minExports.Default(1), min: gubu_minExports.Default(0), max: gubu_minExports.Default(100), - props: Open$h({ + props: Open$j({ marks: gubu_minExports.Default({}), valueLabelDisplay: gubu_minExports.Exact("on", "auto", "off").Default("auto"), direction: gubu_minExports.Exact("horizontal", "vertical").Default("horizontal"), @@ -64861,7 +64860,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }) }) }), - { name: CMPNAME$j } + { name: CMPNAME$l } ); function BasicEntitySliderField(props) { const { spec } = props; @@ -64908,29 +64907,29 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } return marks; } - const CMPNAME$i = "BasicEntitySliderField"; - const { Open: Open$g } = gubu_minExports.Gubu; + const CMPNAME$k = "BasicEntitySliderField"; + const { Open: Open$i } = gubu_minExports.Gubu; const BasicEntityRadioGroupFieldSpecShape = gubu_minExports.Gubu( - Open$g({ - field: Open$g({ + Open$i({ + field: Open$i({ id: String, name: String, kind: "", llabel: "", - ux: Open$g({ + ux: Open$i({ kind: gubu_minExports.Exact("RadioGroup"), edit: gubu_minExports.Default(true), direction: gubu_minExports.Exact("row", "column").Default("row") }), - options: Open$g({ + options: Open$i({ label: { field: gubu_minExports.Default("label") }, value: { field: gubu_minExports.Default("value") }, - default: Open$g({}), - ents: Open$g({}) + default: Open$i({}), + ents: Open$i({}) }) }) }), - { name: CMPNAME$i } + { name: CMPNAME$k } ); function BasicEntityRadioGroupField(props) { const { spec } = props; @@ -65001,23 +65000,23 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha resolvedDefault }; } - const CMPNAME$h = "BasicEntityTextBoxField"; - const { Open: Open$f } = gubu_minExports.Gubu; + const CMPNAME$j = "BasicEntityTextBoxField"; + const { Open: Open$h } = gubu_minExports.Gubu; const BasicEntityTextBoxFieldSpecShape = gubu_minExports.Gubu( - Open$f({ - field: Open$f({ + Open$h({ + field: Open$h({ id: String, name: String, kind: "", label: "", - ux: Open$f({ + ux: Open$h({ kind: gubu_minExports.Exact("TextBox"), edit: gubu_minExports.Default(true), - props: Open$f({}) + props: Open$h({}) }) }) }), - { name: CMPNAME$h } + { name: CMPNAME$j } ); function BasicEntityTextBoxField(props) { const { spec } = props; @@ -65042,23 +65041,23 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const { err } = props; return err ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-active", children: err.message }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-none" }); } - const CMPNAME$g = "BasicEntityTextField"; - const { Open: Open$e } = gubu_minExports.Gubu; + const CMPNAME$i = "BasicEntityTextField"; + const { Open: Open$g } = gubu_minExports.Gubu; const BasicEntityTextFieldSpecShape = gubu_minExports.Gubu( - Open$e({ - field: Open$e({ + Open$g({ + field: Open$g({ id: String, name: String, kind: "", label: "", - ux: Open$e({ + ux: Open$g({ kind: gubu_minExports.Exact("Text"), edit: gubu_minExports.Default(true), - props: Open$e({}) + props: Open$g({}) }) }) }), - { name: CMPNAME$g } + { name: CMPNAME$i } ); function BasicEntityTextField(props) { const { spec } = props; @@ -65081,23 +65080,23 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, field.id); } - const CMPNAME$f = "BasicEntityDateField"; - const { Open: Open$d } = gubu_minExports.Gubu; + const CMPNAME$h = "BasicEntityDateField"; + const { Open: Open$f } = gubu_minExports.Gubu; const BasicEntityDateFieldSpecShape = gubu_minExports.Gubu( - Open$d({ - field: Open$d({ + Open$f({ + field: Open$f({ id: String, name: String, kind: "", label: "", - ux: Open$d({ + ux: Open$f({ kind: gubu_minExports.Exact("Date"), edit: gubu_minExports.Default(true), - props: Open$d({}) + props: Open$f({}) }) }) }), - { name: CMPNAME$f } + { name: CMPNAME$h } ); function BasicEntityDateField(props) { const { spec } = props; @@ -65118,23 +65117,23 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }, register(field.name)) ) }, field.id); } - const CMPNAME$e = "BasicEntityTimeField"; - const { Open: Open$c } = gubu_minExports.Gubu; + const CMPNAME$g = "BasicEntityTimeField"; + const { Open: Open$e } = gubu_minExports.Gubu; const BasicEntityTimeFieldSpecShape = gubu_minExports.Gubu( - Open$c({ - field: Open$c({ + Open$e({ + field: Open$e({ id: String, name: String, kind: "", label: "", - ux: Open$c({ + ux: Open$e({ kind: gubu_minExports.Exact("Time"), edit: gubu_minExports.Default(true), - props: Open$c({}) + props: Open$e({}) }) }) }), - { name: CMPNAME$e } + { name: CMPNAME$g } ); function BasicEntityTimeField(props) { const { spec } = props; @@ -65155,23 +65154,23 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }, register(field.name)) ) }, field.id); } - const CMPNAME$d = "BasicEntityDateTimeField"; - const { Open: Open$b } = gubu_minExports.Gubu; + const CMPNAME$f = "BasicEntityDateTimeField"; + const { Open: Open$d } = gubu_minExports.Gubu; const BasicEntityDateTimeFieldSpecShape = gubu_minExports.Gubu( - Open$b({ - field: Open$b({ + Open$d({ + field: Open$d({ id: String, name: String, kind: "", label: "", - ux: Open$b({ + ux: Open$d({ kind: gubu_minExports.Exact("DateTime"), edit: gubu_minExports.Default(true), - props: Open$b({}) + props: Open$d({}) }) }) }), - { name: CMPNAME$d } + { name: CMPNAME$f } ); function BasicEntityDateTimeField(props) { const { spec } = props; @@ -65192,24 +65191,24 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }, register(field.name)) ) }, field.id); } - const CMPNAME$c = "BasicEntitySliderField"; - const { Open: Open$a } = gubu_minExports.Gubu; + const CMPNAME$e = "BasicEntitySliderField"; + const { Open: Open$c } = gubu_minExports.Gubu; const BasicEntityRatingFieldSpecShape = gubu_minExports.Gubu( - Open$a({ - field: Open$a({ + Open$c({ + field: Open$c({ id: String, name: String, kind: "", label: "", - ux: Open$a({ + ux: Open$c({ kind: gubu_minExports.Exact("Rating"), edit: gubu_minExports.Default(true), precision: 1, - props: Open$a({}) + props: Open$c({}) }) }) }), - { name: CMPNAME$c } + { name: CMPNAME$e } ); function BasicEntityRatingField(props) { const { spec } = props; @@ -65238,69 +65237,64 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ) ] }, `${field.id}-div`); } - const CMPNAME$b = "BasicEntitySliderField"; - const { Open: Open$9 } = gubu_minExports.Gubu; + const CMPNAME$d = "BasicEntitySliderField"; + const { Open: Open$b } = gubu_minExports.Gubu; const BasicEntityButtonFieldSpecShape = gubu_minExports.Gubu( - Open$9({ - field: Open$9({ + Open$b({ + field: Open$b({ id: String, name: String, kind: "", label: String, - ux: Open$9({ + ux: Open$b({ kind: gubu_minExports.Exact("Button"), - edit: gubu_minExports.Default(true), - props: Open$9({}) + edit: true, + variant: "contained", + props: Open$b({}) }) }) }), - { name: CMPNAME$b } + { name: CMPNAME$d } ); function BasicEntityButtonField(props) { const { spec } = props; const basicEntityButtonField = BasicEntityButtonFieldSpecShape(spec); const { control, field } = basicEntityButtonField; return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx( - Controller, - { - name: field.name, - control, - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( - material.Button, - __spreadProps(__spreadValues({ - name: field.name, - value, - onClick: (_2) => onChange(value) - }, field.ux.props), { - children: field.label - }) - ) - }, - `${field.id}-controller` + material.Button, + __spreadProps(__spreadValues({ + variant: field.ux.variant, + disabled: !field.ux.edit, + onClick: () => { + console.log("Button clicked"); + } + }, field.ux.props), { + children: field.label + }) ) }, `${field.id}-div`); } - const CMPNAME$a = "BasicEntitySliderField"; - const { Open: Open$8 } = gubu_minExports.Gubu; + const CMPNAME$c = "BasicEntitySliderField"; + const { Open: Open$a } = gubu_minExports.Gubu; const BasicEntityButtonGroupFieldSpecShape = gubu_minExports.Gubu( - Open$8({ - field: Open$8({ + Open$a({ + field: Open$a({ id: String, name: String, kind: "", label: "", - options: Open$8({ + options: Open$a({ label: { field: "label" }, value: { field: "value" }, - ents: Open$8({}) + ents: Open$a({}) }), - ux: Open$8({ + ux: Open$a({ kind: gubu_minExports.Exact("ButtonGroup"), edit: gubu_minExports.Default(true), - props: Open$8({}) + props: Open$a({}) }) }) }), - { name: CMPNAME$a } + { name: CMPNAME$c } ); function BasicEntityButtonGroupField(props) { const { spec } = props; @@ -65311,44 +65305,43 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha { name: field.name, control, - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.ButtonGroup, __spreadProps(__spreadValues({}, field.ux.props), { children: Object.entries(field.options.ents).map(([key, value2]) => { - var _a, _b; - return /* @__PURE__ */ jsxRuntimeExports.jsx( + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.ButtonGroup, __spreadProps(__spreadValues({}, field.ux.props), { children: Object.entries(field.options.ents).map( + ([key, val]) => /* @__PURE__ */ jsxRuntimeExports.jsx( material.Button, { - onClick: () => onChange(value2), - children: (_b = (_a = field.options.ents) == null ? void 0 : _a[key]) == null ? void 0 : _b[field.options.label.field] + onClick: () => onChange(key), + children: val == null ? void 0 : val[field.options.label.field] }, `${field.id}-${key}` - ); - }) })) + ) + ) })) }, `${field.id}-controller` ) }, `${field.id}-div`); } - const CMPNAME$9 = "BasicEntitySelectField"; - const { Open: Open$7 } = gubu_minExports.Gubu; + const CMPNAME$b = "BasicEntitySelectField"; + const { Open: Open$9 } = gubu_minExports.Gubu; const BasicEntitySelectFieldSpecShape = gubu_minExports.Gubu( - Open$7({ - field: Open$7({ + Open$9({ + field: Open$9({ id: String, name: String, kind: "", label: "", - options: Open$7({ + options: Open$9({ label: { field: gubu_minExports.Default("label") }, value: { field: gubu_minExports.Default("value") }, multiple: gubu_minExports.Default(false), - default: Open$7({}), - ents: Open$7({}) + default: Open$9({}), + ents: Open$9({}) }), - ux: Open$7({ + ux: Open$9({ kind: gubu_minExports.Exact("Select"), edit: gubu_minExports.Default(true) }) }) }), - { name: CMPNAME$9 } + { name: CMPNAME$b } ); function BasicEntitySelectField(props) { const { spec } = props; @@ -65429,6 +65422,101 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha return val || ""; } } + const CMPNAME$a = "BasicEntitySliderField"; + const { Open: Open$8 } = gubu_minExports.Gubu; + const BasicEntitySwitchFieldSpecShape = gubu_minExports.Gubu( + Open$8({ + field: Open$8({ + id: String, + name: String, + kind: "", + label: "", + ux: Open$8({ + kind: gubu_minExports.Exact("Switch"), + edit: gubu_minExports.Default(true), + props: Open$8({}) + }) + }) + }), + { name: CMPNAME$a } + ); + function BasicEntitySwitchField(props) { + const { spec } = props; + const basicEntitySwitchField = BasicEntitySwitchFieldSpecShape(spec); + const { control, field, getValues } = basicEntitySwitchField; + const val = getValues(field.name); + return /* @__PURE__ */ jsxRuntimeExports.jsx(material.Box, { children: /* @__PURE__ */ jsxRuntimeExports.jsx( + material.FormControlLabel, + { + control: /* @__PURE__ */ jsxRuntimeExports.jsx( + Controller, + { + name: field.name, + control, + defaultValue: !!val, + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( + material.Switch, + __spreadValues({ + id: field.id, + checked: value, + onChange, + disabled: !field.ux.edit + }, field.ux.props) + ) + }, + `${field.id}-controller` + ), + label: field.label + } + ) }, `${field.id}-box`); + } + const CMPNAME$9 = "BasicEntitySliderField"; + const { Open: Open$7 } = gubu_minExports.Gubu; + const BasicEntityToggleButtonFieldSpecShape = gubu_minExports.Gubu( + Open$7({ + field: Open$7({ + id: String, + name: String, + kind: "", + label: "", + options: Open$7({ + label: { field: "label" }, + value: { field: "value" }, + ents: Open$7({}) + }), + ux: Open$7({ + kind: gubu_minExports.Exact("ToggleButton"), + edit: gubu_minExports.Default(true), + props: Open$7({}) + }) + }) + }), + { name: CMPNAME$9 } + ); + function BasicEntityToggleButtonField(props) { + const { spec } = props; + const basicEntityToggleButtonField = BasicEntityToggleButtonFieldSpecShape(spec); + const { control, field } = basicEntityToggleButtonField; + return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx( + Controller, + { + name: field.name, + control, + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( + material.ToggleButtonGroup, + __spreadProps(__spreadValues({ + value, + onChange + }, field.ux.props), { + children: Object.entries(field.options.ents).map( + ([key, val]) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.ToggleButton, { value: key, children: val == null ? void 0 : val[field.options.label.field] }, `${field.id}-${key}`) + ) + }) + ) + }, + `${field.id}-controller` + ) }, `${field.id}-div`); + } const CMPNAME$8 = "BasicEntityField"; const { Open: Open$6 } = gubu_minExports.Gubu; const BasicEntityFieldSpecShape = gubu_minExports.Gubu( @@ -65452,7 +65540,9 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha "Rating", "Button", "ButtonGroup", - "Select" + "Select", + "Switch", + "ToggleButton" ), edit: gubu_minExports.Default(true), rows: gubu_minExports.Default(3), @@ -65475,7 +65565,9 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha Rating: BasicEntityRatingField, Button: BasicEntityButtonField, ButtonGroup: BasicEntityButtonGroupField, - Select: BasicEntitySelectField + Select: BasicEntitySelectField, + Switch: BasicEntitySwitchField, + ToggleButton: BasicEntityToggleButtonField }; function BasicEntityField(props) { const { ctx, spec } = props; diff --git a/src/lib/BasicEntityField.tsx b/src/lib/BasicEntityField.tsx index fb6060e..4bb2936 100644 --- a/src/lib/BasicEntityField.tsx +++ b/src/lib/BasicEntityField.tsx @@ -16,6 +16,8 @@ import { BasicEntityRatingField } from './BasicEntityRatingField' import { BasicEntityButtonField } from './BasicEntityButtonField' import { BasicEntityButtonGroupField } from './BasicEntityButtonGroupField' import { BasicEntitySelectField } from './BasicEntitySelectField' +import { BasicEntitySwitchField } from './BasicEntitySwitchField' +import { BasicEntityToggleButtonField } from './BasicEntityToggleButtonField' const CMPNAME = 'BasicEntityField' @@ -41,7 +43,9 @@ const BasicEntityFieldSpecShape = Gubu( 'Rating', 'Button', 'ButtonGroup', - 'Select' + 'Select', + 'Switch', + 'ToggleButton' ), edit: Default(true), rows: Default(3), @@ -66,6 +70,8 @@ const fieldMap: any = { Button: BasicEntityButtonField, ButtonGroup: BasicEntityButtonGroupField, Select: BasicEntitySelectField, + Switch: BasicEntitySwitchField, + ToggleButton: BasicEntityToggleButtonField, } function BasicEntityField(props: any) { diff --git a/src/lib/BasicEntityToggleButtonField.tsx b/src/lib/BasicEntityToggleButtonField.tsx new file mode 100644 index 0000000..864d84e --- /dev/null +++ b/src/lib/BasicEntityToggleButtonField.tsx @@ -0,0 +1,73 @@ +import React from 'react' + +import { + Button, + ButtonGroup, + ToggleButton, + ToggleButtonGroup, +} from '@mui/material' +import { Controller } from 'react-hook-form' + +import type { Spec } from './basic-types' + +import { Default, Exact, Gubu, Skip } from 'gubu' +const CMPNAME = 'BasicEntitySliderField' + +const { Open } = Gubu +const BasicEntityToggleButtonFieldSpecShape = Gubu( + Open({ + field: Open({ + id: String, + name: String, + kind: '', + label: '', + options: Open({ + label: { field: 'label' }, + value: { field: 'value' }, + ents: Open({}), + }), + ux: Open({ + kind: Exact('ToggleButton'), + edit: Default(true), + props: Open({}), + }), + }), + }), + { name: CMPNAME } +) + +function BasicEntityToggleButtonField(props: any) { + const { spec } = props + + const basicEntityToggleButtonField: Spec = + BasicEntityToggleButtonFieldSpecShape(spec) + const { control, field } = basicEntityToggleButtonField + // const val = getValues(field.name) + + return ( +
+ ( + + {Object.entries(field.options.ents).map( + ([key, val]: [any, any]) => ( + + {val?.[field.options.label.field]} + + ) + )} + + )} + /> +
+ ) +} + +export { BasicEntityToggleButtonField } From dd414cc14362421ff8bdf9cc6525d84d985107ec Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Mon, 29 Jul 2024 11:25:27 +0100 Subject: [PATCH 052/122] Add BasicEntitySwitchField component --- dist/BasicEntitySwitchField.d.ts | 2 + src/lib/BasicEntitySwitchField.tsx | 62 ++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 dist/BasicEntitySwitchField.d.ts create mode 100644 src/lib/BasicEntitySwitchField.tsx diff --git a/dist/BasicEntitySwitchField.d.ts b/dist/BasicEntitySwitchField.d.ts new file mode 100644 index 0000000..e541dfe --- /dev/null +++ b/dist/BasicEntitySwitchField.d.ts @@ -0,0 +1,2 @@ +declare function BasicEntitySwitchField(props: any): import("react/jsx-runtime").JSX.Element; +export { BasicEntitySwitchField }; diff --git a/src/lib/BasicEntitySwitchField.tsx b/src/lib/BasicEntitySwitchField.tsx new file mode 100644 index 0000000..064f564 --- /dev/null +++ b/src/lib/BasicEntitySwitchField.tsx @@ -0,0 +1,62 @@ +import React, { useEffect, forwardRef } from 'react' + +import { FormControlLabel, Checkbox, Box, Switch } from '@mui/material' +import { Controller } from 'react-hook-form' + +import type { Spec } from './basic-types' + +import { Default, Exact, Gubu, Skip } from 'gubu' +const CMPNAME = 'BasicEntitySliderField' + +const { Open } = Gubu +const BasicEntitySwitchFieldSpecShape = Gubu( + Open({ + field: Open({ + id: String, + name: String, + kind: '', + label: '', + ux: Open({ + kind: Exact('Switch'), + edit: Default(true), + props: Open({}), + }), + }), + }), + { name: CMPNAME } +) + +function BasicEntitySwitchField(props: any) { + const { spec } = props + + const basicEntitySwitchField: Spec = BasicEntitySwitchFieldSpecShape(spec) + const { control, field, getValues } = basicEntitySwitchField + const val = getValues(field.name) + + return ( + + ( + + )} + /> + } + label={field.label} + /> + + ) +} + +export { BasicEntitySwitchField } From b08433cd2e47ae56b3d2095bdc3a0dd3836a2993 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Mon, 29 Jul 2024 17:43:27 +0100 Subject: [PATCH 053/122] Update disabled and field.ux.props on BasicEntity fields --- dist/voxgig-model-react.es.js | 55 ++++++++++++++---------- dist/voxgig-model-react.umd.js | 55 ++++++++++++++---------- src/lib/BasicEntityAutocompleteField.tsx | 2 + src/lib/BasicEntityCheckboxField.tsx | 2 +- src/lib/BasicEntityRadioGroupField.tsx | 2 + src/lib/BasicEntityRatingField.tsx | 1 + src/lib/BasicEntitySelectField.tsx | 2 + src/lib/BasicEntityTextBoxField.tsx | 2 + src/lib/BasicEntityTextField.tsx | 2 + src/lib/BasicEntityTimeField.tsx | 1 + src/lib/BasicEntityToggleButtonField.tsx | 1 + 11 files changed, 80 insertions(+), 45 deletions(-) diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index 8df6b4e..b0a0c7d 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -64757,7 +64757,7 @@ function BasicEntityAutocompleteField(props) { defaultValue: resolvedDefault, render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( Autocomplete$1, - { + __spreadProps(__spreadValues({ freeSolo: true, forcePopupIcon: true, multiple: field.options.multiple, @@ -64765,9 +64765,11 @@ function BasicEntityAutocompleteField(props) { isOptionEqualToValue: (opt, val) => opt === val || (opt == null ? void 0 : opt.id) != null && (val == null ? void 0 : val.id) != null && opt.id === val.id || (opt == null ? void 0 : opt.value) != null && (val == null ? void 0 : val.value) != null && opt.value === val.value, getOptionLabel: (option) => option[field.options.label.field], value: resolveValue$1(field.options, value), + disabled: !field.ux.edit + }, field.ux.props), { onChange: (_2, newVal) => onChange(newVal), renderInput: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx(TextField$1, __spreadProps(__spreadValues({}, params), { label: field.label })) - } + }) ) }, `${field.id}-controller` @@ -64866,16 +64868,16 @@ function BasicEntitySliderField(props) { render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( Slider$1, { - disabled: !field.ux.edit, - orientation: field.ux.direction, - track: field.ux.track, - valueLabelDisplay: field.ux.props.valueLabelDisplay, step: field.ux.step, marks: resolveMarks(field.ux.props.marks), min: field.ux.min, max: field.ux.max, value, - onChange: (_2, newVal) => onChange(newVal) + onChange: (_2, newVal) => onChange(newVal), + disabled: !field.ux.edit, + orientation: field.ux.direction, + track: field.ux.track, + valueLabelDisplay: field.ux.props.valueLabelDisplay } ) }, @@ -64934,10 +64936,12 @@ function BasicEntityRadioGroupField(props) { defaultValue: resolvedDefault, render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( RadioGroup, - { + __spreadProps(__spreadValues({ value, onChange, row: "row" === field.ux.direction, + disabled: !field.ux.edit + }, field.ux.props), { children: resolvedOptions.map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx( FormControlLabel$1, { @@ -64947,7 +64951,7 @@ function BasicEntityRadioGroupField(props) { }, `${option.value}-option` )) - }, + }), field.id ) }, @@ -65013,7 +65017,7 @@ function BasicEntityTextBoxField(props) { const val = getValues(field.name); return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx( TextField$1, - __spreadValues({ + __spreadValues(__spreadProps(__spreadValues({ id: field.id, name: field.name, label: field.label, @@ -65022,7 +65026,9 @@ function BasicEntityTextBoxField(props) { multiline: true, rows: field.ux.rows, InputLabelProps: { shrink: (val == null ? void 0 : val.length) > 0 } - }, register(field.name)) + }, register(field.name)), { + disabled: !field.ux.edit + }), field.ux.props) ) }, field.name); } function BasicEntityFieldError(props) { @@ -65056,14 +65062,15 @@ function BasicEntityTextField(props) { return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx( TextField$1, - __spreadValues({ + __spreadValues(__spreadValues({ id: field.id, name: field.name, label: field.label, fullWidth: true, variant: "outlined", - InputLabelProps: { shrink: (val == null ? void 0 : val.length) > 0 } - }, register(field.name)) + InputLabelProps: { shrink: (val == null ? void 0 : val.length) > 0 }, + disabled: !field.ux.edit + }, field.ux.props), register(field.name)) ), /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, field.id); @@ -65130,7 +65137,7 @@ function BasicEntityTimeField(props) { const val = getValues(field.name); return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx( TextField$1, - __spreadValues({ + __spreadValues(__spreadValues({ id: field.id, name: field.name, label: field.label, @@ -65139,7 +65146,7 @@ function BasicEntityTimeField(props) { type: "time", disabled: !field.ux.edit, InputLabelProps: { shrink: (val == null ? void 0 : val.length) > 0 } - }, register(field.name)) + }, register(field.name)), field.ux.props) ) }, field.id); } const CMPNAME$f = "BasicEntityDateTimeField"; @@ -65217,7 +65224,8 @@ function BasicEntityRatingField(props) { name: field.name, value, precision: field.ux.precision, - onChange: (_2, newValue) => onChange(newValue) + onChange: (_2, newValue) => onChange(newValue), + disabled: !field.ux.edit }, field.ux.props) ) }, @@ -65247,7 +65255,7 @@ const BasicEntityButtonFieldSpecShape = gubu_minExports.Gubu( function BasicEntityButtonField(props) { const { spec } = props; const basicEntityButtonField = BasicEntityButtonFieldSpecShape(spec); - const { control, field } = basicEntityButtonField; + const { field } = basicEntityButtonField; return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx( Button$1, __spreadProps(__spreadValues({ @@ -65293,7 +65301,7 @@ function BasicEntityButtonGroupField(props) { { name: field.name, control, - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx(ButtonGroup, __spreadProps(__spreadValues({}, field.ux.props), { children: Object.entries(field.options.ents).map( + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx(ButtonGroup, __spreadProps(__spreadValues({ disabled: !field.ux.edit }, field.ux.props), { children: Object.entries(field.options.ents).map( ([key, val]) => /* @__PURE__ */ jsxRuntimeExports.jsx( Button$1, { @@ -65351,15 +65359,17 @@ function BasicEntitySelectField(props) { /* @__PURE__ */ jsxRuntimeExports.jsx(InputLabel$1, { id: `${field.id}-label`, children: field.label }), /* @__PURE__ */ jsxRuntimeExports.jsx( Select$1, - { + __spreadProps(__spreadValues({ labelId: `${field.id}-label`, id: `${field.id}-select`, value: resolveValue(field.options, value), multiple: field.options.multiple, label: field.name, onChange: (event) => onChange(event.target.value), + disabled: !field.ux.edit + }, field.ux.props), { children: resolvedOptions.map((opt) => /* @__PURE__ */ jsxRuntimeExports.jsx(MenuItem$1, { value: opt.value, children: opt.label }, opt.value)) - } + }) ) ] }) }, @@ -65494,7 +65504,8 @@ function BasicEntityToggleButtonField(props) { ToggleButtonGroup, __spreadProps(__spreadValues({ value, - onChange + onChange, + disabled: !field.ux.edit }, field.ux.props), { children: Object.entries(field.options.ents).map( ([key, val]) => /* @__PURE__ */ jsxRuntimeExports.jsx(ToggleButton, { value: key, children: val == null ? void 0 : val[field.options.label.field] }, `${field.id}-${key}`) diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index f05876d..cbba4d6 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -64769,7 +64769,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha defaultValue: resolvedDefault, render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( material.Autocomplete, - { + __spreadProps(__spreadValues({ freeSolo: true, forcePopupIcon: true, multiple: field.options.multiple, @@ -64777,9 +64777,11 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha isOptionEqualToValue: (opt, val) => opt === val || (opt == null ? void 0 : opt.id) != null && (val == null ? void 0 : val.id) != null && opt.id === val.id || (opt == null ? void 0 : opt.value) != null && (val == null ? void 0 : val.value) != null && opt.value === val.value, getOptionLabel: (option) => option[field.options.label.field], value: resolveValue$1(field.options, value), + disabled: !field.ux.edit + }, field.ux.props), { onChange: (_2, newVal) => onChange(newVal), renderInput: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.TextField, __spreadProps(__spreadValues({}, params), { label: field.label })) - } + }) ) }, `${field.id}-controller` @@ -64878,16 +64880,16 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( material.Slider, { - disabled: !field.ux.edit, - orientation: field.ux.direction, - track: field.ux.track, - valueLabelDisplay: field.ux.props.valueLabelDisplay, step: field.ux.step, marks: resolveMarks(field.ux.props.marks), min: field.ux.min, max: field.ux.max, value, - onChange: (_2, newVal) => onChange(newVal) + onChange: (_2, newVal) => onChange(newVal), + disabled: !field.ux.edit, + orientation: field.ux.direction, + track: field.ux.track, + valueLabelDisplay: field.ux.props.valueLabelDisplay } ) }, @@ -64946,10 +64948,12 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha defaultValue: resolvedDefault, render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( material.RadioGroup, - { + __spreadProps(__spreadValues({ value, onChange, row: "row" === field.ux.direction, + disabled: !field.ux.edit + }, field.ux.props), { children: resolvedOptions.map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx( material.FormControlLabel, { @@ -64959,7 +64963,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }, `${option.value}-option` )) - }, + }), field.id ) }, @@ -65025,7 +65029,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const val = getValues(field.name); return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx( material.TextField, - __spreadValues({ + __spreadValues(__spreadProps(__spreadValues({ id: field.id, name: field.name, label: field.label, @@ -65034,7 +65038,9 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha multiline: true, rows: field.ux.rows, InputLabelProps: { shrink: (val == null ? void 0 : val.length) > 0 } - }, register(field.name)) + }, register(field.name)), { + disabled: !field.ux.edit + }), field.ux.props) ) }, field.name); } function BasicEntityFieldError(props) { @@ -65068,14 +65074,15 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx( material.TextField, - __spreadValues({ + __spreadValues(__spreadValues({ id: field.id, name: field.name, label: field.label, fullWidth: true, variant: "outlined", - InputLabelProps: { shrink: (val == null ? void 0 : val.length) > 0 } - }, register(field.name)) + InputLabelProps: { shrink: (val == null ? void 0 : val.length) > 0 }, + disabled: !field.ux.edit + }, field.ux.props), register(field.name)) ), /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, field.id); @@ -65142,7 +65149,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const val = getValues(field.name); return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx( material.TextField, - __spreadValues({ + __spreadValues(__spreadValues({ id: field.id, name: field.name, label: field.label, @@ -65151,7 +65158,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha type: "time", disabled: !field.ux.edit, InputLabelProps: { shrink: (val == null ? void 0 : val.length) > 0 } - }, register(field.name)) + }, register(field.name)), field.ux.props) ) }, field.id); } const CMPNAME$f = "BasicEntityDateTimeField"; @@ -65229,7 +65236,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha name: field.name, value, precision: field.ux.precision, - onChange: (_2, newValue) => onChange(newValue) + onChange: (_2, newValue) => onChange(newValue), + disabled: !field.ux.edit }, field.ux.props) ) }, @@ -65259,7 +65267,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha function BasicEntityButtonField(props) { const { spec } = props; const basicEntityButtonField = BasicEntityButtonFieldSpecShape(spec); - const { control, field } = basicEntityButtonField; + const { field } = basicEntityButtonField; return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx( material.Button, __spreadProps(__spreadValues({ @@ -65305,7 +65313,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha { name: field.name, control, - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.ButtonGroup, __spreadProps(__spreadValues({}, field.ux.props), { children: Object.entries(field.options.ents).map( + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.ButtonGroup, __spreadProps(__spreadValues({ disabled: !field.ux.edit }, field.ux.props), { children: Object.entries(field.options.ents).map( ([key, val]) => /* @__PURE__ */ jsxRuntimeExports.jsx( material.Button, { @@ -65363,15 +65371,17 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha /* @__PURE__ */ jsxRuntimeExports.jsx(material.InputLabel, { id: `${field.id}-label`, children: field.label }), /* @__PURE__ */ jsxRuntimeExports.jsx( material.Select, - { + __spreadProps(__spreadValues({ labelId: `${field.id}-label`, id: `${field.id}-select`, value: resolveValue(field.options, value), multiple: field.options.multiple, label: field.name, onChange: (event) => onChange(event.target.value), + disabled: !field.ux.edit + }, field.ux.props), { children: resolvedOptions.map((opt) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.MenuItem, { value: opt.value, children: opt.label }, opt.value)) - } + }) ) ] }) }, @@ -65506,7 +65516,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha material.ToggleButtonGroup, __spreadProps(__spreadValues({ value, - onChange + onChange, + disabled: !field.ux.edit }, field.ux.props), { children: Object.entries(field.options.ents).map( ([key, val]) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.ToggleButton, { value: key, children: val == null ? void 0 : val[field.options.label.field] }, `${field.id}-${key}`) diff --git a/src/lib/BasicEntityAutocompleteField.tsx b/src/lib/BasicEntityAutocompleteField.tsx index d359732..8b2da78 100644 --- a/src/lib/BasicEntityAutocompleteField.tsx +++ b/src/lib/BasicEntityAutocompleteField.tsx @@ -61,6 +61,8 @@ function BasicEntityAutocompleteField(props: any) { } getOptionLabel={(option: any) => option[field.options.label.field]} value={resolveValue(field.options, value)} + disabled={!field.ux.edit} + {...field.ux.props} onChange={(_, newVal: any) => onChange(newVal)} renderInput={(params: any) => ( diff --git a/src/lib/BasicEntityCheckboxField.tsx b/src/lib/BasicEntityCheckboxField.tsx index 39ff1f1..8cf246c 100644 --- a/src/lib/BasicEntityCheckboxField.tsx +++ b/src/lib/BasicEntityCheckboxField.tsx @@ -48,7 +48,7 @@ function BasicEntityCheckboxField(props: any) { checked={value} onChange={onChange} disabled={!field.ux.edit} - required={field.ux.required || false} + {...field.ux.props} /> )} /> diff --git a/src/lib/BasicEntityRadioGroupField.tsx b/src/lib/BasicEntityRadioGroupField.tsx index 7dd6474..55d9b27 100644 --- a/src/lib/BasicEntityRadioGroupField.tsx +++ b/src/lib/BasicEntityRadioGroupField.tsx @@ -55,6 +55,8 @@ function BasicEntityRadioGroupField(props: any) { value={value} onChange={onChange} row={'row' === field.ux.direction} + disabled={!field.ux.edit} + {...field.ux.props} > {resolvedOptions.map((option: any) => ( onChange(newValue)} + disabled={!field.ux.edit} {...field.ux.props} /> )} diff --git a/src/lib/BasicEntitySelectField.tsx b/src/lib/BasicEntitySelectField.tsx index 452a267..f8cd24a 100644 --- a/src/lib/BasicEntitySelectField.tsx +++ b/src/lib/BasicEntitySelectField.tsx @@ -68,6 +68,8 @@ function BasicEntitySelectField(props: any) { multiple={field.options.multiple} label={field.name} onChange={(event: any) => onChange(event.target.value)} + disabled={!field.ux.edit} + {...field.ux.props} > {resolvedOptions.map((opt: any) => ( diff --git a/src/lib/BasicEntityTextBoxField.tsx b/src/lib/BasicEntityTextBoxField.tsx index 89d92f0..1689390 100644 --- a/src/lib/BasicEntityTextBoxField.tsx +++ b/src/lib/BasicEntityTextBoxField.tsx @@ -43,6 +43,8 @@ function BasicEntityTextBoxField(props: any) { rows={field.ux.rows} InputLabelProps={{ shrink: val?.length > 0 }} {...register(field.name)} + disabled={!field.ux.edit} + {...field.ux.props} />
) diff --git a/src/lib/BasicEntityTextField.tsx b/src/lib/BasicEntityTextField.tsx index bb6222f..a5dc5f2 100644 --- a/src/lib/BasicEntityTextField.tsx +++ b/src/lib/BasicEntityTextField.tsx @@ -45,6 +45,8 @@ function BasicEntityTextField(props: any) { variant="outlined" InputLabelProps={{ shrink: val?.length > 0 }} {...register(field.name)} + disabled={!field.ux.edit} + {...field.ux.props} /> diff --git a/src/lib/BasicEntityTimeField.tsx b/src/lib/BasicEntityTimeField.tsx index 79a40fd..6226bf7 100644 --- a/src/lib/BasicEntityTimeField.tsx +++ b/src/lib/BasicEntityTimeField.tsx @@ -44,6 +44,7 @@ function BasicEntityTimeField(props: any) { disabled={!field.ux.edit} InputLabelProps={{ shrink: val?.length > 0 }} {...register(field.name)} + {...field.ux.props} /> ) diff --git a/src/lib/BasicEntityToggleButtonField.tsx b/src/lib/BasicEntityToggleButtonField.tsx index 864d84e..d857b64 100644 --- a/src/lib/BasicEntityToggleButtonField.tsx +++ b/src/lib/BasicEntityToggleButtonField.tsx @@ -54,6 +54,7 @@ function BasicEntityToggleButtonField(props: any) { {Object.entries(field.options.ents).map( From 39a0bf6b57bb1674ec0afd638f24ea55f2dd4902 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Mon, 29 Jul 2024 17:45:08 +0100 Subject: [PATCH 054/122] Update ButtonGroup field to custom handle click --- src/lib/BasicEntityButtonGroupField.tsx | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/lib/BasicEntityButtonGroupField.tsx b/src/lib/BasicEntityButtonGroupField.tsx index d680cd6..39ff106 100644 --- a/src/lib/BasicEntityButtonGroupField.tsx +++ b/src/lib/BasicEntityButtonGroupField.tsx @@ -46,15 +46,17 @@ function BasicEntityButtonGroupField(props: any) { name={field.name} control={control} render={({ field: { onChange, value } }) => ( - - {Object.entries(field.options.ents).map(([key, value]) => ( - - ))} + + {Object.entries(field.options.ents).map( + ([key, val]: [any, any]) => ( + + ) + )} )} /> From fc2949bc438ffd171c9d9cf0ae4e95166adf6fff Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Mon, 29 Jul 2024 17:45:36 +0100 Subject: [PATCH 055/122] Update ButtonField wiht custom click handler --- src/lib/BasicEntityButtonField.tsx | 32 +++++++++++++----------------- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/src/lib/BasicEntityButtonField.tsx b/src/lib/BasicEntityButtonField.tsx index 4c6948c..12e31cc 100644 --- a/src/lib/BasicEntityButtonField.tsx +++ b/src/lib/BasicEntityButtonField.tsx @@ -18,7 +18,8 @@ const BasicEntityButtonFieldSpecShape = Gubu( label: String, ux: Open({ kind: Exact('Button'), - edit: Default(true), + edit: true, + variant: 'contained', props: Open({}), }), }), @@ -30,26 +31,21 @@ function BasicEntityButtonField(props: any) { const { spec } = props const basicEntityButtonField: Spec = BasicEntityButtonFieldSpecShape(spec) - const { control, field } = basicEntityButtonField - // const val = getValues(field.name) + const { field } = basicEntityButtonField return (
- ( - - )} - /> +
) } From a3a2438284f53a1660b742ec9e9ee9836ea983ec Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Mon, 29 Jul 2024 17:46:00 +0100 Subject: [PATCH 056/122] Update ButtonGroup field to handle custom click --- src/lib/BasicEntityButtonGroupField.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/BasicEntityButtonGroupField.tsx b/src/lib/BasicEntityButtonGroupField.tsx index 39ff106..c7154cb 100644 --- a/src/lib/BasicEntityButtonGroupField.tsx +++ b/src/lib/BasicEntityButtonGroupField.tsx @@ -51,7 +51,9 @@ function BasicEntityButtonGroupField(props: any) { ([key, val]: [any, any]) => ( From b071649e5cb1423ccfe20775009dbc3c9359e85e Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Mon, 29 Jul 2024 17:46:33 +0100 Subject: [PATCH 057/122] Minor refactoring of BasicEntity fields --- dist/voxgig-model-react.es.js | 10 ++++++---- dist/voxgig-model-react.umd.js | 10 ++++++---- src/lib/BasicEntitySliderField.tsx | 10 +++++----- src/lib/BasicEntityTextBoxField.tsx | 1 + 4 files changed, 18 insertions(+), 13 deletions(-) diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index b0a0c7d..b5e4107 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -65062,15 +65062,16 @@ function BasicEntityTextField(props) { return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx( TextField$1, - __spreadValues(__spreadValues({ + __spreadValues(__spreadProps(__spreadValues({ id: field.id, name: field.name, label: field.label, fullWidth: true, variant: "outlined", - InputLabelProps: { shrink: (val == null ? void 0 : val.length) > 0 }, + InputLabelProps: { shrink: (val == null ? void 0 : val.length) > 0 } + }, register(field.name)), { disabled: !field.ux.edit - }, field.ux.props), register(field.name)) + }), field.ux.props) ), /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, field.id); @@ -65305,7 +65306,8 @@ function BasicEntityButtonGroupField(props) { ([key, val]) => /* @__PURE__ */ jsxRuntimeExports.jsx( Button$1, { - onClick: () => onChange(key), + onClick: () => { + }, children: val == null ? void 0 : val[field.options.label.field] }, `${field.id}-${key}` diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index cbba4d6..abc01c3 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -65074,15 +65074,16 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx( material.TextField, - __spreadValues(__spreadValues({ + __spreadValues(__spreadProps(__spreadValues({ id: field.id, name: field.name, label: field.label, fullWidth: true, variant: "outlined", - InputLabelProps: { shrink: (val == null ? void 0 : val.length) > 0 }, + InputLabelProps: { shrink: (val == null ? void 0 : val.length) > 0 } + }, register(field.name)), { disabled: !field.ux.edit - }, field.ux.props), register(field.name)) + }), field.ux.props) ), /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, field.id); @@ -65317,7 +65318,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ([key, val]) => /* @__PURE__ */ jsxRuntimeExports.jsx( material.Button, { - onClick: () => onChange(key), + onClick: () => { + }, children: val == null ? void 0 : val[field.options.label.field] }, `${field.id}-${key}` diff --git a/src/lib/BasicEntitySliderField.tsx b/src/lib/BasicEntitySliderField.tsx index 254bb2b..e484461 100644 --- a/src/lib/BasicEntitySliderField.tsx +++ b/src/lib/BasicEntitySliderField.tsx @@ -5,7 +5,7 @@ import { Controller } from 'react-hook-form' import type { Spec } from './basic-types' -import { Default, Exact, Gubu, Skip } from 'gubu' +import { Default, Exact, Gubu } from 'gubu' const CMPNAME = 'BasicEntitySliderField' const { Open } = Gubu @@ -54,16 +54,16 @@ function BasicEntitySliderField(props: any) { defaultValue={val || field.ux.min} render={({ field: { onChange, value } }) => ( onChange(newVal)} + disabled={!field.ux.edit} + orientation={field.ux.direction} + track={field.ux.track} + valueLabelDisplay={field.ux.props.valueLabelDisplay} /> )} /> diff --git a/src/lib/BasicEntityTextBoxField.tsx b/src/lib/BasicEntityTextBoxField.tsx index 1689390..6882772 100644 --- a/src/lib/BasicEntityTextBoxField.tsx +++ b/src/lib/BasicEntityTextBoxField.tsx @@ -24,6 +24,7 @@ const BasicEntityTextBoxFieldSpecShape = Gubu( { name: CMPNAME } ) +// TODO: Decide on naming convention for TextBox function BasicEntityTextBoxField(props: any) { const { spec } = props From 2595a7510990ee87ea04cdd661cf503062ec1dc2 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Mon, 29 Jul 2024 17:46:49 +0100 Subject: [PATCH 058/122] Move field.ux.props to main component in BasicEntityCheckboxField --- src/lib/BasicEntityCheckboxField.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/BasicEntityCheckboxField.tsx b/src/lib/BasicEntityCheckboxField.tsx index 8cf246c..e521b5c 100644 --- a/src/lib/BasicEntityCheckboxField.tsx +++ b/src/lib/BasicEntityCheckboxField.tsx @@ -33,8 +33,9 @@ function BasicEntityCheckboxField(props: any) { const { control, field, getValues } = basicEntityCheckboxField const val = getValues(field.name) + // TODO: Style wrapper box return ( - + Date: Mon, 29 Jul 2024 19:00:11 +0100 Subject: [PATCH 059/122] Update BasicEntityAutocompleteField to use field.cat object --- dist/voxgig-model-react.es.js | 193 +++++++++++------------ dist/voxgig-model-react.umd.js | 193 +++++++++++------------ src/lib/BasicEntityAutocompleteField.tsx | 125 ++++++++------- 3 files changed, 259 insertions(+), 252 deletions(-) diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index 18c5c37..7e9fdb4 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -1030,15 +1030,21 @@ function requireReactJsxRuntime_development() { } return reactJsxRuntime_development; } -var jsxRuntime = jsxRuntime$2.exports; -"use strict"; -if (process.env.NODE_ENV === "production") { - jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); -} else { - jsxRuntime$2.exports = requireReactJsxRuntime_development(); +var jsxRuntime$1 = jsxRuntime$2.exports; +var hasRequiredJsxRuntime; +function requireJsxRuntime() { + if (hasRequiredJsxRuntime) return jsxRuntime$2.exports; + hasRequiredJsxRuntime = 1; + "use strict"; + if (process.env.NODE_ENV === "production") { + jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); + } else { + jsxRuntime$2.exports = requireReactJsxRuntime_development(); + } + return jsxRuntime$2.exports; } -var jsxRuntimeExports = jsxRuntime$2.exports; -const jsxRuntime$1 = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); +var jsxRuntimeExports = requireJsxRuntime(); +const jsxRuntime = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); var gubu_min$2 = { exports: {} }; var gubu_min = gubu_min$2.exports; (function(module, exports) { @@ -25305,7 +25311,7 @@ Object.defineProperty(ArrowDownward, "__esModule", { }); var default_1$x = ArrowDownward.default = void 0; var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); -var _jsxRuntime$x = jsxRuntimeExports; +var _jsxRuntime$x = requireJsxRuntime(); var _default$x = default_1$x = ArrowDownward.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); @@ -25318,7 +25324,7 @@ Object.defineProperty(ArrowRight, "__esModule", { }); var default_1$w = ArrowRight.default = void 0; var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); -var _jsxRuntime$w = jsxRuntimeExports; +var _jsxRuntime$w = requireJsxRuntime(); var _default$w = default_1$w = ArrowRight.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); @@ -25331,7 +25337,7 @@ Object.defineProperty(Cancel, "__esModule", { }); var default_1$v = Cancel.default = void 0; var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); -var _jsxRuntime$v = jsxRuntimeExports; +var _jsxRuntime$v = requireJsxRuntime(); var _default$v = default_1$v = Cancel.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); @@ -25344,7 +25350,7 @@ Object.defineProperty(ChevronLeft, "__esModule", { }); var default_1$u = ChevronLeft.default = void 0; var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); -var _jsxRuntime$u = jsxRuntimeExports; +var _jsxRuntime$u = requireJsxRuntime(); var _default$u = default_1$u = ChevronLeft.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); @@ -25357,7 +25363,7 @@ Object.defineProperty(ChevronRight, "__esModule", { }); var default_1$t = ChevronRight.default = void 0; var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); -var _jsxRuntime$t = jsxRuntimeExports; +var _jsxRuntime$t = requireJsxRuntime(); var _default$t = default_1$t = ChevronRight.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); @@ -25370,7 +25376,7 @@ Object.defineProperty(ClearAll, "__esModule", { }); var default_1$s = ClearAll.default = void 0; var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); -var _jsxRuntime$s = jsxRuntimeExports; +var _jsxRuntime$s = requireJsxRuntime(); var _default$s = default_1$s = ClearAll.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); @@ -25383,7 +25389,7 @@ Object.defineProperty(Close, "__esModule", { }); var default_1$r = Close.default = void 0; var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); -var _jsxRuntime$r = jsxRuntimeExports; +var _jsxRuntime$r = requireJsxRuntime(); var _default$r = default_1$r = Close.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); @@ -25396,7 +25402,7 @@ Object.defineProperty(ContentCopy, "__esModule", { }); var default_1$q = ContentCopy.default = void 0; var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); -var _jsxRuntime$q = jsxRuntimeExports; +var _jsxRuntime$q = requireJsxRuntime(); var _default$q = default_1$q = ContentCopy.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); @@ -25409,7 +25415,7 @@ Object.defineProperty(DensityLarge, "__esModule", { }); var default_1$p = DensityLarge.default = void 0; var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); -var _jsxRuntime$p = jsxRuntimeExports; +var _jsxRuntime$p = requireJsxRuntime(); var _default$p = default_1$p = DensityLarge.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); @@ -25422,7 +25428,7 @@ Object.defineProperty(DensityMedium, "__esModule", { }); var default_1$o = DensityMedium.default = void 0; var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); -var _jsxRuntime$o = jsxRuntimeExports; +var _jsxRuntime$o = requireJsxRuntime(); var _default$o = default_1$o = DensityMedium.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); @@ -25435,7 +25441,7 @@ Object.defineProperty(DensitySmall, "__esModule", { }); var default_1$n = DensitySmall.default = void 0; var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); -var _jsxRuntime$n = jsxRuntimeExports; +var _jsxRuntime$n = requireJsxRuntime(); var _default$n = default_1$n = DensitySmall.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); @@ -25448,7 +25454,7 @@ Object.defineProperty(DragHandle, "__esModule", { }); var default_1$m = DragHandle.default = void 0; var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); -var _jsxRuntime$m = jsxRuntimeExports; +var _jsxRuntime$m = requireJsxRuntime(); var _default$m = default_1$m = DragHandle.default = (0, _createSvgIcon$m.default)(/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); @@ -25461,7 +25467,7 @@ Object.defineProperty(DynamicFeed, "__esModule", { }); var default_1$l = DynamicFeed.default = void 0; var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); -var _jsxRuntime$l = jsxRuntimeExports; +var _jsxRuntime$l = requireJsxRuntime(); var _default$l = default_1$l = DynamicFeed.default = (0, _createSvgIcon$l.default)([/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { @@ -25476,7 +25482,7 @@ Object.defineProperty(Edit, "__esModule", { }); var default_1$k = Edit.default = void 0; var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); -var _jsxRuntime$k = jsxRuntimeExports; +var _jsxRuntime$k = requireJsxRuntime(); var _default$k = default_1$k = Edit.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); @@ -25489,7 +25495,7 @@ Object.defineProperty(ExpandMore, "__esModule", { }); var default_1$j = ExpandMore.default = void 0; var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); -var _jsxRuntime$j = jsxRuntimeExports; +var _jsxRuntime$j = requireJsxRuntime(); var _default$j = default_1$j = ExpandMore.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); @@ -25502,7 +25508,7 @@ Object.defineProperty(FilterAlt, "__esModule", { }); var default_1$i = FilterAlt.default = void 0; var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); -var _jsxRuntime$i = jsxRuntimeExports; +var _jsxRuntime$i = requireJsxRuntime(); var _default$i = default_1$i = FilterAlt.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); @@ -25515,7 +25521,7 @@ Object.defineProperty(FilterList, "__esModule", { }); var default_1$h = FilterList.default = void 0; var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); -var _jsxRuntime$h = jsxRuntimeExports; +var _jsxRuntime$h = requireJsxRuntime(); var _default$h = default_1$h = FilterList.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); @@ -25528,7 +25534,7 @@ Object.defineProperty(FilterListOff, "__esModule", { }); var default_1$g = FilterListOff.default = void 0; var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); -var _jsxRuntime$g = jsxRuntimeExports; +var _jsxRuntime$g = requireJsxRuntime(); var _default$g = default_1$g = FilterListOff.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); @@ -25541,7 +25547,7 @@ Object.defineProperty(FirstPage, "__esModule", { }); var default_1$f = FirstPage.default = void 0; var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); -var _jsxRuntime$f = jsxRuntimeExports; +var _jsxRuntime$f = requireJsxRuntime(); var _default$f = default_1$f = FirstPage.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); @@ -25554,7 +25560,7 @@ Object.defineProperty(Fullscreen, "__esModule", { }); var default_1$e = Fullscreen.default = void 0; var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); -var _jsxRuntime$e = jsxRuntimeExports; +var _jsxRuntime$e = requireJsxRuntime(); var _default$e = default_1$e = Fullscreen.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); @@ -25567,7 +25573,7 @@ Object.defineProperty(FullscreenExit, "__esModule", { }); var default_1$d = FullscreenExit.default = void 0; var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); -var _jsxRuntime$d = jsxRuntimeExports; +var _jsxRuntime$d = requireJsxRuntime(); var _default$d = default_1$d = FullscreenExit.default = (0, _createSvgIcon$d.default)(/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); @@ -25580,7 +25586,7 @@ Object.defineProperty(KeyboardDoubleArrowDown, "__esModule", { }); var default_1$c = KeyboardDoubleArrowDown.default = void 0; var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); -var _jsxRuntime$c = jsxRuntimeExports; +var _jsxRuntime$c = requireJsxRuntime(); var _default$c = default_1$c = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$c.default)([/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { @@ -25595,7 +25601,7 @@ Object.defineProperty(LastPage, "__esModule", { }); var default_1$b = LastPage.default = void 0; var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); -var _jsxRuntime$b = jsxRuntimeExports; +var _jsxRuntime$b = requireJsxRuntime(); var _default$b = default_1$b = LastPage.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); @@ -25608,7 +25614,7 @@ Object.defineProperty(MoreHoriz, "__esModule", { }); var default_1$a = MoreHoriz.default = void 0; var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); -var _jsxRuntime$a = jsxRuntimeExports; +var _jsxRuntime$a = requireJsxRuntime(); var _default$a = default_1$a = MoreHoriz.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); @@ -25621,7 +25627,7 @@ Object.defineProperty(MoreVert, "__esModule", { }); var default_1$9 = MoreVert.default = void 0; var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); -var _jsxRuntime$9 = jsxRuntimeExports; +var _jsxRuntime$9 = requireJsxRuntime(); var _default$9 = default_1$9 = MoreVert.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); @@ -25634,7 +25640,7 @@ Object.defineProperty(PushPin, "__esModule", { }); var default_1$8 = PushPin.default = void 0; var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); -var _jsxRuntime$8 = jsxRuntimeExports; +var _jsxRuntime$8 = requireJsxRuntime(); var _default$8 = default_1$8 = PushPin.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" @@ -25648,7 +25654,7 @@ Object.defineProperty(RestartAlt, "__esModule", { }); var default_1$7 = RestartAlt.default = void 0; var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); -var _jsxRuntime$7 = jsxRuntimeExports; +var _jsxRuntime$7 = requireJsxRuntime(); var _default$7 = default_1$7 = RestartAlt.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); @@ -25661,7 +25667,7 @@ Object.defineProperty(Save, "__esModule", { }); var default_1$6 = Save.default = void 0; var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); -var _jsxRuntime$6 = jsxRuntimeExports; +var _jsxRuntime$6 = requireJsxRuntime(); var _default$6 = default_1$6 = Save.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); @@ -25674,7 +25680,7 @@ Object.defineProperty(Search, "__esModule", { }); var default_1$5 = Search.default = void 0; var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); -var _jsxRuntime$5 = jsxRuntimeExports; +var _jsxRuntime$5 = requireJsxRuntime(); var _default$5 = default_1$5 = Search.default = (0, _createSvgIcon$5.default)(/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); @@ -25687,7 +25693,7 @@ Object.defineProperty(SearchOff, "__esModule", { }); var default_1$4 = SearchOff.default = void 0; var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); -var _jsxRuntime$4 = jsxRuntimeExports; +var _jsxRuntime$4 = requireJsxRuntime(); var _default$4 = default_1$4 = SearchOff.default = (0, _createSvgIcon$4.default)([/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { @@ -25702,7 +25708,7 @@ Object.defineProperty(Sort, "__esModule", { }); var default_1$3 = Sort.default = void 0; var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); -var _jsxRuntime$3 = jsxRuntimeExports; +var _jsxRuntime$3 = requireJsxRuntime(); var _default$3 = default_1$3 = Sort.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); @@ -25715,7 +25721,7 @@ Object.defineProperty(SyncAlt, "__esModule", { }); var default_1$2 = SyncAlt.default = void 0; var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); -var _jsxRuntime$2 = jsxRuntimeExports; +var _jsxRuntime$2 = requireJsxRuntime(); var _default$2 = default_1$2 = SyncAlt.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); @@ -25728,7 +25734,7 @@ Object.defineProperty(ViewColumn, "__esModule", { }); var default_1$1 = ViewColumn.default = void 0; var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); -var _jsxRuntime$1 = jsxRuntimeExports; +var _jsxRuntime$1 = requireJsxRuntime(); var _default$1 = default_1$1 = ViewColumn.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); @@ -25741,7 +25747,7 @@ Object.defineProperty(VisibilityOff, "__esModule", { }); var default_1 = VisibilityOff.default = void 0; var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); -var _jsxRuntime = jsxRuntimeExports; +var _jsxRuntime = requireJsxRuntime(); var _default = default_1 = VisibilityOff.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); @@ -64720,15 +64726,20 @@ const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu( Open$k({ field: Open$k({ id: String, + label: String, + kind: String, + valid: String, name: String, - kind: "", - label: "", - options: Open$k({ - label: { field: gubu_minExports.Default("label") }, - value: { field: gubu_minExports.Default("value") }, - multiple: gubu_minExports.Default(false), - default: Open$k({}), - ents: Open$k({}) + cat: Open$k({ + default: String, + title: String, + multiple: Number, + order: { + sort: "", + exclude: "", + include: "" + }, + item: Open$k({}) }), ux: Open$k({ kind: gubu_minExports.Exact("Autocomplete"), @@ -64740,9 +64751,10 @@ const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu( ); function BasicEntityAutocompleteField(props) { const { spec } = props; + console.log("BasicEntityAutocompleteField", "spec", spec); const basicEntityAutocompleteField = BasicEntityAutocompleteFieldSpecShape(spec); const { control, field } = basicEntityAutocompleteField; - const { resolvedOptions, resolvedDefault } = resolveOptions$2(field.options); + const { resolvedCategories, resolvedDefault } = resolveCategories(field.cat); return /* @__PURE__ */ jsxRuntimeExports.jsx( Controller, { @@ -64754,11 +64766,11 @@ function BasicEntityAutocompleteField(props) { __spreadProps(__spreadValues({ freeSolo: true, forcePopupIcon: true, - multiple: field.options.multiple, - options: resolvedOptions, - isOptionEqualToValue: (opt, val) => opt === val || (opt == null ? void 0 : opt.id) != null && (val == null ? void 0 : val.id) != null && opt.id === val.id || (opt == null ? void 0 : opt.value) != null && (val == null ? void 0 : val.value) != null && opt.value === val.value, - getOptionLabel: (option) => option[field.options.label.field], - value: resolveValue$1(field.options, value), + multiple: field.cat.multiple === 1 ? false : true, + options: resolvedCategories, + isOptionEqualToValue: (opt, val) => opt === val || (opt == null ? void 0 : opt.id) != null && (val == null ? void 0 : val.id) != null && opt.id === val.id || (opt == null ? void 0 : opt.key) != null && (val == null ? void 0 : val.key) != null && opt.key === val.key, + getOptionLabel: (option) => option.title, + value: resolveValue$1(field.cat, value), disabled: !field.ux.edit }, field.ux.props), { onChange: (_2, newVal) => onChange(newVal), @@ -64769,56 +64781,43 @@ function BasicEntityAutocompleteField(props) { `${field.id}-controller` ); } -function resolveOptions$2(options) { - const { multiple, ents, label, value, default: defaultValues } = options; - const labelField = label == null ? void 0 : label.field; - const valueField = value == null ? void 0 : value.field; - const resolvedOptions = Object.keys(ents).map((key) => { +function resolveCategories(cat) { + const { multiple, item: items, default: defaultValues } = cat; + const resolvedCategories = Object.keys(items).map((key) => { var _a; return { - [labelField]: (_a = ents == null ? void 0 : ents[key]) == null ? void 0 : _a[labelField], - [valueField]: key + title: (_a = items == null ? void 0 : items[key]) == null ? void 0 : _a.title, + key }; }); - let resolvedDefault; - if (multiple === false) { - if (Object.keys(defaultValues).length > 0) { - const firstKey = Object.keys(defaultValues)[0]; - resolvedDefault = { - value: firstKey, - label: defaultValues[firstKey][labelField] - }; - } else { - resolvedDefault = null; - } - } else { - resolvedDefault = Object.keys(defaultValues).map((key) => ({ - label: defaultValues[key].label, - value: key - })); + let resolvedDefault = multiple === 1 ? null : []; + let defaultList = []; + if (typeof defaultValues === "string") { + defaultList = defaultValues.split(","); + } + const mapResolvedDefault = (list) => list.map((val) => ({ + title: items[val].title, + key: val + })); + if (multiple === 1) { + resolvedDefault = { + title: items[defaultList[0]].title, + key: defaultList[0] + }; + } else if (multiple === -1) { + resolvedDefault = mapResolvedDefault(defaultList); + } else if (multiple > 1) { + resolvedDefault = mapResolvedDefault(defaultList.slice(0, multiple)); } return { - resolvedOptions, + resolvedCategories, resolvedDefault }; } -function resolveValue$1(options, val) { - const { multiple, ents, label, value } = options; - const labelField = label == null ? void 0 : label.field; - const valueField = value == null ? void 0 : value.field; - const getValue2 = (val2) => { - var _a; - return ((_a = ents == null ? void 0 : ents[val2]) == null ? void 0 : _a[labelField]) ? { [valueField]: val2, [labelField]: ents[val2][labelField] || val2 } : void 0; - }; - if (!multiple) { - return typeof val === "string" ? getValue2(val) : val || void 0; - } else { - if (typeof val === "string") { - const resolvedValue = getValue2(val); - return resolvedValue ? [resolvedValue] : []; - } - return val || []; - } +function resolveValue$1(cat, value) { + const { multiple, item: items } = cat; + console.log("resolveValue", "value", value); + return value; } const CMPNAME$l = "BasicEntitySliderField"; const { Open: Open$j } = gubu_minExports.Gubu; diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index d123fa4..b90c74c 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -1042,15 +1042,21 @@ var __async = (__this, __arguments, generator) => { } return reactJsxRuntime_development; } - var jsxRuntime = jsxRuntime$2.exports; - "use strict"; - if (process.env.NODE_ENV === "production") { - jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); - } else { - jsxRuntime$2.exports = requireReactJsxRuntime_development(); + var jsxRuntime$1 = jsxRuntime$2.exports; + var hasRequiredJsxRuntime; + function requireJsxRuntime() { + if (hasRequiredJsxRuntime) return jsxRuntime$2.exports; + hasRequiredJsxRuntime = 1; + "use strict"; + if (process.env.NODE_ENV === "production") { + jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); + } else { + jsxRuntime$2.exports = requireReactJsxRuntime_development(); + } + return jsxRuntime$2.exports; } - var jsxRuntimeExports = jsxRuntime$2.exports; - const jsxRuntime$1 = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); + var jsxRuntimeExports = requireJsxRuntime(); + const jsxRuntime = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); var gubu_min$2 = { exports: {} }; var gubu_min = gubu_min$2.exports; (function(module2, exports3) { @@ -25317,7 +25323,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$x = ArrowDownward.default = void 0; var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); - var _jsxRuntime$x = jsxRuntimeExports; + var _jsxRuntime$x = requireJsxRuntime(); var _default$x = default_1$x = ArrowDownward.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); @@ -25330,7 +25336,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$w = ArrowRight.default = void 0; var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); - var _jsxRuntime$w = jsxRuntimeExports; + var _jsxRuntime$w = requireJsxRuntime(); var _default$w = default_1$w = ArrowRight.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); @@ -25343,7 +25349,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$v = Cancel.default = void 0; var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); - var _jsxRuntime$v = jsxRuntimeExports; + var _jsxRuntime$v = requireJsxRuntime(); var _default$v = default_1$v = Cancel.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); @@ -25356,7 +25362,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$u = ChevronLeft.default = void 0; var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); - var _jsxRuntime$u = jsxRuntimeExports; + var _jsxRuntime$u = requireJsxRuntime(); var _default$u = default_1$u = ChevronLeft.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); @@ -25369,7 +25375,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$t = ChevronRight.default = void 0; var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); - var _jsxRuntime$t = jsxRuntimeExports; + var _jsxRuntime$t = requireJsxRuntime(); var _default$t = default_1$t = ChevronRight.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); @@ -25382,7 +25388,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$s = ClearAll.default = void 0; var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); - var _jsxRuntime$s = jsxRuntimeExports; + var _jsxRuntime$s = requireJsxRuntime(); var _default$s = default_1$s = ClearAll.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); @@ -25395,7 +25401,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$r = Close.default = void 0; var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); - var _jsxRuntime$r = jsxRuntimeExports; + var _jsxRuntime$r = requireJsxRuntime(); var _default$r = default_1$r = Close.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); @@ -25408,7 +25414,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$q = ContentCopy.default = void 0; var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); - var _jsxRuntime$q = jsxRuntimeExports; + var _jsxRuntime$q = requireJsxRuntime(); var _default$q = default_1$q = ContentCopy.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); @@ -25421,7 +25427,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$p = DensityLarge.default = void 0; var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); - var _jsxRuntime$p = jsxRuntimeExports; + var _jsxRuntime$p = requireJsxRuntime(); var _default$p = default_1$p = DensityLarge.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); @@ -25434,7 +25440,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$o = DensityMedium.default = void 0; var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); - var _jsxRuntime$o = jsxRuntimeExports; + var _jsxRuntime$o = requireJsxRuntime(); var _default$o = default_1$o = DensityMedium.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); @@ -25447,7 +25453,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$n = DensitySmall.default = void 0; var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); - var _jsxRuntime$n = jsxRuntimeExports; + var _jsxRuntime$n = requireJsxRuntime(); var _default$n = default_1$n = DensitySmall.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); @@ -25460,7 +25466,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$m = DragHandle.default = void 0; var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); - var _jsxRuntime$m = jsxRuntimeExports; + var _jsxRuntime$m = requireJsxRuntime(); var _default$m = default_1$m = DragHandle.default = (0, _createSvgIcon$m.default)(/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); @@ -25473,7 +25479,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$l = DynamicFeed.default = void 0; var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); - var _jsxRuntime$l = jsxRuntimeExports; + var _jsxRuntime$l = requireJsxRuntime(); var _default$l = default_1$l = DynamicFeed.default = (0, _createSvgIcon$l.default)([/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { @@ -25488,7 +25494,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$k = Edit.default = void 0; var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); - var _jsxRuntime$k = jsxRuntimeExports; + var _jsxRuntime$k = requireJsxRuntime(); var _default$k = default_1$k = Edit.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); @@ -25501,7 +25507,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$j = ExpandMore.default = void 0; var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); - var _jsxRuntime$j = jsxRuntimeExports; + var _jsxRuntime$j = requireJsxRuntime(); var _default$j = default_1$j = ExpandMore.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); @@ -25514,7 +25520,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$i = FilterAlt.default = void 0; var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); - var _jsxRuntime$i = jsxRuntimeExports; + var _jsxRuntime$i = requireJsxRuntime(); var _default$i = default_1$i = FilterAlt.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); @@ -25527,7 +25533,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$h = FilterList.default = void 0; var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); - var _jsxRuntime$h = jsxRuntimeExports; + var _jsxRuntime$h = requireJsxRuntime(); var _default$h = default_1$h = FilterList.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); @@ -25540,7 +25546,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$g = FilterListOff.default = void 0; var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); - var _jsxRuntime$g = jsxRuntimeExports; + var _jsxRuntime$g = requireJsxRuntime(); var _default$g = default_1$g = FilterListOff.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); @@ -25553,7 +25559,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$f = FirstPage.default = void 0; var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); - var _jsxRuntime$f = jsxRuntimeExports; + var _jsxRuntime$f = requireJsxRuntime(); var _default$f = default_1$f = FirstPage.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); @@ -25566,7 +25572,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$e = Fullscreen.default = void 0; var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); - var _jsxRuntime$e = jsxRuntimeExports; + var _jsxRuntime$e = requireJsxRuntime(); var _default$e = default_1$e = Fullscreen.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); @@ -25579,7 +25585,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$d = FullscreenExit.default = void 0; var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); - var _jsxRuntime$d = jsxRuntimeExports; + var _jsxRuntime$d = requireJsxRuntime(); var _default$d = default_1$d = FullscreenExit.default = (0, _createSvgIcon$d.default)(/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); @@ -25592,7 +25598,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$c = KeyboardDoubleArrowDown.default = void 0; var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); - var _jsxRuntime$c = jsxRuntimeExports; + var _jsxRuntime$c = requireJsxRuntime(); var _default$c = default_1$c = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$c.default)([/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { @@ -25607,7 +25613,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$b = LastPage.default = void 0; var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); - var _jsxRuntime$b = jsxRuntimeExports; + var _jsxRuntime$b = requireJsxRuntime(); var _default$b = default_1$b = LastPage.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); @@ -25620,7 +25626,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$a = MoreHoriz.default = void 0; var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); - var _jsxRuntime$a = jsxRuntimeExports; + var _jsxRuntime$a = requireJsxRuntime(); var _default$a = default_1$a = MoreHoriz.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); @@ -25633,7 +25639,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$9 = MoreVert.default = void 0; var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); - var _jsxRuntime$9 = jsxRuntimeExports; + var _jsxRuntime$9 = requireJsxRuntime(); var _default$9 = default_1$9 = MoreVert.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); @@ -25646,7 +25652,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$8 = PushPin.default = void 0; var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); - var _jsxRuntime$8 = jsxRuntimeExports; + var _jsxRuntime$8 = requireJsxRuntime(); var _default$8 = default_1$8 = PushPin.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" @@ -25660,7 +25666,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$7 = RestartAlt.default = void 0; var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); - var _jsxRuntime$7 = jsxRuntimeExports; + var _jsxRuntime$7 = requireJsxRuntime(); var _default$7 = default_1$7 = RestartAlt.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); @@ -25673,7 +25679,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$6 = Save.default = void 0; var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); - var _jsxRuntime$6 = jsxRuntimeExports; + var _jsxRuntime$6 = requireJsxRuntime(); var _default$6 = default_1$6 = Save.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); @@ -25686,7 +25692,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$5 = Search.default = void 0; var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); - var _jsxRuntime$5 = jsxRuntimeExports; + var _jsxRuntime$5 = requireJsxRuntime(); var _default$5 = default_1$5 = Search.default = (0, _createSvgIcon$5.default)(/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); @@ -25699,7 +25705,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$4 = SearchOff.default = void 0; var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); - var _jsxRuntime$4 = jsxRuntimeExports; + var _jsxRuntime$4 = requireJsxRuntime(); var _default$4 = default_1$4 = SearchOff.default = (0, _createSvgIcon$4.default)([/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { @@ -25714,7 +25720,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$3 = Sort.default = void 0; var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); - var _jsxRuntime$3 = jsxRuntimeExports; + var _jsxRuntime$3 = requireJsxRuntime(); var _default$3 = default_1$3 = Sort.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); @@ -25727,7 +25733,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$2 = SyncAlt.default = void 0; var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); - var _jsxRuntime$2 = jsxRuntimeExports; + var _jsxRuntime$2 = requireJsxRuntime(); var _default$2 = default_1$2 = SyncAlt.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); @@ -25740,7 +25746,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$1 = ViewColumn.default = void 0; var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); - var _jsxRuntime$1 = jsxRuntimeExports; + var _jsxRuntime$1 = requireJsxRuntime(); var _default$1 = default_1$1 = ViewColumn.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); @@ -25753,7 +25759,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1 = VisibilityOff.default = void 0; var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); - var _jsxRuntime = jsxRuntimeExports; + var _jsxRuntime = requireJsxRuntime(); var _default = default_1 = VisibilityOff.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); @@ -64732,15 +64738,20 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha Open$k({ field: Open$k({ id: String, + label: String, + kind: String, + valid: String, name: String, - kind: "", - label: "", - options: Open$k({ - label: { field: gubu_minExports.Default("label") }, - value: { field: gubu_minExports.Default("value") }, - multiple: gubu_minExports.Default(false), - default: Open$k({}), - ents: Open$k({}) + cat: Open$k({ + default: String, + title: String, + multiple: Number, + order: { + sort: "", + exclude: "", + include: "" + }, + item: Open$k({}) }), ux: Open$k({ kind: gubu_minExports.Exact("Autocomplete"), @@ -64752,9 +64763,10 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ); function BasicEntityAutocompleteField(props) { const { spec } = props; + console.log("BasicEntityAutocompleteField", "spec", spec); const basicEntityAutocompleteField = BasicEntityAutocompleteFieldSpecShape(spec); const { control, field } = basicEntityAutocompleteField; - const { resolvedOptions, resolvedDefault } = resolveOptions$2(field.options); + const { resolvedCategories, resolvedDefault } = resolveCategories(field.cat); return /* @__PURE__ */ jsxRuntimeExports.jsx( Controller, { @@ -64766,11 +64778,11 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha __spreadProps(__spreadValues({ freeSolo: true, forcePopupIcon: true, - multiple: field.options.multiple, - options: resolvedOptions, - isOptionEqualToValue: (opt, val) => opt === val || (opt == null ? void 0 : opt.id) != null && (val == null ? void 0 : val.id) != null && opt.id === val.id || (opt == null ? void 0 : opt.value) != null && (val == null ? void 0 : val.value) != null && opt.value === val.value, - getOptionLabel: (option) => option[field.options.label.field], - value: resolveValue$1(field.options, value), + multiple: field.cat.multiple === 1 ? false : true, + options: resolvedCategories, + isOptionEqualToValue: (opt, val) => opt === val || (opt == null ? void 0 : opt.id) != null && (val == null ? void 0 : val.id) != null && opt.id === val.id || (opt == null ? void 0 : opt.key) != null && (val == null ? void 0 : val.key) != null && opt.key === val.key, + getOptionLabel: (option) => option.title, + value: resolveValue$1(field.cat, value), disabled: !field.ux.edit }, field.ux.props), { onChange: (_2, newVal) => onChange(newVal), @@ -64781,56 +64793,43 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha `${field.id}-controller` ); } - function resolveOptions$2(options) { - const { multiple, ents, label, value, default: defaultValues } = options; - const labelField = label == null ? void 0 : label.field; - const valueField = value == null ? void 0 : value.field; - const resolvedOptions = Object.keys(ents).map((key) => { + function resolveCategories(cat) { + const { multiple, item: items, default: defaultValues } = cat; + const resolvedCategories = Object.keys(items).map((key) => { var _a; return { - [labelField]: (_a = ents == null ? void 0 : ents[key]) == null ? void 0 : _a[labelField], - [valueField]: key + title: (_a = items == null ? void 0 : items[key]) == null ? void 0 : _a.title, + key }; }); - let resolvedDefault; - if (multiple === false) { - if (Object.keys(defaultValues).length > 0) { - const firstKey = Object.keys(defaultValues)[0]; - resolvedDefault = { - value: firstKey, - label: defaultValues[firstKey][labelField] - }; - } else { - resolvedDefault = null; - } - } else { - resolvedDefault = Object.keys(defaultValues).map((key) => ({ - label: defaultValues[key].label, - value: key - })); + let resolvedDefault = multiple === 1 ? null : []; + let defaultList = []; + if (typeof defaultValues === "string") { + defaultList = defaultValues.split(","); + } + const mapResolvedDefault = (list) => list.map((val) => ({ + title: items[val].title, + key: val + })); + if (multiple === 1) { + resolvedDefault = { + title: items[defaultList[0]].title, + key: defaultList[0] + }; + } else if (multiple === -1) { + resolvedDefault = mapResolvedDefault(defaultList); + } else if (multiple > 1) { + resolvedDefault = mapResolvedDefault(defaultList.slice(0, multiple)); } return { - resolvedOptions, + resolvedCategories, resolvedDefault }; } - function resolveValue$1(options, val) { - const { multiple, ents, label, value } = options; - const labelField = label == null ? void 0 : label.field; - const valueField = value == null ? void 0 : value.field; - const getValue2 = (val2) => { - var _a; - return ((_a = ents == null ? void 0 : ents[val2]) == null ? void 0 : _a[labelField]) ? { [valueField]: val2, [labelField]: ents[val2][labelField] || val2 } : void 0; - }; - if (!multiple) { - return typeof val === "string" ? getValue2(val) : val || void 0; - } else { - if (typeof val === "string") { - const resolvedValue = getValue2(val); - return resolvedValue ? [resolvedValue] : []; - } - return val || []; - } + function resolveValue$1(cat, value) { + const { multiple, item: items } = cat; + console.log("resolveValue", "value", value); + return value; } const CMPNAME$l = "BasicEntitySliderField"; const { Open: Open$j } = gubu_minExports.Gubu; diff --git a/src/lib/BasicEntityAutocompleteField.tsx b/src/lib/BasicEntityAutocompleteField.tsx index 8b2da78..38e5b0d 100644 --- a/src/lib/BasicEntityAutocompleteField.tsx +++ b/src/lib/BasicEntityAutocompleteField.tsx @@ -13,15 +13,20 @@ const BasicEntityAutocompleteFieldSpecShape = Gubu( Open({ field: Open({ id: String, + label: String, + kind: String, + valid: String, name: String, - kind: '', - label: '', - options: Open({ - label: { field: Default('label') }, - value: { field: Default('value') }, - multiple: Default(false), - default: Open({}), - ents: Open({}), + cat: Open({ + default: String, + title: String, + multiple: Number, + order: { + sort: '', + exclude: '', + include: '', + }, + item: Open({}), }), ux: Open({ kind: Exact('Autocomplete'), @@ -35,10 +40,23 @@ const BasicEntityAutocompleteFieldSpecShape = Gubu( function BasicEntityAutocompleteField(props: any) { const { spec } = props + console.log('BasicEntityAutocompleteField', 'spec', spec) + const basicEntityAutocompleteField: Spec = BasicEntityAutocompleteFieldSpecShape(spec) const { control, field } = basicEntityAutocompleteField - const { resolvedOptions, resolvedDefault } = resolveOptions(field.options) + const { resolvedCategories, resolvedDefault } = resolveCategories(field.cat) + + // console.log( + // 'BasicEntityAutocompleteField', + // 'resolvedCategories', + // resolvedCategories + // ) + // console.log( + // 'BasicEntityAutocompleteField', + // 'resolvedDefault', + // resolvedDefault + // ) return ( opt === val || (opt?.id != null && val?.id != null && opt.id === val.id) || - (opt?.value != null && - val?.value != null && - opt.value === val.value) + (opt?.key != null && val?.key != null && opt.key === val.key) } - getOptionLabel={(option: any) => option[field.options.label.field]} - value={resolveValue(field.options, value)} + getOptionLabel={(option: any) => option.title} + value={resolveValue(field.cat, value)} disabled={!field.ux.edit} {...field.ux.props} onChange={(_, newVal: any) => onChange(newVal)} @@ -74,60 +90,53 @@ function BasicEntityAutocompleteField(props: any) { } // Returns array of options and default value(s) based on the options object -function resolveOptions(options: any) { - const { multiple, ents, label, value, default: defaultValues } = options - const labelField = label?.field - const valueField = value?.field +function resolveCategories(cat: any) { + const { multiple, item: items, default: defaultValues } = cat + + // console.log('resolveCat', 'cat', cat) // Array of options - const resolvedOptions = Object.keys(ents).map((key) => ({ - [labelField]: ents?.[key]?.[labelField], - [valueField]: key, + const resolvedCategories = Object.keys(items).map((key) => ({ + title: items?.[key]?.title, + key: key, })) - let resolvedDefault - if (multiple === false) { - if (Object.keys(defaultValues).length > 0) { - const firstKey = Object.keys(defaultValues)[0] - resolvedDefault = { - value: firstKey, - label: defaultValues[firstKey][labelField], - } - } else { - resolvedDefault = null - } - } else { - resolvedDefault = Object.keys(defaultValues).map((key) => ({ - label: defaultValues[key].label, - value: key, + let resolvedDefault: any = multiple === 1 ? null : [] + let defaultList: any[] = [] + + if (typeof defaultValues === 'string') { + defaultList = defaultValues.split(',') + } + + const mapResolvedDefault = (list: any[]) => + list.map((val: any) => ({ + title: items[val].title, + key: val, })) + + if (multiple === 1) { + resolvedDefault = { + title: items[defaultList[0]].title, + key: defaultList[0], + } + } else if (multiple === -1) { + resolvedDefault = mapResolvedDefault(defaultList) + } else if (multiple > 1) { + resolvedDefault = mapResolvedDefault(defaultList.slice(0, multiple)) } + // console.log('resolveCat', 'resolvedDefault', resolvedDefault) + return { - resolvedOptions, + resolvedCategories, resolvedDefault, } } -function resolveValue(options: any, val: any) { - const { multiple, ents, label, value } = options - const labelField = label?.field - const valueField = value?.field - - const getValue = (val: string) => - ents?.[val]?.[labelField] - ? { [valueField]: val, [labelField]: ents[val][labelField] || val } - : undefined - - if (!multiple) { - return typeof val === 'string' ? getValue(val) : val || undefined - } else { - if (typeof val === 'string') { - const resolvedValue = getValue(val) - return resolvedValue ? [resolvedValue] : [] - } - return val || [] - } +function resolveValue(cat: any, value: any) { + const { multiple, item: items } = cat + console.log('resolveValue', 'value', value) + return value } export { BasicEntityAutocompleteField } From c4f6ec0bbe74467b2d49cc2e8e1fb505daa0c624 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Mon, 29 Jul 2024 20:19:00 +0100 Subject: [PATCH 060/122] Refactor BasicEntityToggleButtonField to use field.cat model spec --- src/lib/BasicEntityToggleButtonField.tsx | 35 ++++++++++++++---------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/src/lib/BasicEntityToggleButtonField.tsx b/src/lib/BasicEntityToggleButtonField.tsx index d857b64..ab67672 100644 --- a/src/lib/BasicEntityToggleButtonField.tsx +++ b/src/lib/BasicEntityToggleButtonField.tsx @@ -11,6 +11,7 @@ import { Controller } from 'react-hook-form' import type { Spec } from './basic-types' import { Default, Exact, Gubu, Skip } from 'gubu' +import { on } from 'events' const CMPNAME = 'BasicEntitySliderField' const { Open } = Gubu @@ -21,10 +22,16 @@ const BasicEntityToggleButtonFieldSpecShape = Gubu( name: String, kind: '', label: '', - options: Open({ - label: { field: 'label' }, - value: { field: 'value' }, - ents: Open({}), + cat: Open({ + default: '', + title: String, + multiple: Number, + order: { + sort: '', + exclude: '', + include: '', + }, + item: Open({}), }), ux: Open({ kind: Exact('ToggleButton'), @@ -36,13 +43,12 @@ const BasicEntityToggleButtonFieldSpecShape = Gubu( { name: CMPNAME } ) -function BasicEntityToggleButtonField(props: any) { +function BasicEntityToggleButtonField (props: any) { const { spec } = props const basicEntityToggleButtonField: Spec = BasicEntityToggleButtonFieldSpecShape(spec) const { control, field } = basicEntityToggleButtonField - // const val = getValues(field.name) return (
@@ -53,17 +59,18 @@ function BasicEntityToggleButtonField(props: any) { render={({ field: { onChange, value } }) => ( { + field.cat.multiple === 1 ? onChange(v) : onChange([v]) + }} disabled={!field.ux.edit} {...field.ux.props} > - {Object.entries(field.options.ents).map( - ([key, val]: [any, any]) => ( - - {val?.[field.options.label.field]} - - ) - )} + {Object.entries(field.cat.item).map(([key, val]: [any, any]) => ( + + {val?.title} + + ))} )} /> From db277be12500d22373f60739e2aa6fe4833415e9 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Mon, 29 Jul 2024 20:41:07 +0100 Subject: [PATCH 061/122] Remove `valid` prop from BasicEntityAutocompleteField Gubu validation --- src/lib/BasicEntityAutocompleteField.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lib/BasicEntityAutocompleteField.tsx b/src/lib/BasicEntityAutocompleteField.tsx index 38e5b0d..09bc8b5 100644 --- a/src/lib/BasicEntityAutocompleteField.tsx +++ b/src/lib/BasicEntityAutocompleteField.tsx @@ -15,7 +15,6 @@ const BasicEntityAutocompleteFieldSpecShape = Gubu( id: String, label: String, kind: String, - valid: String, name: String, cat: Open({ default: String, From 537a5167deb1669c61e76697707dd3cdd94a6740 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Mon, 29 Jul 2024 20:53:53 +0100 Subject: [PATCH 062/122] Refactor BasicEntityAutocompleteField to use resolveCategories and resolveValue --- src/lib/BasicEntityAutocompleteField.tsx | 51 +++++++++++++++--------- 1 file changed, 32 insertions(+), 19 deletions(-) diff --git a/src/lib/BasicEntityAutocompleteField.tsx b/src/lib/BasicEntityAutocompleteField.tsx index 09bc8b5..cd8e2d0 100644 --- a/src/lib/BasicEntityAutocompleteField.tsx +++ b/src/lib/BasicEntityAutocompleteField.tsx @@ -36,27 +36,16 @@ const BasicEntityAutocompleteFieldSpecShape = Gubu( { name: CMPNAME } ) -function BasicEntityAutocompleteField(props: any) { +function BasicEntityAutocompleteField (props: any) { const { spec } = props - console.log('BasicEntityAutocompleteField', 'spec', spec) + // console.log('BasicEntityAutocompleteField', 'spec', spec) const basicEntityAutocompleteField: Spec = BasicEntityAutocompleteFieldSpecShape(spec) const { control, field } = basicEntityAutocompleteField const { resolvedCategories, resolvedDefault } = resolveCategories(field.cat) - // console.log( - // 'BasicEntityAutocompleteField', - // 'resolvedCategories', - // resolvedCategories - // ) - // console.log( - // 'BasicEntityAutocompleteField', - // 'resolvedDefault', - // resolvedDefault - // ) - return ( option.title} - value={resolveValue(field.cat, value)} + value={resolveValue(value, field.cat)} disabled={!field.ux.edit} {...field.ux.props} onChange={(_, newVal: any) => onChange(newVal)} @@ -88,8 +77,9 @@ function BasicEntityAutocompleteField(props: any) { ) } +// TODO: Make it DRY // Returns array of options and default value(s) based on the options object -function resolveCategories(cat: any) { +function resolveCategories (cat: any) { const { multiple, item: items, default: defaultValues } = cat // console.log('resolveCat', 'cat', cat) @@ -132,10 +122,33 @@ function resolveCategories(cat: any) { } } -function resolveValue(cat: any, value: any) { - const { multiple, item: items } = cat - console.log('resolveValue', 'value', value) - return value +// TODO: Make it DRY +function resolveValue ( + value: any, + cat: { + multiple: number + item: Record + } +) { + const { item: items } = cat + + if (Array.isArray(value)) { + return value + } + + switch (cat.multiple) { + case 1: + return { key: value, title: items[value]?.title } + case -1: + return value + .split(',') + .map((k: any) => ({ key: k, title: items[k]?.title })) + default: + return value + .split(',') + .slice(0, cat.multiple) + .map((k: any) => ({ key: k, title: items[k]?.title })) + } } export { BasicEntityAutocompleteField } From 0ca672d5733b4fa63661092b9a2ed8859107c11e Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Mon, 29 Jul 2024 20:54:30 +0100 Subject: [PATCH 063/122] Refactor BasicEntityRadioGroupField to make use of field.cat and resolveCategories and resolveValue --- src/lib/BasicEntityRadioGroupField.tsx | 114 +++++++++++++++++-------- 1 file changed, 79 insertions(+), 35 deletions(-) diff --git a/src/lib/BasicEntityRadioGroupField.tsx b/src/lib/BasicEntityRadioGroupField.tsx index 55d9b27..d4899e0 100644 --- a/src/lib/BasicEntityRadioGroupField.tsx +++ b/src/lib/BasicEntityRadioGroupField.tsx @@ -6,6 +6,7 @@ import { Controller } from 'react-hook-form' import type { Spec } from './basic-types' import { Default, Exact, Gubu, Skip } from 'gubu' +import { resolve } from 'path' const CMPNAME = 'BasicEntitySliderField' const { Open } = Gubu @@ -21,25 +22,30 @@ const BasicEntityRadioGroupFieldSpecShape = Gubu( edit: Default(true), direction: Exact('row', 'column').Default('row'), }), - options: Open({ - label: { field: Default('label') }, - value: { field: Default('value') }, - default: Open({}), - ents: Open({}), + cat: Open({ + default: '', + title: String, + multiple: Number, + order: { + sort: '', + exclude: '', + include: '', + }, + item: Open({}), }), }), }), { name: CMPNAME } ) -function BasicEntityRadioGroupField(props: any) { +function BasicEntityRadioGroupField (props: any) { const { spec } = props const basicEntityRadioGroupField: Spec = BasicEntityRadioGroupFieldSpecShape(spec) const { control, field } = basicEntityRadioGroupField - const { resolvedOptions, resolvedDefault } = resolveOptions(field.options) + const { resolvedCategories, resolvedDefault } = resolveCategories(field.cat) return ( <> @@ -52,18 +58,18 @@ function BasicEntityRadioGroupField(props: any) { render={({ field: { onChange, value } }) => ( - {resolvedOptions.map((option: any) => ( + {resolvedCategories.map((option: any) => ( } - label={option.label} + label={option.title} /> ))} @@ -73,40 +79,78 @@ function BasicEntityRadioGroupField(props: any) { ) } +// TODO: Make it DRY // Returns array of options and default value(s) based on the options object -function resolveOptions(options: any) { - const { multiple, ents, label, value, default: defaultValues } = options - const labelField = label?.field - const valueField = value?.field +function resolveCategories (cat: any) { + const { multiple, item: items, default: defaultValues } = cat + + // console.log('resolveCat', 'cat', cat) // Array of options - const resolvedOptions = Object.keys(ents).map((key) => ({ - [labelField]: ents?.[key]?.[labelField], - [valueField]: key, + const resolvedCategories = Object.keys(items).map((key) => ({ + title: items?.[key]?.title, + key: key, })) - let resolvedDefault - if (multiple === false) { - if (Object.keys(defaultValues).length > 0) { - const firstKey = Object.keys(defaultValues)[0] - resolvedDefault = { - value: firstKey, - label: defaultValues[firstKey][labelField], - } - } else { - resolvedDefault = null - } - } else { - resolvedDefault = Object.keys(defaultValues).map((key) => ({ - label: defaultValues[key].label, - value: key, + let resolvedDefault: any = multiple === 1 ? null : [] + let defaultList: any[] = [] + + if (typeof defaultValues === 'string') { + defaultList = defaultValues.split(',') + } + + const mapResolvedDefault = (list: any[]) => + list.map((val: any) => ({ + title: items[val].title, + key: val, })) + + if (multiple === 1) { + resolvedDefault = { + title: items[defaultList[0]].title, + key: defaultList[0], + } + } else if (multiple === -1) { + resolvedDefault = mapResolvedDefault(defaultList) + } else if (multiple > 1) { + resolvedDefault = mapResolvedDefault(defaultList.slice(0, multiple)) } + // console.log('resolveCat', 'resolvedDefault', resolvedDefault) + return { - resolvedOptions, + resolvedCategories, resolvedDefault, } } +// TODO: Make it DRY +function resolveValue ( + value: any, + cat: { + multiple: number + item: Record + } +) { + const { item: items, multiple } = cat + + if (Array.isArray(value)) { + return value + } + + switch (multiple) { + case 1: + return { key: value, title: items[value]?.title } + case -1: + return value + .split(',') + .map((k: any) => ({ key: k, title: items[k]?.title })) + default: + return value + .split(',') + .slice(0, multiple) + .map((k: any) => ({ key: k, title: items[k]?.title })) + } +} + export { BasicEntityRadioGroupField } From d65b22cb5d14e48b5ab32eeff2d6736bfd7fa111 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Mon, 29 Jul 2024 20:55:09 +0100 Subject: [PATCH 064/122] Refactor BasicEntitySelectField to make use of field.cat and resolveCategories --- dist/voxgig-model-react.es.js | 253 ++++++++++++++++++----------- dist/voxgig-model-react.umd.js | 253 ++++++++++++++++++----------- src/lib/BasicEntitySelectField.tsx | 132 ++++++++------- 3 files changed, 383 insertions(+), 255 deletions(-) diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index 7e9fdb4..678ce9c 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -64728,7 +64728,6 @@ const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu( id: String, label: String, kind: String, - valid: String, name: String, cat: Open$k({ default: String, @@ -64751,10 +64750,9 @@ const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu( ); function BasicEntityAutocompleteField(props) { const { spec } = props; - console.log("BasicEntityAutocompleteField", "spec", spec); const basicEntityAutocompleteField = BasicEntityAutocompleteFieldSpecShape(spec); const { control, field } = basicEntityAutocompleteField; - const { resolvedCategories, resolvedDefault } = resolveCategories(field.cat); + const { resolvedCategories, resolvedDefault } = resolveCategories$2(field.cat); return /* @__PURE__ */ jsxRuntimeExports.jsx( Controller, { @@ -64770,7 +64768,7 @@ function BasicEntityAutocompleteField(props) { options: resolvedCategories, isOptionEqualToValue: (opt, val) => opt === val || (opt == null ? void 0 : opt.id) != null && (val == null ? void 0 : val.id) != null && opt.id === val.id || (opt == null ? void 0 : opt.key) != null && (val == null ? void 0 : val.key) != null && opt.key === val.key, getOptionLabel: (option) => option.title, - value: resolveValue$1(field.cat, value), + value: resolveValue$2(value, field.cat), disabled: !field.ux.edit }, field.ux.props), { onChange: (_2, newVal) => onChange(newVal), @@ -64781,7 +64779,7 @@ function BasicEntityAutocompleteField(props) { `${field.id}-controller` ); } -function resolveCategories(cat) { +function resolveCategories$2(cat) { const { multiple, item: items, default: defaultValues } = cat; const resolvedCategories = Object.keys(items).map((key) => { var _a; @@ -64814,10 +64812,26 @@ function resolveCategories(cat) { resolvedDefault }; } -function resolveValue$1(cat, value) { - const { multiple, item: items } = cat; - console.log("resolveValue", "value", value); - return value; +function resolveValue$2(value, cat) { + var _a; + const { item: items } = cat; + if (Array.isArray(value)) { + return value; + } + switch (cat.multiple) { + case 1: + return { key: value, title: (_a = items[value]) == null ? void 0 : _a.title }; + case -1: + return value.split(",").map((k) => { + var _a2; + return { key: k, title: (_a2 = items[k]) == null ? void 0 : _a2.title }; + }); + default: + return value.split(",").slice(0, cat.multiple).map((k) => { + var _a2; + return { key: k, title: (_a2 = items[k]) == null ? void 0 : _a2.title }; + }); + } } const CMPNAME$l = "BasicEntitySliderField"; const { Open: Open$j } = gubu_minExports.Gubu; @@ -64904,11 +64918,16 @@ const BasicEntityRadioGroupFieldSpecShape = gubu_minExports.Gubu( edit: gubu_minExports.Default(true), direction: gubu_minExports.Exact("row", "column").Default("row") }), - options: Open$i({ - label: { field: gubu_minExports.Default("label") }, - value: { field: gubu_minExports.Default("value") }, - default: Open$i({}), - ents: Open$i({}) + cat: Open$i({ + default: "", + title: String, + multiple: Number, + order: { + sort: "", + exclude: "", + include: "" + }, + item: Open$i({}) }) }) }), @@ -64918,7 +64937,7 @@ function BasicEntityRadioGroupField(props) { const { spec } = props; const basicEntityRadioGroupField = BasicEntityRadioGroupFieldSpecShape(spec); const { control, field } = basicEntityRadioGroupField; - const { resolvedOptions, resolvedDefault } = resolveOptions$1(field.options); + const { resolvedCategories, resolvedDefault } = resolveCategories$1(field.cat); return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx(FormLabel$1, { children: field.label }, `${field.id}-label`), /* @__PURE__ */ jsxRuntimeExports.jsx( @@ -64930,19 +64949,19 @@ function BasicEntityRadioGroupField(props) { render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( RadioGroup, __spreadProps(__spreadValues({ - value, + value: resolveValue$1(value, field.cat), onChange, row: "row" === field.ux.direction, disabled: !field.ux.edit }, field.ux.props), { - children: resolvedOptions.map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx( + children: resolvedCategories.map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx( FormControlLabel$1, { - value: option.value, + value: option.key, control: /* @__PURE__ */ jsxRuntimeExports.jsx(Radio$1, { disabled: !field.ux.edit }), - label: option.label + label: option.title }, - `${option.value}-option` + `${option.key}-option` )) }), field.id @@ -64952,39 +64971,60 @@ function BasicEntityRadioGroupField(props) { ) ] }); } -function resolveOptions$1(options) { - const { multiple, ents, label, value, default: defaultValues } = options; - const labelField = label == null ? void 0 : label.field; - const valueField = value == null ? void 0 : value.field; - const resolvedOptions = Object.keys(ents).map((key) => { +function resolveCategories$1(cat) { + const { multiple, item: items, default: defaultValues } = cat; + const resolvedCategories = Object.keys(items).map((key) => { var _a; return { - [labelField]: (_a = ents == null ? void 0 : ents[key]) == null ? void 0 : _a[labelField], - [valueField]: key + title: (_a = items == null ? void 0 : items[key]) == null ? void 0 : _a.title, + key }; }); - let resolvedDefault; - if (multiple === false) { - if (Object.keys(defaultValues).length > 0) { - const firstKey = Object.keys(defaultValues)[0]; - resolvedDefault = { - value: firstKey, - label: defaultValues[firstKey][labelField] - }; - } else { - resolvedDefault = null; - } - } else { - resolvedDefault = Object.keys(defaultValues).map((key) => ({ - label: defaultValues[key].label, - value: key - })); + let resolvedDefault = multiple === 1 ? null : []; + let defaultList = []; + if (typeof defaultValues === "string") { + defaultList = defaultValues.split(","); + } + const mapResolvedDefault = (list) => list.map((val) => ({ + title: items[val].title, + key: val + })); + if (multiple === 1) { + resolvedDefault = { + title: items[defaultList[0]].title, + key: defaultList[0] + }; + } else if (multiple === -1) { + resolvedDefault = mapResolvedDefault(defaultList); + } else if (multiple > 1) { + resolvedDefault = mapResolvedDefault(defaultList.slice(0, multiple)); } return { - resolvedOptions, + resolvedCategories, resolvedDefault }; } +function resolveValue$1(value, cat) { + var _a; + const { item: items, multiple } = cat; + if (Array.isArray(value)) { + return value; + } + switch (multiple) { + case 1: + return { key: value, title: (_a = items[value]) == null ? void 0 : _a.title }; + case -1: + return value.split(",").map((k) => { + var _a2; + return { key: k, title: (_a2 = items[k]) == null ? void 0 : _a2.title }; + }); + default: + return value.split(",").slice(0, multiple).map((k) => { + var _a2; + return { key: k, title: (_a2 = items[k]) == null ? void 0 : _a2.title }; + }); + } +} const CMPNAME$j = "BasicEntityTextBoxField"; const { Open: Open$h } = gubu_minExports.Gubu; const BasicEntityTextBoxFieldSpecShape = gubu_minExports.Gubu( @@ -65319,12 +65359,16 @@ const BasicEntitySelectFieldSpecShape = gubu_minExports.Gubu( name: String, kind: "", label: "", - options: Open$9({ - label: { field: gubu_minExports.Default("label") }, - value: { field: gubu_minExports.Default("value") }, - multiple: gubu_minExports.Default(false), - default: Open$9({}), - ents: Open$9({}) + cat: Open$9({ + default: "", + title: String, + multiple: Number, + order: { + sort: "", + exclude: "", + include: "" + }, + item: Open$9({}) }), ux: Open$9({ kind: gubu_minExports.Exact("Select"), @@ -65338,18 +65382,15 @@ function BasicEntitySelectField(props) { const { spec } = props; const basicEntitySelectField = BasicEntitySelectFieldSpecShape(spec); const { control, field, getValues } = basicEntitySelectField; - const { resolvedOptions, resolvedDefault } = resolveOptions(field.options); + const { resolvedCategories, resolvedDefault } = resolveCategories(field.cat); const val = getValues(field.name); - console.log("field", field); - console.log("val", val); console.log("resolvedDefault", resolvedDefault); - console.log("resolvedOptions", resolvedOptions); return /* @__PURE__ */ jsxRuntimeExports.jsx( Controller, { name: field.name, control, - defaultValue: val || "", + defaultValue: resolvedDefault, render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(FormControl$1, { fullWidth: true, children: [ /* @__PURE__ */ jsxRuntimeExports.jsx(InputLabel$1, { id: `${field.id}-label`, children: field.label }), /* @__PURE__ */ jsxRuntimeExports.jsx( @@ -65357,13 +65398,13 @@ function BasicEntitySelectField(props) { __spreadProps(__spreadValues({ labelId: `${field.id}-label`, id: `${field.id}-select`, - value: resolveValue(field.options, value), - multiple: field.options.multiple, + value: resolveValue(value, field.cat), + multiple: field.cat.multiple === 1 ? false : true, label: field.name, onChange: (event) => onChange(event.target.value), disabled: !field.ux.edit }, field.ux.props), { - children: resolvedOptions.map((opt) => /* @__PURE__ */ jsxRuntimeExports.jsx(MenuItem$1, { value: opt.value, children: opt.label }, opt.value)) + children: resolvedCategories.map((opt) => /* @__PURE__ */ jsxRuntimeExports.jsx(MenuItem$1, { value: opt.key, children: opt.title }, opt.key)) }) ) ] }) @@ -65371,49 +65412,56 @@ function BasicEntitySelectField(props) { `${field.id}-controller` ); } -function resolveOptions(options) { - const { multiple, ents, label, value, default: defaultValues } = options; - const labelField = label == null ? void 0 : label.field; - const valueField = value == null ? void 0 : value.field; - const resolvedOptions = Object.keys(ents).map((key) => { +function resolveCategories(cat) { + const { multiple, item: items, default: defaultValues } = cat; + const resolvedCategories = Object.keys(items).map((key) => { var _a; return { - [labelField]: (_a = ents == null ? void 0 : ents[key]) == null ? void 0 : _a[labelField], - [valueField]: key + title: (_a = items == null ? void 0 : items[key]) == null ? void 0 : _a.title, + key }; }); - let resolvedDefault; - if (multiple === false) { - if (Object.keys(defaultValues).length > 0) { - const firstKey = Object.keys(defaultValues)[0]; - resolvedDefault = { - value: firstKey, - label: defaultValues[firstKey][labelField] - }; - } else { - resolvedDefault = null; - } - } else { - resolvedDefault = Object.keys(defaultValues).map((key) => ({ - label: defaultValues[key].label, - value: key - })); + let resolvedDefault = multiple === 1 ? null : []; + let defaultList = []; + if (typeof defaultValues === "string") { + defaultList = defaultValues.split(","); + } + const mapResolvedDefault = (list) => list.map((val) => ({ + title: items[val].title, + key: val + })); + if (multiple === 1) { + resolvedDefault = { + title: items[defaultList[0]].title, + key: defaultList[0] + }; + } else if (multiple === -1) { + resolvedDefault = mapResolvedDefault(defaultList); + } else if (multiple > 1) { + resolvedDefault = mapResolvedDefault(defaultList.slice(0, multiple)); } return { - resolvedOptions, + resolvedCategories, resolvedDefault }; } -function resolveValue(options, val) { - const { multiple } = options; - if (multiple) { - if (typeof val === "string") { - return val ? [val] : []; - } - return val || []; - } else { - return val || ""; +function resolveValue(value, cat) { + var _a; + const { item: items, multiple } = cat; + if (Array.isArray(value)) { + return value; } + switch (multiple) { + case 1: + return { key: value, title: (_a = items[value]) == null ? void 0 : _a.title }; + case -1: + return value.split(","); + default: + if (cat.multiple > 1) { + return value.split(",").slice(0, multiple); + } + } + return value; } const CMPNAME$a = "BasicEntitySliderField"; const { Open: Open$8 } = gubu_minExports.Gubu; @@ -65472,10 +65520,16 @@ const BasicEntityToggleButtonFieldSpecShape = gubu_minExports.Gubu( name: String, kind: "", label: "", - options: Open$7({ - label: { field: "label" }, - value: { field: "value" }, - ents: Open$7({}) + cat: Open$7({ + default: "", + title: String, + multiple: Number, + order: { + sort: "", + exclude: "", + include: "" + }, + item: Open$7({}) }), ux: Open$7({ kind: gubu_minExports.Exact("ToggleButton"), @@ -65499,12 +65553,13 @@ function BasicEntityToggleButtonField(props) { ToggleButtonGroup, __spreadProps(__spreadValues({ value, - onChange, + exclusive: field.cat.multiple === 1 ? true : false, + onChange: (_2, v) => { + field.cat.multiple === 1 ? onChange(v) : onChange([v]); + }, disabled: !field.ux.edit }, field.ux.props), { - children: Object.entries(field.options.ents).map( - ([key, val]) => /* @__PURE__ */ jsxRuntimeExports.jsx(ToggleButton, { value: key, children: val == null ? void 0 : val[field.options.label.field] }, `${field.id}-${key}`) - ) + children: Object.entries(field.cat.item).map(([key, val]) => /* @__PURE__ */ jsxRuntimeExports.jsx(ToggleButton, { value: key, children: val == null ? void 0 : val.title }, `${field.id}-${key}`)) }) ) }, diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index b90c74c..9e85af3 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -64740,7 +64740,6 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha id: String, label: String, kind: String, - valid: String, name: String, cat: Open$k({ default: String, @@ -64763,10 +64762,9 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ); function BasicEntityAutocompleteField(props) { const { spec } = props; - console.log("BasicEntityAutocompleteField", "spec", spec); const basicEntityAutocompleteField = BasicEntityAutocompleteFieldSpecShape(spec); const { control, field } = basicEntityAutocompleteField; - const { resolvedCategories, resolvedDefault } = resolveCategories(field.cat); + const { resolvedCategories, resolvedDefault } = resolveCategories$2(field.cat); return /* @__PURE__ */ jsxRuntimeExports.jsx( Controller, { @@ -64782,7 +64780,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha options: resolvedCategories, isOptionEqualToValue: (opt, val) => opt === val || (opt == null ? void 0 : opt.id) != null && (val == null ? void 0 : val.id) != null && opt.id === val.id || (opt == null ? void 0 : opt.key) != null && (val == null ? void 0 : val.key) != null && opt.key === val.key, getOptionLabel: (option) => option.title, - value: resolveValue$1(field.cat, value), + value: resolveValue$2(value, field.cat), disabled: !field.ux.edit }, field.ux.props), { onChange: (_2, newVal) => onChange(newVal), @@ -64793,7 +64791,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha `${field.id}-controller` ); } - function resolveCategories(cat) { + function resolveCategories$2(cat) { const { multiple, item: items, default: defaultValues } = cat; const resolvedCategories = Object.keys(items).map((key) => { var _a; @@ -64826,10 +64824,26 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha resolvedDefault }; } - function resolveValue$1(cat, value) { - const { multiple, item: items } = cat; - console.log("resolveValue", "value", value); - return value; + function resolveValue$2(value, cat) { + var _a; + const { item: items } = cat; + if (Array.isArray(value)) { + return value; + } + switch (cat.multiple) { + case 1: + return { key: value, title: (_a = items[value]) == null ? void 0 : _a.title }; + case -1: + return value.split(",").map((k) => { + var _a2; + return { key: k, title: (_a2 = items[k]) == null ? void 0 : _a2.title }; + }); + default: + return value.split(",").slice(0, cat.multiple).map((k) => { + var _a2; + return { key: k, title: (_a2 = items[k]) == null ? void 0 : _a2.title }; + }); + } } const CMPNAME$l = "BasicEntitySliderField"; const { Open: Open$j } = gubu_minExports.Gubu; @@ -64916,11 +64930,16 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha edit: gubu_minExports.Default(true), direction: gubu_minExports.Exact("row", "column").Default("row") }), - options: Open$i({ - label: { field: gubu_minExports.Default("label") }, - value: { field: gubu_minExports.Default("value") }, - default: Open$i({}), - ents: Open$i({}) + cat: Open$i({ + default: "", + title: String, + multiple: Number, + order: { + sort: "", + exclude: "", + include: "" + }, + item: Open$i({}) }) }) }), @@ -64930,7 +64949,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const { spec } = props; const basicEntityRadioGroupField = BasicEntityRadioGroupFieldSpecShape(spec); const { control, field } = basicEntityRadioGroupField; - const { resolvedOptions, resolvedDefault } = resolveOptions$1(field.options); + const { resolvedCategories, resolvedDefault } = resolveCategories$1(field.cat); return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx(material.FormLabel, { children: field.label }, `${field.id}-label`), /* @__PURE__ */ jsxRuntimeExports.jsx( @@ -64942,19 +64961,19 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( material.RadioGroup, __spreadProps(__spreadValues({ - value, + value: resolveValue$1(value, field.cat), onChange, row: "row" === field.ux.direction, disabled: !field.ux.edit }, field.ux.props), { - children: resolvedOptions.map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx( + children: resolvedCategories.map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx( material.FormControlLabel, { - value: option.value, + value: option.key, control: /* @__PURE__ */ jsxRuntimeExports.jsx(material.Radio, { disabled: !field.ux.edit }), - label: option.label + label: option.title }, - `${option.value}-option` + `${option.key}-option` )) }), field.id @@ -64964,39 +64983,60 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ) ] }); } - function resolveOptions$1(options) { - const { multiple, ents, label, value, default: defaultValues } = options; - const labelField = label == null ? void 0 : label.field; - const valueField = value == null ? void 0 : value.field; - const resolvedOptions = Object.keys(ents).map((key) => { + function resolveCategories$1(cat) { + const { multiple, item: items, default: defaultValues } = cat; + const resolvedCategories = Object.keys(items).map((key) => { var _a; return { - [labelField]: (_a = ents == null ? void 0 : ents[key]) == null ? void 0 : _a[labelField], - [valueField]: key + title: (_a = items == null ? void 0 : items[key]) == null ? void 0 : _a.title, + key }; }); - let resolvedDefault; - if (multiple === false) { - if (Object.keys(defaultValues).length > 0) { - const firstKey = Object.keys(defaultValues)[0]; - resolvedDefault = { - value: firstKey, - label: defaultValues[firstKey][labelField] - }; - } else { - resolvedDefault = null; - } - } else { - resolvedDefault = Object.keys(defaultValues).map((key) => ({ - label: defaultValues[key].label, - value: key - })); + let resolvedDefault = multiple === 1 ? null : []; + let defaultList = []; + if (typeof defaultValues === "string") { + defaultList = defaultValues.split(","); + } + const mapResolvedDefault = (list) => list.map((val) => ({ + title: items[val].title, + key: val + })); + if (multiple === 1) { + resolvedDefault = { + title: items[defaultList[0]].title, + key: defaultList[0] + }; + } else if (multiple === -1) { + resolvedDefault = mapResolvedDefault(defaultList); + } else if (multiple > 1) { + resolvedDefault = mapResolvedDefault(defaultList.slice(0, multiple)); } return { - resolvedOptions, + resolvedCategories, resolvedDefault }; } + function resolveValue$1(value, cat) { + var _a; + const { item: items, multiple } = cat; + if (Array.isArray(value)) { + return value; + } + switch (multiple) { + case 1: + return { key: value, title: (_a = items[value]) == null ? void 0 : _a.title }; + case -1: + return value.split(",").map((k) => { + var _a2; + return { key: k, title: (_a2 = items[k]) == null ? void 0 : _a2.title }; + }); + default: + return value.split(",").slice(0, multiple).map((k) => { + var _a2; + return { key: k, title: (_a2 = items[k]) == null ? void 0 : _a2.title }; + }); + } + } const CMPNAME$j = "BasicEntityTextBoxField"; const { Open: Open$h } = gubu_minExports.Gubu; const BasicEntityTextBoxFieldSpecShape = gubu_minExports.Gubu( @@ -65331,12 +65371,16 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha name: String, kind: "", label: "", - options: Open$9({ - label: { field: gubu_minExports.Default("label") }, - value: { field: gubu_minExports.Default("value") }, - multiple: gubu_minExports.Default(false), - default: Open$9({}), - ents: Open$9({}) + cat: Open$9({ + default: "", + title: String, + multiple: Number, + order: { + sort: "", + exclude: "", + include: "" + }, + item: Open$9({}) }), ux: Open$9({ kind: gubu_minExports.Exact("Select"), @@ -65350,18 +65394,15 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const { spec } = props; const basicEntitySelectField = BasicEntitySelectFieldSpecShape(spec); const { control, field, getValues } = basicEntitySelectField; - const { resolvedOptions, resolvedDefault } = resolveOptions(field.options); + const { resolvedCategories, resolvedDefault } = resolveCategories(field.cat); const val = getValues(field.name); - console.log("field", field); - console.log("val", val); console.log("resolvedDefault", resolvedDefault); - console.log("resolvedOptions", resolvedOptions); return /* @__PURE__ */ jsxRuntimeExports.jsx( Controller, { name: field.name, control, - defaultValue: val || "", + defaultValue: resolvedDefault, render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(material.FormControl, { fullWidth: true, children: [ /* @__PURE__ */ jsxRuntimeExports.jsx(material.InputLabel, { id: `${field.id}-label`, children: field.label }), /* @__PURE__ */ jsxRuntimeExports.jsx( @@ -65369,13 +65410,13 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha __spreadProps(__spreadValues({ labelId: `${field.id}-label`, id: `${field.id}-select`, - value: resolveValue(field.options, value), - multiple: field.options.multiple, + value: resolveValue(value, field.cat), + multiple: field.cat.multiple === 1 ? false : true, label: field.name, onChange: (event) => onChange(event.target.value), disabled: !field.ux.edit }, field.ux.props), { - children: resolvedOptions.map((opt) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.MenuItem, { value: opt.value, children: opt.label }, opt.value)) + children: resolvedCategories.map((opt) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.MenuItem, { value: opt.key, children: opt.title }, opt.key)) }) ) ] }) @@ -65383,49 +65424,56 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha `${field.id}-controller` ); } - function resolveOptions(options) { - const { multiple, ents, label, value, default: defaultValues } = options; - const labelField = label == null ? void 0 : label.field; - const valueField = value == null ? void 0 : value.field; - const resolvedOptions = Object.keys(ents).map((key) => { + function resolveCategories(cat) { + const { multiple, item: items, default: defaultValues } = cat; + const resolvedCategories = Object.keys(items).map((key) => { var _a; return { - [labelField]: (_a = ents == null ? void 0 : ents[key]) == null ? void 0 : _a[labelField], - [valueField]: key + title: (_a = items == null ? void 0 : items[key]) == null ? void 0 : _a.title, + key }; }); - let resolvedDefault; - if (multiple === false) { - if (Object.keys(defaultValues).length > 0) { - const firstKey = Object.keys(defaultValues)[0]; - resolvedDefault = { - value: firstKey, - label: defaultValues[firstKey][labelField] - }; - } else { - resolvedDefault = null; - } - } else { - resolvedDefault = Object.keys(defaultValues).map((key) => ({ - label: defaultValues[key].label, - value: key - })); + let resolvedDefault = multiple === 1 ? null : []; + let defaultList = []; + if (typeof defaultValues === "string") { + defaultList = defaultValues.split(","); + } + const mapResolvedDefault = (list) => list.map((val) => ({ + title: items[val].title, + key: val + })); + if (multiple === 1) { + resolvedDefault = { + title: items[defaultList[0]].title, + key: defaultList[0] + }; + } else if (multiple === -1) { + resolvedDefault = mapResolvedDefault(defaultList); + } else if (multiple > 1) { + resolvedDefault = mapResolvedDefault(defaultList.slice(0, multiple)); } return { - resolvedOptions, + resolvedCategories, resolvedDefault }; } - function resolveValue(options, val) { - const { multiple } = options; - if (multiple) { - if (typeof val === "string") { - return val ? [val] : []; - } - return val || []; - } else { - return val || ""; + function resolveValue(value, cat) { + var _a; + const { item: items, multiple } = cat; + if (Array.isArray(value)) { + return value; } + switch (multiple) { + case 1: + return { key: value, title: (_a = items[value]) == null ? void 0 : _a.title }; + case -1: + return value.split(","); + default: + if (cat.multiple > 1) { + return value.split(",").slice(0, multiple); + } + } + return value; } const CMPNAME$a = "BasicEntitySliderField"; const { Open: Open$8 } = gubu_minExports.Gubu; @@ -65484,10 +65532,16 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha name: String, kind: "", label: "", - options: Open$7({ - label: { field: "label" }, - value: { field: "value" }, - ents: Open$7({}) + cat: Open$7({ + default: "", + title: String, + multiple: Number, + order: { + sort: "", + exclude: "", + include: "" + }, + item: Open$7({}) }), ux: Open$7({ kind: gubu_minExports.Exact("ToggleButton"), @@ -65511,12 +65565,13 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha material.ToggleButtonGroup, __spreadProps(__spreadValues({ value, - onChange, + exclusive: field.cat.multiple === 1 ? true : false, + onChange: (_2, v) => { + field.cat.multiple === 1 ? onChange(v) : onChange([v]); + }, disabled: !field.ux.edit }, field.ux.props), { - children: Object.entries(field.options.ents).map( - ([key, val]) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.ToggleButton, { value: key, children: val == null ? void 0 : val[field.options.label.field] }, `${field.id}-${key}`) - ) + children: Object.entries(field.cat.item).map(([key, val]) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.ToggleButton, { value: key, children: val == null ? void 0 : val.title }, `${field.id}-${key}`)) }) ) }, diff --git a/src/lib/BasicEntitySelectField.tsx b/src/lib/BasicEntitySelectField.tsx index f8cd24a..5ec9432 100644 --- a/src/lib/BasicEntitySelectField.tsx +++ b/src/lib/BasicEntitySelectField.tsx @@ -1,13 +1,6 @@ import React from 'react' -import { - TextField, - Autocomplete, - FormControl, - InputLabel, - Select, - MenuItem, -} from '@mui/material' +import { FormControl, InputLabel, Select, MenuItem } from '@mui/material' import { Controller } from 'react-hook-form' import type { Spec } from './basic-types' @@ -23,12 +16,16 @@ const BasicEntitySelectFieldSpecShape = Gubu( name: String, kind: '', label: '', - options: Open({ - label: { field: Default('label') }, - value: { field: Default('value') }, - multiple: Default(false), - default: Open({}), - ents: Open({}), + cat: Open({ + default: '', + title: String, + multiple: Number, + order: { + sort: '', + exclude: '', + include: '', + }, + item: Open({}), }), ux: Open({ kind: Exact('Select'), @@ -39,41 +36,41 @@ const BasicEntitySelectFieldSpecShape = Gubu( { name: CMPNAME } ) -function BasicEntitySelectField(props: any) { +function BasicEntitySelectField (props: any) { const { spec } = props const basicEntitySelectField: Spec = BasicEntitySelectFieldSpecShape(spec) const { control, field, getValues } = basicEntitySelectField - const { resolvedOptions, resolvedDefault } = resolveOptions(field.options) + const { resolvedCategories, resolvedDefault } = resolveCategories(field.cat) const val = getValues(field.name) - console.log('field', field) - console.log('val', val) + // console.log('field', field) + // console.log('val', val) console.log('resolvedDefault', resolvedDefault) - console.log('resolvedOptions', resolvedOptions) + // console.log('resolvedCategories', resolvedCategories) return ( ( {field.label} @@ -83,53 +80,74 @@ function BasicEntitySelectField(props: any) { ) } +// TODO: Make it DRY // Returns array of options and default value(s) based on the options object -function resolveOptions(options: any) { - const { multiple, ents, label, value, default: defaultValues } = options - const labelField = label?.field - const valueField = value?.field +function resolveCategories (cat: any) { + const { multiple, item: items, default: defaultValues } = cat + + // console.log('resolveCat', 'cat', cat) // Array of options - const resolvedOptions = Object.keys(ents).map((key) => ({ - [labelField]: ents?.[key]?.[labelField], - [valueField]: key, + const resolvedCategories = Object.keys(items).map((key) => ({ + title: items?.[key]?.title, + key: key, })) - let resolvedDefault - if (multiple === false) { - if (Object.keys(defaultValues).length > 0) { - const firstKey = Object.keys(defaultValues)[0] - resolvedDefault = { - value: firstKey, - label: defaultValues[firstKey][labelField], - } - } else { - resolvedDefault = null - } - } else { - resolvedDefault = Object.keys(defaultValues).map((key) => ({ - label: defaultValues[key].label, - value: key, + let resolvedDefault: any = multiple === 1 ? null : [] + let defaultList: any[] = [] + + if (typeof defaultValues === 'string') { + defaultList = defaultValues.split(',') + } + + const mapResolvedDefault = (list: any[]) => + list.map((val: any) => ({ + title: items[val].title, + key: val, })) + + if (multiple === 1) { + resolvedDefault = { + title: items[defaultList[0]].title, + key: defaultList[0], + } + } else if (multiple === -1) { + resolvedDefault = mapResolvedDefault(defaultList) + } else if (multiple > 1) { + resolvedDefault = mapResolvedDefault(defaultList.slice(0, multiple)) } + // console.log('resolveCat', 'resolvedDefault', resolvedDefault) + return { - resolvedOptions, + resolvedCategories, resolvedDefault, } } -function resolveValue(options: any, val: any) { - const { multiple } = options +// TODO: Make it DRY +function resolveValue ( + value: any, + cat: { multiple: number; item: Record } +) { + const { item: items, multiple } = cat - if (multiple) { - if (typeof val === 'string') { - return val ? [val] : [] - } - return val || [] - } else { - return val || '' + if (Array.isArray(value)) { + return value } + + switch (multiple) { + case 1: + return { key: value, title: items[value]?.title } + case -1: + return value.split(',') + default: + if (cat.multiple > 1) { + return value.split(',').slice(0, multiple) + } + } + + return value } export { BasicEntitySelectField } From f411d9312760e1d144fa3585127d81d3291317f5 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Mon, 29 Jul 2024 21:28:46 +0100 Subject: [PATCH 065/122] Refactor BasicEntityAutocompleteField to improve code readability and maintainability --- src/lib/BasicEntityAutocompleteField.tsx | 30 +++++++++++++++++------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/src/lib/BasicEntityAutocompleteField.tsx b/src/lib/BasicEntityAutocompleteField.tsx index cd8e2d0..4d9dfd4 100644 --- a/src/lib/BasicEntityAutocompleteField.tsx +++ b/src/lib/BasicEntityAutocompleteField.tsx @@ -103,17 +103,29 @@ function resolveCategories (cat: any) { key: val, })) - if (multiple === 1) { - resolvedDefault = { - title: items[defaultList[0]].title, - key: defaultList[0], - } - } else if (multiple === -1) { - resolvedDefault = mapResolvedDefault(defaultList) - } else if (multiple > 1) { - resolvedDefault = mapResolvedDefault(defaultList.slice(0, multiple)) + switch (multiple) { + case 1: + resolvedDefault = { + key: defaultList[0], + title: items[defaultList[0]]?.title, + } + case -1: + resolvedDefault = mapResolvedDefault(defaultList) + default: + resolvedDefault = mapResolvedDefault(defaultList.slice(0, multiple)) } + // if (multiple === 1) { + // resolvedDefault = { + // title: items[defaultList[0]].title, + // key: defaultList[0], + // } + // } else if (multiple === -1) { + // resolvedDefault = mapResolvedDefault(defaultList) + // } else if (multiple > 1) { + // resolvedDefault = mapResolvedDefault(defaultList.slice(0, multiple)) + // } + // console.log('resolveCat', 'resolvedDefault', resolvedDefault) return { From 8e82f1e0aff737cc3631c64be2d8ad38985990c4 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Mon, 29 Jul 2024 21:29:18 +0100 Subject: [PATCH 066/122] Refactor BasicEntitySelectField to use resolveCategories and resolveValue --- dist/voxgig-model-react.es.js | 75 +++++++------------------- dist/voxgig-model-react.umd.js | 75 +++++++------------------- src/lib/BasicEntityRadioGroupField.tsx | 63 ++-------------------- src/lib/BasicEntitySelectField.tsx | 2 +- 4 files changed, 40 insertions(+), 175 deletions(-) diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index 678ce9c..b7a73b7 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -64768,7 +64768,7 @@ function BasicEntityAutocompleteField(props) { options: resolvedCategories, isOptionEqualToValue: (opt, val) => opt === val || (opt == null ? void 0 : opt.id) != null && (val == null ? void 0 : val.id) != null && opt.id === val.id || (opt == null ? void 0 : opt.key) != null && (val == null ? void 0 : val.key) != null && opt.key === val.key, getOptionLabel: (option) => option.title, - value: resolveValue$2(value, field.cat), + value: resolveValue$1(value, field.cat), disabled: !field.ux.edit }, field.ux.props), { onChange: (_2, newVal) => onChange(newVal), @@ -64780,11 +64780,12 @@ function BasicEntityAutocompleteField(props) { ); } function resolveCategories$2(cat) { + var _a; const { multiple, item: items, default: defaultValues } = cat; const resolvedCategories = Object.keys(items).map((key) => { - var _a; + var _a2; return { - title: (_a = items == null ? void 0 : items[key]) == null ? void 0 : _a.title, + title: (_a2 = items == null ? void 0 : items[key]) == null ? void 0 : _a2.title, key }; }); @@ -64797,22 +64798,23 @@ function resolveCategories$2(cat) { title: items[val].title, key: val })); - if (multiple === 1) { - resolvedDefault = { - title: items[defaultList[0]].title, - key: defaultList[0] - }; - } else if (multiple === -1) { - resolvedDefault = mapResolvedDefault(defaultList); - } else if (multiple > 1) { - resolvedDefault = mapResolvedDefault(defaultList.slice(0, multiple)); + switch (multiple) { + case 1: + resolvedDefault = { + key: defaultList[0], + title: (_a = items[defaultList[0]]) == null ? void 0 : _a.title + }; + case -1: + resolvedDefault = mapResolvedDefault(defaultList); + default: + resolvedDefault = mapResolvedDefault(defaultList.slice(0, multiple)); } return { resolvedCategories, resolvedDefault }; } -function resolveValue$2(value, cat) { +function resolveValue$1(value, cat) { var _a; const { item: items } = cat; if (Array.isArray(value)) { @@ -64921,7 +64923,6 @@ const BasicEntityRadioGroupFieldSpecShape = gubu_minExports.Gubu( cat: Open$i({ default: "", title: String, - multiple: Number, order: { sort: "", exclude: "", @@ -64949,7 +64950,7 @@ function BasicEntityRadioGroupField(props) { render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( RadioGroup, __spreadProps(__spreadValues({ - value: resolveValue$1(value, field.cat), + value, onChange, row: "row" === field.ux.direction, disabled: !field.ux.edit @@ -64972,7 +64973,7 @@ function BasicEntityRadioGroupField(props) { ] }); } function resolveCategories$1(cat) { - const { multiple, item: items, default: defaultValues } = cat; + const { item: items, default: defaultValues } = cat; const resolvedCategories = Object.keys(items).map((key) => { var _a; return { @@ -64980,51 +64981,12 @@ function resolveCategories$1(cat) { key }; }); - let resolvedDefault = multiple === 1 ? null : []; - let defaultList = []; - if (typeof defaultValues === "string") { - defaultList = defaultValues.split(","); - } - const mapResolvedDefault = (list) => list.map((val) => ({ - title: items[val].title, - key: val - })); - if (multiple === 1) { - resolvedDefault = { - title: items[defaultList[0]].title, - key: defaultList[0] - }; - } else if (multiple === -1) { - resolvedDefault = mapResolvedDefault(defaultList); - } else if (multiple > 1) { - resolvedDefault = mapResolvedDefault(defaultList.slice(0, multiple)); - } + const resolvedDefault = defaultValues; return { resolvedCategories, resolvedDefault }; } -function resolveValue$1(value, cat) { - var _a; - const { item: items, multiple } = cat; - if (Array.isArray(value)) { - return value; - } - switch (multiple) { - case 1: - return { key: value, title: (_a = items[value]) == null ? void 0 : _a.title }; - case -1: - return value.split(",").map((k) => { - var _a2; - return { key: k, title: (_a2 = items[k]) == null ? void 0 : _a2.title }; - }); - default: - return value.split(",").slice(0, multiple).map((k) => { - var _a2; - return { key: k, title: (_a2 = items[k]) == null ? void 0 : _a2.title }; - }); - } -} const CMPNAME$j = "BasicEntityTextBoxField"; const { Open: Open$h } = gubu_minExports.Gubu; const BasicEntityTextBoxFieldSpecShape = gubu_minExports.Gubu( @@ -65384,7 +65346,6 @@ function BasicEntitySelectField(props) { const { control, field, getValues } = basicEntitySelectField; const { resolvedCategories, resolvedDefault } = resolveCategories(field.cat); const val = getValues(field.name); - console.log("resolvedDefault", resolvedDefault); return /* @__PURE__ */ jsxRuntimeExports.jsx( Controller, { diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index 9e85af3..68d5de4 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -64780,7 +64780,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha options: resolvedCategories, isOptionEqualToValue: (opt, val) => opt === val || (opt == null ? void 0 : opt.id) != null && (val == null ? void 0 : val.id) != null && opt.id === val.id || (opt == null ? void 0 : opt.key) != null && (val == null ? void 0 : val.key) != null && opt.key === val.key, getOptionLabel: (option) => option.title, - value: resolveValue$2(value, field.cat), + value: resolveValue$1(value, field.cat), disabled: !field.ux.edit }, field.ux.props), { onChange: (_2, newVal) => onChange(newVal), @@ -64792,11 +64792,12 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ); } function resolveCategories$2(cat) { + var _a; const { multiple, item: items, default: defaultValues } = cat; const resolvedCategories = Object.keys(items).map((key) => { - var _a; + var _a2; return { - title: (_a = items == null ? void 0 : items[key]) == null ? void 0 : _a.title, + title: (_a2 = items == null ? void 0 : items[key]) == null ? void 0 : _a2.title, key }; }); @@ -64809,22 +64810,23 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha title: items[val].title, key: val })); - if (multiple === 1) { - resolvedDefault = { - title: items[defaultList[0]].title, - key: defaultList[0] - }; - } else if (multiple === -1) { - resolvedDefault = mapResolvedDefault(defaultList); - } else if (multiple > 1) { - resolvedDefault = mapResolvedDefault(defaultList.slice(0, multiple)); + switch (multiple) { + case 1: + resolvedDefault = { + key: defaultList[0], + title: (_a = items[defaultList[0]]) == null ? void 0 : _a.title + }; + case -1: + resolvedDefault = mapResolvedDefault(defaultList); + default: + resolvedDefault = mapResolvedDefault(defaultList.slice(0, multiple)); } return { resolvedCategories, resolvedDefault }; } - function resolveValue$2(value, cat) { + function resolveValue$1(value, cat) { var _a; const { item: items } = cat; if (Array.isArray(value)) { @@ -64933,7 +64935,6 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha cat: Open$i({ default: "", title: String, - multiple: Number, order: { sort: "", exclude: "", @@ -64961,7 +64962,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( material.RadioGroup, __spreadProps(__spreadValues({ - value: resolveValue$1(value, field.cat), + value, onChange, row: "row" === field.ux.direction, disabled: !field.ux.edit @@ -64984,7 +64985,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ] }); } function resolveCategories$1(cat) { - const { multiple, item: items, default: defaultValues } = cat; + const { item: items, default: defaultValues } = cat; const resolvedCategories = Object.keys(items).map((key) => { var _a; return { @@ -64992,51 +64993,12 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha key }; }); - let resolvedDefault = multiple === 1 ? null : []; - let defaultList = []; - if (typeof defaultValues === "string") { - defaultList = defaultValues.split(","); - } - const mapResolvedDefault = (list) => list.map((val) => ({ - title: items[val].title, - key: val - })); - if (multiple === 1) { - resolvedDefault = { - title: items[defaultList[0]].title, - key: defaultList[0] - }; - } else if (multiple === -1) { - resolvedDefault = mapResolvedDefault(defaultList); - } else if (multiple > 1) { - resolvedDefault = mapResolvedDefault(defaultList.slice(0, multiple)); - } + const resolvedDefault = defaultValues; return { resolvedCategories, resolvedDefault }; } - function resolveValue$1(value, cat) { - var _a; - const { item: items, multiple } = cat; - if (Array.isArray(value)) { - return value; - } - switch (multiple) { - case 1: - return { key: value, title: (_a = items[value]) == null ? void 0 : _a.title }; - case -1: - return value.split(",").map((k) => { - var _a2; - return { key: k, title: (_a2 = items[k]) == null ? void 0 : _a2.title }; - }); - default: - return value.split(",").slice(0, multiple).map((k) => { - var _a2; - return { key: k, title: (_a2 = items[k]) == null ? void 0 : _a2.title }; - }); - } - } const CMPNAME$j = "BasicEntityTextBoxField"; const { Open: Open$h } = gubu_minExports.Gubu; const BasicEntityTextBoxFieldSpecShape = gubu_minExports.Gubu( @@ -65396,7 +65358,6 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const { control, field, getValues } = basicEntitySelectField; const { resolvedCategories, resolvedDefault } = resolveCategories(field.cat); const val = getValues(field.name); - console.log("resolvedDefault", resolvedDefault); return /* @__PURE__ */ jsxRuntimeExports.jsx( Controller, { diff --git a/src/lib/BasicEntityRadioGroupField.tsx b/src/lib/BasicEntityRadioGroupField.tsx index d4899e0..37ec878 100644 --- a/src/lib/BasicEntityRadioGroupField.tsx +++ b/src/lib/BasicEntityRadioGroupField.tsx @@ -25,7 +25,6 @@ const BasicEntityRadioGroupFieldSpecShape = Gubu( cat: Open({ default: '', title: String, - multiple: Number, order: { sort: '', exclude: '', @@ -58,7 +57,7 @@ function BasicEntityRadioGroupField (props: any) { render={({ field: { onChange, value } }) => ( ({ @@ -92,31 +88,7 @@ function resolveCategories (cat: any) { key: key, })) - let resolvedDefault: any = multiple === 1 ? null : [] - let defaultList: any[] = [] - - if (typeof defaultValues === 'string') { - defaultList = defaultValues.split(',') - } - - const mapResolvedDefault = (list: any[]) => - list.map((val: any) => ({ - title: items[val].title, - key: val, - })) - - if (multiple === 1) { - resolvedDefault = { - title: items[defaultList[0]].title, - key: defaultList[0], - } - } else if (multiple === -1) { - resolvedDefault = mapResolvedDefault(defaultList) - } else if (multiple > 1) { - resolvedDefault = mapResolvedDefault(defaultList.slice(0, multiple)) - } - - // console.log('resolveCat', 'resolvedDefault', resolvedDefault) + const resolvedDefault = defaultValues return { resolvedCategories, @@ -124,33 +96,4 @@ function resolveCategories (cat: any) { } } -// TODO: Make it DRY -function resolveValue ( - value: any, - cat: { - multiple: number - item: Record - } -) { - const { item: items, multiple } = cat - - if (Array.isArray(value)) { - return value - } - - switch (multiple) { - case 1: - return { key: value, title: items[value]?.title } - case -1: - return value - .split(',') - .map((k: any) => ({ key: k, title: items[k]?.title })) - default: - return value - .split(',') - .slice(0, multiple) - .map((k: any) => ({ key: k, title: items[k]?.title })) - } -} - export { BasicEntityRadioGroupField } diff --git a/src/lib/BasicEntitySelectField.tsx b/src/lib/BasicEntitySelectField.tsx index 5ec9432..ececb96 100644 --- a/src/lib/BasicEntitySelectField.tsx +++ b/src/lib/BasicEntitySelectField.tsx @@ -46,7 +46,7 @@ function BasicEntitySelectField (props: any) { // console.log('field', field) // console.log('val', val) - console.log('resolvedDefault', resolvedDefault) + // console.log('resolvedDefault', resolvedDefault) // console.log('resolvedCategories', resolvedCategories) return ( From 4cf008bb926db4da3250e496985e30abfa28af67 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Tue, 30 Jul 2024 13:44:13 +0100 Subject: [PATCH 067/122] Debug and refactor BasicEntitySelectField --- src/lib/BasicEntitySelectField.tsx | 85 +++++++++++------------------- 1 file changed, 32 insertions(+), 53 deletions(-) diff --git a/src/lib/BasicEntitySelectField.tsx b/src/lib/BasicEntitySelectField.tsx index ececb96..6643fb8 100644 --- a/src/lib/BasicEntitySelectField.tsx +++ b/src/lib/BasicEntitySelectField.tsx @@ -40,21 +40,14 @@ function BasicEntitySelectField (props: any) { const { spec } = props const basicEntitySelectField: Spec = BasicEntitySelectFieldSpecShape(spec) - const { control, field, getValues } = basicEntitySelectField - const { resolvedCategories, resolvedDefault } = resolveCategories(field.cat) - const val = getValues(field.name) - - // console.log('field', field) - // console.log('val', val) - // console.log('resolvedDefault', resolvedDefault) - // console.log('resolvedCategories', resolvedCategories) + const { control, field } = basicEntitySelectField return ( ( {field.label} @@ -62,13 +55,13 @@ function BasicEntitySelectField (props: any) { labelId={`${field.id}-label`} id={`${field.id}-select`} value={resolveValue(value, field.cat)} - multiple={field.cat.multiple === 1 ? false : true} + multiple={field.cat.multiple !== 1} label={field.name} onChange={(event: any) => onChange(event.target.value)} disabled={!field.ux.edit} {...field.ux.props} > - {resolvedCategories.map((opt: any) => ( + {resolveCategories(field.cat).map((opt: any) => ( {opt.title} @@ -80,48 +73,32 @@ function BasicEntitySelectField (props: any) { ) } -// TODO: Make it DRY -// Returns array of options and default value(s) based on the options object +// Returns array of options based on field.cat object function resolveCategories (cat: any) { - const { multiple, item: items, default: defaultValues } = cat - - // console.log('resolveCat', 'cat', cat) - - // Array of options - const resolvedCategories = Object.keys(items).map((key) => ({ - title: items?.[key]?.title, + return Object.keys(cat.item).map((key) => ({ + title: cat.item?.[key]?.title, key: key, })) +} - let resolvedDefault: any = multiple === 1 ? null : [] - let defaultList: any[] = [] +function resolveDefault (cat: any) { + const { multiple, default: defaultValues } = cat - if (typeof defaultValues === 'string') { - defaultList = defaultValues.split(',') + if (!defaultValues) { + return multiple === 1 ? '' : [''] } - const mapResolvedDefault = (list: any[]) => - list.map((val: any) => ({ - title: items[val].title, - key: val, - })) - - if (multiple === 1) { - resolvedDefault = { - title: items[defaultList[0]].title, - key: defaultList[0], - } - } else if (multiple === -1) { - resolvedDefault = mapResolvedDefault(defaultList) - } else if (multiple > 1) { - resolvedDefault = mapResolvedDefault(defaultList.slice(0, multiple)) - } + const defaultItems = defaultValues.split(',') - // console.log('resolveCat', 'resolvedDefault', resolvedDefault) + const mapResolvedDefault = (list: string[]) => list.map((val) => val) - return { - resolvedCategories, - resolvedDefault, + switch (multiple) { + case 1: + return defaultItems.length > 0 ? defaultItems[0] : '' + case -1: + return mapResolvedDefault(defaultItems) + default: + return mapResolvedDefault(defaultItems.slice(0, multiple)) } } @@ -130,24 +107,26 @@ function resolveValue ( value: any, cat: { multiple: number; item: Record } ) { - const { item: items, multiple } = cat + const { multiple } = cat if (Array.isArray(value)) { - return value + const items = value.map((val) => val.key) + return multiple === 1 ? items[0] : items.slice(0, multiple) } + if (typeof value === 'object' && value !== null) { + return multiple === 1 ? value.key : [value.key] + } + + let items = value.split(',') switch (multiple) { case 1: - return { key: value, title: items[value]?.title } + return items[0] || '' case -1: - return value.split(',') + return items default: - if (cat.multiple > 1) { - return value.split(',').slice(0, multiple) - } + return items.slice(0, multiple) } - - return value } export { BasicEntitySelectField } From a339051a6b85f603c23ac131fcaf098cf1bae6e6 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Tue, 30 Jul 2024 19:21:54 +0100 Subject: [PATCH 068/122] Refactor BasicEntityRadioGroupField for simplicity --- dist/BasicEntityRadioGroupField.d.ts | 5 + dist/voxgig-model-react.es.js | 393 ++++++++++------------- dist/voxgig-model-react.umd.js | 393 ++++++++++------------- src/lib/BasicEntityRadioGroupField.tsx | 32 +- test/BasicEntityRadioGroupField.test.tsx | 56 ++++ 5 files changed, 424 insertions(+), 455 deletions(-) create mode 100644 test/BasicEntityRadioGroupField.test.tsx diff --git a/dist/BasicEntityRadioGroupField.d.ts b/dist/BasicEntityRadioGroupField.d.ts index 3219868..5a2efe2 100644 --- a/dist/BasicEntityRadioGroupField.d.ts +++ b/dist/BasicEntityRadioGroupField.d.ts @@ -1,2 +1,7 @@ declare function BasicEntityRadioGroupField(props: any): import("react/jsx-runtime").JSX.Element; +export declare function resolveCategories(cat: any): { + title: any; + key: string; +}[]; +export declare function resolveDefault(cat: any): any; export { BasicEntityRadioGroupField }; diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index b7a73b7..6c0d616 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -64752,20 +64752,19 @@ function BasicEntityAutocompleteField(props) { const { spec } = props; const basicEntityAutocompleteField = BasicEntityAutocompleteFieldSpecShape(spec); const { control, field } = basicEntityAutocompleteField; - const { resolvedCategories, resolvedDefault } = resolveCategories$2(field.cat); return /* @__PURE__ */ jsxRuntimeExports.jsx( Controller, { name: field.name, control, - defaultValue: resolvedDefault, + defaultValue: resolveDefault$2(field.cat), render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( Autocomplete$1, __spreadProps(__spreadValues({ freeSolo: true, forcePopupIcon: true, - multiple: field.cat.multiple === 1 ? false : true, - options: resolvedCategories, + multiple: field.cat.multiple !== 1, + options: resolveCategories$2(field.cat), isOptionEqualToValue: (opt, val) => opt === val || (opt == null ? void 0 : opt.id) != null && (val == null ? void 0 : val.id) != null && opt.id === val.id || (opt == null ? void 0 : opt.key) != null && (val == null ? void 0 : val.key) != null && opt.key === val.key, getOptionLabel: (option) => option.title, value: resolveValue$1(value, field.cat), @@ -64780,59 +64779,60 @@ function BasicEntityAutocompleteField(props) { ); } function resolveCategories$2(cat) { + return Object.keys(cat.item).map((key) => { + var _a, _b; + return { + title: (_b = (_a = cat.item) == null ? void 0 : _a[key]) == null ? void 0 : _b.title, + key + }; + }); +} +function resolveDefault$2(cat) { var _a; const { multiple, item: items, default: defaultValues } = cat; - const resolvedCategories = Object.keys(items).map((key) => { + if (Object.keys(items).length === 0) { + return multiple === 1 ? "" : []; + } + const defaultItems = defaultValues.split(","); + const mapResolvedDefault = (list) => list.map((val) => { var _a2; return { - title: (_a2 = items == null ? void 0 : items[key]) == null ? void 0 : _a2.title, - key + title: (_a2 = items[val]) == null ? void 0 : _a2.title, + key: val }; }); - let resolvedDefault = multiple === 1 ? null : []; - let defaultList = []; - if (typeof defaultValues === "string") { - defaultList = defaultValues.split(","); - } - const mapResolvedDefault = (list) => list.map((val) => ({ - title: items[val].title, - key: val - })); switch (multiple) { case 1: - resolvedDefault = { - key: defaultList[0], - title: (_a = items[defaultList[0]]) == null ? void 0 : _a.title - }; + return defaultItems[0] ? { + key: defaultItems[0], + title: (_a = items[defaultItems[0]]) == null ? void 0 : _a.title + } : ""; case -1: - resolvedDefault = mapResolvedDefault(defaultList); + return mapResolvedDefault(defaultItems) || []; default: - resolvedDefault = mapResolvedDefault(defaultList.slice(0, multiple)); + return mapResolvedDefault(defaultItems.slice(0, multiple)) || []; } - return { - resolvedCategories, - resolvedDefault - }; } function resolveValue$1(value, cat) { - var _a; - const { item: items } = cat; + const { item: items, multiple } = cat; + if (Object.keys(items).length === 0) { + return multiple === 1 ? "" : []; + } if (Array.isArray(value)) { - return value; + return multiple === 1 && value[0] ? value[0] : value.slice(0, multiple); + } + if (typeof value === "object") { + return multiple === 1 ? value : [value]; } - switch (cat.multiple) { + const mapValue = (val) => items[val] ? { key: val, title: items[val].title } : void 0; + const splitValue = value.split(","); + switch (multiple) { case 1: - return { key: value, title: (_a = items[value]) == null ? void 0 : _a.title }; + return mapValue(splitValue[0]) || ""; case -1: - return value.split(",").map((k) => { - var _a2; - return { key: k, title: (_a2 = items[k]) == null ? void 0 : _a2.title }; - }); + return splitValue.map(mapValue).filter(Boolean) || []; default: - return value.split(",").slice(0, cat.multiple).map((k) => { - var _a2; - return { key: k, title: (_a2 = items[k]) == null ? void 0 : _a2.title }; - }); + return splitValue.slice(0, multiple).map(mapValue).filter(Boolean); } } const CMPNAME$l = "BasicEntitySliderField"; @@ -64938,7 +64938,6 @@ function BasicEntityRadioGroupField(props) { const { spec } = props; const basicEntityRadioGroupField = BasicEntityRadioGroupFieldSpecShape(spec); const { control, field } = basicEntityRadioGroupField; - const { resolvedCategories, resolvedDefault } = resolveCategories$1(field.cat); return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx(FormLabel$1, { children: field.label }, `${field.id}-label`), /* @__PURE__ */ jsxRuntimeExports.jsx( @@ -64946,46 +64945,25 @@ function BasicEntityRadioGroupField(props) { { name: field.name, control, - defaultValue: resolvedDefault, - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( - RadioGroup, - __spreadProps(__spreadValues({ - value, - onChange, - row: "row" === field.ux.direction, - disabled: !field.ux.edit - }, field.ux.props), { - children: resolvedCategories.map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx( - FormControlLabel$1, - { - value: option.key, - control: /* @__PURE__ */ jsxRuntimeExports.jsx(Radio$1, { disabled: !field.ux.edit }), - label: option.title - }, - `${option.key}-option` - )) - }), - field.id - ) + defaultValue: field.cat.default, + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx(RadioGroup, __spreadProps(__spreadValues({ value, onChange, row: "row" === field.ux.direction, disabled: !field.ux.edit }, field.ux.props), { children: resolveCategories$1(field.cat).map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx(FormControlLabel$1, { value: option.key, control: /* @__PURE__ */ jsxRuntimeExports.jsx(Radio$1, { disabled: !field.ux.edit }), label: option.title }, `${option.key}-option`)) }), field.id) }, `${field.id}-controller` ) ] }); } function resolveCategories$1(cat) { - const { item: items, default: defaultValues } = cat; - const resolvedCategories = Object.keys(items).map((key) => { - var _a; + return Object.keys(cat.item).map((key) => { + var _a, _b; return { - title: (_a = items == null ? void 0 : items[key]) == null ? void 0 : _a.title, + title: (_b = (_a = cat.item) == null ? void 0 : _a[key]) == null ? void 0 : _b.title, key }; }); - const resolvedDefault = defaultValues; - return { - resolvedCategories, - resolvedDefault - }; +} +function resolveDefault$1(cat) { + const { default: defaultValues } = cat; + return defaultValues; } const CMPNAME$j = "BasicEntityTextBoxField"; const { Open: Open$h } = gubu_minExports.Gubu; @@ -65343,86 +65321,67 @@ const BasicEntitySelectFieldSpecShape = gubu_minExports.Gubu( function BasicEntitySelectField(props) { const { spec } = props; const basicEntitySelectField = BasicEntitySelectFieldSpecShape(spec); - const { control, field, getValues } = basicEntitySelectField; - const { resolvedCategories, resolvedDefault } = resolveCategories(field.cat); - const val = getValues(field.name); + const { control, field } = basicEntitySelectField; return /* @__PURE__ */ jsxRuntimeExports.jsx( Controller, { name: field.name, control, - defaultValue: resolvedDefault, + defaultValue: resolveDefault(field.cat), render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(FormControl$1, { fullWidth: true, children: [ /* @__PURE__ */ jsxRuntimeExports.jsx(InputLabel$1, { id: `${field.id}-label`, children: field.label }), - /* @__PURE__ */ jsxRuntimeExports.jsx( - Select$1, - __spreadProps(__spreadValues({ - labelId: `${field.id}-label`, - id: `${field.id}-select`, - value: resolveValue(value, field.cat), - multiple: field.cat.multiple === 1 ? false : true, - label: field.name, - onChange: (event) => onChange(event.target.value), - disabled: !field.ux.edit - }, field.ux.props), { - children: resolvedCategories.map((opt) => /* @__PURE__ */ jsxRuntimeExports.jsx(MenuItem$1, { value: opt.key, children: opt.title }, opt.key)) - }) - ) + /* @__PURE__ */ jsxRuntimeExports.jsx(Select$1, __spreadProps(__spreadValues({ labelId: `${field.id}-label`, id: `${field.id}-select`, value: resolveValue(value, field.cat), multiple: field.cat.multiple !== 1, label: field.name, onChange: (event) => onChange(event.target.value), disabled: !field.ux.edit }, field.ux.props), { children: resolveCategories(field.cat).map((opt) => /* @__PURE__ */ jsxRuntimeExports.jsx(MenuItem$1, { value: opt.key, children: opt.title }, opt.key)) })) ] }) }, `${field.id}-controller` ); } function resolveCategories(cat) { - const { multiple, item: items, default: defaultValues } = cat; - const resolvedCategories = Object.keys(items).map((key) => { - var _a; + return Object.keys(cat.item).map((key) => { + var _a, _b; return { - title: (_a = items == null ? void 0 : items[key]) == null ? void 0 : _a.title, + title: (_b = (_a = cat.item) == null ? void 0 : _a[key]) == null ? void 0 : _b.title, key }; }); - let resolvedDefault = multiple === 1 ? null : []; - let defaultList = []; - if (typeof defaultValues === "string") { - defaultList = defaultValues.split(","); +} +function resolveDefault(cat) { + const { multiple, item: items, default: defaultValues } = cat; + if (Object.keys(items).length === 0) { + return multiple === 1 ? "" : []; } - const mapResolvedDefault = (list) => list.map((val) => ({ - title: items[val].title, - key: val - })); - if (multiple === 1) { - resolvedDefault = { - title: items[defaultList[0]].title, - key: defaultList[0] - }; - } else if (multiple === -1) { - resolvedDefault = mapResolvedDefault(defaultList); - } else if (multiple > 1) { - resolvedDefault = mapResolvedDefault(defaultList.slice(0, multiple)); + const defaultItems = defaultValues.split(","); + const mapResolvedDefault = (list) => list.map((val) => items[val] ? val : void 0); + switch (multiple) { + case 1: + return defaultItems[0] ? defaultItems[0] : ""; + case -1: + return mapResolvedDefault(defaultItems).filter(Boolean) || []; + default: + return mapResolvedDefault(defaultItems.slice(0, multiple)).filter(Boolean) || []; } - return { - resolvedCategories, - resolvedDefault - }; } function resolveValue(value, cat) { - var _a; const { item: items, multiple } = cat; + if (Object.keys(items).length === 0) { + return multiple === 1 ? "" : []; + } if (Array.isArray(value)) { - return value; + return multiple === 1 && value[0] ? value[0] : value.slice(0, multiple); } + if (typeof value === "object") { + return multiple === 1 ? value : [value]; + } + const mapValue = (val) => items[val] ? val : void 0; + const splitValue = value.split(","); switch (multiple) { case 1: - return { key: value, title: (_a = items[value]) == null ? void 0 : _a.title }; + return mapValue(splitValue[0]) || ""; case -1: - return value.split(","); + return splitValue.map(mapValue).filter(Boolean) || []; default: - if (cat.multiple > 1) { - return value.split(",").slice(0, multiple); - } + return splitValue.slice(0, multiple).map(mapValue).filter(Boolean) || []; } - return value; } const CMPNAME$a = "BasicEntitySliderField"; const { Open: Open$8 } = gubu_minExports.Gubu; @@ -65624,29 +65583,36 @@ Object.assign(VxgBasicEntityEditPlugin, { }); Object.defineProperty(VxgBasicEntityEditPlugin, "name", { value: "VxgBasicEntityEditPlugin" }); const CMPNAME$7 = "BasicEntityEdit"; -const makeResolver = (seneca, spec) => useCallback((data) => __async(void 0, null, function* () { - const { ent, name } = spec; - const view = name; - let entity = seneca.entity(ent); - entity = entity.make$().data$(data); - let errors = entity.valid$({ errors: true }); - seneca.act("aim:app,on:BasicLed,entity:valid", { - view, - entity, - errors - }); - const errmsg = seneca.context.errmsg; - errors = errors.map((e) => (e.tag_kind = "ent", e)).reduce((a, e, _2) => (a[e.key] = { - type: e.type, - message: errmsg ? (_2 = errmsg.find(e)) ? _2.text : e.text : e.text - }, a), {}); - const values2 = entity.data$(false); - const out = { - values: values2, - errors - }; - return out; -}), [spec.ent]); +const makeResolver = (seneca, spec) => useCallback( + (data) => __async(void 0, null, function* () { + const { ent, name } = spec; + const view = name; + let entity = seneca.entity(ent); + entity = entity.make$().data$(data); + let errors = entity.valid$({ errors: true }); + seneca.act("aim:app,on:BasicLed,entity:valid", { + view, + entity, + errors + }); + const errmsg = seneca.context.errmsg; + errors = errors.map((e) => (e.tag_kind = "ent", e)).reduce( + (a, e, _2) => (a[e.key] = { + type: e.type, + message: errmsg ? (_2 = errmsg.find(e)) ? _2.text : e.text : e.text + }, a), + {} + ); + const values2 = entity.data$(false); + const out = { + values: values2, + errors + }; + console.log("makeResolver", out); + return out; + }), + [spec.ent] +); function BasicEntityEdit(props) { const { ctx } = props; const { seneca } = ctx(); @@ -65664,7 +65630,9 @@ function BasicEntityEdit(props) { }); } }, []); - const { spec, slot, fields } = seneca.export("VxgBasicEntityEditPlugin/handle") || { spec: {}, slot: null, fields: [] }; + const { spec, slot, fields } = seneca.export( + "VxgBasicEntityEditPlugin/handle" + ) || { spec: {}, slot: null, fields: [] }; const { ent, name } = spec; if (plugin && !ready) { seneca.act("aim:app,on:BasicLed,ready:edit", { view: name, setReady }); @@ -65713,29 +65681,19 @@ function BasicEntityEdit(props) { className: "vxg-BasicEntityEdit-form", onSubmit: handleSubmit(onSubmit), children: [ - /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { container: true, spacing: 2, children: fields.map( - (field) => /* @__PURE__ */ jsxRuntimeExports.jsx( - Grid$1, - { - item: true, - xs: field.ux.size, - children: /* @__PURE__ */ jsxRuntimeExports.jsx( - BasicEntityField, - { - ctx, - spec: { - field, - register, - getValues, - control, - errors - } - } - ) - }, - field.id - ) - ) }), + /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { container: true, spacing: 2, children: fields.map((field) => /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, xs: field.ux.size, children: /* @__PURE__ */ jsxRuntimeExports.jsx( + BasicEntityField, + { + ctx, + spec: { + field, + register, + getValues, + control, + errors + } + } + ) }, field.id)) }), /* @__PURE__ */ jsxRuntimeExports.jsx(Toolbar$1, { className: "vxg-BasicEntityEdit-toolbar-foot", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button$1, { type: "submit", variant: "contained", children: "Save" }) }) ] } @@ -65825,27 +65783,30 @@ function BasicLoading(props) { return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { children: "Loading..." }) }); } const { Open: Open$2 } = gubu_minExports.Gubu; -const Shape = gubu_minExports.Gubu({ - name: String, - title: String, - active: Boolean, - kind: String, - def: { - ent: String, - head: Open$2({ - active: false - }), - list: Open$2({ - active: false - }), - edit: Open$2({ - active: false - }), - foot: Open$2({ - active: false - }) - } -}, { name: "BasicLed" }); +const Shape = gubu_minExports.Gubu( + { + name: String, + title: String, + active: Boolean, + kind: String, + def: { + ent: String, + head: Open$2({ + active: false + }), + list: Open$2({ + active: false + }), + edit: Open$2({ + active: false + }), + foot: Open$2({ + active: false + }) + } + }, + { name: "BasicLed" } +); function VxgBasicLedPlugin(options) { const seneca = this; const spec = Shape(options.spec); @@ -65884,34 +65845,32 @@ function VxgBasicLedPlugin(options) { setReady(true); reply(); } - ).add( - "aim:app,on:BasicLed,modify:edit", - function(msg) { - let item = msg.item; - let fields = msg.fields; - if (null == item) return item; - item = __spreadValues({}, item); - for (const field of fields) { - if ("Date" === field.ux.kind) { - const dt = util$1.dateTimeFromUTC(item[field.name]); - item[field.name + "_orig$"] = item[field.name]; - item[field.name + "_udm$"] = dt.udm; - item[field.name] = dt.locald; - } else if ("Time" === field.ux.kind) { - const dt = util$1.dateTimeFromUTC(item[field.name]); - item[field.name + "_orig$"] = item[field.name]; - item[field.name + "_udm$"] = dt.udm; - item[field.name] = dt.localt; - } else if ("DateTime" === field.ux.kind) { - const dt = util$1.dateTimeFromUTC(item[field.name]); - item[field.name + "_orig$"] = item[field.name]; - item[field.name + "_udm$"] = dt.udm; - item[field.name] = dt.locald + "T" + dt.localt; - } - } - return item; - } - ).message( + ).add("aim:app,on:BasicLed,modify:edit", function(msg) { + let item = msg.item; + let fields = msg.fields; + if (null == item) return item; + item = __spreadValues({}, item); + for (const field of fields) { + if ("Date" === field.ux.kind) { + const dt = util$1.dateTimeFromUTC(item[field.name]); + item[field.name + "_orig$"] = item[field.name]; + item[field.name + "_udm$"] = dt.udm; + item[field.name] = dt.locald; + } else if ("Time" === field.ux.kind) { + const dt = util$1.dateTimeFromUTC(item[field.name]); + item[field.name + "_orig$"] = item[field.name]; + item[field.name + "_udm$"] = dt.udm; + item[field.name] = dt.localt; + } else if ("DateTime" === field.ux.kind) { + const dt = util$1.dateTimeFromUTC(item[field.name]); + item[field.name + "_orig$"] = item[field.name]; + item[field.name + "_udm$"] = dt.udm; + item[field.name] = dt.locald + "T" + dt.localt; + } + } + return item; + }).add("aim:app,on:BasicLed,modify:save", function(msg) { + }).message( "aim:app,on:BasicLed,edit:item,redux$:true", { item_id: String }, function(msg, meta) { diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index 68d5de4..b161361 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -64764,20 +64764,19 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const { spec } = props; const basicEntityAutocompleteField = BasicEntityAutocompleteFieldSpecShape(spec); const { control, field } = basicEntityAutocompleteField; - const { resolvedCategories, resolvedDefault } = resolveCategories$2(field.cat); return /* @__PURE__ */ jsxRuntimeExports.jsx( Controller, { name: field.name, control, - defaultValue: resolvedDefault, + defaultValue: resolveDefault$2(field.cat), render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( material.Autocomplete, __spreadProps(__spreadValues({ freeSolo: true, forcePopupIcon: true, - multiple: field.cat.multiple === 1 ? false : true, - options: resolvedCategories, + multiple: field.cat.multiple !== 1, + options: resolveCategories$2(field.cat), isOptionEqualToValue: (opt, val) => opt === val || (opt == null ? void 0 : opt.id) != null && (val == null ? void 0 : val.id) != null && opt.id === val.id || (opt == null ? void 0 : opt.key) != null && (val == null ? void 0 : val.key) != null && opt.key === val.key, getOptionLabel: (option) => option.title, value: resolveValue$1(value, field.cat), @@ -64792,59 +64791,60 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ); } function resolveCategories$2(cat) { + return Object.keys(cat.item).map((key) => { + var _a, _b; + return { + title: (_b = (_a = cat.item) == null ? void 0 : _a[key]) == null ? void 0 : _b.title, + key + }; + }); + } + function resolveDefault$2(cat) { var _a; const { multiple, item: items, default: defaultValues } = cat; - const resolvedCategories = Object.keys(items).map((key) => { + if (Object.keys(items).length === 0) { + return multiple === 1 ? "" : []; + } + const defaultItems = defaultValues.split(","); + const mapResolvedDefault = (list) => list.map((val) => { var _a2; return { - title: (_a2 = items == null ? void 0 : items[key]) == null ? void 0 : _a2.title, - key + title: (_a2 = items[val]) == null ? void 0 : _a2.title, + key: val }; }); - let resolvedDefault = multiple === 1 ? null : []; - let defaultList = []; - if (typeof defaultValues === "string") { - defaultList = defaultValues.split(","); - } - const mapResolvedDefault = (list) => list.map((val) => ({ - title: items[val].title, - key: val - })); switch (multiple) { case 1: - resolvedDefault = { - key: defaultList[0], - title: (_a = items[defaultList[0]]) == null ? void 0 : _a.title - }; + return defaultItems[0] ? { + key: defaultItems[0], + title: (_a = items[defaultItems[0]]) == null ? void 0 : _a.title + } : ""; case -1: - resolvedDefault = mapResolvedDefault(defaultList); + return mapResolvedDefault(defaultItems) || []; default: - resolvedDefault = mapResolvedDefault(defaultList.slice(0, multiple)); + return mapResolvedDefault(defaultItems.slice(0, multiple)) || []; } - return { - resolvedCategories, - resolvedDefault - }; } function resolveValue$1(value, cat) { - var _a; - const { item: items } = cat; + const { item: items, multiple } = cat; + if (Object.keys(items).length === 0) { + return multiple === 1 ? "" : []; + } if (Array.isArray(value)) { - return value; + return multiple === 1 && value[0] ? value[0] : value.slice(0, multiple); + } + if (typeof value === "object") { + return multiple === 1 ? value : [value]; } - switch (cat.multiple) { + const mapValue = (val) => items[val] ? { key: val, title: items[val].title } : void 0; + const splitValue = value.split(","); + switch (multiple) { case 1: - return { key: value, title: (_a = items[value]) == null ? void 0 : _a.title }; + return mapValue(splitValue[0]) || ""; case -1: - return value.split(",").map((k) => { - var _a2; - return { key: k, title: (_a2 = items[k]) == null ? void 0 : _a2.title }; - }); + return splitValue.map(mapValue).filter(Boolean) || []; default: - return value.split(",").slice(0, cat.multiple).map((k) => { - var _a2; - return { key: k, title: (_a2 = items[k]) == null ? void 0 : _a2.title }; - }); + return splitValue.slice(0, multiple).map(mapValue).filter(Boolean); } } const CMPNAME$l = "BasicEntitySliderField"; @@ -64950,7 +64950,6 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const { spec } = props; const basicEntityRadioGroupField = BasicEntityRadioGroupFieldSpecShape(spec); const { control, field } = basicEntityRadioGroupField; - const { resolvedCategories, resolvedDefault } = resolveCategories$1(field.cat); return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx(material.FormLabel, { children: field.label }, `${field.id}-label`), /* @__PURE__ */ jsxRuntimeExports.jsx( @@ -64958,46 +64957,25 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha { name: field.name, control, - defaultValue: resolvedDefault, - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( - material.RadioGroup, - __spreadProps(__spreadValues({ - value, - onChange, - row: "row" === field.ux.direction, - disabled: !field.ux.edit - }, field.ux.props), { - children: resolvedCategories.map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx( - material.FormControlLabel, - { - value: option.key, - control: /* @__PURE__ */ jsxRuntimeExports.jsx(material.Radio, { disabled: !field.ux.edit }), - label: option.title - }, - `${option.key}-option` - )) - }), - field.id - ) + defaultValue: field.cat.default, + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.RadioGroup, __spreadProps(__spreadValues({ value, onChange, row: "row" === field.ux.direction, disabled: !field.ux.edit }, field.ux.props), { children: resolveCategories$1(field.cat).map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.FormControlLabel, { value: option.key, control: /* @__PURE__ */ jsxRuntimeExports.jsx(material.Radio, { disabled: !field.ux.edit }), label: option.title }, `${option.key}-option`)) }), field.id) }, `${field.id}-controller` ) ] }); } function resolveCategories$1(cat) { - const { item: items, default: defaultValues } = cat; - const resolvedCategories = Object.keys(items).map((key) => { - var _a; + return Object.keys(cat.item).map((key) => { + var _a, _b; return { - title: (_a = items == null ? void 0 : items[key]) == null ? void 0 : _a.title, + title: (_b = (_a = cat.item) == null ? void 0 : _a[key]) == null ? void 0 : _b.title, key }; }); - const resolvedDefault = defaultValues; - return { - resolvedCategories, - resolvedDefault - }; + } + function resolveDefault$1(cat) { + const { default: defaultValues } = cat; + return defaultValues; } const CMPNAME$j = "BasicEntityTextBoxField"; const { Open: Open$h } = gubu_minExports.Gubu; @@ -65355,86 +65333,67 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha function BasicEntitySelectField(props) { const { spec } = props; const basicEntitySelectField = BasicEntitySelectFieldSpecShape(spec); - const { control, field, getValues } = basicEntitySelectField; - const { resolvedCategories, resolvedDefault } = resolveCategories(field.cat); - const val = getValues(field.name); + const { control, field } = basicEntitySelectField; return /* @__PURE__ */ jsxRuntimeExports.jsx( Controller, { name: field.name, control, - defaultValue: resolvedDefault, + defaultValue: resolveDefault(field.cat), render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(material.FormControl, { fullWidth: true, children: [ /* @__PURE__ */ jsxRuntimeExports.jsx(material.InputLabel, { id: `${field.id}-label`, children: field.label }), - /* @__PURE__ */ jsxRuntimeExports.jsx( - material.Select, - __spreadProps(__spreadValues({ - labelId: `${field.id}-label`, - id: `${field.id}-select`, - value: resolveValue(value, field.cat), - multiple: field.cat.multiple === 1 ? false : true, - label: field.name, - onChange: (event) => onChange(event.target.value), - disabled: !field.ux.edit - }, field.ux.props), { - children: resolvedCategories.map((opt) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.MenuItem, { value: opt.key, children: opt.title }, opt.key)) - }) - ) + /* @__PURE__ */ jsxRuntimeExports.jsx(material.Select, __spreadProps(__spreadValues({ labelId: `${field.id}-label`, id: `${field.id}-select`, value: resolveValue(value, field.cat), multiple: field.cat.multiple !== 1, label: field.name, onChange: (event) => onChange(event.target.value), disabled: !field.ux.edit }, field.ux.props), { children: resolveCategories(field.cat).map((opt) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.MenuItem, { value: opt.key, children: opt.title }, opt.key)) })) ] }) }, `${field.id}-controller` ); } function resolveCategories(cat) { - const { multiple, item: items, default: defaultValues } = cat; - const resolvedCategories = Object.keys(items).map((key) => { - var _a; + return Object.keys(cat.item).map((key) => { + var _a, _b; return { - title: (_a = items == null ? void 0 : items[key]) == null ? void 0 : _a.title, + title: (_b = (_a = cat.item) == null ? void 0 : _a[key]) == null ? void 0 : _b.title, key }; }); - let resolvedDefault = multiple === 1 ? null : []; - let defaultList = []; - if (typeof defaultValues === "string") { - defaultList = defaultValues.split(","); + } + function resolveDefault(cat) { + const { multiple, item: items, default: defaultValues } = cat; + if (Object.keys(items).length === 0) { + return multiple === 1 ? "" : []; } - const mapResolvedDefault = (list) => list.map((val) => ({ - title: items[val].title, - key: val - })); - if (multiple === 1) { - resolvedDefault = { - title: items[defaultList[0]].title, - key: defaultList[0] - }; - } else if (multiple === -1) { - resolvedDefault = mapResolvedDefault(defaultList); - } else if (multiple > 1) { - resolvedDefault = mapResolvedDefault(defaultList.slice(0, multiple)); + const defaultItems = defaultValues.split(","); + const mapResolvedDefault = (list) => list.map((val) => items[val] ? val : void 0); + switch (multiple) { + case 1: + return defaultItems[0] ? defaultItems[0] : ""; + case -1: + return mapResolvedDefault(defaultItems).filter(Boolean) || []; + default: + return mapResolvedDefault(defaultItems.slice(0, multiple)).filter(Boolean) || []; } - return { - resolvedCategories, - resolvedDefault - }; } function resolveValue(value, cat) { - var _a; const { item: items, multiple } = cat; + if (Object.keys(items).length === 0) { + return multiple === 1 ? "" : []; + } if (Array.isArray(value)) { - return value; + return multiple === 1 && value[0] ? value[0] : value.slice(0, multiple); } + if (typeof value === "object") { + return multiple === 1 ? value : [value]; + } + const mapValue = (val) => items[val] ? val : void 0; + const splitValue = value.split(","); switch (multiple) { case 1: - return { key: value, title: (_a = items[value]) == null ? void 0 : _a.title }; + return mapValue(splitValue[0]) || ""; case -1: - return value.split(","); + return splitValue.map(mapValue).filter(Boolean) || []; default: - if (cat.multiple > 1) { - return value.split(",").slice(0, multiple); - } + return splitValue.slice(0, multiple).map(mapValue).filter(Boolean) || []; } - return value; } const CMPNAME$a = "BasicEntitySliderField"; const { Open: Open$8 } = gubu_minExports.Gubu; @@ -65636,29 +65595,36 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); Object.defineProperty(VxgBasicEntityEditPlugin, "name", { value: "VxgBasicEntityEditPlugin" }); const CMPNAME$7 = "BasicEntityEdit"; - const makeResolver = (seneca, spec) => React$1.useCallback((data) => __async(this, null, function* () { - const { ent, name } = spec; - const view = name; - let entity = seneca.entity(ent); - entity = entity.make$().data$(data); - let errors = entity.valid$({ errors: true }); - seneca.act("aim:app,on:BasicLed,entity:valid", { - view, - entity, - errors - }); - const errmsg = seneca.context.errmsg; - errors = errors.map((e) => (e.tag_kind = "ent", e)).reduce((a, e, _2) => (a[e.key] = { - type: e.type, - message: errmsg ? (_2 = errmsg.find(e)) ? _2.text : e.text : e.text - }, a), {}); - const values2 = entity.data$(false); - const out = { - values: values2, - errors - }; - return out; - }), [spec.ent]); + const makeResolver = (seneca, spec) => React$1.useCallback( + (data) => __async(this, null, function* () { + const { ent, name } = spec; + const view = name; + let entity = seneca.entity(ent); + entity = entity.make$().data$(data); + let errors = entity.valid$({ errors: true }); + seneca.act("aim:app,on:BasicLed,entity:valid", { + view, + entity, + errors + }); + const errmsg = seneca.context.errmsg; + errors = errors.map((e) => (e.tag_kind = "ent", e)).reduce( + (a, e, _2) => (a[e.key] = { + type: e.type, + message: errmsg ? (_2 = errmsg.find(e)) ? _2.text : e.text : e.text + }, a), + {} + ); + const values2 = entity.data$(false); + const out = { + values: values2, + errors + }; + console.log("makeResolver", out); + return out; + }), + [spec.ent] + ); function BasicEntityEdit(props) { const { ctx } = props; const { seneca } = ctx(); @@ -65676,7 +65642,9 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); } }, []); - const { spec, slot, fields } = seneca.export("VxgBasicEntityEditPlugin/handle") || { spec: {}, slot: null, fields: [] }; + const { spec, slot, fields } = seneca.export( + "VxgBasicEntityEditPlugin/handle" + ) || { spec: {}, slot: null, fields: [] }; const { ent, name } = spec; if (plugin && !ready) { seneca.act("aim:app,on:BasicLed,ready:edit", { view: name, setReady }); @@ -65725,29 +65693,19 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha className: "vxg-BasicEntityEdit-form", onSubmit: handleSubmit(onSubmit), children: [ - /* @__PURE__ */ jsxRuntimeExports.jsx(material.Grid, { container: true, spacing: 2, children: fields.map( - (field) => /* @__PURE__ */ jsxRuntimeExports.jsx( - material.Grid, - { - item: true, - xs: field.ux.size, - children: /* @__PURE__ */ jsxRuntimeExports.jsx( - BasicEntityField, - { - ctx, - spec: { - field, - register, - getValues, - control, - errors - } - } - ) - }, - field.id - ) - ) }), + /* @__PURE__ */ jsxRuntimeExports.jsx(material.Grid, { container: true, spacing: 2, children: fields.map((field) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.Grid, { item: true, xs: field.ux.size, children: /* @__PURE__ */ jsxRuntimeExports.jsx( + BasicEntityField, + { + ctx, + spec: { + field, + register, + getValues, + control, + errors + } + } + ) }, field.id)) }), /* @__PURE__ */ jsxRuntimeExports.jsx(material.Toolbar, { className: "vxg-BasicEntityEdit-toolbar-foot", children: /* @__PURE__ */ jsxRuntimeExports.jsx(material.Button, { type: "submit", variant: "contained", children: "Save" }) }) ] } @@ -65837,27 +65795,30 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { children: "Loading..." }) }); } const { Open: Open$2 } = gubu_minExports.Gubu; - const Shape = gubu_minExports.Gubu({ - name: String, - title: String, - active: Boolean, - kind: String, - def: { - ent: String, - head: Open$2({ - active: false - }), - list: Open$2({ - active: false - }), - edit: Open$2({ - active: false - }), - foot: Open$2({ - active: false - }) - } - }, { name: "BasicLed" }); + const Shape = gubu_minExports.Gubu( + { + name: String, + title: String, + active: Boolean, + kind: String, + def: { + ent: String, + head: Open$2({ + active: false + }), + list: Open$2({ + active: false + }), + edit: Open$2({ + active: false + }), + foot: Open$2({ + active: false + }) + } + }, + { name: "BasicLed" } + ); function VxgBasicLedPlugin(options) { const seneca = this; const spec = Shape(options.spec); @@ -65896,34 +65857,32 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha setReady(true); reply(); } - ).add( - "aim:app,on:BasicLed,modify:edit", - function(msg) { - let item = msg.item; - let fields = msg.fields; - if (null == item) return item; - item = __spreadValues({}, item); - for (const field of fields) { - if ("Date" === field.ux.kind) { - const dt = util$1.dateTimeFromUTC(item[field.name]); - item[field.name + "_orig$"] = item[field.name]; - item[field.name + "_udm$"] = dt.udm; - item[field.name] = dt.locald; - } else if ("Time" === field.ux.kind) { - const dt = util$1.dateTimeFromUTC(item[field.name]); - item[field.name + "_orig$"] = item[field.name]; - item[field.name + "_udm$"] = dt.udm; - item[field.name] = dt.localt; - } else if ("DateTime" === field.ux.kind) { - const dt = util$1.dateTimeFromUTC(item[field.name]); - item[field.name + "_orig$"] = item[field.name]; - item[field.name + "_udm$"] = dt.udm; - item[field.name] = dt.locald + "T" + dt.localt; - } - } - return item; - } - ).message( + ).add("aim:app,on:BasicLed,modify:edit", function(msg) { + let item = msg.item; + let fields = msg.fields; + if (null == item) return item; + item = __spreadValues({}, item); + for (const field of fields) { + if ("Date" === field.ux.kind) { + const dt = util$1.dateTimeFromUTC(item[field.name]); + item[field.name + "_orig$"] = item[field.name]; + item[field.name + "_udm$"] = dt.udm; + item[field.name] = dt.locald; + } else if ("Time" === field.ux.kind) { + const dt = util$1.dateTimeFromUTC(item[field.name]); + item[field.name + "_orig$"] = item[field.name]; + item[field.name + "_udm$"] = dt.udm; + item[field.name] = dt.localt; + } else if ("DateTime" === field.ux.kind) { + const dt = util$1.dateTimeFromUTC(item[field.name]); + item[field.name + "_orig$"] = item[field.name]; + item[field.name + "_udm$"] = dt.udm; + item[field.name] = dt.locald + "T" + dt.localt; + } + } + return item; + }).add("aim:app,on:BasicLed,modify:save", function(msg) { + }).message( "aim:app,on:BasicLed,edit:item,redux$:true", { item_id: String }, function(msg, meta) { diff --git a/src/lib/BasicEntityRadioGroupField.tsx b/src/lib/BasicEntityRadioGroupField.tsx index 37ec878..f56ec34 100644 --- a/src/lib/BasicEntityRadioGroupField.tsx +++ b/src/lib/BasicEntityRadioGroupField.tsx @@ -5,8 +5,7 @@ import { Controller } from 'react-hook-form' import type { Spec } from './basic-types' -import { Default, Exact, Gubu, Skip } from 'gubu' -import { resolve } from 'path' +import { Default, Exact, Gubu } from 'gubu' const CMPNAME = 'BasicEntitySliderField' const { Open } = Gubu @@ -40,12 +39,9 @@ const BasicEntityRadioGroupFieldSpecShape = Gubu( function BasicEntityRadioGroupField (props: any) { const { spec } = props - const basicEntityRadioGroupField: Spec = - BasicEntityRadioGroupFieldSpecShape(spec) + const basicEntityRadioGroupField: Spec = BasicEntityRadioGroupFieldSpecShape(spec) const { control, field } = basicEntityRadioGroupField - const { resolvedCategories, resolvedDefault } = resolveCategories(field.cat) - return ( <> {field.label} @@ -53,7 +49,7 @@ function BasicEntityRadioGroupField (props: any) { key={`${field.id}-controller`} name={field.name} control={control} - defaultValue={resolvedDefault} + defaultValue={field.cat.default} render={({ field: { onChange, value } }) => ( - {resolvedCategories.map((option: any) => ( + {resolveCategories(field.cat).map((option: any) => ( ({ - title: items?.[key]?.title, +export function resolveCategories (cat: any) { + return Object.keys(cat.item).map((key) => ({ + title: cat.item?.[key]?.title, key: key, })) +} - const resolvedDefault = defaultValues - - return { - resolvedCategories, - resolvedDefault, - } +export function resolveDefault (cat: any) { + const { default: defaultValues } = cat + return defaultValues } export { BasicEntityRadioGroupField } diff --git a/test/BasicEntityRadioGroupField.test.tsx b/test/BasicEntityRadioGroupField.test.tsx new file mode 100644 index 0000000..c658766 --- /dev/null +++ b/test/BasicEntityRadioGroupField.test.tsx @@ -0,0 +1,56 @@ +import { describe, it, expect, beforeEach } from 'vitest' + +import { resolveCategories, resolveDefault } from '../src/lib/BasicEntityRadioGroupField' + +describe('resolveDefault', () => { + let cat: any + + beforeEach(() => { + cat = { + default: 'code', + order: { + sort: 'human$', + exclude: '', + include: '', + }, + item: { + code: { title: 'Coding' }, + tech: { title: 'Technology' }, + devr: { title: 'Developer Relations' }, + }, + } + }) + + it('returns empty string when default is empty', () => { + expect(resolveDefault(cat)).toEqual('code') + }) +}) + +describe('resolveCategories', () => { + let cat: any + + beforeEach(() => { + cat = { + default: 'code', + multiple: 1, + order: { + sort: 'human$', + exclude: '', + include: '', + }, + item: { + code: { title: 'Coding' }, + tech: { title: 'Technology' }, + devr: { title: 'Developer Relations' }, + }, + } + }) + + it('returns array of matched values when multiple is 1', () => { + expect(resolveCategories(cat)).toEqual([ + { key: 'code', title: 'Coding' }, + { key: 'tech', title: 'Technology' }, + { key: 'devr', title: 'Developer Relations' }, + ]) + }) +}) From e32d1def8ce71187ffa4c9d828a3704ec552387c Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Tue, 30 Jul 2024 19:23:17 +0100 Subject: [PATCH 069/122] Refactor BasicEntityAutocompleteField for simplicity --- dist/BasicEntityAutocompleteField.d.ts | 25 +++ src/lib/BasicEntityAutocompleteField.tsx | 114 ++++++-------- test/BasicEntityAutocompleteField.test.tsx | 173 +++++++++++++++++++++ 3 files changed, 243 insertions(+), 69 deletions(-) create mode 100644 test/BasicEntityAutocompleteField.test.tsx diff --git a/dist/BasicEntityAutocompleteField.d.ts b/dist/BasicEntityAutocompleteField.d.ts index cf25015..c2b22b3 100644 --- a/dist/BasicEntityAutocompleteField.d.ts +++ b/dist/BasicEntityAutocompleteField.d.ts @@ -1,2 +1,27 @@ declare function BasicEntityAutocompleteField(props: any): import("react/jsx-runtime").JSX.Element; +export declare function resolveCategories(cat: { + item: Record; +}): { + title: string; + key: string; +}[]; +export declare function resolveDefault(cat: { + multiple: number; + item: any; + default: string; +}): "" | { + title: any; + key: any; +}[] | { + key: string; + title: any; +}; +export declare function resolveValue(value: any, cat: { + multiple: number; + item: Record; +}): any; export { BasicEntityAutocompleteField }; diff --git a/src/lib/BasicEntityAutocompleteField.tsx b/src/lib/BasicEntityAutocompleteField.tsx index 4d9dfd4..13f482a 100644 --- a/src/lib/BasicEntityAutocompleteField.tsx +++ b/src/lib/BasicEntityAutocompleteField.tsx @@ -5,7 +5,7 @@ import { Controller } from 'react-hook-form' import type { Spec } from './basic-types' -import { Default, Exact, Gubu, Skip } from 'gubu' +import { Default, Exact, Gubu } from 'gubu' const CMPNAME = 'BasicEntityAutocompleteField' const { Open } = Gubu @@ -39,25 +39,21 @@ const BasicEntityAutocompleteFieldSpecShape = Gubu( function BasicEntityAutocompleteField (props: any) { const { spec } = props - // console.log('BasicEntityAutocompleteField', 'spec', spec) - - const basicEntityAutocompleteField: Spec = - BasicEntityAutocompleteFieldSpecShape(spec) + const basicEntityAutocompleteField: Spec = BasicEntityAutocompleteFieldSpecShape(spec) const { control, field } = basicEntityAutocompleteField - const { resolvedCategories, resolvedDefault } = resolveCategories(field.cat) return ( ( opt === val || (opt?.id != null && val?.id != null && opt.id === val.id) || @@ -68,98 +64,78 @@ function BasicEntityAutocompleteField (props: any) { disabled={!field.ux.edit} {...field.ux.props} onChange={(_, newVal: any) => onChange(newVal)} - renderInput={(params: any) => ( - - )} + renderInput={(params: any) => } /> )} /> ) } -// TODO: Make it DRY -// Returns array of options and default value(s) based on the options object -function resolveCategories (cat: any) { - const { multiple, item: items, default: defaultValues } = cat - - // console.log('resolveCat', 'cat', cat) - - // Array of options - const resolvedCategories = Object.keys(items).map((key) => ({ - title: items?.[key]?.title, +export function resolveCategories (cat: { item: Record }) { + return Object.keys(cat.item).map((key) => ({ + title: cat.item?.[key]?.title, key: key, })) +} - let resolvedDefault: any = multiple === 1 ? null : [] - let defaultList: any[] = [] +export function resolveDefault (cat: { multiple: number; item: any; default: string }) { + const { multiple, item: items, default: defaultValues } = cat - if (typeof defaultValues === 'string') { - defaultList = defaultValues.split(',') + if (Object.keys(items).length === 0) { + return multiple === 1 ? '' : [] } - const mapResolvedDefault = (list: any[]) => + const defaultItems = defaultValues.split(',') + + const mapResolvedDefault = (list: string[]) => list.map((val: any) => ({ - title: items[val].title, + title: items[val]?.title, key: val, })) switch (multiple) { case 1: - resolvedDefault = { - key: defaultList[0], - title: items[defaultList[0]]?.title, - } + return defaultItems[0] + ? { + key: defaultItems[0], + title: items[defaultItems[0]]?.title, + } + : '' case -1: - resolvedDefault = mapResolvedDefault(defaultList) + return mapResolvedDefault(defaultItems) || [] default: - resolvedDefault = mapResolvedDefault(defaultList.slice(0, multiple)) - } - - // if (multiple === 1) { - // resolvedDefault = { - // title: items[defaultList[0]].title, - // key: defaultList[0], - // } - // } else if (multiple === -1) { - // resolvedDefault = mapResolvedDefault(defaultList) - // } else if (multiple > 1) { - // resolvedDefault = mapResolvedDefault(defaultList.slice(0, multiple)) - // } - - // console.log('resolveCat', 'resolvedDefault', resolvedDefault) - - return { - resolvedCategories, - resolvedDefault, + return mapResolvedDefault(defaultItems.slice(0, multiple)) || [] } } -// TODO: Make it DRY -function resolveValue ( +export function resolveValue ( value: any, - cat: { - multiple: number - item: Record - } + cat: { multiple: number; item: Record } ) { - const { item: items } = cat + const { item: items, multiple } = cat + + if (Object.keys(items).length === 0) { + return multiple === 1 ? '' : [] + } if (Array.isArray(value)) { - return value + return multiple === 1 && value[0] ? value[0] : value.slice(0, multiple) } - switch (cat.multiple) { + if (typeof value === 'object') { + return multiple === 1 ? value : [value] + } + + const mapValue = (val: string) => (items[val] ? { key: val, title: items[val].title } : undefined) + const splitValue = value.split(',') + + switch (multiple) { case 1: - return { key: value, title: items[value]?.title } + return mapValue(splitValue[0]) || '' case -1: - return value - .split(',') - .map((k: any) => ({ key: k, title: items[k]?.title })) + return splitValue.map(mapValue).filter(Boolean) || [] default: - return value - .split(',') - .slice(0, cat.multiple) - .map((k: any) => ({ key: k, title: items[k]?.title })) + return splitValue.slice(0, multiple).map(mapValue).filter(Boolean) } } diff --git a/test/BasicEntityAutocompleteField.test.tsx b/test/BasicEntityAutocompleteField.test.tsx new file mode 100644 index 0000000..0a1bd63 --- /dev/null +++ b/test/BasicEntityAutocompleteField.test.tsx @@ -0,0 +1,173 @@ +import { describe, it, expect, beforeEach } from 'vitest' + +import { resolveCategories, resolveDefault, resolveValue } from '../src/lib/BasicEntityAutocompleteField' + +describe('resolveValue', () => { + let value: any + let cat: any + + beforeEach(() => { + value = 'code,tech' + cat = { + default: 'code', + multiple: 1, + order: { + sort: 'human$', + exclude: '', + include: '', + }, + item: { + code: { title: 'Coding' }, + tech: { title: 'Technology' }, + devr: { title: 'Developer Relations' }, + }, + } + }) + + it('returns empty string for unmatched values when multiple is 1', () => { + value = 'foo,bar' + expect(resolveValue(value, cat)).toEqual('') + }) + + it('returns object of matched values when multiple is 1', () => { + cat.multiple = 1 + expect(resolveValue(value, cat)).toEqual({ key: 'code', title: 'Coding' }) + }) + + it('returns empty array for unmatched values when multiple is 2', () => { + value = 'foo,bar' + cat.multiple = 2 + expect(resolveValue(value, cat)).toEqual([]) + }) + + it('returns empty array for unmatched values when multiple is 2', () => { + value = 'foo' + cat.multiple = 2 + expect(resolveValue(value, cat)).toEqual([]) + }) + + it('returns array of matched values when multiple is 2', () => { + cat.multiple = 2 + expect(resolveValue(value, cat)).toEqual([ + { key: 'code', title: 'Coding' }, + { key: 'tech', title: 'Technology' }, + ]) + }) + + it('returns empty array for unmatched values when multiple is -1', () => { + value = 'foo,bar' + cat.multiple = -1 + expect(resolveValue(value, cat)).toEqual([]) + }) + + it('returns array of matched values when multiple is -1', () => { + cat.multiple = -1 + expect(resolveValue(value, cat)).toEqual([ + { key: 'code', title: 'Coding' }, + { key: 'tech', title: 'Technology' }, + ]) + }) +}) + +describe('resolveDefault', () => { + let cat: any + + beforeEach(() => { + cat = { + default: 'code', + multiple: 1, + order: { + sort: 'human$', + exclude: '', + include: '', + }, + item: { + code: { title: 'Coding' }, + tech: { title: 'Technology' }, + devr: { title: 'Developer Relations' }, + }, + } + }) + + it('returns object of matched values when multiple is 1', () => { + expect(resolveDefault(cat)).toEqual({ key: 'code', title: 'Coding' }) + }) + + it('returns object of matched value when multiple is 1', () => { + cat.default = 'code,tech,devr' + expect(resolveDefault(cat)).toEqual({ key: 'code', title: 'Coding' }) + }) + + it('returns empty string when item is empty and multiple is 1', () => { + cat.default = 'code,tech,devr' + cat.item = {} + expect(resolveDefault(cat)).toEqual('') + }) + + it('returns array of matched values when multiple is 2', () => { + cat.default = 'code,tech,devr' + cat.multiple = 2 + expect(resolveDefault(cat)).toEqual([ + { key: 'code', title: 'Coding' }, + { key: 'tech', title: 'Technology' }, + ]) + }) + + it('returns empty array when item is empty and multiple is 2', () => { + cat.default = 'code,tech,devr' + cat.item = {} + cat.multiple = 2 + expect(resolveDefault(cat)).toEqual([]) + }) + + it('returns empty array when item is empty and multiple is -1', () => { + cat.multiple = -1 + expect(resolveDefault(cat)).toEqual([{ key: 'code', title: 'Coding' }]) + }) + + it('returns empty array when item is empty and multiple is -1', () => { + cat.multiple = -1 + cat.default = 'code,tech,devr' + expect(resolveDefault(cat)).toEqual([ + { key: 'code', title: 'Coding' }, + { key: 'tech', title: 'Technology' }, + { key: 'devr', title: 'Developer Relations' }, + ]) + }) + + it('returns empty array when item is empty and multiple is -1', () => { + cat.default = 'code,tech,devr' + cat.item = {} + cat.multiple = -1 + expect(resolveDefault(cat)).toEqual([]) + }) +}) + +describe('resolveCategories', () => { + let cat: any + + beforeEach(() => { + cat = { + default: 'code', + multiple: 1, + order: { + sort: 'human$', + exclude: '', + include: '', + }, + item: { + code: { title: 'Coding' }, + tech: { title: 'Technology' }, + devr: { title: 'Developer Relations' }, + }, + } + }) + + it('returns array of matched values when multiple is 1', () => { + expect(resolveCategories(cat)).toEqual([ + { key: 'code', title: 'Coding' }, + { key: 'tech', title: 'Technology' }, + { key: 'devr', title: 'Developer Relations' }, + ]) + }) +}) From b5efade6b0bd0081f7ae6d0d37e148a82e41351b Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Tue, 30 Jul 2024 19:24:15 +0100 Subject: [PATCH 070/122] Refactor BasicEntitySelectField for simplicity --- dist/BasicEntitySelectField.d.ts | 15 +++ src/lib/BasicEntitySelectField.tsx | 45 ++++---- test/BasicEntitySelectField.test.tsx | 160 +++++++++++++++++++++++++++ 3 files changed, 200 insertions(+), 20 deletions(-) create mode 100644 test/BasicEntitySelectField.test.tsx diff --git a/dist/BasicEntitySelectField.d.ts b/dist/BasicEntitySelectField.d.ts index 4a87de4..7ec4d68 100644 --- a/dist/BasicEntitySelectField.d.ts +++ b/dist/BasicEntitySelectField.d.ts @@ -1,2 +1,17 @@ declare function BasicEntitySelectField(props: any): import("react/jsx-runtime").JSX.Element; +export declare function resolveCategories(cat: any): { + title: any; + key: string; +}[]; +export declare function resolveDefault(cat: { + multiple: number; + item: any; + default: string; +}): string | any[]; +export declare function resolveValue(value: any, cat: { + multiple: number; + item: Record; +}): any; export { BasicEntitySelectField }; diff --git a/src/lib/BasicEntitySelectField.tsx b/src/lib/BasicEntitySelectField.tsx index 6643fb8..81e0359 100644 --- a/src/lib/BasicEntitySelectField.tsx +++ b/src/lib/BasicEntitySelectField.tsx @@ -74,58 +74,63 @@ function BasicEntitySelectField (props: any) { } // Returns array of options based on field.cat object -function resolveCategories (cat: any) { +export function resolveCategories (cat: any) { return Object.keys(cat.item).map((key) => ({ title: cat.item?.[key]?.title, key: key, })) } -function resolveDefault (cat: any) { - const { multiple, default: defaultValues } = cat +export function resolveDefault (cat: { multiple: number; item: any; default: string }) { + const { multiple, item: items, default: defaultValues } = cat - if (!defaultValues) { - return multiple === 1 ? '' : [''] + if (Object.keys(items).length === 0) { + return multiple === 1 ? '' : [] } const defaultItems = defaultValues.split(',') - const mapResolvedDefault = (list: string[]) => list.map((val) => val) + const mapResolvedDefault = (list: string[]) => + list.map((val: any) => (items[val] ? val : undefined)) switch (multiple) { case 1: - return defaultItems.length > 0 ? defaultItems[0] : '' + return defaultItems[0] ? defaultItems[0] : '' case -1: - return mapResolvedDefault(defaultItems) + return mapResolvedDefault(defaultItems).filter(Boolean) || [] default: - return mapResolvedDefault(defaultItems.slice(0, multiple)) + return mapResolvedDefault(defaultItems.slice(0, multiple)).filter(Boolean) || [] } } -// TODO: Make it DRY -function resolveValue ( +export function resolveValue ( value: any, cat: { multiple: number; item: Record } ) { - const { multiple } = cat + const { item: items, multiple } = cat + + if (Object.keys(items).length === 0) { + return multiple === 1 ? '' : [] + } if (Array.isArray(value)) { - const items = value.map((val) => val.key) - return multiple === 1 ? items[0] : items.slice(0, multiple) + return multiple === 1 && value[0] ? value[0] : value.slice(0, multiple) } - if (typeof value === 'object' && value !== null) { - return multiple === 1 ? value.key : [value.key] + if (typeof value === 'object') { + return multiple === 1 ? value : [value] } - let items = value.split(',') + const mapValue = (val: string) => (items[val] ? val : undefined) + const splitValue = value.split(',') + switch (multiple) { case 1: - return items[0] || '' + return mapValue(splitValue[0]) || '' case -1: - return items + return splitValue.map(mapValue).filter(Boolean) || [] default: - return items.slice(0, multiple) + return splitValue.slice(0, multiple).map(mapValue).filter(Boolean) || [] } } diff --git a/test/BasicEntitySelectField.test.tsx b/test/BasicEntitySelectField.test.tsx new file mode 100644 index 0000000..672385f --- /dev/null +++ b/test/BasicEntitySelectField.test.tsx @@ -0,0 +1,160 @@ +import { describe, it, expect, beforeEach } from 'vitest' + +import { resolveCategories, resolveDefault, resolveValue } from '../src/lib/BasicEntitySelectField' + +describe('resolveValue', () => { + let value: any + let cat: any + + beforeEach(() => { + value = 'code,tech' + cat = { + default: 'code', + multiple: 1, + order: { + sort: 'human$', + exclude: '', + include: '', + }, + item: { + code: { title: 'Coding' }, + tech: { title: 'Technology' }, + devr: { title: 'Developer Relations' }, + }, + } + }) + + it('returns empty string for unmatched values when multiple is 1', () => { + value = 'foo,bar' + expect(resolveValue(value, cat)).toEqual('') + }) + + it('returns object of matched values when multiple is 1', () => { + cat.multiple = 1 + expect(resolveValue(value, cat)).toEqual('code') + }) + + it('returns empty array for unmatched values when multiple is 2', () => { + value = 'foo,bar' + cat.multiple = 2 + expect(resolveValue(value, cat)).toEqual([]) + }) + + it('returns empty array for unmatched values when multiple is 2', () => { + value = 'foo' + cat.multiple = 2 + expect(resolveValue(value, cat)).toEqual([]) + }) + + it('returns array of matched values when multiple is 2', () => { + cat.multiple = 2 + expect(resolveValue(value, cat)).toEqual(['code', 'tech']) + }) + + it('returns empty array for unmatched values when multiple is -1', () => { + value = 'foo,bar' + cat.multiple = -1 + expect(resolveValue(value, cat)).toEqual([]) + }) + + it('returns array of matched values when multiple is -1', () => { + cat.multiple = -1 + expect(resolveValue(value, cat)).toEqual(['code', 'tech']) + }) +}) + +describe('resolveDefault', () => { + let cat: any + + beforeEach(() => { + cat = { + default: 'code', + multiple: 1, + order: { + sort: 'human$', + exclude: '', + include: '', + }, + item: { + code: { title: 'Coding' }, + tech: { title: 'Technology' }, + devr: { title: 'Developer Relations' }, + }, + } + }) + + it('returns object of matched values when multiple is 1', () => { + expect(resolveDefault(cat)).toEqual('code') + }) + + it('returns object of matched value when multiple is 1', () => { + cat.default = 'code,tech,devr' + expect(resolveDefault(cat)).toEqual('code') + }) + + it('returns empty string when item is empty and multiple is 1', () => { + cat.default = 'code,tech,devr' + cat.item = {} + expect(resolveDefault(cat)).toEqual('') + }) + + it('returns array of matched values when multiple is 2', () => { + cat.default = 'code,tech,devr' + cat.multiple = 2 + expect(resolveDefault(cat)).toEqual(['code', 'tech']) + }) + + it('returns empty array when item is empty and multiple is 2', () => { + cat.default = 'code,tech,devr' + cat.item = {} + cat.multiple = 2 + expect(resolveDefault(cat)).toEqual([]) + }) + + it('returns empty array when item is empty and multiple is -1', () => { + cat.multiple = -1 + expect(resolveDefault(cat)).toEqual(['code']) + }) + + it('returns empty array when item is empty and multiple is -1', () => { + cat.multiple = -1 + cat.default = 'code,tech,devr' + expect(resolveDefault(cat)).toEqual(['code', 'tech', 'devr']) + }) + + it('returns empty array when item is empty and multiple is -1', () => { + cat.default = 'code,tech,devr' + cat.item = {} + cat.multiple = -1 + expect(resolveDefault(cat)).toEqual([]) + }) +}) + +describe('resolveCategories', () => { + let cat: any + + beforeEach(() => { + cat = { + default: 'code', + multiple: 1, + order: { + sort: 'human$', + exclude: '', + include: '', + }, + item: { + code: { title: 'Coding' }, + tech: { title: 'Technology' }, + devr: { title: 'Developer Relations' }, + }, + } + }) + + it('returns array of matched values when multiple is 1', () => { + expect(resolveCategories(cat)).toEqual([ + { key: 'code', title: 'Coding' }, + { key: 'tech', title: 'Technology' }, + { key: 'devr', title: 'Developer Relations' }, + ]) + }) +}) From 28857c668aff3a055f20751349b3e94b868007eb Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Tue, 30 Jul 2024 19:25:44 +0100 Subject: [PATCH 071/122] Add key to FormLabel in BasicEntityRatingField --- src/lib/BasicEntityRatingField.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/BasicEntityRatingField.tsx b/src/lib/BasicEntityRatingField.tsx index 76c4b03..6cb6c9d 100644 --- a/src/lib/BasicEntityRatingField.tsx +++ b/src/lib/BasicEntityRatingField.tsx @@ -27,7 +27,7 @@ const BasicEntityRatingFieldSpecShape = Gubu( { name: CMPNAME } ) -function BasicEntityRatingField(props: any) { +function BasicEntityRatingField (props: any) { const { spec } = props const basicEntityRatingField: Spec = BasicEntityRatingFieldSpecShape(spec) @@ -38,7 +38,7 @@ function BasicEntityRatingField(props: any) { return (
- {field.label} + {field.label} Date: Tue, 30 Jul 2024 20:02:44 +0100 Subject: [PATCH 072/122] Refactor BasicEntityTextBoxField to include error handling --- src/lib/BasicEntityTextBoxField.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/lib/BasicEntityTextBoxField.tsx b/src/lib/BasicEntityTextBoxField.tsx index 6882772..1b90b3e 100644 --- a/src/lib/BasicEntityTextBoxField.tsx +++ b/src/lib/BasicEntityTextBoxField.tsx @@ -4,6 +4,7 @@ import { TextField } from '@mui/material' import type { Spec } from './basic-types' import { Default, Exact, Gubu, Skip } from 'gubu' +import { BasicEntityFieldError } from './BasicEntityFieldError' const CMPNAME = 'BasicEntityTextBoxField' const { Open } = Gubu @@ -25,28 +26,31 @@ const BasicEntityTextBoxFieldSpecShape = Gubu( ) // TODO: Decide on naming convention for TextBox -function BasicEntityTextBoxField(props: any) { +function BasicEntityTextBoxField (props: any) { const { spec } = props const basicEntityTextBoxField: Spec = BasicEntityTextBoxFieldSpecShape(spec) - const { field, getValues, register } = basicEntityTextBoxField + const { field, getValues, register, errors } = basicEntityTextBoxField const val = getValues(field.name) + const err = errors[field.name] + return (
0 }} - {...register(field.name)} disabled={!field.ux.edit} {...field.ux.props} + {...register(field.name)} /> +
) } From b4f6f49636da0f836203d3dcb5de12402f99f957 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Tue, 30 Jul 2024 20:03:09 +0100 Subject: [PATCH 073/122] Refactor BasicEntityAutocompleteField to include error handling and improve code readability --- src/lib/BasicEntityAutocompleteField.tsx | 60 +++++++++++++----------- 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/src/lib/BasicEntityAutocompleteField.tsx b/src/lib/BasicEntityAutocompleteField.tsx index 13f482a..51018b9 100644 --- a/src/lib/BasicEntityAutocompleteField.tsx +++ b/src/lib/BasicEntityAutocompleteField.tsx @@ -1,11 +1,12 @@ import React, { useEffect, forwardRef } from 'react' -import { TextField, Autocomplete } from '@mui/material' +import { TextField, Autocomplete, Box } from '@mui/material' import { Controller } from 'react-hook-form' import type { Spec } from './basic-types' import { Default, Exact, Gubu } from 'gubu' +import { BasicEntityFieldError } from './BasicEntityFieldError' const CMPNAME = 'BasicEntityAutocompleteField' const { Open } = Gubu @@ -40,34 +41,39 @@ function BasicEntityAutocompleteField (props: any) { const { spec } = props const basicEntityAutocompleteField: Spec = BasicEntityAutocompleteFieldSpecShape(spec) - const { control, field } = basicEntityAutocompleteField + const { control, field, errors } = basicEntityAutocompleteField + + const err = errors[field.name] return ( - ( - - opt === val || - (opt?.id != null && val?.id != null && opt.id === val.id) || - (opt?.key != null && val?.key != null && opt.key === val.key) - } - getOptionLabel={(option: any) => option.title} - value={resolveValue(value, field.cat)} - disabled={!field.ux.edit} - {...field.ux.props} - onChange={(_, newVal: any) => onChange(newVal)} - renderInput={(params: any) => } - /> - )} - /> + + ( + + opt === val || + (opt?.id != null && val?.id != null && opt.id === val.id) || + (opt?.key != null && val?.key != null && opt.key === val.key) + } + getOptionLabel={(option: any) => option.title} + value={resolveValue(value, field.cat)} + disabled={!field.ux.edit} + {...field.ux.props} + onChange={(_, newVal: any) => onChange(newVal)} + renderInput={(params: any) => } + /> + )} + /> + + ) } From d15fa6baa7e55d7a3974035508f486c159d1eae1 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Tue, 30 Jul 2024 20:03:32 +0100 Subject: [PATCH 074/122] Refactor BasicEntityCheckboxField to include error handling and improve code readability --- src/lib/BasicEntityCheckboxField.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lib/BasicEntityCheckboxField.tsx b/src/lib/BasicEntityCheckboxField.tsx index e521b5c..668f2c8 100644 --- a/src/lib/BasicEntityCheckboxField.tsx +++ b/src/lib/BasicEntityCheckboxField.tsx @@ -6,6 +6,7 @@ import { Controller } from 'react-hook-form' import type { Spec } from './basic-types' import { Default, Exact, Gubu, Skip } from 'gubu' +import { BasicEntityFieldError } from './BasicEntityFieldError' const CMPNAME = 'BasicEntitySliderField' const { Open } = Gubu @@ -26,13 +27,15 @@ const BasicEntityCheckboxFieldSpecShape = Gubu( { name: CMPNAME } ) -function BasicEntityCheckboxField(props: any) { +function BasicEntityCheckboxField (props: any) { const { spec } = props const basicEntityCheckboxField: Spec = BasicEntityCheckboxFieldSpecShape(spec) - const { control, field, getValues } = basicEntityCheckboxField + const { control, field, getValues, errors } = basicEntityCheckboxField const val = getValues(field.name) + const err = errors[field.name] + // TODO: Style wrapper box return ( @@ -56,6 +59,7 @@ function BasicEntityCheckboxField(props: any) { } label={field.label} /> + ) } From e13de8931bb320e14936d1849bd67510028a070f Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Tue, 30 Jul 2024 20:03:47 +0100 Subject: [PATCH 075/122] Refactor BasicEntityDateField to include error handling and improve code readability --- src/lib/BasicEntityDateField.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/lib/BasicEntityDateField.tsx b/src/lib/BasicEntityDateField.tsx index cddb87c..cac8084 100644 --- a/src/lib/BasicEntityDateField.tsx +++ b/src/lib/BasicEntityDateField.tsx @@ -4,6 +4,7 @@ import { TextField } from '@mui/material' import type { Spec } from './basic-types' import { Default, Exact, Gubu, Skip } from 'gubu' +import { BasicEntityFieldError } from './BasicEntityFieldError' const CMPNAME = 'BasicEntityDateField' const { Open } = Gubu @@ -24,13 +25,15 @@ const BasicEntityDateFieldSpecShape = Gubu( { name: CMPNAME } ) -function BasicEntityDateField(props: any) { +function BasicEntityDateField (props: any) { const { spec } = props const basicEntityDateField: Spec = BasicEntityDateFieldSpecShape(spec) - const { field, getValues, register } = basicEntityDateField + const { field, getValues, register, errors } = basicEntityDateField const val = getValues(field.name) + const err = errors[field.name] + return (
0 }} {...register(field.name)} /> +
) } From 217b3b7bff6cec4bbc262254f9e5be11ca60e5d7 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Tue, 30 Jul 2024 20:03:55 +0100 Subject: [PATCH 076/122] Refactor BasicEntityRadioGroupField to include error handling and improve code readability --- src/lib/BasicEntityRadioGroupField.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/BasicEntityRadioGroupField.tsx b/src/lib/BasicEntityRadioGroupField.tsx index f56ec34..5bc23a3 100644 --- a/src/lib/BasicEntityRadioGroupField.tsx +++ b/src/lib/BasicEntityRadioGroupField.tsx @@ -6,6 +6,7 @@ import { Controller } from 'react-hook-form' import type { Spec } from './basic-types' import { Default, Exact, Gubu } from 'gubu' +import { BasicEntityFieldError } from './BasicEntityFieldError' const CMPNAME = 'BasicEntitySliderField' const { Open } = Gubu @@ -40,7 +41,9 @@ function BasicEntityRadioGroupField (props: any) { const { spec } = props const basicEntityRadioGroupField: Spec = BasicEntityRadioGroupFieldSpecShape(spec) - const { control, field } = basicEntityRadioGroupField + const { control, field, errors } = basicEntityRadioGroupField + + const err = errors[field.name] return ( <> @@ -70,6 +73,7 @@ function BasicEntityRadioGroupField (props: any) { )} /> + ) } From 6d501940c7a11fb1d72dab5bf3cee0dba44b9b18 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Tue, 30 Jul 2024 20:04:52 +0100 Subject: [PATCH 077/122] Refactor BasicEntityTimeField to include error handling and improve code readability --- src/lib/BasicEntityTimeField.tsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/lib/BasicEntityTimeField.tsx b/src/lib/BasicEntityTimeField.tsx index 6226bf7..11cd0bd 100644 --- a/src/lib/BasicEntityTimeField.tsx +++ b/src/lib/BasicEntityTimeField.tsx @@ -3,7 +3,8 @@ import { TextField } from '@mui/material' import type { Spec } from './basic-types' -import { Default, Exact, Gubu, Skip } from 'gubu' +import { Default, Exact, Gubu } from 'gubu' +import { BasicEntityFieldError } from './BasicEntityFieldError' const CMPNAME = 'BasicEntityTimeField' const { Open } = Gubu @@ -24,14 +25,16 @@ const BasicEntityTimeFieldSpecShape = Gubu( { name: CMPNAME } ) -function BasicEntityTimeField(props: any) { +function BasicEntityTimeField (props: any) { const { spec } = props const basicEntityTimeField: Spec = BasicEntityTimeFieldSpecShape(spec) - const { field, getValues, register } = basicEntityTimeField + const { field, getValues, register, errors } = basicEntityTimeField const val = getValues(field.name) + const err = errors[field.name] + return (
0 }} {...register(field.name)} {...field.ux.props} /> +
) } From 5ef841f500ccee0c0ee8a22ea5a5fe1414c89068 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Tue, 30 Jul 2024 20:05:09 +0100 Subject: [PATCH 078/122] Refactor BasicEntitySwitchField to fix error handling and remove unused imports --- src/lib/BasicEntitySwitchField.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/lib/BasicEntitySwitchField.tsx b/src/lib/BasicEntitySwitchField.tsx index 064f564..1308988 100644 --- a/src/lib/BasicEntitySwitchField.tsx +++ b/src/lib/BasicEntitySwitchField.tsx @@ -1,11 +1,12 @@ import React, { useEffect, forwardRef } from 'react' -import { FormControlLabel, Checkbox, Box, Switch } from '@mui/material' +import { FormControlLabel, Box, Switch } from '@mui/material' import { Controller } from 'react-hook-form' import type { Spec } from './basic-types' -import { Default, Exact, Gubu, Skip } from 'gubu' +import { Default, Exact, Gubu } from 'gubu' +import { BasicEntityFieldError } from './BasicEntityFieldError' const CMPNAME = 'BasicEntitySliderField' const { Open } = Gubu @@ -26,13 +27,15 @@ const BasicEntitySwitchFieldSpecShape = Gubu( { name: CMPNAME } ) -function BasicEntitySwitchField(props: any) { +function BasicEntitySwitchField (props: any) { const { spec } = props const basicEntitySwitchField: Spec = BasicEntitySwitchFieldSpecShape(spec) - const { control, field, getValues } = basicEntitySwitchField + const { control, field, getValues, errors } = basicEntitySwitchField const val = getValues(field.name) + const err = errors[field.name] + return ( + ) } From fdb7c5cddd1d6a631bddb4b726a3078d18e48721 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Tue, 30 Jul 2024 20:05:30 +0100 Subject: [PATCH 079/122] Refactor BasicEntitySliderField to include error handling and improve code readability --- src/lib/BasicEntitySliderField.tsx | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/lib/BasicEntitySliderField.tsx b/src/lib/BasicEntitySliderField.tsx index e484461..ffdbc21 100644 --- a/src/lib/BasicEntitySliderField.tsx +++ b/src/lib/BasicEntitySliderField.tsx @@ -6,6 +6,7 @@ import { Controller } from 'react-hook-form' import type { Spec } from './basic-types' import { Default, Exact, Gubu } from 'gubu' +import { BasicEntityFieldError } from './BasicEntityFieldError' const CMPNAME = 'BasicEntitySliderField' const { Open } = Gubu @@ -34,15 +35,17 @@ const BasicEntitySliderFieldSpecShape = Gubu( { name: CMPNAME } ) -function BasicEntitySliderField(props: any) { +function BasicEntitySliderField (props: any) { const { spec } = props - const basicEntityAutocompleteField: Spec = - BasicEntitySliderFieldSpecShape(spec) - const { control, field, getValues } = basicEntityAutocompleteField + const basicEntityAutocompleteField: Spec = BasicEntitySliderFieldSpecShape(spec) + const { control, field, getValues, errors } = basicEntityAutocompleteField + + // if cmp not ready, call seneca.add('modify:edit') and seneca.add('modify:save') + const val = getValues(field.name) - // console.log('BESF', field, val) + const err = errors[field.name] return ( <> @@ -67,15 +70,13 @@ function BasicEntitySliderField(props: any) { /> )} /> + ) } -function resolveMarks(marks: any) { - if ( - !marks || - (typeof marks === 'object' && Object.keys(marks).length === 0) - ) { +function resolveMarks (marks: any) { + if (!marks || (typeof marks === 'object' && Object.keys(marks).length === 0)) { return false } if (typeof marks === 'object') { From c9f9368717145c1ce96f33d2de60f27ca1e1e2f9 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Tue, 30 Jul 2024 20:05:50 +0100 Subject: [PATCH 080/122] Refactor BasicEntityToggleButtonField to include error handling and improve code readability --- src/lib/BasicEntityToggleButtonField.tsx | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/lib/BasicEntityToggleButtonField.tsx b/src/lib/BasicEntityToggleButtonField.tsx index ab67672..fdcf51f 100644 --- a/src/lib/BasicEntityToggleButtonField.tsx +++ b/src/lib/BasicEntityToggleButtonField.tsx @@ -1,17 +1,12 @@ import React from 'react' -import { - Button, - ButtonGroup, - ToggleButton, - ToggleButtonGroup, -} from '@mui/material' +import { FormLabel, ToggleButton, ToggleButtonGroup } from '@mui/material' import { Controller } from 'react-hook-form' import type { Spec } from './basic-types' -import { Default, Exact, Gubu, Skip } from 'gubu' -import { on } from 'events' +import { Default, Exact, Gubu } from 'gubu' +import { BasicEntityFieldError } from './BasicEntityFieldError' const CMPNAME = 'BasicEntitySliderField' const { Open } = Gubu @@ -48,10 +43,13 @@ function BasicEntityToggleButtonField (props: any) { const basicEntityToggleButtonField: Spec = BasicEntityToggleButtonFieldSpecShape(spec) - const { control, field } = basicEntityToggleButtonField + const { control, field, errors } = basicEntityToggleButtonField + + const err = errors[field.name] return ( -
+
+ {field.label} )} /> +
) } From a69cae979ecb1f9ddffd517fcdc4d3d9daeaa293 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Tue, 30 Jul 2024 20:06:06 +0100 Subject: [PATCH 081/122] Refactor BasicEntityDateTimeField to include error handling and improve code readability --- src/lib/BasicEntityDateTimeField.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/lib/BasicEntityDateTimeField.tsx b/src/lib/BasicEntityDateTimeField.tsx index a87039b..26fdd78 100644 --- a/src/lib/BasicEntityDateTimeField.tsx +++ b/src/lib/BasicEntityDateTimeField.tsx @@ -4,6 +4,7 @@ import { TextField } from '@mui/material' import type { Spec } from './basic-types' import { Default, Exact, Gubu, Skip } from 'gubu' +import { BasicEntityFieldError } from './BasicEntityFieldError' const CMPNAME = 'BasicEntityDateTimeField' const { Open } = Gubu @@ -24,14 +25,16 @@ const BasicEntityDateTimeFieldSpecShape = Gubu( { name: CMPNAME } ) -function BasicEntityDateTimeField(props: any) { +function BasicEntityDateTimeField (props: any) { const { spec } = props const basicEntityDateTimeField: Spec = BasicEntityDateTimeFieldSpecShape(spec) - const { field, getValues, register } = basicEntityDateTimeField + const { field, getValues, register, errors } = basicEntityDateTimeField const val = getValues(field.name) + const err = errors[field.name] + return (
0 }} {...register(field.name)} /> +
) } From e2f5af314dbbfbf31ab695643bf03275241a25ed Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Tue, 30 Jul 2024 20:06:18 +0100 Subject: [PATCH 082/122] Refactor BasicEntityDateTimeField to remove unused import and improve code readability --- src/lib/BasicEntityDateTimeField.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/BasicEntityDateTimeField.tsx b/src/lib/BasicEntityDateTimeField.tsx index 26fdd78..e1606d0 100644 --- a/src/lib/BasicEntityDateTimeField.tsx +++ b/src/lib/BasicEntityDateTimeField.tsx @@ -3,7 +3,7 @@ import { TextField } from '@mui/material' import type { Spec } from './basic-types' -import { Default, Exact, Gubu, Skip } from 'gubu' +import { Default, Exact, Gubu } from 'gubu' import { BasicEntityFieldError } from './BasicEntityFieldError' const CMPNAME = 'BasicEntityDateTimeField' From b89cbb92daf260e58eee94dd6e61be68acad15cb Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Tue, 30 Jul 2024 20:06:51 +0100 Subject: [PATCH 083/122] Refactor BasicEntityRatingField to remove unused import and improve code readability --- src/lib/BasicEntityRatingField.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/lib/BasicEntityRatingField.tsx b/src/lib/BasicEntityRatingField.tsx index 6cb6c9d..0d39ce5 100644 --- a/src/lib/BasicEntityRatingField.tsx +++ b/src/lib/BasicEntityRatingField.tsx @@ -5,7 +5,8 @@ import { Controller } from 'react-hook-form' import type { Spec } from './basic-types' -import { Default, Exact, Gubu, Skip } from 'gubu' +import { Default, Exact, Gubu } from 'gubu' +import { BasicEntityFieldError } from './BasicEntityFieldError' const CMPNAME = 'BasicEntitySliderField' const { Open } = Gubu @@ -31,14 +32,14 @@ function BasicEntityRatingField (props: any) { const { spec } = props const basicEntityRatingField: Spec = BasicEntityRatingFieldSpecShape(spec) - const { control, field, getValues } = basicEntityRatingField + const { control, field, getValues, errors } = basicEntityRatingField const val = getValues(field.name) - // console.log("BasicEntityRatingField", "val", val); + const err = errors[field.name] return (
- {field.label} + {field.label} )} /> +
) } From 5fc7311b0f06cf3216c44b8e2bc43075557cb583 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Tue, 30 Jul 2024 20:07:01 +0100 Subject: [PATCH 084/122] Refactor BasicEntitySelectField to include error handling and improve code readability --- src/lib/BasicEntitySelectField.tsx | 64 ++++++++++++++++-------------- 1 file changed, 35 insertions(+), 29 deletions(-) diff --git a/src/lib/BasicEntitySelectField.tsx b/src/lib/BasicEntitySelectField.tsx index 81e0359..175b6e5 100644 --- a/src/lib/BasicEntitySelectField.tsx +++ b/src/lib/BasicEntitySelectField.tsx @@ -1,11 +1,12 @@ import React from 'react' -import { FormControl, InputLabel, Select, MenuItem } from '@mui/material' +import { FormControl, InputLabel, Select, MenuItem, Box } from '@mui/material' import { Controller } from 'react-hook-form' import type { Spec } from './basic-types' import { Default, Exact, Gubu } from 'gubu' +import { BasicEntityFieldError } from './BasicEntityFieldError' const CMPNAME = 'BasicEntitySelectField' const { Open } = Gubu @@ -40,36 +41,41 @@ function BasicEntitySelectField (props: any) { const { spec } = props const basicEntitySelectField: Spec = BasicEntitySelectFieldSpecShape(spec) - const { control, field } = basicEntitySelectField + const { control, field, errors } = basicEntitySelectField + + const err = errors[field.name] return ( - ( - - {field.label} - - - )} - /> + + ( + + {field.label} + + + )} + /> + + ) } From 472a82a53f62772c12af73277d42c9153bb4dd54 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Wed, 31 Jul 2024 17:34:40 +0100 Subject: [PATCH 085/122] Add VxgBasicEntityFieldPlugin --- dist/voxgig-model-react.es.js | 436 ++++++++++++++++----------- dist/voxgig-model-react.umd.js | 436 ++++++++++++++++----------- src/lib/BasicEntityButtonField.tsx | 3 +- src/lib/BasicEntityEdit.tsx | 220 +++++++------- src/lib/BasicEntitySliderField.tsx | 10 +- src/lib/VxgBasicEntityFieldPlugin.ts | 66 ++++ src/lib/VxgBasicLedPlugin.ts | 194 ++++++------ 7 files changed, 791 insertions(+), 574 deletions(-) create mode 100644 src/lib/VxgBasicEntityFieldPlugin.ts diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index 6c0d616..c9555c4 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -64672,6 +64672,10 @@ function useForm(props = {}) { _formControl.current.formState = getProxyFormState(formState, control); return _formControl.current; } +function BasicEntityFieldError(props) { + const { err } = props; + return err ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-active", children: err.message }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-none" }); +} const CMPNAME$n = "BasicEntitySliderField"; const { Open: Open$l } = gubu_minExports.Gubu; const BasicEntityCheckboxFieldSpecShape = gubu_minExports.Gubu( @@ -64693,32 +64697,36 @@ const BasicEntityCheckboxFieldSpecShape = gubu_minExports.Gubu( function BasicEntityCheckboxField(props) { const { spec } = props; const basicEntityCheckboxField = BasicEntityCheckboxFieldSpecShape(spec); - const { control, field, getValues } = basicEntityCheckboxField; + const { control, field, getValues, errors } = basicEntityCheckboxField; const val = getValues(field.name); - return /* @__PURE__ */ jsxRuntimeExports.jsx(Box$2, { children: /* @__PURE__ */ jsxRuntimeExports.jsx( - FormControlLabel$1, - { - control: /* @__PURE__ */ jsxRuntimeExports.jsx( - Controller, - { - name: field.name, - control, - defaultValue: !!val, - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( - Checkbox$1, - __spreadValues({ - id: field.id, - checked: value, - onChange, - disabled: !field.ux.edit - }, field.ux.props) - ) - }, - `${field.id}-controller` - ), - label: field.label - } - ) }, `${field.id}-box`); + const err = errors[field.name]; + return /* @__PURE__ */ jsxRuntimeExports.jsxs(Box$2, { children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx( + FormControlLabel$1, + { + control: /* @__PURE__ */ jsxRuntimeExports.jsx( + Controller, + { + name: field.name, + control, + defaultValue: !!val, + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( + Checkbox$1, + __spreadValues({ + id: field.id, + checked: value, + onChange, + disabled: !field.ux.edit + }, field.ux.props) + ) + }, + `${field.id}-controller` + ), + label: field.label + } + ), + /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) + ] }, `${field.id}-box`); } const CMPNAME$m = "BasicEntityAutocompleteField"; const { Open: Open$k } = gubu_minExports.Gubu; @@ -64751,32 +64759,36 @@ const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu( function BasicEntityAutocompleteField(props) { const { spec } = props; const basicEntityAutocompleteField = BasicEntityAutocompleteFieldSpecShape(spec); - const { control, field } = basicEntityAutocompleteField; - return /* @__PURE__ */ jsxRuntimeExports.jsx( - Controller, - { - name: field.name, - control, - defaultValue: resolveDefault$2(field.cat), - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( - Autocomplete$1, - __spreadProps(__spreadValues({ - freeSolo: true, - forcePopupIcon: true, - multiple: field.cat.multiple !== 1, - options: resolveCategories$2(field.cat), - isOptionEqualToValue: (opt, val) => opt === val || (opt == null ? void 0 : opt.id) != null && (val == null ? void 0 : val.id) != null && opt.id === val.id || (opt == null ? void 0 : opt.key) != null && (val == null ? void 0 : val.key) != null && opt.key === val.key, - getOptionLabel: (option) => option.title, - value: resolveValue$1(value, field.cat), - disabled: !field.ux.edit - }, field.ux.props), { - onChange: (_2, newVal) => onChange(newVal), - renderInput: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx(TextField$1, __spreadProps(__spreadValues({}, params), { label: field.label })) - }) - ) - }, - `${field.id}-controller` - ); + const { control, field, errors } = basicEntityAutocompleteField; + const err = errors[field.name]; + return /* @__PURE__ */ jsxRuntimeExports.jsxs(Box$2, { children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx( + Controller, + { + name: field.name, + control, + defaultValue: resolveDefault$2(field.cat), + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( + Autocomplete$1, + __spreadProps(__spreadValues({ + freeSolo: true, + forcePopupIcon: true, + multiple: field.cat.multiple !== 1, + options: resolveCategories$2(field.cat), + isOptionEqualToValue: (opt, val) => opt === val || (opt == null ? void 0 : opt.id) != null && (val == null ? void 0 : val.id) != null && opt.id === val.id || (opt == null ? void 0 : opt.key) != null && (val == null ? void 0 : val.key) != null && opt.key === val.key, + getOptionLabel: (option) => option.title, + value: resolveValue$1(value, field.cat), + disabled: !field.ux.edit + }, field.ux.props), { + onChange: (_2, newVal) => onChange(newVal), + renderInput: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx(TextField$1, __spreadProps(__spreadValues({}, params), { label: field.label })) + }) + ) + }, + `${field.id}-controller` + ), + /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) + ] }, `${field.id}-box`); } function resolveCategories$2(cat) { return Object.keys(cat.item).map((key) => { @@ -64864,8 +64876,9 @@ const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu( function BasicEntitySliderField(props) { const { spec } = props; const basicEntityAutocompleteField = BasicEntitySliderFieldSpecShape(spec); - const { control, field, getValues } = basicEntityAutocompleteField; + const { control, field, getValues, errors } = basicEntityAutocompleteField; const val = getValues(field.name); + const err = errors[field.name]; return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx(FormLabel$1, { children: field.label }, `${field.id}-label`), /* @__PURE__ */ jsxRuntimeExports.jsx( @@ -64891,7 +64904,8 @@ function BasicEntitySliderField(props) { ) }, `${field.id}-controller` - ) + ), + /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }); } function resolveMarks(marks) { @@ -64937,7 +64951,8 @@ const BasicEntityRadioGroupFieldSpecShape = gubu_minExports.Gubu( function BasicEntityRadioGroupField(props) { const { spec } = props; const basicEntityRadioGroupField = BasicEntityRadioGroupFieldSpecShape(spec); - const { control, field } = basicEntityRadioGroupField; + const { control, field, errors } = basicEntityRadioGroupField; + const err = errors[field.name]; return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx(FormLabel$1, { children: field.label }, `${field.id}-label`), /* @__PURE__ */ jsxRuntimeExports.jsx( @@ -64946,10 +64961,30 @@ function BasicEntityRadioGroupField(props) { name: field.name, control, defaultValue: field.cat.default, - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx(RadioGroup, __spreadProps(__spreadValues({ value, onChange, row: "row" === field.ux.direction, disabled: !field.ux.edit }, field.ux.props), { children: resolveCategories$1(field.cat).map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx(FormControlLabel$1, { value: option.key, control: /* @__PURE__ */ jsxRuntimeExports.jsx(Radio$1, { disabled: !field.ux.edit }), label: option.title }, `${option.key}-option`)) }), field.id) + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( + RadioGroup, + __spreadProps(__spreadValues({ + value, + onChange, + row: "row" === field.ux.direction, + disabled: !field.ux.edit + }, field.ux.props), { + children: resolveCategories$1(field.cat).map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx( + FormControlLabel$1, + { + value: option.key, + control: /* @__PURE__ */ jsxRuntimeExports.jsx(Radio$1, { disabled: !field.ux.edit }), + label: option.title + }, + `${option.key}-option` + )) + }), + field.id + ) }, `${field.id}-controller` - ) + ), + /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }); } function resolveCategories$1(cat) { @@ -64986,27 +65021,26 @@ const BasicEntityTextBoxFieldSpecShape = gubu_minExports.Gubu( function BasicEntityTextBoxField(props) { const { spec } = props; const basicEntityTextBoxField = BasicEntityTextBoxFieldSpecShape(spec); - const { field, getValues, register } = basicEntityTextBoxField; + const { field, getValues, register, errors } = basicEntityTextBoxField; const val = getValues(field.name); - return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx( - TextField$1, - __spreadValues(__spreadProps(__spreadValues({ - id: field.id, - name: field.name, - label: field.label, - variant: "outlined", - fullWidth: true, - multiline: true, - rows: field.ux.rows, - InputLabelProps: { shrink: (val == null ? void 0 : val.length) > 0 } - }, register(field.name)), { - disabled: !field.ux.edit - }), field.ux.props) - ) }, field.name); -} -function BasicEntityFieldError(props) { - const { err } = props; - return err ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-active", children: err.message }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-none" }); + const err = errors[field.name]; + return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx( + TextField$1, + __spreadValues(__spreadValues({ + id: field.id, + name: field.name, + label: field.label, + variant: "outlined", + fullWidth: true, + multiline: true, + rows: field.ux.rows, + InputLabelProps: { shrink: (val == null ? void 0 : val.length) > 0 }, + disabled: !field.ux.edit + }, field.ux.props), register(field.name)) + ), + /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) + ] }, field.name); } const CMPNAME$i = "BasicEntityTextField"; const { Open: Open$g } = gubu_minExports.Gubu; @@ -65070,21 +65104,25 @@ const BasicEntityDateFieldSpecShape = gubu_minExports.Gubu( function BasicEntityDateField(props) { const { spec } = props; const basicEntityDateField = BasicEntityDateFieldSpecShape(spec); - const { field, getValues, register } = basicEntityDateField; + const { field, getValues, register, errors } = basicEntityDateField; const val = getValues(field.name); - return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx( - TextField$1, - __spreadValues({ - id: field.id, - name: field.name, - label: field.label, - fullWidth: true, - variant: "outlined", - type: "date", - disabled: !field.ux.edit, - InputLabelProps: { shrink: (val == null ? void 0 : val.length) > 0 } - }, register(field.name)) - ) }, field.id); + const err = errors[field.name]; + return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx( + TextField$1, + __spreadValues({ + id: field.id, + name: field.name, + label: field.label, + fullWidth: true, + variant: "outlined", + type: "date", + disabled: !field.ux.edit, + InputLabelProps: { shrink: (val == null ? void 0 : val.length) > 0 } + }, register(field.name)) + ), + /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) + ] }, field.id); } const CMPNAME$g = "BasicEntityTimeField"; const { Open: Open$e } = gubu_minExports.Gubu; @@ -65107,21 +65145,25 @@ const BasicEntityTimeFieldSpecShape = gubu_minExports.Gubu( function BasicEntityTimeField(props) { const { spec } = props; const basicEntityTimeField = BasicEntityTimeFieldSpecShape(spec); - const { field, getValues, register } = basicEntityTimeField; + const { field, getValues, register, errors } = basicEntityTimeField; const val = getValues(field.name); - return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx( - TextField$1, - __spreadValues(__spreadValues({ - id: field.id, - name: field.name, - label: field.label, - fullWidth: true, - variant: "outlined", - type: "time", - disabled: !field.ux.edit, - InputLabelProps: { shrink: (val == null ? void 0 : val.length) > 0 } - }, register(field.name)), field.ux.props) - ) }, field.id); + const err = errors[field.name]; + return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx( + TextField$1, + __spreadValues(__spreadValues({ + id: field.id, + name: field.name, + label: field.label, + fullWidth: true, + variant: "outlined", + type: "time", + disabled: !field.ux.edit, + InputLabelProps: { shrink: (val == null ? void 0 : val.length) > 0 } + }, register(field.name)), field.ux.props) + ), + /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) + ] }, field.id); } const CMPNAME$f = "BasicEntityDateTimeField"; const { Open: Open$d } = gubu_minExports.Gubu; @@ -65144,21 +65186,25 @@ const BasicEntityDateTimeFieldSpecShape = gubu_minExports.Gubu( function BasicEntityDateTimeField(props) { const { spec } = props; const basicEntityDateTimeField = BasicEntityDateTimeFieldSpecShape(spec); - const { field, getValues, register } = basicEntityDateTimeField; + const { field, getValues, register, errors } = basicEntityDateTimeField; const val = getValues(field.name); - return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx( - TextField$1, - __spreadValues({ - id: field.id, - name: field.name, - label: field.label, - fullWidth: true, - variant: "outlined", - type: "datetime-local", - disabled: !field.ux.edit, - InputLabelProps: { shrink: (val == null ? void 0 : val.length) > 0 } - }, register(field.name)) - ) }, field.id); + const err = errors[field.name]; + return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx( + TextField$1, + __spreadValues({ + id: field.id, + name: field.name, + label: field.label, + fullWidth: true, + variant: "outlined", + type: "datetime-local", + disabled: !field.ux.edit, + InputLabelProps: { shrink: (val == null ? void 0 : val.length) > 0 } + }, register(field.name)) + ), + /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) + ] }, field.id); } const CMPNAME$e = "BasicEntitySliderField"; const { Open: Open$c } = gubu_minExports.Gubu; @@ -65182,8 +65228,9 @@ const BasicEntityRatingFieldSpecShape = gubu_minExports.Gubu( function BasicEntityRatingField(props) { const { spec } = props; const basicEntityRatingField = BasicEntityRatingFieldSpecShape(spec); - const { control, field, getValues } = basicEntityRatingField; + const { control, field, getValues, errors } = basicEntityRatingField; const val = getValues(field.name); + const err = errors[field.name]; return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx(FormLabel$1, { component: "legend", children: field.label }), /* @__PURE__ */ jsxRuntimeExports.jsx( @@ -65204,7 +65251,8 @@ function BasicEntityRatingField(props) { ) }, `${field.id}-controller` - ) + ), + /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, `${field.id}-div`); } const CMPNAME$d = "BasicEntitySliderField"; @@ -65321,20 +65369,37 @@ const BasicEntitySelectFieldSpecShape = gubu_minExports.Gubu( function BasicEntitySelectField(props) { const { spec } = props; const basicEntitySelectField = BasicEntitySelectFieldSpecShape(spec); - const { control, field } = basicEntitySelectField; - return /* @__PURE__ */ jsxRuntimeExports.jsx( - Controller, - { - name: field.name, - control, - defaultValue: resolveDefault(field.cat), - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(FormControl$1, { fullWidth: true, children: [ - /* @__PURE__ */ jsxRuntimeExports.jsx(InputLabel$1, { id: `${field.id}-label`, children: field.label }), - /* @__PURE__ */ jsxRuntimeExports.jsx(Select$1, __spreadProps(__spreadValues({ labelId: `${field.id}-label`, id: `${field.id}-select`, value: resolveValue(value, field.cat), multiple: field.cat.multiple !== 1, label: field.name, onChange: (event) => onChange(event.target.value), disabled: !field.ux.edit }, field.ux.props), { children: resolveCategories(field.cat).map((opt) => /* @__PURE__ */ jsxRuntimeExports.jsx(MenuItem$1, { value: opt.key, children: opt.title }, opt.key)) })) - ] }) - }, - `${field.id}-controller` - ); + const { control, field, errors } = basicEntitySelectField; + const err = errors[field.name]; + return /* @__PURE__ */ jsxRuntimeExports.jsxs(Box$2, { children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx( + Controller, + { + name: field.name, + control, + defaultValue: resolveDefault(field.cat), + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(FormControl$1, { fullWidth: true, children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx(InputLabel$1, { id: `${field.id}-label`, children: field.label }), + /* @__PURE__ */ jsxRuntimeExports.jsx( + Select$1, + __spreadProps(__spreadValues({ + labelId: `${field.id}-label`, + id: `${field.id}-select`, + value: resolveValue(value, field.cat), + multiple: field.cat.multiple !== 1, + label: field.name, + onChange: (event) => onChange(event.target.value), + disabled: !field.ux.edit + }, field.ux.props), { + children: resolveCategories(field.cat).map((opt) => /* @__PURE__ */ jsxRuntimeExports.jsx(MenuItem$1, { value: opt.key, children: opt.title }, opt.key)) + }) + ) + ] }) + }, + `${field.id}-controller` + ), + /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) + ] }, `${field.id}-box`); } function resolveCategories(cat) { return Object.keys(cat.item).map((key) => { @@ -65404,32 +65469,36 @@ const BasicEntitySwitchFieldSpecShape = gubu_minExports.Gubu( function BasicEntitySwitchField(props) { const { spec } = props; const basicEntitySwitchField = BasicEntitySwitchFieldSpecShape(spec); - const { control, field, getValues } = basicEntitySwitchField; + const { control, field, getValues, errors } = basicEntitySwitchField; const val = getValues(field.name); - return /* @__PURE__ */ jsxRuntimeExports.jsx(Box$2, { children: /* @__PURE__ */ jsxRuntimeExports.jsx( - FormControlLabel$1, - { - control: /* @__PURE__ */ jsxRuntimeExports.jsx( - Controller, - { - name: field.name, - control, - defaultValue: !!val, - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( - Switch$1, - __spreadValues({ - id: field.id, - checked: value, - onChange, - disabled: !field.ux.edit - }, field.ux.props) - ) - }, - `${field.id}-controller` - ), - label: field.label - } - ) }, `${field.id}-box`); + const err = errors[field.name]; + return /* @__PURE__ */ jsxRuntimeExports.jsxs(Box$2, { children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx( + FormControlLabel$1, + { + control: /* @__PURE__ */ jsxRuntimeExports.jsx( + Controller, + { + name: field.name, + control, + defaultValue: !!val, + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( + Switch$1, + __spreadValues({ + id: field.id, + checked: value, + onChange, + disabled: !field.ux.edit + }, field.ux.props) + ) + }, + `${field.id}-controller` + ), + label: field.label + } + ), + /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) + ] }, `${field.id}-box`); } const CMPNAME$9 = "BasicEntitySliderField"; const { Open: Open$7 } = gubu_minExports.Gubu; @@ -65463,28 +65532,33 @@ const BasicEntityToggleButtonFieldSpecShape = gubu_minExports.Gubu( function BasicEntityToggleButtonField(props) { const { spec } = props; const basicEntityToggleButtonField = BasicEntityToggleButtonFieldSpecShape(spec); - const { control, field } = basicEntityToggleButtonField; - return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx( - Controller, - { - name: field.name, - control, - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( - ToggleButtonGroup, - __spreadProps(__spreadValues({ - value, - exclusive: field.cat.multiple === 1 ? true : false, - onChange: (_2, v) => { - field.cat.multiple === 1 ? onChange(v) : onChange([v]); - }, - disabled: !field.ux.edit - }, field.ux.props), { - children: Object.entries(field.cat.item).map(([key, val]) => /* @__PURE__ */ jsxRuntimeExports.jsx(ToggleButton, { value: key, children: val == null ? void 0 : val.title }, `${field.id}-${key}`)) - }) - ) - }, - `${field.id}-controller` - ) }, `${field.id}-div`); + const { control, field, errors } = basicEntityToggleButtonField; + const err = errors[field.name]; + return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx(FormLabel$1, { component: "legend", children: field.label }), + /* @__PURE__ */ jsxRuntimeExports.jsx( + Controller, + { + name: field.name, + control, + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( + ToggleButtonGroup, + __spreadProps(__spreadValues({ + value, + exclusive: field.cat.multiple === 1 ? true : false, + onChange: (_2, v) => { + field.cat.multiple === 1 ? onChange(v) : onChange([v]); + }, + disabled: !field.ux.edit + }, field.ux.props), { + children: Object.entries(field.cat.item).map(([key, val]) => /* @__PURE__ */ jsxRuntimeExports.jsx(ToggleButton, { value: key, children: val == null ? void 0 : val.title }, `${field.id}-${key}`)) + }) + ) + }, + `${field.id}-controller` + ), + /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) + ] }, `${field.id}-box`); } const CMPNAME$8 = "BasicEntityField"; const { Open: Open$6 } = gubu_minExports.Gubu; diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index b161361..b29086d 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -64684,6 +64684,10 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha _formControl.current.formState = getProxyFormState(formState, control); return _formControl.current; } + function BasicEntityFieldError(props) { + const { err } = props; + return err ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-active", children: err.message }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-none" }); + } const CMPNAME$n = "BasicEntitySliderField"; const { Open: Open$l } = gubu_minExports.Gubu; const BasicEntityCheckboxFieldSpecShape = gubu_minExports.Gubu( @@ -64705,32 +64709,36 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha function BasicEntityCheckboxField(props) { const { spec } = props; const basicEntityCheckboxField = BasicEntityCheckboxFieldSpecShape(spec); - const { control, field, getValues } = basicEntityCheckboxField; + const { control, field, getValues, errors } = basicEntityCheckboxField; const val = getValues(field.name); - return /* @__PURE__ */ jsxRuntimeExports.jsx(material.Box, { children: /* @__PURE__ */ jsxRuntimeExports.jsx( - material.FormControlLabel, - { - control: /* @__PURE__ */ jsxRuntimeExports.jsx( - Controller, - { - name: field.name, - control, - defaultValue: !!val, - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( - material.Checkbox, - __spreadValues({ - id: field.id, - checked: value, - onChange, - disabled: !field.ux.edit - }, field.ux.props) - ) - }, - `${field.id}-controller` - ), - label: field.label - } - ) }, `${field.id}-box`); + const err = errors[field.name]; + return /* @__PURE__ */ jsxRuntimeExports.jsxs(material.Box, { children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx( + material.FormControlLabel, + { + control: /* @__PURE__ */ jsxRuntimeExports.jsx( + Controller, + { + name: field.name, + control, + defaultValue: !!val, + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( + material.Checkbox, + __spreadValues({ + id: field.id, + checked: value, + onChange, + disabled: !field.ux.edit + }, field.ux.props) + ) + }, + `${field.id}-controller` + ), + label: field.label + } + ), + /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) + ] }, `${field.id}-box`); } const CMPNAME$m = "BasicEntityAutocompleteField"; const { Open: Open$k } = gubu_minExports.Gubu; @@ -64763,32 +64771,36 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha function BasicEntityAutocompleteField(props) { const { spec } = props; const basicEntityAutocompleteField = BasicEntityAutocompleteFieldSpecShape(spec); - const { control, field } = basicEntityAutocompleteField; - return /* @__PURE__ */ jsxRuntimeExports.jsx( - Controller, - { - name: field.name, - control, - defaultValue: resolveDefault$2(field.cat), - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( - material.Autocomplete, - __spreadProps(__spreadValues({ - freeSolo: true, - forcePopupIcon: true, - multiple: field.cat.multiple !== 1, - options: resolveCategories$2(field.cat), - isOptionEqualToValue: (opt, val) => opt === val || (opt == null ? void 0 : opt.id) != null && (val == null ? void 0 : val.id) != null && opt.id === val.id || (opt == null ? void 0 : opt.key) != null && (val == null ? void 0 : val.key) != null && opt.key === val.key, - getOptionLabel: (option) => option.title, - value: resolveValue$1(value, field.cat), - disabled: !field.ux.edit - }, field.ux.props), { - onChange: (_2, newVal) => onChange(newVal), - renderInput: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.TextField, __spreadProps(__spreadValues({}, params), { label: field.label })) - }) - ) - }, - `${field.id}-controller` - ); + const { control, field, errors } = basicEntityAutocompleteField; + const err = errors[field.name]; + return /* @__PURE__ */ jsxRuntimeExports.jsxs(material.Box, { children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx( + Controller, + { + name: field.name, + control, + defaultValue: resolveDefault$2(field.cat), + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( + material.Autocomplete, + __spreadProps(__spreadValues({ + freeSolo: true, + forcePopupIcon: true, + multiple: field.cat.multiple !== 1, + options: resolveCategories$2(field.cat), + isOptionEqualToValue: (opt, val) => opt === val || (opt == null ? void 0 : opt.id) != null && (val == null ? void 0 : val.id) != null && opt.id === val.id || (opt == null ? void 0 : opt.key) != null && (val == null ? void 0 : val.key) != null && opt.key === val.key, + getOptionLabel: (option) => option.title, + value: resolveValue$1(value, field.cat), + disabled: !field.ux.edit + }, field.ux.props), { + onChange: (_2, newVal) => onChange(newVal), + renderInput: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.TextField, __spreadProps(__spreadValues({}, params), { label: field.label })) + }) + ) + }, + `${field.id}-controller` + ), + /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) + ] }, `${field.id}-box`); } function resolveCategories$2(cat) { return Object.keys(cat.item).map((key) => { @@ -64876,8 +64888,9 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha function BasicEntitySliderField(props) { const { spec } = props; const basicEntityAutocompleteField = BasicEntitySliderFieldSpecShape(spec); - const { control, field, getValues } = basicEntityAutocompleteField; + const { control, field, getValues, errors } = basicEntityAutocompleteField; const val = getValues(field.name); + const err = errors[field.name]; return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx(material.FormLabel, { children: field.label }, `${field.id}-label`), /* @__PURE__ */ jsxRuntimeExports.jsx( @@ -64903,7 +64916,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ) }, `${field.id}-controller` - ) + ), + /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }); } function resolveMarks(marks) { @@ -64949,7 +64963,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha function BasicEntityRadioGroupField(props) { const { spec } = props; const basicEntityRadioGroupField = BasicEntityRadioGroupFieldSpecShape(spec); - const { control, field } = basicEntityRadioGroupField; + const { control, field, errors } = basicEntityRadioGroupField; + const err = errors[field.name]; return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx(material.FormLabel, { children: field.label }, `${field.id}-label`), /* @__PURE__ */ jsxRuntimeExports.jsx( @@ -64958,10 +64973,30 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha name: field.name, control, defaultValue: field.cat.default, - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.RadioGroup, __spreadProps(__spreadValues({ value, onChange, row: "row" === field.ux.direction, disabled: !field.ux.edit }, field.ux.props), { children: resolveCategories$1(field.cat).map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.FormControlLabel, { value: option.key, control: /* @__PURE__ */ jsxRuntimeExports.jsx(material.Radio, { disabled: !field.ux.edit }), label: option.title }, `${option.key}-option`)) }), field.id) + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( + material.RadioGroup, + __spreadProps(__spreadValues({ + value, + onChange, + row: "row" === field.ux.direction, + disabled: !field.ux.edit + }, field.ux.props), { + children: resolveCategories$1(field.cat).map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx( + material.FormControlLabel, + { + value: option.key, + control: /* @__PURE__ */ jsxRuntimeExports.jsx(material.Radio, { disabled: !field.ux.edit }), + label: option.title + }, + `${option.key}-option` + )) + }), + field.id + ) }, `${field.id}-controller` - ) + ), + /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }); } function resolveCategories$1(cat) { @@ -64998,27 +65033,26 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha function BasicEntityTextBoxField(props) { const { spec } = props; const basicEntityTextBoxField = BasicEntityTextBoxFieldSpecShape(spec); - const { field, getValues, register } = basicEntityTextBoxField; + const { field, getValues, register, errors } = basicEntityTextBoxField; const val = getValues(field.name); - return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx( - material.TextField, - __spreadValues(__spreadProps(__spreadValues({ - id: field.id, - name: field.name, - label: field.label, - variant: "outlined", - fullWidth: true, - multiline: true, - rows: field.ux.rows, - InputLabelProps: { shrink: (val == null ? void 0 : val.length) > 0 } - }, register(field.name)), { - disabled: !field.ux.edit - }), field.ux.props) - ) }, field.name); - } - function BasicEntityFieldError(props) { - const { err } = props; - return err ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-active", children: err.message }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-none" }); + const err = errors[field.name]; + return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx( + material.TextField, + __spreadValues(__spreadValues({ + id: field.id, + name: field.name, + label: field.label, + variant: "outlined", + fullWidth: true, + multiline: true, + rows: field.ux.rows, + InputLabelProps: { shrink: (val == null ? void 0 : val.length) > 0 }, + disabled: !field.ux.edit + }, field.ux.props), register(field.name)) + ), + /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) + ] }, field.name); } const CMPNAME$i = "BasicEntityTextField"; const { Open: Open$g } = gubu_minExports.Gubu; @@ -65082,21 +65116,25 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha function BasicEntityDateField(props) { const { spec } = props; const basicEntityDateField = BasicEntityDateFieldSpecShape(spec); - const { field, getValues, register } = basicEntityDateField; + const { field, getValues, register, errors } = basicEntityDateField; const val = getValues(field.name); - return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx( - material.TextField, - __spreadValues({ - id: field.id, - name: field.name, - label: field.label, - fullWidth: true, - variant: "outlined", - type: "date", - disabled: !field.ux.edit, - InputLabelProps: { shrink: (val == null ? void 0 : val.length) > 0 } - }, register(field.name)) - ) }, field.id); + const err = errors[field.name]; + return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx( + material.TextField, + __spreadValues({ + id: field.id, + name: field.name, + label: field.label, + fullWidth: true, + variant: "outlined", + type: "date", + disabled: !field.ux.edit, + InputLabelProps: { shrink: (val == null ? void 0 : val.length) > 0 } + }, register(field.name)) + ), + /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) + ] }, field.id); } const CMPNAME$g = "BasicEntityTimeField"; const { Open: Open$e } = gubu_minExports.Gubu; @@ -65119,21 +65157,25 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha function BasicEntityTimeField(props) { const { spec } = props; const basicEntityTimeField = BasicEntityTimeFieldSpecShape(spec); - const { field, getValues, register } = basicEntityTimeField; + const { field, getValues, register, errors } = basicEntityTimeField; const val = getValues(field.name); - return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx( - material.TextField, - __spreadValues(__spreadValues({ - id: field.id, - name: field.name, - label: field.label, - fullWidth: true, - variant: "outlined", - type: "time", - disabled: !field.ux.edit, - InputLabelProps: { shrink: (val == null ? void 0 : val.length) > 0 } - }, register(field.name)), field.ux.props) - ) }, field.id); + const err = errors[field.name]; + return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx( + material.TextField, + __spreadValues(__spreadValues({ + id: field.id, + name: field.name, + label: field.label, + fullWidth: true, + variant: "outlined", + type: "time", + disabled: !field.ux.edit, + InputLabelProps: { shrink: (val == null ? void 0 : val.length) > 0 } + }, register(field.name)), field.ux.props) + ), + /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) + ] }, field.id); } const CMPNAME$f = "BasicEntityDateTimeField"; const { Open: Open$d } = gubu_minExports.Gubu; @@ -65156,21 +65198,25 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha function BasicEntityDateTimeField(props) { const { spec } = props; const basicEntityDateTimeField = BasicEntityDateTimeFieldSpecShape(spec); - const { field, getValues, register } = basicEntityDateTimeField; + const { field, getValues, register, errors } = basicEntityDateTimeField; const val = getValues(field.name); - return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx( - material.TextField, - __spreadValues({ - id: field.id, - name: field.name, - label: field.label, - fullWidth: true, - variant: "outlined", - type: "datetime-local", - disabled: !field.ux.edit, - InputLabelProps: { shrink: (val == null ? void 0 : val.length) > 0 } - }, register(field.name)) - ) }, field.id); + const err = errors[field.name]; + return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx( + material.TextField, + __spreadValues({ + id: field.id, + name: field.name, + label: field.label, + fullWidth: true, + variant: "outlined", + type: "datetime-local", + disabled: !field.ux.edit, + InputLabelProps: { shrink: (val == null ? void 0 : val.length) > 0 } + }, register(field.name)) + ), + /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) + ] }, field.id); } const CMPNAME$e = "BasicEntitySliderField"; const { Open: Open$c } = gubu_minExports.Gubu; @@ -65194,8 +65240,9 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha function BasicEntityRatingField(props) { const { spec } = props; const basicEntityRatingField = BasicEntityRatingFieldSpecShape(spec); - const { control, field, getValues } = basicEntityRatingField; + const { control, field, getValues, errors } = basicEntityRatingField; const val = getValues(field.name); + const err = errors[field.name]; return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx(material.FormLabel, { component: "legend", children: field.label }), /* @__PURE__ */ jsxRuntimeExports.jsx( @@ -65216,7 +65263,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ) }, `${field.id}-controller` - ) + ), + /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, `${field.id}-div`); } const CMPNAME$d = "BasicEntitySliderField"; @@ -65333,20 +65381,37 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha function BasicEntitySelectField(props) { const { spec } = props; const basicEntitySelectField = BasicEntitySelectFieldSpecShape(spec); - const { control, field } = basicEntitySelectField; - return /* @__PURE__ */ jsxRuntimeExports.jsx( - Controller, - { - name: field.name, - control, - defaultValue: resolveDefault(field.cat), - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(material.FormControl, { fullWidth: true, children: [ - /* @__PURE__ */ jsxRuntimeExports.jsx(material.InputLabel, { id: `${field.id}-label`, children: field.label }), - /* @__PURE__ */ jsxRuntimeExports.jsx(material.Select, __spreadProps(__spreadValues({ labelId: `${field.id}-label`, id: `${field.id}-select`, value: resolveValue(value, field.cat), multiple: field.cat.multiple !== 1, label: field.name, onChange: (event) => onChange(event.target.value), disabled: !field.ux.edit }, field.ux.props), { children: resolveCategories(field.cat).map((opt) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.MenuItem, { value: opt.key, children: opt.title }, opt.key)) })) - ] }) - }, - `${field.id}-controller` - ); + const { control, field, errors } = basicEntitySelectField; + const err = errors[field.name]; + return /* @__PURE__ */ jsxRuntimeExports.jsxs(material.Box, { children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx( + Controller, + { + name: field.name, + control, + defaultValue: resolveDefault(field.cat), + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(material.FormControl, { fullWidth: true, children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx(material.InputLabel, { id: `${field.id}-label`, children: field.label }), + /* @__PURE__ */ jsxRuntimeExports.jsx( + material.Select, + __spreadProps(__spreadValues({ + labelId: `${field.id}-label`, + id: `${field.id}-select`, + value: resolveValue(value, field.cat), + multiple: field.cat.multiple !== 1, + label: field.name, + onChange: (event) => onChange(event.target.value), + disabled: !field.ux.edit + }, field.ux.props), { + children: resolveCategories(field.cat).map((opt) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.MenuItem, { value: opt.key, children: opt.title }, opt.key)) + }) + ) + ] }) + }, + `${field.id}-controller` + ), + /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) + ] }, `${field.id}-box`); } function resolveCategories(cat) { return Object.keys(cat.item).map((key) => { @@ -65416,32 +65481,36 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha function BasicEntitySwitchField(props) { const { spec } = props; const basicEntitySwitchField = BasicEntitySwitchFieldSpecShape(spec); - const { control, field, getValues } = basicEntitySwitchField; + const { control, field, getValues, errors } = basicEntitySwitchField; const val = getValues(field.name); - return /* @__PURE__ */ jsxRuntimeExports.jsx(material.Box, { children: /* @__PURE__ */ jsxRuntimeExports.jsx( - material.FormControlLabel, - { - control: /* @__PURE__ */ jsxRuntimeExports.jsx( - Controller, - { - name: field.name, - control, - defaultValue: !!val, - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( - material.Switch, - __spreadValues({ - id: field.id, - checked: value, - onChange, - disabled: !field.ux.edit - }, field.ux.props) - ) - }, - `${field.id}-controller` - ), - label: field.label - } - ) }, `${field.id}-box`); + const err = errors[field.name]; + return /* @__PURE__ */ jsxRuntimeExports.jsxs(material.Box, { children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx( + material.FormControlLabel, + { + control: /* @__PURE__ */ jsxRuntimeExports.jsx( + Controller, + { + name: field.name, + control, + defaultValue: !!val, + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( + material.Switch, + __spreadValues({ + id: field.id, + checked: value, + onChange, + disabled: !field.ux.edit + }, field.ux.props) + ) + }, + `${field.id}-controller` + ), + label: field.label + } + ), + /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) + ] }, `${field.id}-box`); } const CMPNAME$9 = "BasicEntitySliderField"; const { Open: Open$7 } = gubu_minExports.Gubu; @@ -65475,28 +65544,33 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha function BasicEntityToggleButtonField(props) { const { spec } = props; const basicEntityToggleButtonField = BasicEntityToggleButtonFieldSpecShape(spec); - const { control, field } = basicEntityToggleButtonField; - return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx( - Controller, - { - name: field.name, - control, - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( - material.ToggleButtonGroup, - __spreadProps(__spreadValues({ - value, - exclusive: field.cat.multiple === 1 ? true : false, - onChange: (_2, v) => { - field.cat.multiple === 1 ? onChange(v) : onChange([v]); - }, - disabled: !field.ux.edit - }, field.ux.props), { - children: Object.entries(field.cat.item).map(([key, val]) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.ToggleButton, { value: key, children: val == null ? void 0 : val.title }, `${field.id}-${key}`)) - }) - ) - }, - `${field.id}-controller` - ) }, `${field.id}-div`); + const { control, field, errors } = basicEntityToggleButtonField; + const err = errors[field.name]; + return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx(material.FormLabel, { component: "legend", children: field.label }), + /* @__PURE__ */ jsxRuntimeExports.jsx( + Controller, + { + name: field.name, + control, + render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( + material.ToggleButtonGroup, + __spreadProps(__spreadValues({ + value, + exclusive: field.cat.multiple === 1 ? true : false, + onChange: (_2, v) => { + field.cat.multiple === 1 ? onChange(v) : onChange([v]); + }, + disabled: !field.ux.edit + }, field.ux.props), { + children: Object.entries(field.cat.item).map(([key, val]) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.ToggleButton, { value: key, children: val == null ? void 0 : val.title }, `${field.id}-${key}`)) + }) + ) + }, + `${field.id}-controller` + ), + /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) + ] }, `${field.id}-box`); } const CMPNAME$8 = "BasicEntityField"; const { Open: Open$6 } = gubu_minExports.Gubu; diff --git a/src/lib/BasicEntityButtonField.tsx b/src/lib/BasicEntityButtonField.tsx index 12e31cc..8754bb3 100644 --- a/src/lib/BasicEntityButtonField.tsx +++ b/src/lib/BasicEntityButtonField.tsx @@ -1,7 +1,6 @@ import React from 'react' import { Button } from '@mui/material' -import { Controller } from 'react-hook-form' import type { Spec } from './basic-types' @@ -27,7 +26,7 @@ const BasicEntityButtonFieldSpecShape = Gubu( { name: CMPNAME } ) -function BasicEntityButtonField(props: any) { +function BasicEntityButtonField (props: any) { const { spec } = props const basicEntityButtonField: Spec = BasicEntityButtonFieldSpecShape(spec) diff --git a/src/lib/BasicEntityEdit.tsx b/src/lib/BasicEntityEdit.tsx index 59da3d8..02c2b76 100644 --- a/src/lib/BasicEntityEdit.tsx +++ b/src/lib/BasicEntityEdit.tsx @@ -4,125 +4,130 @@ import { useSelector } from 'react-redux' import { useParams } from 'react-router-dom' - -import { - Box, - Grid, - Button, - Toolbar, -} from '@mui/material' +import { Box, Grid, Button, Toolbar } from '@mui/material' import { useForm } from 'react-hook-form' - import { BasicEntityField } from './BasicEntityField' - import { VxgBasicEntityEditPlugin } from './VxgBasicEntityEditPlugin' - const CMPNAME = 'BasicEntityEdit' - // TODO: make this debuggable // Resolver for react-hook-form -const makeResolver = (seneca:any, spec:any) => useCallback(async (data:any) => { - const { ent, name } = spec - - const view = name - let entity = seneca.entity(ent) - - entity = entity.make$().data$(data) - let errors = entity.valid$({errors:true}) - - // Emit a seneca message to provide errors for other uses - debugging etc. - // To listen for these, use seneca.sub('aim:app,on:BasicLed,entity:valid,view:VIEW', listener) - // Also useful for introspecting the error details for gubu-errmsg patterns - seneca.act('aim:app,on:BasicLed,entity:valid',{ - view, - entity, - errors, - }) - - // TODO: need a better way to access this; also namespaced! - // NOTE: uses gubu-errmsg - const errmsg = seneca.context.errmsg - - // Convert to react-hook-form errors - errors = errors - .map((e:any)=>(e.tag_kind='ent',e)) - .reduce((a:any,e:any,_:any)=>(a[e.key]={ - type: e.type, - message: errmsg ? ((_=errmsg.find(e))?_.text:e.text) : e.text - },a),{}) - - const values = entity.data$(false) - const out = { - values, - errors, - } +const makeResolver = (seneca: any, spec: any) => + useCallback( + async (data: any) => { + const { ent, name } = spec + + const view = name + let entity = seneca.entity(ent) + + entity = entity.make$().data$(data) + let errors = entity.valid$({ errors: true }) + + // Emit a seneca message to provide errors for other uses - debugging etc. + // To listen for these, use seneca.sub('aim:app,on:BasicLed,entity:valid,view:VIEW', listener) + // Also useful for introspecting the error details for gubu-errmsg patterns + seneca.act('aim:app,on:BasicLed,entity:valid', { + view, + entity, + errors, + }) - return out -},[spec.ent]) + // TODO: need a better way to access this; also namespaced! + // NOTE: uses gubu-errmsg + const errmsg = seneca.context.errmsg + + // Convert to react-hook-form errors + errors = errors + .map((e: any) => ((e.tag_kind = 'ent'), e)) + .reduce( + (a: any, e: any, _: any) => ( + (a[e.key] = { + type: e.type, + message: errmsg + ? (_ = errmsg.find(e)) + ? _.text + : e.text + : e.text, + }), + a + ), + {} + ) + + const values = entity.data$(false) + const out = { + values, + errors, + } + + console.log('makeResolver', out) + return out + }, + [spec.ent] + ) function BasicEntityEdit (props: any) { const { ctx } = props const { seneca } = ctx() - const [plugin,setPlugin] = useState(false) + const [plugin, setPlugin] = useState(false) const [ready, setReady] = useState(false) - - useEffect(()=>{ - if(!plugin) { + + useEffect(() => { + if (!plugin) { seneca.use({ tag: props.spec.name, define: VxgBasicEntityEditPlugin, options: { spec: props.spec, setPlugin, - } + }, }) } - },[]) + }, []) - - const { spec, slot, fields } = - seneca.export('VxgBasicEntityEditPlugin/handle') || - { spec: {}, slot: null, fields: [] } + const { spec, slot, fields } = seneca.export( + 'VxgBasicEntityEditPlugin/handle' + ) || { spec: {}, slot: null, fields: [] } const { ent, name } = spec - if(plugin && !ready) { - seneca.act('aim:app,on:BasicLed,ready:edit',{view:name,setReady}) + if (plugin && !ready) { + seneca.act('aim:app,on:BasicLed,ready:edit', { view: name, setReady }) } const slotSelectors = seneca.export('Redux/slotSelectors') let { selectItem, selectList, selectMeta } = slotSelectors(slot) - let item = useSelector((state:any)=>selectItem(state)) + let item = useSelector((state: any) => selectItem(state)) - if(item && name) { - item = - seneca.direct('aim:app,on:BasicLed,modify:edit', { - view:name, item, fields + if (item && name) { + item = seneca.direct('aim:app,on:BasicLed,modify:edit', { + view: name, + item, + fields, }) } const params: any = useParams() - useEffect(()=>{ - if(ready) { - if(null == item && null != params.item) { + useEffect(() => { + if (ready) { + if (null == item && null != params.item) { seneca.act('aim:app,on:BasicLed,edit:item', { view: name, fields, - item_id: params.item + item_id: params.item, }) } reset(item) } - },[null==item,ready]) + }, [null == item, ready]) const resolver = makeResolver(seneca, spec) @@ -138,49 +143,46 @@ function BasicEntityEdit (props: any) { resolver, }) - const onSubmit = (data:any) => { - seneca.act('aim:app,on:BasicLed,save:item',{view:name,data}) + const onSubmit = (data: any) => { + // seneca.direct('') + seneca.act('aim:app,on:BasicLed,save:item', { view: name, data }) } - + return ( - { item ? -
- - - { fields.map((field:any)=> - - - - - )} - - - - - -
- : <> } + {item ? ( +
+ + {fields.map((field: any) => ( + + + + ))} + + + + + +
+ ) : ( + <> + )}
) } - - -export { - BasicEntityEdit -} \ No newline at end of file +export { BasicEntityEdit } diff --git a/src/lib/BasicEntitySliderField.tsx b/src/lib/BasicEntitySliderField.tsx index ffdbc21..991381e 100644 --- a/src/lib/BasicEntitySliderField.tsx +++ b/src/lib/BasicEntitySliderField.tsx @@ -38,12 +38,13 @@ const BasicEntitySliderFieldSpecShape = Gubu( function BasicEntitySliderField (props: any) { const { spec } = props - const basicEntityAutocompleteField: Spec = BasicEntitySliderFieldSpecShape(spec) + const basicEntityAutocompleteField: Spec = + BasicEntitySliderFieldSpecShape(spec) const { control, field, getValues, errors } = basicEntityAutocompleteField // if cmp not ready, call seneca.add('modify:edit') and seneca.add('modify:save') - const val = getValues(field.name) + const val = getValues(field.name) // field.name + '_uival$' const err = errors[field.name] @@ -76,7 +77,10 @@ function BasicEntitySliderField (props: any) { } function resolveMarks (marks: any) { - if (!marks || (typeof marks === 'object' && Object.keys(marks).length === 0)) { + if ( + !marks || + (typeof marks === 'object' && Object.keys(marks).length === 0) + ) { return false } if (typeof marks === 'object') { diff --git a/src/lib/VxgBasicEntityFieldPlugin.ts b/src/lib/VxgBasicEntityFieldPlugin.ts new file mode 100644 index 0000000..cac7e0e --- /dev/null +++ b/src/lib/VxgBasicEntityFieldPlugin.ts @@ -0,0 +1,66 @@ +// // This code does not belong here +// for (const field of fields) { +// if ('Date' === field.ux.kind) { +// const dt = util.dateTimeFromUTC(item[field.name]) +// item[field.name + '_orig$'] = item[field.name] +// item[field.name + '_udm$'] = dt.udm +// item[field.name] = dt.locald +// } else if ('Time' === field.ux.kind) { +// const dt = util.dateTimeFromUTC(item[field.name]) +// item[field.name + '_orig$'] = item[field.name] +// item[field.name + '_udm$'] = dt.udm +// item[field.name] = dt.localt +// } else if ('DateTime' === field.ux.kind) { +// const dt = util.dateTimeFromUTC(item[field.name]) +// item[field.name + '_orig$'] = item[field.name] +// item[field.name + '_udm$'] = dt.udm +// item[field.name] = dt.locald + 'T' + dt.localt +// } +// } + +// on plugin define, we want to loop over all the fields, +// if the field is special(like datetime), seneca.add + +import type { Spec } from './basic-types' + +import { Gubu } from 'gubu' + +const { Open, Child } = Gubu + +const Shape = Gubu( + Open({ + name: String, + prefix: String, + ent: String, + order: [String], + field: Child({}, {}), + }), + { name: 'BasicEntityEdit' } +) + +function VxgBasicEntityFieldPlugin (this: any, options: any) { + const seneca = this + + console.log('VxgBasicEntityFieldPlugin', options) + + options.setPlugin(true) + + return { + exports: { + handle: {}, + }, + } +} + +Object.assign(VxgBasicEntityFieldPlugin, { + defaults: { + spec: {}, + setPlugin: Function, + }, +}) + +Object.defineProperty(VxgBasicEntityFieldPlugin, 'name', { + value: 'VxgBasicEntityFieldPlugin', +}) + +export { VxgBasicEntityFieldPlugin } diff --git a/src/lib/VxgBasicLedPlugin.ts b/src/lib/VxgBasicLedPlugin.ts index ecde40b..d723608 100644 --- a/src/lib/VxgBasicLedPlugin.ts +++ b/src/lib/VxgBasicLedPlugin.ts @@ -1,35 +1,35 @@ - import type { Spec } from './basic-types' import { Gubu } from 'gubu' const { Open } = Gubu -const Shape = Gubu({ - name: String, - title: String, - active: Boolean, - kind: String, - def: { - ent: String, - head: Open({ - active: false, - }), - list: Open({ - active: false, - }), - edit: Open({ - active: false, - }), - foot: Open({ - active: false, - }), +const Shape = Gubu( + { + name: String, + title: String, + active: Boolean, + kind: String, + def: { + ent: String, + head: Open({ + active: false, + }), + list: Open({ + active: false, + }), + edit: Open({ + active: false, + }), + foot: Open({ + active: false, + }), + }, }, -}, { name: 'BasicLed' }) - - + { name: 'BasicLed' } +) -function VxgBasicLedPlugin(this: any, options: any) { +function VxgBasicLedPlugin (this: any, options: any) { const seneca = this const spec = Shape(options.spec) @@ -44,8 +44,9 @@ function VxgBasicLedPlugin(this: any, options: any) { .fix({ view: name }) - .add('aim:app,on:view,init:state,redux$:true', - function(this: any, _msg: any, reply: any, meta: any) { + .add( + 'aim:app,on:view,init:state,redux$:true', + function (this: any, _msg: any, reply: any, meta: any) { const state = meta.custom.state() let view = state.view[name] @@ -55,10 +56,12 @@ function VxgBasicLedPlugin(this: any, options: any) { this.export('Redux/entityPrepare')(state, slotName) reply() - }) + } + ) - .add('aim:app,on:BasicLed,ready:list,redux$:true', - function(this: any, msg: any, reply: any, meta: any) { + .add( + 'aim:app,on:BasicLed,ready:list,redux$:true', + function (this: any, msg: any, reply: any, meta: any) { const setReady = msg.setReady const view = meta.custom.state().view[name] @@ -67,10 +70,12 @@ function VxgBasicLedPlugin(this: any, options: any) { setReady(true) reply() - }) + } + ) - .add('aim:app,on:BasicLed,ready:edit,redux$:true', - function(msg: any, reply: any, meta: any) { + .add( + 'aim:app,on:BasicLed,ready:edit,redux$:true', + function (msg: any, reply: any, meta: any) { const setReady = msg.setReady const view = meta.custom.state().view[name] @@ -79,45 +84,46 @@ function VxgBasicLedPlugin(this: any, options: any) { setReady(true) reply() - }) - - .add('aim:app,on:BasicLed,modify:edit', - function(msg: any) { - let item = msg.item - let fields = msg.fields - - if (null == item) return item; - - item = { ...item } - - // This code does not belong here - for (const field of fields) { - if ('Date' === field.ux.kind) { - const dt = util.dateTimeFromUTC(item[field.name]) - item[field.name + '_orig$'] = item[field.name] - item[field.name + '_udm$'] = dt.udm - item[field.name] = dt.locald - } - else if ('Time' === field.ux.kind) { - const dt = util.dateTimeFromUTC(item[field.name]) - item[field.name + '_orig$'] = item[field.name] - item[field.name + '_udm$'] = dt.udm - item[field.name] = dt.localt - } - else if ('DateTime' === field.ux.kind) { - const dt = util.dateTimeFromUTC(item[field.name]) - item[field.name + '_orig$'] = item[field.name] - item[field.name + '_udm$'] = dt.udm - item[field.name] = dt.locald + 'T' + dt.localt - } + } + ) + + .add('aim:app,on:BasicLed,modify:edit', function (msg: any) { + let item = msg.item + let fields = msg.fields + + if (null == item) return item + + item = { ...item } + + // This code does not belong here + for (const field of fields) { + if ('Date' === field.ux.kind) { + const dt = util.dateTimeFromUTC(item[field.name]) + item[field.name + '_orig$'] = item[field.name] + item[field.name + '_udm$'] = dt.udm + item[field.name] = dt.locald + } else if ('Time' === field.ux.kind) { + const dt = util.dateTimeFromUTC(item[field.name]) + item[field.name + '_orig$'] = item[field.name] + item[field.name + '_udm$'] = dt.udm + item[field.name] = dt.localt + } else if ('DateTime' === field.ux.kind) { + const dt = util.dateTimeFromUTC(item[field.name]) + item[field.name + '_orig$'] = item[field.name] + item[field.name + '_udm$'] = dt.udm + item[field.name] = dt.locald + 'T' + dt.localt } + } - return item - }) + return item + }) - .message('aim:app,on:BasicLed,edit:item,redux$:true', + .add('aim:app,on:BasicLed,modify:save', function (msg: any) {}) + + .message( + 'aim:app,on:BasicLed,edit:item,redux$:true', { item_id: String }, - async function(this: any, msg: any, meta: any) { + async function (this: any, msg: any, meta: any) { const state = meta.custom.state() let view = state.view[name] const { item_id } = msg @@ -132,32 +138,32 @@ function VxgBasicLedPlugin(this: any, options: any) { }) return item - }) - + } + ) - .message('aim:app,on:BasicLed,add:item', - async function(this: any, _msg: any) { + .message( + 'aim:app,on:BasicLed,add:item', + async function (this: any, _msg: any) { await seneca.entity(entCanon).save$({ add$: true, slot$: slotName }) navigate('/view/' + name + '/add') - }) - + } + ) - .message('aim:app,on:BasicLed,save:item', - async function(this: any, msg: any) { + .message( + 'aim:app,on:BasicLed,save:item', + async function (this: any, msg: any) { const data = Object.entries(spec.def.edit.field) .filter((n: any[]) => false !== n[1].ux.edit) - .reduce((a: any, n: any[]) => (a[n[0]] = msg.data[n[0]], a), {}) + .reduce((a: any, n: any[]) => ((a[n[0]] = msg.data[n[0]]), a), {}) const item = await seneca.entity(entCanon).save$(data) navigate('/view/' + name + '/edit/' + item.id) - }) - - - seneca - .prepare(async function(this: any) { - this.act('aim:app,on:view,init:state,direct$:true', { view: name }) - }) + } + ) + seneca.prepare(async function (this: any) { + this.act('aim:app,on:view,init:state,direct$:true', { view: name }) + }) const sharedSpec = { name, @@ -165,7 +171,6 @@ function VxgBasicLedPlugin(this: any, options: any) { prefix: 'BasicLed_', } - const listSpec = { ...spec.def.list, ...sharedSpec, @@ -174,7 +179,6 @@ function VxgBasicLedPlugin(this: any, options: any) { const editSpec = { ...spec.def.edit, ...sharedSpec, - } const headSpec = { @@ -187,7 +191,6 @@ function VxgBasicLedPlugin(this: any, options: any) { ...sharedSpec, } - return { exports: { spec: { @@ -197,11 +200,10 @@ function VxgBasicLedPlugin(this: any, options: any) { foot: footSpec, }, util, - } + }, } } - const util = { dateTimeFromUTC: (utc: number, tz?: string) => { const date = new Date(utc) @@ -211,9 +213,9 @@ const util = { // UTC millis into day (since midnight) const udm = - (date.getUTCHours() * 60 * 60 * 1000) + - (date.getUTCMinutes() * 60 * 1000) + - (date.getUTCSeconds() * 1000) + + date.getUTCHours() * 60 * 60 * 1000 + + date.getUTCMinutes() * 60 * 1000 + + date.getUTCSeconds() * 1000 + date.getUTCMilliseconds() let out: any = { @@ -229,7 +231,7 @@ const util = { timeZone: tz, year: 'numeric', month: '2-digit', - day: '2-digit' + day: '2-digit', }) const timeFormatter = new Intl.DateTimeFormat('en-GB', { @@ -237,7 +239,7 @@ const util = { hour: '2-digit', minute: '2-digit', second: '2-digit', - hour12: false + hour12: false, }) const [{ value: day }, , { value: month }, , { value: year }] = @@ -252,15 +254,11 @@ const util = { }, } - VxgBasicLedPlugin.defaults = { spec: {}, navigate: Function, } - Object.defineProperty(VxgBasicLedPlugin, 'name', { value: 'VxgBasicLedPlugin' }) -export { - VxgBasicLedPlugin -} +export { VxgBasicLedPlugin } From ab18ca20bc43ce09d71c0bec35b64f7d2ba86e12 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 1 Aug 2024 11:08:08 +0100 Subject: [PATCH 086/122] Update edit and save modifiers to transform data --- dist/VxgBasicEntityFieldPlugin.d.ts | 6 ++++++ dist/voxgig-model-react.es.js | 22 +++++++++++++++++++++- dist/voxgig-model-react.umd.js | 22 +++++++++++++++++++++- src/lib/BasicEntityEdit.tsx | 8 ++++++-- src/lib/VxgBasicLedPlugin.ts | 25 ++++++++++++++++++++++++- 5 files changed, 78 insertions(+), 5 deletions(-) create mode 100644 dist/VxgBasicEntityFieldPlugin.d.ts diff --git a/dist/VxgBasicEntityFieldPlugin.d.ts b/dist/VxgBasicEntityFieldPlugin.d.ts new file mode 100644 index 0000000..3725ec0 --- /dev/null +++ b/dist/VxgBasicEntityFieldPlugin.d.ts @@ -0,0 +1,6 @@ +declare function VxgBasicEntityFieldPlugin(this: any, options: any): { + exports: { + handle: {}; + }; +}; +export { VxgBasicEntityFieldPlugin }; diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index c9555c4..ff54b3b 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -65747,7 +65747,12 @@ function BasicEntityEdit(props) { resolver }); const onSubmit = (data) => { - seneca.act("aim:app,on:BasicLed,save:item", { view: name, data }); + const formItem = seneca.direct("aim:app,on:BasicLed,modify:save", { + view: name, + data, + fields + }); + seneca.act("aim:app,on:BasicLed,save:item", { view: name, data: formItem }); }; return /* @__PURE__ */ jsxRuntimeExports.jsx(Box$2, { className: "vxg-BasicEntityEdit", children: item ? /* @__PURE__ */ jsxRuntimeExports.jsxs( "form", @@ -65940,10 +65945,25 @@ function VxgBasicLedPlugin(options) { item[field.name + "_orig$"] = item[field.name]; item[field.name + "_udm$"] = dt.udm; item[field.name] = dt.locald + "T" + dt.localt; + } else if ("Slider" === field.ux.kind) { + item[field.name + "_orig$"] = item[field.name]; + item[field.name] = Number(item[field.name]) / 60; } } + console.log("modify:edit", "item", item); return item; }).add("aim:app,on:BasicLed,modify:save", function(msg) { + let item = msg.data; + let fields = msg.fields; + if (null == item) return item; + item = __spreadValues({}, item); + for (const field of fields) { + if ("Slider" === field.ux.kind) { + item[field.name] = Number(item[field.name]) * 60; + } + } + console.log("modify:save", "item", item); + return item; }).message( "aim:app,on:BasicLed,edit:item,redux$:true", { item_id: String }, diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index b29086d..eea9d91 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -65759,7 +65759,12 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha resolver }); const onSubmit = (data) => { - seneca.act("aim:app,on:BasicLed,save:item", { view: name, data }); + const formItem = seneca.direct("aim:app,on:BasicLed,modify:save", { + view: name, + data, + fields + }); + seneca.act("aim:app,on:BasicLed,save:item", { view: name, data: formItem }); }; return /* @__PURE__ */ jsxRuntimeExports.jsx(material.Box, { className: "vxg-BasicEntityEdit", children: item ? /* @__PURE__ */ jsxRuntimeExports.jsxs( "form", @@ -65952,10 +65957,25 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha item[field.name + "_orig$"] = item[field.name]; item[field.name + "_udm$"] = dt.udm; item[field.name] = dt.locald + "T" + dt.localt; + } else if ("Slider" === field.ux.kind) { + item[field.name + "_orig$"] = item[field.name]; + item[field.name] = Number(item[field.name]) / 60; } } + console.log("modify:edit", "item", item); return item; }).add("aim:app,on:BasicLed,modify:save", function(msg) { + let item = msg.data; + let fields = msg.fields; + if (null == item) return item; + item = __spreadValues({}, item); + for (const field of fields) { + if ("Slider" === field.ux.kind) { + item[field.name] = Number(item[field.name]) * 60; + } + } + console.log("modify:save", "item", item); + return item; }).message( "aim:app,on:BasicLed,edit:item,redux$:true", { item_id: String }, diff --git a/src/lib/BasicEntityEdit.tsx b/src/lib/BasicEntityEdit.tsx index 02c2b76..41eb21d 100644 --- a/src/lib/BasicEntityEdit.tsx +++ b/src/lib/BasicEntityEdit.tsx @@ -144,8 +144,12 @@ function BasicEntityEdit (props: any) { }) const onSubmit = (data: any) => { - // seneca.direct('') - seneca.act('aim:app,on:BasicLed,save:item', { view: name, data }) + const formItem = seneca.direct('aim:app,on:BasicLed,modify:save', { + view: name, + data, + fields, + }) + seneca.act('aim:app,on:BasicLed,save:item', { view: name, data: formItem }) } return ( diff --git a/src/lib/VxgBasicLedPlugin.ts b/src/lib/VxgBasicLedPlugin.ts index d723608..4bf638d 100644 --- a/src/lib/VxgBasicLedPlugin.ts +++ b/src/lib/VxgBasicLedPlugin.ts @@ -112,13 +112,36 @@ function VxgBasicLedPlugin (this: any, options: any) { item[field.name + '_orig$'] = item[field.name] item[field.name + '_udm$'] = dt.udm item[field.name] = dt.locald + 'T' + dt.localt + } else if ('Slider' === field.ux.kind) { + item[field.name + '_orig$'] = item[field.name] + item[field.name] = Number(item[field.name]) / 60 } } + console.log('modify:edit', 'item', item) + return item }) - .add('aim:app,on:BasicLed,modify:save', function (msg: any) {}) + .add('aim:app,on:BasicLed,modify:save', function (msg: any) { + let item = msg.data + let fields = msg.fields + + if (null == item) return item + + item = { ...item } + + // This code does not belong here + for (const field of fields) { + if ('Slider' === field.ux.kind) { + item[field.name] = Number(item[field.name]) * 60 + } + } + + console.log('modify:save', 'item', item) + + return item + }) .message( 'aim:app,on:BasicLed,edit:item,redux$:true', From 9c04760740cfd76d1e15fb630c22a401d6a8e049 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 1 Aug 2024 14:07:28 +0100 Subject: [PATCH 087/122] Add plugin for BasicEntityField --- dist/VxgBasicEntityFieldPlugin.d.ts | 4 +- dist/voxgig-model-react.es.js | 302 ++++++++++++++++----------- dist/voxgig-model-react.umd.js | 302 ++++++++++++++++----------- src/lib/BasicEntityEdit.tsx | 5 + src/lib/BasicEntityField.tsx | 70 +++---- src/lib/VxgBasicEntityEditPlugin.ts | 53 +++-- src/lib/VxgBasicEntityFieldPlugin.ts | 95 ++++++--- 7 files changed, 490 insertions(+), 341 deletions(-) diff --git a/dist/VxgBasicEntityFieldPlugin.d.ts b/dist/VxgBasicEntityFieldPlugin.d.ts index 3725ec0..b133986 100644 --- a/dist/VxgBasicEntityFieldPlugin.d.ts +++ b/dist/VxgBasicEntityFieldPlugin.d.ts @@ -1,6 +1,8 @@ declare function VxgBasicEntityFieldPlugin(this: any, options: any): { exports: { - handle: {}; + handle: { + Field: any; + }; }; }; export { VxgBasicEntityFieldPlugin }; diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index ff54b3b..2f6f493 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -10747,12 +10747,12 @@ function BasicHeadTool(props) { return tool; } const CMPNAME$p = "BasicHead"; -const { Child: Child$5, Exact, Open: Open$n, Required: Required$1 } = gubu_minExports.Gubu; +const { Child: Child$6, Exact, Open: Open$o, Required: Required$1 } = gubu_minExports.Gubu; const BasicHeadSpecShape = gubu_minExports.Gubu({ head: { name: String, active: Boolean, - tool: Child$5(Open$n({ + tool: Child$6(Open$o({ align: Exact("left", "right") })) }, @@ -62706,17 +62706,17 @@ const MaterialReactTable = (props) => { } return jsxRuntimeExports.jsx(MRT_TablePaper, { table }); }; -const { Open: Open$m, Child: Child$4 } = gubu_minExports.Gubu; -const Shape$2 = gubu_minExports.Gubu(Open$m({ +const { Open: Open$n, Child: Child$5 } = gubu_minExports.Gubu; +const Shape$3 = gubu_minExports.Gubu(Open$n({ name: String, prefix: String, ent: String, order: [String], - field: Child$4({}, {}) + field: Child$5({}, {}) }), { name: "BasicEntityList" }); function VxgBasicEntityListPlugin(options) { const seneca = this; - const spec = Shape$2(options.spec); + const spec = Shape$3(options.spec); const slot = spec.prefix + spec.name; const columns = spec.order.reduce((a, fn2) => { const field = spec.field[fn2]; @@ -64677,18 +64677,18 @@ function BasicEntityFieldError(props) { return err ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-active", children: err.message }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-none" }); } const CMPNAME$n = "BasicEntitySliderField"; -const { Open: Open$l } = gubu_minExports.Gubu; +const { Open: Open$m } = gubu_minExports.Gubu; const BasicEntityCheckboxFieldSpecShape = gubu_minExports.Gubu( - Open$l({ - field: Open$l({ + Open$m({ + field: Open$m({ id: String, name: String, kind: "", label: "", - ux: Open$l({ + ux: Open$m({ kind: gubu_minExports.Exact("Checkbox"), edit: gubu_minExports.Default(true), - props: Open$l({}) + props: Open$m({}) }) }) }), @@ -64729,15 +64729,15 @@ function BasicEntityCheckboxField(props) { ] }, `${field.id}-box`); } const CMPNAME$m = "BasicEntityAutocompleteField"; -const { Open: Open$k } = gubu_minExports.Gubu; +const { Open: Open$l } = gubu_minExports.Gubu; const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu( - Open$k({ - field: Open$k({ + Open$l({ + field: Open$l({ id: String, label: String, kind: String, name: String, - cat: Open$k({ + cat: Open$l({ default: String, title: String, multiple: Number, @@ -64746,9 +64746,9 @@ const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu( exclude: "", include: "" }, - item: Open$k({}) + item: Open$l({}) }), - ux: Open$k({ + ux: Open$l({ kind: gubu_minExports.Exact("Autocomplete"), edit: gubu_minExports.Default(true) }) @@ -64848,21 +64848,21 @@ function resolveValue$1(value, cat) { } } const CMPNAME$l = "BasicEntitySliderField"; -const { Open: Open$j } = gubu_minExports.Gubu; +const { Open: Open$k } = gubu_minExports.Gubu; const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu( - Open$j({ - field: Open$j({ + Open$k({ + field: Open$k({ id: String, name: String, kind: "", label: "", - ux: Open$j({ + ux: Open$k({ kind: gubu_minExports.Exact("Slider"), edit: gubu_minExports.Default(true), step: gubu_minExports.Default(1), min: gubu_minExports.Default(0), max: gubu_minExports.Default(100), - props: Open$j({ + props: Open$k({ marks: gubu_minExports.Default({}), valueLabelDisplay: gubu_minExports.Exact("on", "auto", "off").Default("auto"), direction: gubu_minExports.Exact("horizontal", "vertical").Default("horizontal"), @@ -64921,20 +64921,20 @@ function resolveMarks(marks) { return marks; } const CMPNAME$k = "BasicEntitySliderField"; -const { Open: Open$i } = gubu_minExports.Gubu; +const { Open: Open$j } = gubu_minExports.Gubu; const BasicEntityRadioGroupFieldSpecShape = gubu_minExports.Gubu( - Open$i({ - field: Open$i({ + Open$j({ + field: Open$j({ id: String, name: String, kind: "", llabel: "", - ux: Open$i({ + ux: Open$j({ kind: gubu_minExports.Exact("RadioGroup"), edit: gubu_minExports.Default(true), direction: gubu_minExports.Exact("row", "column").Default("row") }), - cat: Open$i({ + cat: Open$j({ default: "", title: String, order: { @@ -64942,7 +64942,7 @@ const BasicEntityRadioGroupFieldSpecShape = gubu_minExports.Gubu( exclude: "", include: "" }, - item: Open$i({}) + item: Open$j({}) }) }) }), @@ -65001,18 +65001,18 @@ function resolveDefault$1(cat) { return defaultValues; } const CMPNAME$j = "BasicEntityTextBoxField"; -const { Open: Open$h } = gubu_minExports.Gubu; +const { Open: Open$i } = gubu_minExports.Gubu; const BasicEntityTextBoxFieldSpecShape = gubu_minExports.Gubu( - Open$h({ - field: Open$h({ + Open$i({ + field: Open$i({ id: String, name: String, kind: "", label: "", - ux: Open$h({ + ux: Open$i({ kind: gubu_minExports.Exact("TextBox"), edit: gubu_minExports.Default(true), - props: Open$h({}) + props: Open$i({}) }) }) }), @@ -65043,18 +65043,18 @@ function BasicEntityTextBoxField(props) { ] }, field.name); } const CMPNAME$i = "BasicEntityTextField"; -const { Open: Open$g } = gubu_minExports.Gubu; +const { Open: Open$h } = gubu_minExports.Gubu; const BasicEntityTextFieldSpecShape = gubu_minExports.Gubu( - Open$g({ - field: Open$g({ + Open$h({ + field: Open$h({ id: String, name: String, kind: "", label: "", - ux: Open$g({ + ux: Open$h({ kind: gubu_minExports.Exact("Text"), edit: gubu_minExports.Default(true), - props: Open$g({}) + props: Open$h({}) }) }) }), @@ -65084,18 +65084,18 @@ function BasicEntityTextField(props) { ] }, field.id); } const CMPNAME$h = "BasicEntityDateField"; -const { Open: Open$f } = gubu_minExports.Gubu; +const { Open: Open$g } = gubu_minExports.Gubu; const BasicEntityDateFieldSpecShape = gubu_minExports.Gubu( - Open$f({ - field: Open$f({ + Open$g({ + field: Open$g({ id: String, name: String, kind: "", label: "", - ux: Open$f({ + ux: Open$g({ kind: gubu_minExports.Exact("Date"), edit: gubu_minExports.Default(true), - props: Open$f({}) + props: Open$g({}) }) }) }), @@ -65125,18 +65125,18 @@ function BasicEntityDateField(props) { ] }, field.id); } const CMPNAME$g = "BasicEntityTimeField"; -const { Open: Open$e } = gubu_minExports.Gubu; +const { Open: Open$f } = gubu_minExports.Gubu; const BasicEntityTimeFieldSpecShape = gubu_minExports.Gubu( - Open$e({ - field: Open$e({ + Open$f({ + field: Open$f({ id: String, name: String, kind: "", label: "", - ux: Open$e({ + ux: Open$f({ kind: gubu_minExports.Exact("Time"), edit: gubu_minExports.Default(true), - props: Open$e({}) + props: Open$f({}) }) }) }), @@ -65166,18 +65166,18 @@ function BasicEntityTimeField(props) { ] }, field.id); } const CMPNAME$f = "BasicEntityDateTimeField"; -const { Open: Open$d } = gubu_minExports.Gubu; +const { Open: Open$e } = gubu_minExports.Gubu; const BasicEntityDateTimeFieldSpecShape = gubu_minExports.Gubu( - Open$d({ - field: Open$d({ + Open$e({ + field: Open$e({ id: String, name: String, kind: "", label: "", - ux: Open$d({ + ux: Open$e({ kind: gubu_minExports.Exact("DateTime"), edit: gubu_minExports.Default(true), - props: Open$d({}) + props: Open$e({}) }) }) }), @@ -65207,19 +65207,19 @@ function BasicEntityDateTimeField(props) { ] }, field.id); } const CMPNAME$e = "BasicEntitySliderField"; -const { Open: Open$c } = gubu_minExports.Gubu; +const { Open: Open$d } = gubu_minExports.Gubu; const BasicEntityRatingFieldSpecShape = gubu_minExports.Gubu( - Open$c({ - field: Open$c({ + Open$d({ + field: Open$d({ id: String, name: String, kind: "", label: "", - ux: Open$c({ + ux: Open$d({ kind: gubu_minExports.Exact("Rating"), edit: gubu_minExports.Default(true), precision: 1, - props: Open$c({}) + props: Open$d({}) }) }) }), @@ -65256,19 +65256,19 @@ function BasicEntityRatingField(props) { ] }, `${field.id}-div`); } const CMPNAME$d = "BasicEntitySliderField"; -const { Open: Open$b } = gubu_minExports.Gubu; +const { Open: Open$c } = gubu_minExports.Gubu; const BasicEntityButtonFieldSpecShape = gubu_minExports.Gubu( - Open$b({ - field: Open$b({ + Open$c({ + field: Open$c({ id: String, name: String, kind: "", label: String, - ux: Open$b({ + ux: Open$c({ kind: gubu_minExports.Exact("Button"), edit: true, variant: "contained", - props: Open$b({}) + props: Open$c({}) }) }) }), @@ -65292,23 +65292,23 @@ function BasicEntityButtonField(props) { ) }, `${field.id}-div`); } const CMPNAME$c = "BasicEntitySliderField"; -const { Open: Open$a } = gubu_minExports.Gubu; +const { Open: Open$b } = gubu_minExports.Gubu; const BasicEntityButtonGroupFieldSpecShape = gubu_minExports.Gubu( - Open$a({ - field: Open$a({ + Open$b({ + field: Open$b({ id: String, name: String, kind: "", label: "", - options: Open$a({ + options: Open$b({ label: { field: "label" }, value: { field: "value" }, - ents: Open$a({}) + ents: Open$b({}) }), - ux: Open$a({ + ux: Open$b({ kind: gubu_minExports.Exact("ButtonGroup"), edit: gubu_minExports.Default(true), - props: Open$a({}) + props: Open$b({}) }) }) }), @@ -65339,15 +65339,15 @@ function BasicEntityButtonGroupField(props) { ) }, `${field.id}-div`); } const CMPNAME$b = "BasicEntitySelectField"; -const { Open: Open$9 } = gubu_minExports.Gubu; +const { Open: Open$a } = gubu_minExports.Gubu; const BasicEntitySelectFieldSpecShape = gubu_minExports.Gubu( - Open$9({ - field: Open$9({ + Open$a({ + field: Open$a({ id: String, name: String, kind: "", label: "", - cat: Open$9({ + cat: Open$a({ default: "", title: String, multiple: Number, @@ -65356,9 +65356,9 @@ const BasicEntitySelectFieldSpecShape = gubu_minExports.Gubu( exclude: "", include: "" }, - item: Open$9({}) + item: Open$a({}) }), - ux: Open$9({ + ux: Open$a({ kind: gubu_minExports.Exact("Select"), edit: gubu_minExports.Default(true) }) @@ -65449,18 +65449,18 @@ function resolveValue(value, cat) { } } const CMPNAME$a = "BasicEntitySliderField"; -const { Open: Open$8 } = gubu_minExports.Gubu; +const { Open: Open$9 } = gubu_minExports.Gubu; const BasicEntitySwitchFieldSpecShape = gubu_minExports.Gubu( - Open$8({ - field: Open$8({ + Open$9({ + field: Open$9({ id: String, name: String, kind: "", label: "", - ux: Open$8({ + ux: Open$9({ kind: gubu_minExports.Exact("Switch"), edit: gubu_minExports.Default(true), - props: Open$8({}) + props: Open$9({}) }) }) }), @@ -65501,15 +65501,15 @@ function BasicEntitySwitchField(props) { ] }, `${field.id}-box`); } const CMPNAME$9 = "BasicEntitySliderField"; -const { Open: Open$7 } = gubu_minExports.Gubu; +const { Open: Open$8 } = gubu_minExports.Gubu; const BasicEntityToggleButtonFieldSpecShape = gubu_minExports.Gubu( - Open$7({ - field: Open$7({ + Open$8({ + field: Open$8({ id: String, name: String, kind: "", label: "", - cat: Open$7({ + cat: Open$8({ default: "", title: String, multiple: Number, @@ -65518,12 +65518,12 @@ const BasicEntityToggleButtonFieldSpecShape = gubu_minExports.Gubu( exclude: "", include: "" }, - item: Open$7({}) + item: Open$8({}) }), - ux: Open$7({ + ux: Open$8({ kind: gubu_minExports.Exact("ToggleButton"), edit: gubu_minExports.Default(true), - props: Open$7({}) + props: Open$8({}) }) }) }), @@ -65560,6 +65560,52 @@ function BasicEntityToggleButtonField(props) { /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, `${field.id}-box`); } +const { Open: Open$7, Child: Child$4 } = gubu_minExports.Gubu; +const Shape$2 = gubu_minExports.Gubu( + Open$7({ + field: {} + }), + { name: "BasicEntityField" } +); +const fieldMap = { + Text: BasicEntityTextField, + TextBox: BasicEntityTextBoxField, + Date: BasicEntityDateField, + DateTime: BasicEntityDateTimeField, + Time: BasicEntityTimeField, + Checkbox: BasicEntityCheckboxField, + Autocomplete: BasicEntityAutocompleteField, + Slider: BasicEntitySliderField, + RadioGroup: BasicEntityRadioGroupField, + Rating: BasicEntityRatingField, + Button: BasicEntityButtonField, + ButtonGroup: BasicEntityButtonGroupField, + Select: BasicEntitySelectField, + Switch: BasicEntitySwitchField, + ToggleButton: BasicEntityToggleButtonField +}; +function VxgBasicEntityFieldPlugin(options) { + const seneca = this; + const spec = Shape$2(options.spec); + const field = spec.field; + const Field = fieldMap[field.ux.kind]; + console.log("VxgBasicEntityFieldPlugin", "init", field.name, field.ux.kind); + options.setPlugin(true); + return { + exports: { + handle: { Field } + } + }; +} +Object.assign(VxgBasicEntityFieldPlugin, { + defaults: { + spec: {}, + setPlugin: Function + } +}); +Object.defineProperty(VxgBasicEntityFieldPlugin, "name", { + value: "VxgBasicEntityFieldPlugin" +}); const CMPNAME$8 = "BasicEntityField"; const { Open: Open$6 } = gubu_minExports.Gubu; const BasicEntityFieldSpecShape = gubu_minExports.Gubu( @@ -65595,43 +65641,49 @@ const BasicEntityFieldSpecShape = gubu_minExports.Gubu( }), { name: CMPNAME$8 } ); -const fieldMap = { - Text: BasicEntityTextField, - TextBox: BasicEntityTextBoxField, - Date: BasicEntityDateField, - DateTime: BasicEntityDateTimeField, - Time: BasicEntityTimeField, - Checkbox: BasicEntityCheckboxField, - Autocomplete: BasicEntityAutocompleteField, - Slider: BasicEntitySliderField, - RadioGroup: BasicEntityRadioGroupField, - Rating: BasicEntityRatingField, - Button: BasicEntityButtonField, - ButtonGroup: BasicEntityButtonGroupField, - Select: BasicEntitySelectField, - Switch: BasicEntitySwitchField, - ToggleButton: BasicEntityToggleButtonField -}; function BasicEntityField(props) { const { ctx, spec } = props; - const basicEntityFieldSpec = BasicEntityFieldSpecShape(spec); - const field = basicEntityFieldSpec.field; - const Field = fieldMap[field.ux.kind]; - return /* @__PURE__ */ jsxRuntimeExports.jsx(Field, { ctx, spec }); + const { seneca } = ctx(); + const basicEntityField = BasicEntityFieldSpecShape(spec); + const [plugin, setPlugin] = useState(false); + useEffect(() => { + if (!plugin) { + seneca.use({ + tag: basicEntityField.field.name, + define: VxgBasicEntityFieldPlugin, + options: { + spec: { + field: basicEntityField.field + }, + setPlugin + } + }); + } + }, []); + const { Field } = seneca.export( + "VxgBasicEntityFieldPlugin$" + spec.field.name + "/handle" + ) || { Field: null }; + return Field ? /* @__PURE__ */ jsxRuntimeExports.jsx(Field, { ctx, spec: basicEntityField }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", {}); } const { Open: Open$5, Child: Child$3 } = gubu_minExports.Gubu; -const Shape$1 = gubu_minExports.Gubu(Open$5({ - name: String, - prefix: String, - ent: String, - order: [String], - field: Child$3({}, {}) -}), { name: "BasicEntityEdit" }); +const Shape$1 = gubu_minExports.Gubu( + Open$5({ + name: String, + prefix: String, + ent: String, + order: [String], + field: Child$3({}, {}) + }), + { name: "BasicEntityEdit" } +); function VxgBasicEntityEditPlugin(options) { const seneca = this; const spec = Shape$1(options.spec); const slot = spec.prefix + spec.name; - const fields = spec.order.reduce((a, fn2) => (fixField(fn2, spec.field[fn2], spec), a.push(spec.field[fn2]), a), []); + const fields = spec.order.reduce( + (a, fn2) => (fixField(fn2, spec.field[fn2], spec), a.push(spec.field[fn2]), a), + [] + ); options.setPlugin(true); return { exports: { @@ -65655,7 +65707,9 @@ Object.assign(VxgBasicEntityEditPlugin, { setPlugin: Function } }); -Object.defineProperty(VxgBasicEntityEditPlugin, "name", { value: "VxgBasicEntityEditPlugin" }); +Object.defineProperty(VxgBasicEntityEditPlugin, "name", { + value: "VxgBasicEntityEditPlugin" +}); const CMPNAME$7 = "BasicEntityEdit"; const makeResolver = (seneca, spec) => useCallback( (data) => __async(void 0, null, function* () { @@ -65709,12 +65763,14 @@ function BasicEntityEdit(props) { ) || { spec: {}, slot: null, fields: [] }; const { ent, name } = spec; if (plugin && !ready) { + console.log("BasicEntityEdit", "useEffect", "ready:edit"); seneca.act("aim:app,on:BasicLed,ready:edit", { view: name, setReady }); } const slotSelectors = seneca.export("Redux/slotSelectors"); let { selectItem, selectList, selectMeta } = slotSelectors(slot); let item = useSelector((state) => selectItem(state)); if (item && name) { + console.log("BasicEntityEdit", "useEffect", "modify:edit"); item = seneca.direct("aim:app,on:BasicLed,modify:edit", { view: name, item, @@ -65724,13 +65780,16 @@ function BasicEntityEdit(props) { const params = useParams(); useEffect(() => { if (ready) { + console.log("BasicEntityEdit", "useEffect", "ready"); if (null == item && null != params.item) { + console.log("BasicEntityEdit", "useEffect", "edit:item"); seneca.act("aim:app,on:BasicLed,edit:item", { view: name, fields, item_id: params.item }); } + console.log("BasicEntityEdit", "useEffect", "reset(item)"); reset(item); } }, [null == item, ready]); @@ -65893,6 +65952,7 @@ function VxgBasicLedPlugin(options) { const name = spec.name; const entCanon = spec.def.ent; const slotName = "BasicLed_" + name; + console.log("VxgBasicLedPlugin", "name", name, "init"); seneca.add("on:BasicLed").fix({ view: name }).add( "aim:app,on:view,init:state,redux$:true", function(_msg, reply, meta) { @@ -65924,7 +65984,7 @@ function VxgBasicLedPlugin(options) { setReady(true); reply(); } - ).add("aim:app,on:BasicLed,modify:edit", function(msg) { + ).add("aim:app,on:BasicLed,modify:edit", function modify_edit(msg) { let item = msg.item; let fields = msg.fields; if (null == item) return item; @@ -65950,9 +66010,9 @@ function VxgBasicLedPlugin(options) { item[field.name] = Number(item[field.name]) / 60; } } - console.log("modify:edit", "item", item); + console.log("VxgBasicLedPlugin", "modify:edit", "item", item); return item; - }).add("aim:app,on:BasicLed,modify:save", function(msg) { + }).add("aim:app,on:BasicLed,modify:save", function modify_save(msg) { let item = msg.data; let fields = msg.fields; if (null == item) return item; diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index eea9d91..3d5addd 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -10759,12 +10759,12 @@ try { return tool; } const CMPNAME$p = "BasicHead"; - const { Child: Child$5, Exact, Open: Open$n, Required: Required$1 } = gubu_minExports.Gubu; + const { Child: Child$6, Exact, Open: Open$o, Required: Required$1 } = gubu_minExports.Gubu; const BasicHeadSpecShape = gubu_minExports.Gubu({ head: { name: String, active: Boolean, - tool: Child$5(Open$n({ + tool: Child$6(Open$o({ align: Exact("left", "right") })) }, @@ -62718,17 +62718,17 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } return jsxRuntimeExports.jsx(MRT_TablePaper, { table }); }; - const { Open: Open$m, Child: Child$4 } = gubu_minExports.Gubu; - const Shape$2 = gubu_minExports.Gubu(Open$m({ + const { Open: Open$n, Child: Child$5 } = gubu_minExports.Gubu; + const Shape$3 = gubu_minExports.Gubu(Open$n({ name: String, prefix: String, ent: String, order: [String], - field: Child$4({}, {}) + field: Child$5({}, {}) }), { name: "BasicEntityList" }); function VxgBasicEntityListPlugin(options) { const seneca = this; - const spec = Shape$2(options.spec); + const spec = Shape$3(options.spec); const slot = spec.prefix + spec.name; const columns = spec.order.reduce((a, fn) => { const field = spec.field[fn]; @@ -64689,18 +64689,18 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha return err ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-active", children: err.message }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-none" }); } const CMPNAME$n = "BasicEntitySliderField"; - const { Open: Open$l } = gubu_minExports.Gubu; + const { Open: Open$m } = gubu_minExports.Gubu; const BasicEntityCheckboxFieldSpecShape = gubu_minExports.Gubu( - Open$l({ - field: Open$l({ + Open$m({ + field: Open$m({ id: String, name: String, kind: "", label: "", - ux: Open$l({ + ux: Open$m({ kind: gubu_minExports.Exact("Checkbox"), edit: gubu_minExports.Default(true), - props: Open$l({}) + props: Open$m({}) }) }) }), @@ -64741,15 +64741,15 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ] }, `${field.id}-box`); } const CMPNAME$m = "BasicEntityAutocompleteField"; - const { Open: Open$k } = gubu_minExports.Gubu; + const { Open: Open$l } = gubu_minExports.Gubu; const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu( - Open$k({ - field: Open$k({ + Open$l({ + field: Open$l({ id: String, label: String, kind: String, name: String, - cat: Open$k({ + cat: Open$l({ default: String, title: String, multiple: Number, @@ -64758,9 +64758,9 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha exclude: "", include: "" }, - item: Open$k({}) + item: Open$l({}) }), - ux: Open$k({ + ux: Open$l({ kind: gubu_minExports.Exact("Autocomplete"), edit: gubu_minExports.Default(true) }) @@ -64860,21 +64860,21 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } } const CMPNAME$l = "BasicEntitySliderField"; - const { Open: Open$j } = gubu_minExports.Gubu; + const { Open: Open$k } = gubu_minExports.Gubu; const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu( - Open$j({ - field: Open$j({ + Open$k({ + field: Open$k({ id: String, name: String, kind: "", label: "", - ux: Open$j({ + ux: Open$k({ kind: gubu_minExports.Exact("Slider"), edit: gubu_minExports.Default(true), step: gubu_minExports.Default(1), min: gubu_minExports.Default(0), max: gubu_minExports.Default(100), - props: Open$j({ + props: Open$k({ marks: gubu_minExports.Default({}), valueLabelDisplay: gubu_minExports.Exact("on", "auto", "off").Default("auto"), direction: gubu_minExports.Exact("horizontal", "vertical").Default("horizontal"), @@ -64933,20 +64933,20 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha return marks; } const CMPNAME$k = "BasicEntitySliderField"; - const { Open: Open$i } = gubu_minExports.Gubu; + const { Open: Open$j } = gubu_minExports.Gubu; const BasicEntityRadioGroupFieldSpecShape = gubu_minExports.Gubu( - Open$i({ - field: Open$i({ + Open$j({ + field: Open$j({ id: String, name: String, kind: "", llabel: "", - ux: Open$i({ + ux: Open$j({ kind: gubu_minExports.Exact("RadioGroup"), edit: gubu_minExports.Default(true), direction: gubu_minExports.Exact("row", "column").Default("row") }), - cat: Open$i({ + cat: Open$j({ default: "", title: String, order: { @@ -64954,7 +64954,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha exclude: "", include: "" }, - item: Open$i({}) + item: Open$j({}) }) }) }), @@ -65013,18 +65013,18 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha return defaultValues; } const CMPNAME$j = "BasicEntityTextBoxField"; - const { Open: Open$h } = gubu_minExports.Gubu; + const { Open: Open$i } = gubu_minExports.Gubu; const BasicEntityTextBoxFieldSpecShape = gubu_minExports.Gubu( - Open$h({ - field: Open$h({ + Open$i({ + field: Open$i({ id: String, name: String, kind: "", label: "", - ux: Open$h({ + ux: Open$i({ kind: gubu_minExports.Exact("TextBox"), edit: gubu_minExports.Default(true), - props: Open$h({}) + props: Open$i({}) }) }) }), @@ -65055,18 +65055,18 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ] }, field.name); } const CMPNAME$i = "BasicEntityTextField"; - const { Open: Open$g } = gubu_minExports.Gubu; + const { Open: Open$h } = gubu_minExports.Gubu; const BasicEntityTextFieldSpecShape = gubu_minExports.Gubu( - Open$g({ - field: Open$g({ + Open$h({ + field: Open$h({ id: String, name: String, kind: "", label: "", - ux: Open$g({ + ux: Open$h({ kind: gubu_minExports.Exact("Text"), edit: gubu_minExports.Default(true), - props: Open$g({}) + props: Open$h({}) }) }) }), @@ -65096,18 +65096,18 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ] }, field.id); } const CMPNAME$h = "BasicEntityDateField"; - const { Open: Open$f } = gubu_minExports.Gubu; + const { Open: Open$g } = gubu_minExports.Gubu; const BasicEntityDateFieldSpecShape = gubu_minExports.Gubu( - Open$f({ - field: Open$f({ + Open$g({ + field: Open$g({ id: String, name: String, kind: "", label: "", - ux: Open$f({ + ux: Open$g({ kind: gubu_minExports.Exact("Date"), edit: gubu_minExports.Default(true), - props: Open$f({}) + props: Open$g({}) }) }) }), @@ -65137,18 +65137,18 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ] }, field.id); } const CMPNAME$g = "BasicEntityTimeField"; - const { Open: Open$e } = gubu_minExports.Gubu; + const { Open: Open$f } = gubu_minExports.Gubu; const BasicEntityTimeFieldSpecShape = gubu_minExports.Gubu( - Open$e({ - field: Open$e({ + Open$f({ + field: Open$f({ id: String, name: String, kind: "", label: "", - ux: Open$e({ + ux: Open$f({ kind: gubu_minExports.Exact("Time"), edit: gubu_minExports.Default(true), - props: Open$e({}) + props: Open$f({}) }) }) }), @@ -65178,18 +65178,18 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ] }, field.id); } const CMPNAME$f = "BasicEntityDateTimeField"; - const { Open: Open$d } = gubu_minExports.Gubu; + const { Open: Open$e } = gubu_minExports.Gubu; const BasicEntityDateTimeFieldSpecShape = gubu_minExports.Gubu( - Open$d({ - field: Open$d({ + Open$e({ + field: Open$e({ id: String, name: String, kind: "", label: "", - ux: Open$d({ + ux: Open$e({ kind: gubu_minExports.Exact("DateTime"), edit: gubu_minExports.Default(true), - props: Open$d({}) + props: Open$e({}) }) }) }), @@ -65219,19 +65219,19 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ] }, field.id); } const CMPNAME$e = "BasicEntitySliderField"; - const { Open: Open$c } = gubu_minExports.Gubu; + const { Open: Open$d } = gubu_minExports.Gubu; const BasicEntityRatingFieldSpecShape = gubu_minExports.Gubu( - Open$c({ - field: Open$c({ + Open$d({ + field: Open$d({ id: String, name: String, kind: "", label: "", - ux: Open$c({ + ux: Open$d({ kind: gubu_minExports.Exact("Rating"), edit: gubu_minExports.Default(true), precision: 1, - props: Open$c({}) + props: Open$d({}) }) }) }), @@ -65268,19 +65268,19 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ] }, `${field.id}-div`); } const CMPNAME$d = "BasicEntitySliderField"; - const { Open: Open$b } = gubu_minExports.Gubu; + const { Open: Open$c } = gubu_minExports.Gubu; const BasicEntityButtonFieldSpecShape = gubu_minExports.Gubu( - Open$b({ - field: Open$b({ + Open$c({ + field: Open$c({ id: String, name: String, kind: "", label: String, - ux: Open$b({ + ux: Open$c({ kind: gubu_minExports.Exact("Button"), edit: true, variant: "contained", - props: Open$b({}) + props: Open$c({}) }) }) }), @@ -65304,23 +65304,23 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ) }, `${field.id}-div`); } const CMPNAME$c = "BasicEntitySliderField"; - const { Open: Open$a } = gubu_minExports.Gubu; + const { Open: Open$b } = gubu_minExports.Gubu; const BasicEntityButtonGroupFieldSpecShape = gubu_minExports.Gubu( - Open$a({ - field: Open$a({ + Open$b({ + field: Open$b({ id: String, name: String, kind: "", label: "", - options: Open$a({ + options: Open$b({ label: { field: "label" }, value: { field: "value" }, - ents: Open$a({}) + ents: Open$b({}) }), - ux: Open$a({ + ux: Open$b({ kind: gubu_minExports.Exact("ButtonGroup"), edit: gubu_minExports.Default(true), - props: Open$a({}) + props: Open$b({}) }) }) }), @@ -65351,15 +65351,15 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ) }, `${field.id}-div`); } const CMPNAME$b = "BasicEntitySelectField"; - const { Open: Open$9 } = gubu_minExports.Gubu; + const { Open: Open$a } = gubu_minExports.Gubu; const BasicEntitySelectFieldSpecShape = gubu_minExports.Gubu( - Open$9({ - field: Open$9({ + Open$a({ + field: Open$a({ id: String, name: String, kind: "", label: "", - cat: Open$9({ + cat: Open$a({ default: "", title: String, multiple: Number, @@ -65368,9 +65368,9 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha exclude: "", include: "" }, - item: Open$9({}) + item: Open$a({}) }), - ux: Open$9({ + ux: Open$a({ kind: gubu_minExports.Exact("Select"), edit: gubu_minExports.Default(true) }) @@ -65461,18 +65461,18 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } } const CMPNAME$a = "BasicEntitySliderField"; - const { Open: Open$8 } = gubu_minExports.Gubu; + const { Open: Open$9 } = gubu_minExports.Gubu; const BasicEntitySwitchFieldSpecShape = gubu_minExports.Gubu( - Open$8({ - field: Open$8({ + Open$9({ + field: Open$9({ id: String, name: String, kind: "", label: "", - ux: Open$8({ + ux: Open$9({ kind: gubu_minExports.Exact("Switch"), edit: gubu_minExports.Default(true), - props: Open$8({}) + props: Open$9({}) }) }) }), @@ -65513,15 +65513,15 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ] }, `${field.id}-box`); } const CMPNAME$9 = "BasicEntitySliderField"; - const { Open: Open$7 } = gubu_minExports.Gubu; + const { Open: Open$8 } = gubu_minExports.Gubu; const BasicEntityToggleButtonFieldSpecShape = gubu_minExports.Gubu( - Open$7({ - field: Open$7({ + Open$8({ + field: Open$8({ id: String, name: String, kind: "", label: "", - cat: Open$7({ + cat: Open$8({ default: "", title: String, multiple: Number, @@ -65530,12 +65530,12 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha exclude: "", include: "" }, - item: Open$7({}) + item: Open$8({}) }), - ux: Open$7({ + ux: Open$8({ kind: gubu_minExports.Exact("ToggleButton"), edit: gubu_minExports.Default(true), - props: Open$7({}) + props: Open$8({}) }) }) }), @@ -65572,6 +65572,52 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, `${field.id}-box`); } + const { Open: Open$7, Child: Child$4 } = gubu_minExports.Gubu; + const Shape$2 = gubu_minExports.Gubu( + Open$7({ + field: {} + }), + { name: "BasicEntityField" } + ); + const fieldMap = { + Text: BasicEntityTextField, + TextBox: BasicEntityTextBoxField, + Date: BasicEntityDateField, + DateTime: BasicEntityDateTimeField, + Time: BasicEntityTimeField, + Checkbox: BasicEntityCheckboxField, + Autocomplete: BasicEntityAutocompleteField, + Slider: BasicEntitySliderField, + RadioGroup: BasicEntityRadioGroupField, + Rating: BasicEntityRatingField, + Button: BasicEntityButtonField, + ButtonGroup: BasicEntityButtonGroupField, + Select: BasicEntitySelectField, + Switch: BasicEntitySwitchField, + ToggleButton: BasicEntityToggleButtonField + }; + function VxgBasicEntityFieldPlugin(options) { + const seneca = this; + const spec = Shape$2(options.spec); + const field = spec.field; + const Field = fieldMap[field.ux.kind]; + console.log("VxgBasicEntityFieldPlugin", "init", field.name, field.ux.kind); + options.setPlugin(true); + return { + exports: { + handle: { Field } + } + }; + } + Object.assign(VxgBasicEntityFieldPlugin, { + defaults: { + spec: {}, + setPlugin: Function + } + }); + Object.defineProperty(VxgBasicEntityFieldPlugin, "name", { + value: "VxgBasicEntityFieldPlugin" + }); const CMPNAME$8 = "BasicEntityField"; const { Open: Open$6 } = gubu_minExports.Gubu; const BasicEntityFieldSpecShape = gubu_minExports.Gubu( @@ -65607,43 +65653,49 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }), { name: CMPNAME$8 } ); - const fieldMap = { - Text: BasicEntityTextField, - TextBox: BasicEntityTextBoxField, - Date: BasicEntityDateField, - DateTime: BasicEntityDateTimeField, - Time: BasicEntityTimeField, - Checkbox: BasicEntityCheckboxField, - Autocomplete: BasicEntityAutocompleteField, - Slider: BasicEntitySliderField, - RadioGroup: BasicEntityRadioGroupField, - Rating: BasicEntityRatingField, - Button: BasicEntityButtonField, - ButtonGroup: BasicEntityButtonGroupField, - Select: BasicEntitySelectField, - Switch: BasicEntitySwitchField, - ToggleButton: BasicEntityToggleButtonField - }; function BasicEntityField(props) { const { ctx, spec } = props; - const basicEntityFieldSpec = BasicEntityFieldSpecShape(spec); - const field = basicEntityFieldSpec.field; - const Field = fieldMap[field.ux.kind]; - return /* @__PURE__ */ jsxRuntimeExports.jsx(Field, { ctx, spec }); + const { seneca } = ctx(); + const basicEntityField = BasicEntityFieldSpecShape(spec); + const [plugin, setPlugin] = React$1.useState(false); + React$1.useEffect(() => { + if (!plugin) { + seneca.use({ + tag: basicEntityField.field.name, + define: VxgBasicEntityFieldPlugin, + options: { + spec: { + field: basicEntityField.field + }, + setPlugin + } + }); + } + }, []); + const { Field } = seneca.export( + "VxgBasicEntityFieldPlugin$" + spec.field.name + "/handle" + ) || { Field: null }; + return Field ? /* @__PURE__ */ jsxRuntimeExports.jsx(Field, { ctx, spec: basicEntityField }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", {}); } const { Open: Open$5, Child: Child$3 } = gubu_minExports.Gubu; - const Shape$1 = gubu_minExports.Gubu(Open$5({ - name: String, - prefix: String, - ent: String, - order: [String], - field: Child$3({}, {}) - }), { name: "BasicEntityEdit" }); + const Shape$1 = gubu_minExports.Gubu( + Open$5({ + name: String, + prefix: String, + ent: String, + order: [String], + field: Child$3({}, {}) + }), + { name: "BasicEntityEdit" } + ); function VxgBasicEntityEditPlugin(options) { const seneca = this; const spec = Shape$1(options.spec); const slot = spec.prefix + spec.name; - const fields = spec.order.reduce((a, fn) => (fixField(fn, spec.field[fn], spec), a.push(spec.field[fn]), a), []); + const fields = spec.order.reduce( + (a, fn) => (fixField(fn, spec.field[fn], spec), a.push(spec.field[fn]), a), + [] + ); options.setPlugin(true); return { exports: { @@ -65667,7 +65719,9 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha setPlugin: Function } }); - Object.defineProperty(VxgBasicEntityEditPlugin, "name", { value: "VxgBasicEntityEditPlugin" }); + Object.defineProperty(VxgBasicEntityEditPlugin, "name", { + value: "VxgBasicEntityEditPlugin" + }); const CMPNAME$7 = "BasicEntityEdit"; const makeResolver = (seneca, spec) => React$1.useCallback( (data) => __async(this, null, function* () { @@ -65721,12 +65775,14 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ) || { spec: {}, slot: null, fields: [] }; const { ent, name } = spec; if (plugin && !ready) { + console.log("BasicEntityEdit", "useEffect", "ready:edit"); seneca.act("aim:app,on:BasicLed,ready:edit", { view: name, setReady }); } const slotSelectors = seneca.export("Redux/slotSelectors"); let { selectItem, selectList, selectMeta } = slotSelectors(slot); let item = reactRedux.useSelector((state) => selectItem(state)); if (item && name) { + console.log("BasicEntityEdit", "useEffect", "modify:edit"); item = seneca.direct("aim:app,on:BasicLed,modify:edit", { view: name, item, @@ -65736,13 +65792,16 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const params = reactRouterDom.useParams(); React$1.useEffect(() => { if (ready) { + console.log("BasicEntityEdit", "useEffect", "ready"); if (null == item && null != params.item) { + console.log("BasicEntityEdit", "useEffect", "edit:item"); seneca.act("aim:app,on:BasicLed,edit:item", { view: name, fields, item_id: params.item }); } + console.log("BasicEntityEdit", "useEffect", "reset(item)"); reset(item); } }, [null == item, ready]); @@ -65905,6 +65964,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const name = spec.name; const entCanon = spec.def.ent; const slotName = "BasicLed_" + name; + console.log("VxgBasicLedPlugin", "name", name, "init"); seneca.add("on:BasicLed").fix({ view: name }).add( "aim:app,on:view,init:state,redux$:true", function(_msg, reply, meta) { @@ -65936,7 +65996,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha setReady(true); reply(); } - ).add("aim:app,on:BasicLed,modify:edit", function(msg) { + ).add("aim:app,on:BasicLed,modify:edit", function modify_edit(msg) { let item = msg.item; let fields = msg.fields; if (null == item) return item; @@ -65962,9 +66022,9 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha item[field.name] = Number(item[field.name]) / 60; } } - console.log("modify:edit", "item", item); + console.log("VxgBasicLedPlugin", "modify:edit", "item", item); return item; - }).add("aim:app,on:BasicLed,modify:save", function(msg) { + }).add("aim:app,on:BasicLed,modify:save", function modify_save(msg) { let item = msg.data; let fields = msg.fields; if (null == item) return item; diff --git a/src/lib/BasicEntityEdit.tsx b/src/lib/BasicEntityEdit.tsx index 41eb21d..96607a7 100644 --- a/src/lib/BasicEntityEdit.tsx +++ b/src/lib/BasicEntityEdit.tsx @@ -98,6 +98,7 @@ function BasicEntityEdit (props: any) { const { ent, name } = spec if (plugin && !ready) { + console.log('BasicEntityEdit', 'useEffect', 'ready:edit') seneca.act('aim:app,on:BasicLed,ready:edit', { view: name, setReady }) } @@ -107,6 +108,7 @@ function BasicEntityEdit (props: any) { let item = useSelector((state: any) => selectItem(state)) if (item && name) { + console.log('BasicEntityEdit', 'useEffect', 'modify:edit') item = seneca.direct('aim:app,on:BasicLed,modify:edit', { view: name, item, @@ -118,13 +120,16 @@ function BasicEntityEdit (props: any) { useEffect(() => { if (ready) { + console.log('BasicEntityEdit', 'useEffect', 'ready') if (null == item && null != params.item) { + console.log('BasicEntityEdit', 'useEffect', 'edit:item') seneca.act('aim:app,on:BasicLed,edit:item', { view: name, fields, item_id: params.item, }) } + console.log('BasicEntityEdit', 'useEffect', 'reset(item)') reset(item) } }, [null == item, ready]) diff --git a/src/lib/BasicEntityField.tsx b/src/lib/BasicEntityField.tsx index 87700f5..c6c5ec7 100644 --- a/src/lib/BasicEntityField.tsx +++ b/src/lib/BasicEntityField.tsx @@ -1,23 +1,9 @@ -import React from 'react' +import React, { useEffect, useState } from 'react' import type { Spec } from './basic-types' import { Default, Exact, Gubu, Skip } from 'gubu' -import { BasicEntityCheckboxField } from './BasicEntityCheckboxField' -import { BasicEntityAutocompleteField } from './BasicEntityAutocompleteField' -import { BasicEntitySliderField } from './BasicEntitySliderField' -import { BasicEntityRadioGroupField } from './BasicEntityRadioGroupField' -import { BasicEntityTextBoxField } from './BasicEntityTextBoxField' -import { BasicEntityTextField } from './BasicEntityTextField' -import { BasicEntityDateField } from './BasicEntityDateField' -import { BasicEntityTimeField } from './BasicEntityTimeField' -import { BasicEntityDateTimeField } from './BasicEntityDateTimeField' -import { BasicEntityRatingField } from './BasicEntityRatingField' -import { BasicEntityButtonField } from './BasicEntityButtonField' -import { BasicEntityButtonGroupField } from './BasicEntityButtonGroupField' -import { BasicEntitySelectField } from './BasicEntitySelectField' -import { BasicEntitySwitchField } from './BasicEntitySwitchField' -import { BasicEntityToggleButtonField } from './BasicEntityToggleButtonField' +import { VxgBasicEntityFieldPlugin } from './VxgBasicEntityFieldPlugin' const CMPNAME = 'BasicEntityField' @@ -56,32 +42,34 @@ const BasicEntityFieldSpecShape = Gubu( { name: CMPNAME } ) -const fieldMap: any = { - Text: BasicEntityTextField, - TextBox: BasicEntityTextBoxField, - Date: BasicEntityDateField, - DateTime: BasicEntityDateTimeField, - Time: BasicEntityTimeField, - Checkbox: BasicEntityCheckboxField, - Autocomplete: BasicEntityAutocompleteField, - Slider: BasicEntitySliderField, - RadioGroup: BasicEntityRadioGroupField, - Rating: BasicEntityRatingField, - Button: BasicEntityButtonField, - ButtonGroup: BasicEntityButtonGroupField, - Select: BasicEntitySelectField, - Switch: BasicEntitySwitchField, - ToggleButton: BasicEntityToggleButtonField, -} - -function BasicEntityField(props: any) { +function BasicEntityField (props: any) { const { ctx, spec } = props - - const basicEntityFieldSpec: Spec = BasicEntityFieldSpecShape(spec) - const field: any = basicEntityFieldSpec.field - const Field: any = fieldMap[field.ux.kind] - - return + const { seneca } = ctx() + + const basicEntityField: Spec = BasicEntityFieldSpecShape(spec) + const [plugin, setPlugin] = useState(false) + + useEffect(() => { + if (!plugin) { + // TODO: plugin name needs to be unique across system (use field.name, view ...) + seneca.use({ + tag: basicEntityField.field.name, + define: VxgBasicEntityFieldPlugin, + options: { + spec: { + field: basicEntityField.field, + }, + setPlugin, + }, + }) + } + }, []) + + const { Field } = seneca.export( + 'VxgBasicEntityFieldPlugin$' + spec.field.name + '/handle' + ) || { Field: null } + + return Field ? :
} /* diff --git a/src/lib/VxgBasicEntityEditPlugin.ts b/src/lib/VxgBasicEntityEditPlugin.ts index 2508340..eb1906f 100644 --- a/src/lib/VxgBasicEntityEditPlugin.ts +++ b/src/lib/VxgBasicEntityEditPlugin.ts @@ -1,28 +1,33 @@ - import type { Spec } from './basic-types' import { Gubu } from 'gubu' const { Open, Child } = Gubu -const Shape = Gubu(Open({ - name: String, - prefix: String, - ent: String, - order: [String], - field: Child({}, {}) -}), { name: 'BasicEntityEdit' }) - - -function VxgBasicEntityEditPlugin(this: any, options: any) { +const Shape = Gubu( + Open({ + name: String, + prefix: String, + ent: String, + order: [String], + field: Child({}, {}), + }), + { name: 'BasicEntityEdit' } +) + +function VxgBasicEntityEditPlugin (this: any, options: any) { const seneca = this const spec = Shape(options.spec) const slot = spec.prefix + spec.name - const fields = spec.order.reduce((a: any, fn: any) => - (fixField(fn, spec.field[fn], spec), a.push(spec.field[fn]), a), []) + const fields = spec.order.reduce( + (a: any, fn: any) => ( + fixField(fn, spec.field[fn], spec), a.push(spec.field[fn]), a + ), + [] + ) options.setPlugin(true) @@ -32,33 +37,27 @@ function VxgBasicEntityEditPlugin(this: any, options: any) { spec, slot, fields, - } - } + }, + }, } } - - -function fixField(name: string, field: any, spec: any) { +function fixField (name: string, field: any, spec: any) { field.id = 'vxg-field-' + spec.name + '-' + name field.name = name field.ux = field.ux || {} field.ux.size = null == field.ux.size ? 4 : parseInt(field.ux.size, 10) } - - - Object.assign(VxgBasicEntityEditPlugin, { defaults: { spec: {}, setPlugin: Function, - } + }, }) +Object.defineProperty(VxgBasicEntityEditPlugin, 'name', { + value: 'VxgBasicEntityEditPlugin', +}) -Object.defineProperty(VxgBasicEntityEditPlugin, 'name', { value: 'VxgBasicEntityEditPlugin' }) - -export { - VxgBasicEntityEditPlugin -} +export { VxgBasicEntityEditPlugin } diff --git a/src/lib/VxgBasicEntityFieldPlugin.ts b/src/lib/VxgBasicEntityFieldPlugin.ts index cac7e0e..74d74b0 100644 --- a/src/lib/VxgBasicEntityFieldPlugin.ts +++ b/src/lib/VxgBasicEntityFieldPlugin.ts @@ -1,25 +1,18 @@ -// // This code does not belong here -// for (const field of fields) { -// if ('Date' === field.ux.kind) { -// const dt = util.dateTimeFromUTC(item[field.name]) -// item[field.name + '_orig$'] = item[field.name] -// item[field.name + '_udm$'] = dt.udm -// item[field.name] = dt.locald -// } else if ('Time' === field.ux.kind) { -// const dt = util.dateTimeFromUTC(item[field.name]) -// item[field.name + '_orig$'] = item[field.name] -// item[field.name + '_udm$'] = dt.udm -// item[field.name] = dt.localt -// } else if ('DateTime' === field.ux.kind) { -// const dt = util.dateTimeFromUTC(item[field.name]) -// item[field.name + '_orig$'] = item[field.name] -// item[field.name + '_udm$'] = dt.udm -// item[field.name] = dt.locald + 'T' + dt.localt -// } -// } - -// on plugin define, we want to loop over all the fields, -// if the field is special(like datetime), seneca.add +import { BasicEntityCheckboxField } from './BasicEntityCheckboxField' +import { BasicEntityAutocompleteField } from './BasicEntityAutocompleteField' +import { BasicEntitySliderField } from './BasicEntitySliderField' +import { BasicEntityRadioGroupField } from './BasicEntityRadioGroupField' +import { BasicEntityTextBoxField } from './BasicEntityTextBoxField' +import { BasicEntityTextField } from './BasicEntityTextField' +import { BasicEntityDateField } from './BasicEntityDateField' +import { BasicEntityTimeField } from './BasicEntityTimeField' +import { BasicEntityDateTimeField } from './BasicEntityDateTimeField' +import { BasicEntityRatingField } from './BasicEntityRatingField' +import { BasicEntityButtonField } from './BasicEntityButtonField' +import { BasicEntityButtonGroupField } from './BasicEntityButtonGroupField' +import { BasicEntitySelectField } from './BasicEntitySelectField' +import { BasicEntitySwitchField } from './BasicEntitySwitchField' +import { BasicEntityToggleButtonField } from './BasicEntityToggleButtonField' import type { Spec } from './basic-types' @@ -29,25 +22,67 @@ const { Open, Child } = Gubu const Shape = Gubu( Open({ - name: String, - prefix: String, - ent: String, - order: [String], - field: Child({}, {}), + field: {}, }), - { name: 'BasicEntityEdit' } + { name: 'BasicEntityField' } ) +const fieldMap: any = { + Text: BasicEntityTextField, + TextBox: BasicEntityTextBoxField, + Date: BasicEntityDateField, + DateTime: BasicEntityDateTimeField, + Time: BasicEntityTimeField, + Checkbox: BasicEntityCheckboxField, + Autocomplete: BasicEntityAutocompleteField, + Slider: BasicEntitySliderField, + RadioGroup: BasicEntityRadioGroupField, + Rating: BasicEntityRatingField, + Button: BasicEntityButtonField, + ButtonGroup: BasicEntityButtonGroupField, + Select: BasicEntitySelectField, + Switch: BasicEntitySwitchField, + ToggleButton: BasicEntityToggleButtonField, +} + function VxgBasicEntityFieldPlugin (this: any, options: any) { const seneca = this - console.log('VxgBasicEntityFieldPlugin', options) + const spec = Shape(options.spec) + + const field: any = spec.field + const Field: any = fieldMap[field.ux.kind] + + console.log('VxgBasicEntityFieldPlugin', 'init', field.name, field.ux.kind) + + // if ('Slider' === field.ux.kind) { + // console.log( + // 'VxgBasicEntityFieldPlugin', + // 'seneca.add', + // field.name, + // field.ux.kind + // ) + // seneca.add( + // 'aim:app,on:BasicLed,modify:edit,view:podcast', + // function modify_edit_Slider (this: any, msg: any) { + // const item = msg.item + + // const out = this.prior(msg) + + // console.log('VxgBasicLedPlugin', 'modify:edit', 'Slider', out) + + // return item + // } + // ) + // } + + // seneca.add('aim:app,on:BasicLed,modify:save', function (msg: any) {}) options.setPlugin(true) return { exports: { - handle: {}, + handle: { Field }, }, } } From ad1dd7541096743a2dd2d71c5471cf6f5d79324f Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 1 Aug 2024 14:07:52 +0100 Subject: [PATCH 088/122] Specify function name on seneca msg def --- src/lib/VxgBasicLedPlugin.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/lib/VxgBasicLedPlugin.ts b/src/lib/VxgBasicLedPlugin.ts index 4bf638d..e7761fa 100644 --- a/src/lib/VxgBasicLedPlugin.ts +++ b/src/lib/VxgBasicLedPlugin.ts @@ -39,6 +39,8 @@ function VxgBasicLedPlugin (this: any, options: any) { const entCanon = spec.def.ent const slotName = 'BasicLed_' + name + console.log('VxgBasicLedPlugin', 'name', name, 'init') + seneca .add('on:BasicLed') @@ -77,8 +79,9 @@ function VxgBasicLedPlugin (this: any, options: any) { 'aim:app,on:BasicLed,ready:edit,redux$:true', function (msg: any, reply: any, meta: any) { const setReady = msg.setReady - const view = meta.custom.state().view[name] + // Update the view state + const view = meta.custom.state().view[name] view.mode = 'edit' view.status = 'edit-item' @@ -87,7 +90,7 @@ function VxgBasicLedPlugin (this: any, options: any) { } ) - .add('aim:app,on:BasicLed,modify:edit', function (msg: any) { + .add('aim:app,on:BasicLed,modify:edit', function modify_edit (msg: any) { let item = msg.item let fields = msg.fields @@ -118,12 +121,12 @@ function VxgBasicLedPlugin (this: any, options: any) { } } - console.log('modify:edit', 'item', item) + console.log('VxgBasicLedPlugin', 'modify:edit', 'item', item) return item }) - .add('aim:app,on:BasicLed,modify:save', function (msg: any) { + .add('aim:app,on:BasicLed,modify:save', function modify_save (msg: any) { let item = msg.data let fields = msg.fields From 66259cefc731d5e2c07f5a6e97775d50b8e8f9df Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 1 Aug 2024 15:42:59 +0100 Subject: [PATCH 089/122] Refactor react-hook-form Controller to useController --- dist/voxgig-model-react.es.js | 340 +++++++++++------------ dist/voxgig-model-react.umd.js | 340 +++++++++++------------ src/lib/BasicEntityAutocompleteField.tsx | 110 ++++++-- src/lib/BasicEntityButtonGroupField.tsx | 71 +++-- src/lib/BasicEntityCheckboxField.tsx | 71 +++-- src/lib/BasicEntityRadioGroupField.tsx | 99 +++++-- src/lib/BasicEntityRatingField.tsx | 65 +++-- src/lib/BasicEntitySelectField.tsx | 113 +++++--- src/lib/BasicEntitySliderField.tsx | 87 ++++-- src/lib/BasicEntitySwitchField.tsx | 69 +++-- src/lib/BasicEntityToggleButtonField.tsx | 88 ++++-- 11 files changed, 873 insertions(+), 580 deletions(-) diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index ff54b3b..05694c0 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -64700,27 +64700,26 @@ function BasicEntityCheckboxField(props) { const { control, field, getValues, errors } = basicEntityCheckboxField; const val = getValues(field.name); const err = errors[field.name]; + const { + field: controllerField, + fieldState: { error } + } = useController({ + name: field.name, + control, + defaultValue: !!val + }); return /* @__PURE__ */ jsxRuntimeExports.jsxs(Box$2, { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx( FormControlLabel$1, { control: /* @__PURE__ */ jsxRuntimeExports.jsx( - Controller, - { - name: field.name, - control, - defaultValue: !!val, - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( - Checkbox$1, - __spreadValues({ - id: field.id, - checked: value, - onChange, - disabled: !field.ux.edit - }, field.ux.props) - ) - }, - `${field.id}-controller` + Checkbox$1, + __spreadValues({ + id: field.id, + checked: controllerField.value, + onChange: controllerField.onChange, + disabled: !field.ux.edit + }, field.ux.props) ), label: field.label } @@ -64761,31 +64760,29 @@ function BasicEntityAutocompleteField(props) { const basicEntityAutocompleteField = BasicEntityAutocompleteFieldSpecShape(spec); const { control, field, errors } = basicEntityAutocompleteField; const err = errors[field.name]; + const { + field: controllerField, + fieldState: { error } + } = useController({ + name: field.name, + control, + defaultValue: resolveDefault$2(field.cat) + }); return /* @__PURE__ */ jsxRuntimeExports.jsxs(Box$2, { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx( - Controller, - { - name: field.name, - control, - defaultValue: resolveDefault$2(field.cat), - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( - Autocomplete$1, - __spreadProps(__spreadValues({ - freeSolo: true, - forcePopupIcon: true, - multiple: field.cat.multiple !== 1, - options: resolveCategories$2(field.cat), - isOptionEqualToValue: (opt, val) => opt === val || (opt == null ? void 0 : opt.id) != null && (val == null ? void 0 : val.id) != null && opt.id === val.id || (opt == null ? void 0 : opt.key) != null && (val == null ? void 0 : val.key) != null && opt.key === val.key, - getOptionLabel: (option) => option.title, - value: resolveValue$1(value, field.cat), - disabled: !field.ux.edit - }, field.ux.props), { - onChange: (_2, newVal) => onChange(newVal), - renderInput: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx(TextField$1, __spreadProps(__spreadValues({}, params), { label: field.label })) - }) - ) - }, - `${field.id}-controller` + Autocomplete$1, + __spreadValues({ + freeSolo: true, + forcePopupIcon: true, + multiple: field.cat.multiple !== 1, + options: resolveCategories$2(field.cat), + isOptionEqualToValue: (opt, val) => opt === val || (opt == null ? void 0 : opt.id) != null && (val == null ? void 0 : val.id) != null && opt.id === val.id || (opt == null ? void 0 : opt.key) != null && (val == null ? void 0 : val.key) != null && opt.key === val.key, + getOptionLabel: (option) => option.title, + value: resolveValue$1(controllerField.value, field.cat), + disabled: !field.ux.edit, + onChange: (_2, newVal) => controllerField.onChange(newVal), + renderInput: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx(TextField$1, __spreadProps(__spreadValues({}, params), { label: field.label })) + }, field.ux.props) ), /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, `${field.id}-box`); @@ -64879,31 +64876,28 @@ function BasicEntitySliderField(props) { const { control, field, getValues, errors } = basicEntityAutocompleteField; const val = getValues(field.name); const err = errors[field.name]; - return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [ + const { field: controllerField } = useController({ + name: field.name, + control, + defaultValue: val || field.ux.min + }); + return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx(FormLabel$1, { children: field.label }, `${field.id}-label`), /* @__PURE__ */ jsxRuntimeExports.jsx( - Controller, + Slider$1, { - name: field.name, - control, - defaultValue: val || field.ux.min, - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( - Slider$1, - { - step: field.ux.step, - marks: resolveMarks(field.ux.props.marks), - min: field.ux.min, - max: field.ux.max, - value, - onChange: (_2, newVal) => onChange(newVal), - disabled: !field.ux.edit, - orientation: field.ux.direction, - track: field.ux.track, - valueLabelDisplay: field.ux.props.valueLabelDisplay - } - ) + step: field.ux.step, + marks: resolveMarks(field.ux.props.marks), + min: field.ux.min, + max: field.ux.max, + value: controllerField.value, + onChange: (_2, newVal) => controllerField.onChange(newVal), + disabled: !field.ux.edit, + orientation: field.ux.direction, + track: field.ux.track, + valueLabelDisplay: field.ux.props.valueLabelDisplay }, - `${field.id}-controller` + `${field.id}-slider` ), /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }); @@ -64953,36 +64947,35 @@ function BasicEntityRadioGroupField(props) { const basicEntityRadioGroupField = BasicEntityRadioGroupFieldSpecShape(spec); const { control, field, errors } = basicEntityRadioGroupField; const err = errors[field.name]; + const { + field: controllerField, + fieldState: { error } + } = useController({ + name: field.name, + control, + defaultValue: field.cat.default + }); return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx(FormLabel$1, { children: field.label }, `${field.id}-label`), /* @__PURE__ */ jsxRuntimeExports.jsx( - Controller, - { - name: field.name, - control, - defaultValue: field.cat.default, - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( - RadioGroup, - __spreadProps(__spreadValues({ - value, - onChange, - row: "row" === field.ux.direction, - disabled: !field.ux.edit - }, field.ux.props), { - children: resolveCategories$1(field.cat).map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx( - FormControlLabel$1, - { - value: option.key, - control: /* @__PURE__ */ jsxRuntimeExports.jsx(Radio$1, { disabled: !field.ux.edit }), - label: option.title - }, - `${option.key}-option` - )) - }), - field.id - ) - }, - `${field.id}-controller` + RadioGroup, + __spreadProps(__spreadValues({ + value: controllerField.value, + onChange: controllerField.onChange, + row: "row" === field.ux.direction, + disabled: !field.ux.edit + }, field.ux.props), { + children: resolveCategories$1(field.cat).map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx( + FormControlLabel$1, + { + value: option.key, + control: /* @__PURE__ */ jsxRuntimeExports.jsx(Radio$1, { disabled: !field.ux.edit }), + label: option.title + }, + `${option.key}-option` + )) + }), + field.id ), /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }); @@ -65231,26 +65224,25 @@ function BasicEntityRatingField(props) { const { control, field, getValues, errors } = basicEntityRatingField; const val = getValues(field.name); const err = errors[field.name]; + const { + field: controllerField, + fieldState: { error } + } = useController({ + name: field.name, + control, + defaultValue: !!val || 0 + }); return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx(FormLabel$1, { component: "legend", children: field.label }), /* @__PURE__ */ jsxRuntimeExports.jsx( - Controller, - { + Rating, + __spreadValues({ name: field.name, - control, - defaultValue: !!val || 0, - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( - Rating, - __spreadValues({ - name: field.name, - value, - precision: field.ux.precision, - onChange: (_2, newValue) => onChange(newValue), - disabled: !field.ux.edit - }, field.ux.props) - ) - }, - `${field.id}-controller` + value: controllerField.value, + precision: field.ux.precision, + onChange: (_2, newValue) => controllerField.onChange(newValue), + disabled: !field.ux.edit + }, field.ux.props) ), /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, `${field.id}-div`); @@ -65317,26 +65309,9 @@ const BasicEntityButtonGroupFieldSpecShape = gubu_minExports.Gubu( function BasicEntityButtonGroupField(props) { const { spec } = props; const basicEntityButtonGroupField = BasicEntityButtonGroupFieldSpecShape(spec); - const { control, field } = basicEntityButtonGroupField; - return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx( - Controller, - { - name: field.name, - control, - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx(ButtonGroup, __spreadProps(__spreadValues({ disabled: !field.ux.edit }, field.ux.props), { children: Object.entries(field.options.ents).map( - ([key, val]) => /* @__PURE__ */ jsxRuntimeExports.jsx( - Button$1, - { - onClick: () => { - }, - children: val == null ? void 0 : val[field.options.label.field] - }, - `${field.id}-${key}` - ) - ) })) - }, - `${field.id}-controller` - ) }, `${field.id}-div`); + const { field } = basicEntityButtonGroupField; + return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(ButtonGroup, __spreadProps(__spreadValues({ disabled: !field.ux.edit }, field.ux.props), { children: Object.entries(field.options.ents).map(([key, val]) => /* @__PURE__ */ jsxRuntimeExports.jsx(Button$1, { onClick: () => { + }, children: val == null ? void 0 : val[field.options.label.field] }, `${field.id}-${key}`)) })) }, `${field.id}-div`); } const CMPNAME$b = "BasicEntitySelectField"; const { Open: Open$9 } = gubu_minExports.Gubu; @@ -65371,33 +65346,32 @@ function BasicEntitySelectField(props) { const basicEntitySelectField = BasicEntitySelectFieldSpecShape(spec); const { control, field, errors } = basicEntitySelectField; const err = errors[field.name]; + const { + field: controllerField, + fieldState: { error } + } = useController({ + name: field.name, + control, + defaultValue: resolveDefault(field.cat) + }); return /* @__PURE__ */ jsxRuntimeExports.jsxs(Box$2, { children: [ - /* @__PURE__ */ jsxRuntimeExports.jsx( - Controller, - { - name: field.name, - control, - defaultValue: resolveDefault(field.cat), - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(FormControl$1, { fullWidth: true, children: [ - /* @__PURE__ */ jsxRuntimeExports.jsx(InputLabel$1, { id: `${field.id}-label`, children: field.label }), - /* @__PURE__ */ jsxRuntimeExports.jsx( - Select$1, - __spreadProps(__spreadValues({ - labelId: `${field.id}-label`, - id: `${field.id}-select`, - value: resolveValue(value, field.cat), - multiple: field.cat.multiple !== 1, - label: field.name, - onChange: (event) => onChange(event.target.value), - disabled: !field.ux.edit - }, field.ux.props), { - children: resolveCategories(field.cat).map((opt) => /* @__PURE__ */ jsxRuntimeExports.jsx(MenuItem$1, { value: opt.key, children: opt.title }, opt.key)) - }) - ) - ] }) - }, - `${field.id}-controller` - ), + /* @__PURE__ */ jsxRuntimeExports.jsxs(FormControl$1, { fullWidth: true, children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx(InputLabel$1, { id: `${field.id}-label`, children: field.label }), + /* @__PURE__ */ jsxRuntimeExports.jsx( + Select$1, + __spreadProps(__spreadValues({ + labelId: `${field.id}-label`, + id: `${field.id}-select`, + value: resolveValue(controllerField.value, field.cat), + multiple: field.cat.multiple !== 1, + label: field.name, + onChange: (event) => controllerField.onChange(event.target.value), + disabled: !field.ux.edit + }, field.ux.props), { + children: resolveCategories(field.cat).map((opt) => /* @__PURE__ */ jsxRuntimeExports.jsx(MenuItem$1, { value: opt.key, children: opt.title }, opt.key)) + }) + ) + ] }), /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, `${field.id}-box`); } @@ -65472,27 +65446,26 @@ function BasicEntitySwitchField(props) { const { control, field, getValues, errors } = basicEntitySwitchField; const val = getValues(field.name); const err = errors[field.name]; + const { + field: controllerField, + fieldState: { error } + } = useController({ + name: field.name, + control, + defaultValue: !!val + }); return /* @__PURE__ */ jsxRuntimeExports.jsxs(Box$2, { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx( FormControlLabel$1, { control: /* @__PURE__ */ jsxRuntimeExports.jsx( - Controller, - { - name: field.name, - control, - defaultValue: !!val, - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( - Switch$1, - __spreadValues({ - id: field.id, - checked: value, - onChange, - disabled: !field.ux.edit - }, field.ux.props) - ) - }, - `${field.id}-controller` + Switch$1, + __spreadValues({ + id: field.id, + checked: controllerField.value, + onChange: controllerField.onChange, + disabled: !field.ux.edit + }, field.ux.props) ), label: field.label } @@ -65534,28 +65507,27 @@ function BasicEntityToggleButtonField(props) { const basicEntityToggleButtonField = BasicEntityToggleButtonFieldSpecShape(spec); const { control, field, errors } = basicEntityToggleButtonField; const err = errors[field.name]; + const { + field: controllerField, + fieldState: { error } + } = useController({ + name: field.name, + control + }); return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx(FormLabel$1, { component: "legend", children: field.label }), /* @__PURE__ */ jsxRuntimeExports.jsx( - Controller, - { - name: field.name, - control, - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( - ToggleButtonGroup, - __spreadProps(__spreadValues({ - value, - exclusive: field.cat.multiple === 1 ? true : false, - onChange: (_2, v) => { - field.cat.multiple === 1 ? onChange(v) : onChange([v]); - }, - disabled: !field.ux.edit - }, field.ux.props), { - children: Object.entries(field.cat.item).map(([key, val]) => /* @__PURE__ */ jsxRuntimeExports.jsx(ToggleButton, { value: key, children: val == null ? void 0 : val.title }, `${field.id}-${key}`)) - }) - ) - }, - `${field.id}-controller` + ToggleButtonGroup, + __spreadProps(__spreadValues({ + value: controllerField.value, + exclusive: field.cat.multiple === 1 ? true : false, + onChange: (_2, v) => { + field.cat.multiple === 1 ? controllerField.onChange(v) : controllerField.onChange([v]); + }, + disabled: !field.ux.edit + }, field.ux.props), { + children: Object.entries(field.cat.item).map(([key, val]) => /* @__PURE__ */ jsxRuntimeExports.jsx(ToggleButton, { value: key, children: val == null ? void 0 : val.title }, `${field.id}-${key}`)) + }) ), /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, `${field.id}-box`); diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index eea9d91..e23d5ad 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -64712,27 +64712,26 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const { control, field, getValues, errors } = basicEntityCheckboxField; const val = getValues(field.name); const err = errors[field.name]; + const { + field: controllerField, + fieldState: { error } + } = useController({ + name: field.name, + control, + defaultValue: !!val + }); return /* @__PURE__ */ jsxRuntimeExports.jsxs(material.Box, { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx( material.FormControlLabel, { control: /* @__PURE__ */ jsxRuntimeExports.jsx( - Controller, - { - name: field.name, - control, - defaultValue: !!val, - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( - material.Checkbox, - __spreadValues({ - id: field.id, - checked: value, - onChange, - disabled: !field.ux.edit - }, field.ux.props) - ) - }, - `${field.id}-controller` + material.Checkbox, + __spreadValues({ + id: field.id, + checked: controllerField.value, + onChange: controllerField.onChange, + disabled: !field.ux.edit + }, field.ux.props) ), label: field.label } @@ -64773,31 +64772,29 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const basicEntityAutocompleteField = BasicEntityAutocompleteFieldSpecShape(spec); const { control, field, errors } = basicEntityAutocompleteField; const err = errors[field.name]; + const { + field: controllerField, + fieldState: { error } + } = useController({ + name: field.name, + control, + defaultValue: resolveDefault$2(field.cat) + }); return /* @__PURE__ */ jsxRuntimeExports.jsxs(material.Box, { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx( - Controller, - { - name: field.name, - control, - defaultValue: resolveDefault$2(field.cat), - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( - material.Autocomplete, - __spreadProps(__spreadValues({ - freeSolo: true, - forcePopupIcon: true, - multiple: field.cat.multiple !== 1, - options: resolveCategories$2(field.cat), - isOptionEqualToValue: (opt, val) => opt === val || (opt == null ? void 0 : opt.id) != null && (val == null ? void 0 : val.id) != null && opt.id === val.id || (opt == null ? void 0 : opt.key) != null && (val == null ? void 0 : val.key) != null && opt.key === val.key, - getOptionLabel: (option) => option.title, - value: resolveValue$1(value, field.cat), - disabled: !field.ux.edit - }, field.ux.props), { - onChange: (_2, newVal) => onChange(newVal), - renderInput: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.TextField, __spreadProps(__spreadValues({}, params), { label: field.label })) - }) - ) - }, - `${field.id}-controller` + material.Autocomplete, + __spreadValues({ + freeSolo: true, + forcePopupIcon: true, + multiple: field.cat.multiple !== 1, + options: resolveCategories$2(field.cat), + isOptionEqualToValue: (opt, val) => opt === val || (opt == null ? void 0 : opt.id) != null && (val == null ? void 0 : val.id) != null && opt.id === val.id || (opt == null ? void 0 : opt.key) != null && (val == null ? void 0 : val.key) != null && opt.key === val.key, + getOptionLabel: (option) => option.title, + value: resolveValue$1(controllerField.value, field.cat), + disabled: !field.ux.edit, + onChange: (_2, newVal) => controllerField.onChange(newVal), + renderInput: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.TextField, __spreadProps(__spreadValues({}, params), { label: field.label })) + }, field.ux.props) ), /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, `${field.id}-box`); @@ -64891,31 +64888,28 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const { control, field, getValues, errors } = basicEntityAutocompleteField; const val = getValues(field.name); const err = errors[field.name]; - return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [ + const { field: controllerField } = useController({ + name: field.name, + control, + defaultValue: val || field.ux.min + }); + return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx(material.FormLabel, { children: field.label }, `${field.id}-label`), /* @__PURE__ */ jsxRuntimeExports.jsx( - Controller, + material.Slider, { - name: field.name, - control, - defaultValue: val || field.ux.min, - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( - material.Slider, - { - step: field.ux.step, - marks: resolveMarks(field.ux.props.marks), - min: field.ux.min, - max: field.ux.max, - value, - onChange: (_2, newVal) => onChange(newVal), - disabled: !field.ux.edit, - orientation: field.ux.direction, - track: field.ux.track, - valueLabelDisplay: field.ux.props.valueLabelDisplay - } - ) + step: field.ux.step, + marks: resolveMarks(field.ux.props.marks), + min: field.ux.min, + max: field.ux.max, + value: controllerField.value, + onChange: (_2, newVal) => controllerField.onChange(newVal), + disabled: !field.ux.edit, + orientation: field.ux.direction, + track: field.ux.track, + valueLabelDisplay: field.ux.props.valueLabelDisplay }, - `${field.id}-controller` + `${field.id}-slider` ), /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }); @@ -64965,36 +64959,35 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const basicEntityRadioGroupField = BasicEntityRadioGroupFieldSpecShape(spec); const { control, field, errors } = basicEntityRadioGroupField; const err = errors[field.name]; + const { + field: controllerField, + fieldState: { error } + } = useController({ + name: field.name, + control, + defaultValue: field.cat.default + }); return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx(material.FormLabel, { children: field.label }, `${field.id}-label`), /* @__PURE__ */ jsxRuntimeExports.jsx( - Controller, - { - name: field.name, - control, - defaultValue: field.cat.default, - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( - material.RadioGroup, - __spreadProps(__spreadValues({ - value, - onChange, - row: "row" === field.ux.direction, - disabled: !field.ux.edit - }, field.ux.props), { - children: resolveCategories$1(field.cat).map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx( - material.FormControlLabel, - { - value: option.key, - control: /* @__PURE__ */ jsxRuntimeExports.jsx(material.Radio, { disabled: !field.ux.edit }), - label: option.title - }, - `${option.key}-option` - )) - }), - field.id - ) - }, - `${field.id}-controller` + material.RadioGroup, + __spreadProps(__spreadValues({ + value: controllerField.value, + onChange: controllerField.onChange, + row: "row" === field.ux.direction, + disabled: !field.ux.edit + }, field.ux.props), { + children: resolveCategories$1(field.cat).map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx( + material.FormControlLabel, + { + value: option.key, + control: /* @__PURE__ */ jsxRuntimeExports.jsx(material.Radio, { disabled: !field.ux.edit }), + label: option.title + }, + `${option.key}-option` + )) + }), + field.id ), /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }); @@ -65243,26 +65236,25 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const { control, field, getValues, errors } = basicEntityRatingField; const val = getValues(field.name); const err = errors[field.name]; + const { + field: controllerField, + fieldState: { error } + } = useController({ + name: field.name, + control, + defaultValue: !!val || 0 + }); return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx(material.FormLabel, { component: "legend", children: field.label }), /* @__PURE__ */ jsxRuntimeExports.jsx( - Controller, - { + material.Rating, + __spreadValues({ name: field.name, - control, - defaultValue: !!val || 0, - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( - material.Rating, - __spreadValues({ - name: field.name, - value, - precision: field.ux.precision, - onChange: (_2, newValue) => onChange(newValue), - disabled: !field.ux.edit - }, field.ux.props) - ) - }, - `${field.id}-controller` + value: controllerField.value, + precision: field.ux.precision, + onChange: (_2, newValue) => controllerField.onChange(newValue), + disabled: !field.ux.edit + }, field.ux.props) ), /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, `${field.id}-div`); @@ -65329,26 +65321,9 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha function BasicEntityButtonGroupField(props) { const { spec } = props; const basicEntityButtonGroupField = BasicEntityButtonGroupFieldSpecShape(spec); - const { control, field } = basicEntityButtonGroupField; - return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx( - Controller, - { - name: field.name, - control, - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.ButtonGroup, __spreadProps(__spreadValues({ disabled: !field.ux.edit }, field.ux.props), { children: Object.entries(field.options.ents).map( - ([key, val]) => /* @__PURE__ */ jsxRuntimeExports.jsx( - material.Button, - { - onClick: () => { - }, - children: val == null ? void 0 : val[field.options.label.field] - }, - `${field.id}-${key}` - ) - ) })) - }, - `${field.id}-controller` - ) }, `${field.id}-div`); + const { field } = basicEntityButtonGroupField; + return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(material.ButtonGroup, __spreadProps(__spreadValues({ disabled: !field.ux.edit }, field.ux.props), { children: Object.entries(field.options.ents).map(([key, val]) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.Button, { onClick: () => { + }, children: val == null ? void 0 : val[field.options.label.field] }, `${field.id}-${key}`)) })) }, `${field.id}-div`); } const CMPNAME$b = "BasicEntitySelectField"; const { Open: Open$9 } = gubu_minExports.Gubu; @@ -65383,33 +65358,32 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const basicEntitySelectField = BasicEntitySelectFieldSpecShape(spec); const { control, field, errors } = basicEntitySelectField; const err = errors[field.name]; + const { + field: controllerField, + fieldState: { error } + } = useController({ + name: field.name, + control, + defaultValue: resolveDefault(field.cat) + }); return /* @__PURE__ */ jsxRuntimeExports.jsxs(material.Box, { children: [ - /* @__PURE__ */ jsxRuntimeExports.jsx( - Controller, - { - name: field.name, - control, - defaultValue: resolveDefault(field.cat), - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(material.FormControl, { fullWidth: true, children: [ - /* @__PURE__ */ jsxRuntimeExports.jsx(material.InputLabel, { id: `${field.id}-label`, children: field.label }), - /* @__PURE__ */ jsxRuntimeExports.jsx( - material.Select, - __spreadProps(__spreadValues({ - labelId: `${field.id}-label`, - id: `${field.id}-select`, - value: resolveValue(value, field.cat), - multiple: field.cat.multiple !== 1, - label: field.name, - onChange: (event) => onChange(event.target.value), - disabled: !field.ux.edit - }, field.ux.props), { - children: resolveCategories(field.cat).map((opt) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.MenuItem, { value: opt.key, children: opt.title }, opt.key)) - }) - ) - ] }) - }, - `${field.id}-controller` - ), + /* @__PURE__ */ jsxRuntimeExports.jsxs(material.FormControl, { fullWidth: true, children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx(material.InputLabel, { id: `${field.id}-label`, children: field.label }), + /* @__PURE__ */ jsxRuntimeExports.jsx( + material.Select, + __spreadProps(__spreadValues({ + labelId: `${field.id}-label`, + id: `${field.id}-select`, + value: resolveValue(controllerField.value, field.cat), + multiple: field.cat.multiple !== 1, + label: field.name, + onChange: (event) => controllerField.onChange(event.target.value), + disabled: !field.ux.edit + }, field.ux.props), { + children: resolveCategories(field.cat).map((opt) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.MenuItem, { value: opt.key, children: opt.title }, opt.key)) + }) + ) + ] }), /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, `${field.id}-box`); } @@ -65484,27 +65458,26 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const { control, field, getValues, errors } = basicEntitySwitchField; const val = getValues(field.name); const err = errors[field.name]; + const { + field: controllerField, + fieldState: { error } + } = useController({ + name: field.name, + control, + defaultValue: !!val + }); return /* @__PURE__ */ jsxRuntimeExports.jsxs(material.Box, { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx( material.FormControlLabel, { control: /* @__PURE__ */ jsxRuntimeExports.jsx( - Controller, - { - name: field.name, - control, - defaultValue: !!val, - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( - material.Switch, - __spreadValues({ - id: field.id, - checked: value, - onChange, - disabled: !field.ux.edit - }, field.ux.props) - ) - }, - `${field.id}-controller` + material.Switch, + __spreadValues({ + id: field.id, + checked: controllerField.value, + onChange: controllerField.onChange, + disabled: !field.ux.edit + }, field.ux.props) ), label: field.label } @@ -65546,28 +65519,27 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const basicEntityToggleButtonField = BasicEntityToggleButtonFieldSpecShape(spec); const { control, field, errors } = basicEntityToggleButtonField; const err = errors[field.name]; + const { + field: controllerField, + fieldState: { error } + } = useController({ + name: field.name, + control + }); return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx(material.FormLabel, { component: "legend", children: field.label }), /* @__PURE__ */ jsxRuntimeExports.jsx( - Controller, - { - name: field.name, - control, - render: ({ field: { onChange, value } }) => /* @__PURE__ */ jsxRuntimeExports.jsx( - material.ToggleButtonGroup, - __spreadProps(__spreadValues({ - value, - exclusive: field.cat.multiple === 1 ? true : false, - onChange: (_2, v) => { - field.cat.multiple === 1 ? onChange(v) : onChange([v]); - }, - disabled: !field.ux.edit - }, field.ux.props), { - children: Object.entries(field.cat.item).map(([key, val]) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.ToggleButton, { value: key, children: val == null ? void 0 : val.title }, `${field.id}-${key}`)) - }) - ) - }, - `${field.id}-controller` + material.ToggleButtonGroup, + __spreadProps(__spreadValues({ + value: controllerField.value, + exclusive: field.cat.multiple === 1 ? true : false, + onChange: (_2, v) => { + field.cat.multiple === 1 ? controllerField.onChange(v) : controllerField.onChange([v]); + }, + disabled: !field.ux.edit + }, field.ux.props), { + children: Object.entries(field.cat.item).map(([key, val]) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.ToggleButton, { value: key, children: val == null ? void 0 : val.title }, `${field.id}-${key}`)) + }) ), /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, `${field.id}-box`); diff --git a/src/lib/BasicEntityAutocompleteField.tsx b/src/lib/BasicEntityAutocompleteField.tsx index 51018b9..dc39f1e 100644 --- a/src/lib/BasicEntityAutocompleteField.tsx +++ b/src/lib/BasicEntityAutocompleteField.tsx @@ -1,7 +1,7 @@ -import React, { useEffect, forwardRef } from 'react' +import React from 'react' import { TextField, Autocomplete, Box } from '@mui/material' -import { Controller } from 'react-hook-form' +import { useController } from 'react-hook-form' import type { Spec } from './basic-types' @@ -40,51 +40,100 @@ const BasicEntityAutocompleteFieldSpecShape = Gubu( function BasicEntityAutocompleteField (props: any) { const { spec } = props - const basicEntityAutocompleteField: Spec = BasicEntityAutocompleteFieldSpecShape(spec) + const basicEntityAutocompleteField: Spec = + BasicEntityAutocompleteFieldSpecShape(spec) const { control, field, errors } = basicEntityAutocompleteField - const err = errors[field.name] + const { + field: controllerField, + fieldState: { error }, + } = useController({ + name: field.name, + control, + defaultValue: resolveDefault(field.cat), + }) + return ( - ( - - opt === val || - (opt?.id != null && val?.id != null && opt.id === val.id) || - (opt?.key != null && val?.key != null && opt.key === val.key) - } - getOptionLabel={(option: any) => option.title} - value={resolveValue(value, field.cat)} - disabled={!field.ux.edit} - {...field.ux.props} - onChange={(_, newVal: any) => onChange(newVal)} - renderInput={(params: any) => } - /> + + opt === val || + (opt?.id != null && val?.id != null && opt.id === val.id) || + (opt?.key != null && val?.key != null && opt.key === val.key) + } + getOptionLabel={(option: any) => option.title} + value={resolveValue(controllerField.value, field.cat)} + disabled={!field.ux.edit} + onChange={(_, newVal: any) => controllerField.onChange(newVal)} + renderInput={(params: any) => ( + )} + {...field.ux.props} /> ) } -export function resolveCategories (cat: { item: Record }) { +// function BasicEntityAutocompleteField (props: any) { +// const { spec } = props + +// const basicEntityAutocompleteField: Spec = BasicEntityAutocompleteFieldSpecShape(spec) +// const { control, field, errors } = basicEntityAutocompleteField + +// const err = errors[field.name] + +// return ( +// +// ( +// +// opt === val || +// (opt?.id != null && val?.id != null && opt.id === val.id) || +// (opt?.key != null && val?.key != null && opt.key === val.key) +// } +// getOptionLabel={(option: any) => option.title} +// value={resolveValue(value, field.cat)} +// disabled={!field.ux.edit} +// {...field.ux.props} +// onChange={(_, newVal: any) => onChange(newVal)} +// renderInput={(params: any) => } +// /> +// )} +// /> +// +// +// ) +// } + +export function resolveCategories (cat: { + item: Record +}) { return Object.keys(cat.item).map((key) => ({ title: cat.item?.[key]?.title, key: key, })) } -export function resolveDefault (cat: { multiple: number; item: any; default: string }) { +export function resolveDefault (cat: { + multiple: number + item: any + default: string +}) { const { multiple, item: items, default: defaultValues } = cat if (Object.keys(items).length === 0) { @@ -132,7 +181,8 @@ export function resolveValue ( return multiple === 1 ? value : [value] } - const mapValue = (val: string) => (items[val] ? { key: val, title: items[val].title } : undefined) + const mapValue = (val: string) => + items[val] ? { key: val, title: items[val].title } : undefined const splitValue = value.split(',') switch (multiple) { diff --git a/src/lib/BasicEntityButtonGroupField.tsx b/src/lib/BasicEntityButtonGroupField.tsx index c7154cb..40fe8da 100644 --- a/src/lib/BasicEntityButtonGroupField.tsx +++ b/src/lib/BasicEntityButtonGroupField.tsx @@ -1,11 +1,10 @@ import React from 'react' import { Button, ButtonGroup } from '@mui/material' -import { Controller } from 'react-hook-form' import type { Spec } from './basic-types' -import { Default, Exact, Gubu, Skip } from 'gubu' +import { Default, Exact, Gubu } from 'gubu' const CMPNAME = 'BasicEntitySliderField' const { Open } = Gubu @@ -31,39 +30,59 @@ const BasicEntityButtonGroupFieldSpecShape = Gubu( { name: CMPNAME } ) -function BasicEntityButtonGroupField(props: any) { +function BasicEntityButtonGroupField (props: any) { const { spec } = props const basicEntityButtonGroupField: Spec = BasicEntityButtonGroupFieldSpecShape(spec) - const { control, field } = basicEntityButtonGroupField - // const val = getValues(field.name) + const { field } = basicEntityButtonGroupField return (
- ( - - {Object.entries(field.options.ents).map( - ([key, val]: [any, any]) => ( - - ) - )} - - )} - /> + + {Object.entries(field.options.ents).map(([key, val]: [any, any]) => ( + + ))} +
) } +// function BasicEntityButtonGroupField(props: any) { +// const { spec } = props + +// const basicEntityButtonGroupField: Spec = +// BasicEntityButtonGroupFieldSpecShape(spec) +// const { control, field } = basicEntityButtonGroupField +// // const val = getValues(field.name) + +// return ( +//
+// ( +// +// {Object.entries(field.options.ents).map( +// ([key, val]: [any, any]) => ( +// +// ) +// )} +// +// )} +// /> +//
+// ) +// } + export { BasicEntityButtonGroupField } diff --git a/src/lib/BasicEntityCheckboxField.tsx b/src/lib/BasicEntityCheckboxField.tsx index 668f2c8..53b1fc1 100644 --- a/src/lib/BasicEntityCheckboxField.tsx +++ b/src/lib/BasicEntityCheckboxField.tsx @@ -1,7 +1,7 @@ -import React, { useEffect, forwardRef } from 'react' +import React from 'react' import { FormControlLabel, Checkbox, Box } from '@mui/material' -import { Controller } from 'react-hook-form' +import { useController } from 'react-hook-form' import type { Spec } from './basic-types' @@ -33,28 +33,28 @@ function BasicEntityCheckboxField (props: any) { const basicEntityCheckboxField: Spec = BasicEntityCheckboxFieldSpecShape(spec) const { control, field, getValues, errors } = basicEntityCheckboxField const val = getValues(field.name) - const err = errors[field.name] + const { + field: controllerField, + fieldState: { error }, + } = useController({ + name: field.name, + control, + defaultValue: !!val, + }) + // TODO: Style wrapper box return ( ( - - )} + } label={field.label} @@ -64,4 +64,41 @@ function BasicEntityCheckboxField (props: any) { ) } +// function BasicEntityCheckboxField (props: any) { +// const { spec } = props + +// const basicEntityCheckboxField: Spec = BasicEntityCheckboxFieldSpecShape(spec) +// const { control, field, getValues, errors } = basicEntityCheckboxField +// const val = getValues(field.name) + +// const err = errors[field.name] + +// // TODO: Style wrapper box +// return ( +// +// ( +// +// )} +// /> +// } +// label={field.label} +// /> +// +// +// ) +// } + export { BasicEntityCheckboxField } diff --git a/src/lib/BasicEntityRadioGroupField.tsx b/src/lib/BasicEntityRadioGroupField.tsx index 5bc23a3..213756b 100644 --- a/src/lib/BasicEntityRadioGroupField.tsx +++ b/src/lib/BasicEntityRadioGroupField.tsx @@ -1,7 +1,7 @@ -import React, { useEffect, forwardRef } from 'react' +import React from 'react' import { FormControlLabel, RadioGroup, Radio, FormLabel } from '@mui/material' -import { Controller } from 'react-hook-form' +import { useController } from 'react-hook-form' import type { Spec } from './basic-types' @@ -40,44 +40,87 @@ const BasicEntityRadioGroupFieldSpecShape = Gubu( function BasicEntityRadioGroupField (props: any) { const { spec } = props - const basicEntityRadioGroupField: Spec = BasicEntityRadioGroupFieldSpecShape(spec) + const basicEntityRadioGroupField: Spec = + BasicEntityRadioGroupFieldSpecShape(spec) const { control, field, errors } = basicEntityRadioGroupField const err = errors[field.name] + const { + field: controllerField, + fieldState: { error }, + } = useController({ + name: field.name, + control, + defaultValue: field.cat.default, + }) + return ( <> {field.label} - ( - - {resolveCategories(field.cat).map((option: any) => ( - } - label={option.title} - /> - ))} - - )} - /> + + {resolveCategories(field.cat).map((option: any) => ( + } + label={option.title} + /> + ))} + ) } +// function BasicEntityRadioGroupField (props: any) { +// const { spec } = props + +// const basicEntityRadioGroupField: Spec = BasicEntityRadioGroupFieldSpecShape(spec) +// const { control, field, errors } = basicEntityRadioGroupField + +// const err = errors[field.name] + +// return ( +// <> +// {field.label} +// ( +// +// {resolveCategories(field.cat).map((option: any) => ( +// } +// label={option.title} +// /> +// ))} +// +// )} +// /> +// +// +// ) +// } + export function resolveCategories (cat: any) { return Object.keys(cat.item).map((key) => ({ title: cat.item?.[key]?.title, diff --git a/src/lib/BasicEntityRatingField.tsx b/src/lib/BasicEntityRatingField.tsx index 0d39ce5..f015f26 100644 --- a/src/lib/BasicEntityRatingField.tsx +++ b/src/lib/BasicEntityRatingField.tsx @@ -1,7 +1,7 @@ import React from 'react' import { Rating, FormLabel } from '@mui/material' -import { Controller } from 'react-hook-form' +import { useController } from 'react-hook-form' import type { Spec } from './basic-types' @@ -34,31 +34,64 @@ function BasicEntityRatingField (props: any) { const basicEntityRatingField: Spec = BasicEntityRatingFieldSpecShape(spec) const { control, field, getValues, errors } = basicEntityRatingField const val = getValues(field.name) - const err = errors[field.name] + const { + field: controllerField, + fieldState: { error }, + } = useController({ + name: field.name, + control, + defaultValue: !!val || 0, + }) + return (
{field.label} - ( - onChange(newValue)} - disabled={!field.ux.edit} - {...field.ux.props} - /> - )} + value={controllerField.value} + precision={field.ux.precision} + onChange={(_, newValue) => controllerField.onChange(newValue)} + disabled={!field.ux.edit} + {...field.ux.props} />
) } +// function BasicEntityRatingField (props: any) { +// const { spec } = props + +// const basicEntityRatingField: Spec = BasicEntityRatingFieldSpecShape(spec) +// const { control, field, getValues, errors } = basicEntityRatingField +// const val = getValues(field.name) + +// const err = errors[field.name] + +// return ( +//
+// {field.label} +// ( +// onChange(newValue)} +// disabled={!field.ux.edit} +// {...field.ux.props} +// /> +// )} +// /> +// +//
+// ) +// } + export { BasicEntityRatingField } diff --git a/src/lib/BasicEntitySelectField.tsx b/src/lib/BasicEntitySelectField.tsx index 175b6e5..00e40b5 100644 --- a/src/lib/BasicEntitySelectField.tsx +++ b/src/lib/BasicEntitySelectField.tsx @@ -1,7 +1,7 @@ import React from 'react' import { FormControl, InputLabel, Select, MenuItem, Box } from '@mui/material' -import { Controller } from 'react-hook-form' +import { useController } from 'react-hook-form' import type { Spec } from './basic-types' @@ -42,43 +42,87 @@ function BasicEntitySelectField (props: any) { const basicEntitySelectField: Spec = BasicEntitySelectFieldSpecShape(spec) const { control, field, errors } = basicEntitySelectField - const err = errors[field.name] + const { + field: controllerField, + fieldState: { error }, + } = useController({ + name: field.name, + control, + defaultValue: resolveDefault(field.cat), + }) + return ( - ( - - {field.label} - - - )} - /> + + {field.label} + + ) } +// function BasicEntitySelectField (props: any) { +// const { spec } = props + +// const basicEntitySelectField: Spec = BasicEntitySelectFieldSpecShape(spec) +// const { control, field, errors } = basicEntitySelectField + +// const err = errors[field.name] + +// return ( +// +// ( +// +// {field.label} +// +// +// )} +// /> +// +// +// ) +// } + // Returns array of options based on field.cat object export function resolveCategories (cat: any) { return Object.keys(cat.item).map((key) => ({ @@ -87,7 +131,11 @@ export function resolveCategories (cat: any) { })) } -export function resolveDefault (cat: { multiple: number; item: any; default: string }) { +export function resolveDefault (cat: { + multiple: number + item: any + default: string +}) { const { multiple, item: items, default: defaultValues } = cat if (Object.keys(items).length === 0) { @@ -105,7 +153,10 @@ export function resolveDefault (cat: { multiple: number; item: any; default: str case -1: return mapResolvedDefault(defaultItems).filter(Boolean) || [] default: - return mapResolvedDefault(defaultItems.slice(0, multiple)).filter(Boolean) || [] + return ( + mapResolvedDefault(defaultItems.slice(0, multiple)).filter(Boolean) || + [] + ) } } diff --git a/src/lib/BasicEntitySliderField.tsx b/src/lib/BasicEntitySliderField.tsx index 991381e..c9deb62 100644 --- a/src/lib/BasicEntitySliderField.tsx +++ b/src/lib/BasicEntitySliderField.tsx @@ -1,7 +1,7 @@ -import React, { useEffect, forwardRef } from 'react' +import React from 'react' import { FormLabel, Slider } from '@mui/material' -import { Controller } from 'react-hook-form' +import { useController } from 'react-hook-form' import type { Spec } from './basic-types' @@ -43,39 +43,76 @@ function BasicEntitySliderField (props: any) { const { control, field, getValues, errors } = basicEntityAutocompleteField // if cmp not ready, call seneca.add('modify:edit') and seneca.add('modify:save') - const val = getValues(field.name) // field.name + '_uival$' - const err = errors[field.name] + const { field: controllerField } = useController({ + name: field.name, + control, + defaultValue: val || field.ux.min, + }) + return ( - <> +
{field.label} - ( - onChange(newVal)} - disabled={!field.ux.edit} - orientation={field.ux.direction} - track={field.ux.track} - valueLabelDisplay={field.ux.props.valueLabelDisplay} - /> - )} + controllerField.onChange(newVal)} + disabled={!field.ux.edit} + orientation={field.ux.direction} + track={field.ux.track} + valueLabelDisplay={field.ux.props.valueLabelDisplay} /> - +
) } +// function BasicEntitySliderField (props: any) { +// const { spec } = props + +// const basicEntityAutocompleteField: Spec = +// BasicEntitySliderFieldSpecShape(spec) +// const { control, field, getValues, errors } = basicEntityAutocompleteField + +// // if cmp not ready, call seneca.add('modify:edit') and seneca.add('modify:save') +// const val = getValues(field.name) // field.name + '_uival$' + +// const err = errors[field.name] + +// return ( +// <> +// {field.label} +// ( +// onChange(newVal)} +// disabled={!field.ux.edit} +// orientation={field.ux.direction} +// track={field.ux.track} +// valueLabelDisplay={field.ux.props.valueLabelDisplay} +// /> +// )} +// /> +// +// +// ) +// } + function resolveMarks (marks: any) { if ( !marks || diff --git a/src/lib/BasicEntitySwitchField.tsx b/src/lib/BasicEntitySwitchField.tsx index 1308988..b9e6249 100644 --- a/src/lib/BasicEntitySwitchField.tsx +++ b/src/lib/BasicEntitySwitchField.tsx @@ -1,7 +1,7 @@ -import React, { useEffect, forwardRef } from 'react' +import React from 'react' import { FormControlLabel, Box, Switch } from '@mui/material' -import { Controller } from 'react-hook-form' +import { useController } from 'react-hook-form' import type { Spec } from './basic-types' @@ -36,24 +36,25 @@ function BasicEntitySwitchField (props: any) { const err = errors[field.name] + const { + field: controllerField, + fieldState: { error }, + } = useController({ + name: field.name, + control, + defaultValue: !!val, + }) + return ( ( - - )} + } label={field.label} @@ -63,4 +64,40 @@ function BasicEntitySwitchField (props: any) { ) } +// function BasicEntitySwitchField (props: any) { +// const { spec } = props + +// const basicEntitySwitchField: Spec = BasicEntitySwitchFieldSpecShape(spec) +// const { control, field, getValues, errors } = basicEntitySwitchField +// const val = getValues(field.name) + +// const err = errors[field.name] + +// return ( +// +// ( +// +// )} +// /> +// } +// label={field.label} +// /> +// +// +// ) +// } + export { BasicEntitySwitchField } diff --git a/src/lib/BasicEntityToggleButtonField.tsx b/src/lib/BasicEntityToggleButtonField.tsx index fdcf51f..c14eb85 100644 --- a/src/lib/BasicEntityToggleButtonField.tsx +++ b/src/lib/BasicEntityToggleButtonField.tsx @@ -1,7 +1,7 @@ import React from 'react' import { FormLabel, ToggleButton, ToggleButtonGroup } from '@mui/material' -import { Controller } from 'react-hook-form' +import { useController } from 'react-hook-form' import type { Spec } from './basic-types' @@ -47,34 +47,76 @@ function BasicEntityToggleButtonField (props: any) { const err = errors[field.name] + const { + field: controllerField, + fieldState: { error }, + } = useController({ + name: field.name, + control, + }) + return (
{field.label} - ( - { - field.cat.multiple === 1 ? onChange(v) : onChange([v]) - }} - disabled={!field.ux.edit} - {...field.ux.props} - > - {Object.entries(field.cat.item).map(([key, val]: [any, any]) => ( - - {val?.title} - - ))} - - )} - /> + { + field.cat.multiple === 1 + ? controllerField.onChange(v) + : controllerField.onChange([v]) + }} + disabled={!field.ux.edit} + {...field.ux.props} + > + {Object.entries(field.cat.item).map(([key, val]: [any, any]) => ( + + {val?.title} + + ))} +
) } +// function BasicEntityToggleButtonField (props: any) { +// const { spec } = props + +// const basicEntityToggleButtonField: Spec = +// BasicEntityToggleButtonFieldSpecShape(spec) +// const { control, field, errors } = basicEntityToggleButtonField + +// const err = errors[field.name] + +// return ( +//
+// {field.label} +// ( +// { +// field.cat.multiple === 1 ? onChange(v) : onChange([v]) +// }} +// disabled={!field.ux.edit} +// {...field.ux.props} +// > +// {Object.entries(field.cat.item).map(([key, val]: [any, any]) => ( +// +// {val?.title} +// +// ))} +// +// )} +// /> +// +//
+// ) +// } + export { BasicEntityToggleButtonField } From e3110e48352ddfa0b7760ab7062628abaf62e40d Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 1 Aug 2024 19:37:39 +0100 Subject: [PATCH 090/122] Remove unnecessary code --- src/lib/BasicEntitySliderField.tsx | 6 ++++++ src/lib/VxgBasicEntityFieldPlugin.ts | 25 ------------------------- 2 files changed, 6 insertions(+), 25 deletions(-) diff --git a/src/lib/BasicEntitySliderField.tsx b/src/lib/BasicEntitySliderField.tsx index c9deb62..7659fce 100644 --- a/src/lib/BasicEntitySliderField.tsx +++ b/src/lib/BasicEntitySliderField.tsx @@ -52,6 +52,12 @@ function BasicEntitySliderField (props: any) { defaultValue: val || field.ux.min, }) + // console.log( + // 'BasicEntitySliderField', + // 'controllerField', + // controllerField.value + // ) + return (
{field.label} diff --git a/src/lib/VxgBasicEntityFieldPlugin.ts b/src/lib/VxgBasicEntityFieldPlugin.ts index 74d74b0..91bdc61 100644 --- a/src/lib/VxgBasicEntityFieldPlugin.ts +++ b/src/lib/VxgBasicEntityFieldPlugin.ts @@ -53,31 +53,6 @@ function VxgBasicEntityFieldPlugin (this: any, options: any) { const field: any = spec.field const Field: any = fieldMap[field.ux.kind] - console.log('VxgBasicEntityFieldPlugin', 'init', field.name, field.ux.kind) - - // if ('Slider' === field.ux.kind) { - // console.log( - // 'VxgBasicEntityFieldPlugin', - // 'seneca.add', - // field.name, - // field.ux.kind - // ) - // seneca.add( - // 'aim:app,on:BasicLed,modify:edit,view:podcast', - // function modify_edit_Slider (this: any, msg: any) { - // const item = msg.item - - // const out = this.prior(msg) - - // console.log('VxgBasicLedPlugin', 'modify:edit', 'Slider', out) - - // return item - // } - // ) - // } - - // seneca.add('aim:app,on:BasicLed,modify:save', function (msg: any) {}) - options.setPlugin(true) return { From 2d8014b0cd7d29df9796d202a72852ff5130d4f9 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 1 Aug 2024 19:38:05 +0100 Subject: [PATCH 091/122] Fix hook issue and move modify:edit to BasicEntityEditPlugin --- dist/voxgig-model-react.es.js | 166 +++++++++++++++++++++------- dist/voxgig-model-react.umd.js | 166 +++++++++++++++++++++------- src/lib/BasicEntityEdit.tsx | 58 +++++++--- src/lib/VxgBasicEntityEditPlugin.ts | 124 ++++++++++++++++++++- src/lib/VxgBasicLedPlugin.ts | 31 +----- 5 files changed, 411 insertions(+), 134 deletions(-) diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index aeee4a7..23fb82d 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -65561,7 +65561,6 @@ function VxgBasicEntityFieldPlugin(options) { const spec = Shape$2(options.spec); const field = spec.field; const Field = fieldMap[field.ux.kind]; - console.log("VxgBasicEntityFieldPlugin", "init", field.name, field.ux.kind); options.setPlugin(true); return { exports: { @@ -65652,10 +65651,69 @@ function VxgBasicEntityEditPlugin(options) { const seneca = this; const spec = Shape$1(options.spec); const slot = spec.prefix + spec.name; - const fields = spec.order.reduce( - (a, fn2) => (fixField(fn2, spec.field[fn2], spec), a.push(spec.field[fn2]), a), - [] - ); + const fields = spec.order.reduce((a, fn2) => (fixField(fn2, spec.field[fn2], spec), a.push(spec.field[fn2]), a), []); + console.log("VxgBasicEntityEditPlugin", "init", spec.name, fields); + for (const field of fields) { + if ("Date" === field.ux.kind) { + seneca.add("aim:app,on:BasicLed,modify:edit,view:" + spec.name, function modify_edit_Date(msg) { + return __async(this, null, function* () { + const out = yield this.prior(msg); + let { item } = out; + item = __spreadValues({}, item); + if (!item[field.name + "_orig$"]) { + const dt = util$2.dateTimeFromUTC(item[field.name]); + item[field.name + "_orig$"] = item[field.name]; + item[field.name + "_udm$"] = dt.udm; + item[field.name] = dt.localt; + } + return __spreadProps(__spreadValues({}, msg), { item }); + }); + }); + } else if ("Time" === field.ux.kind) { + seneca.add("aim:app,on:BasicLed,modify:edit,view:" + spec.name, function modify_edit_Time(msg) { + return __async(this, null, function* () { + const out = yield this.prior(msg); + let { item } = out; + item = __spreadValues({}, item); + if (!item[field.name + "_orig$"]) { + const dt = util$2.dateTimeFromUTC(item[field.name]); + item[field.name + "_orig$"] = item[field.name]; + item[field.name + "_udm$"] = dt.udm; + item[field.name] = dt.localt; + } + return __spreadProps(__spreadValues({}, msg), { item }); + }); + }); + } else if ("DateTime" === field.ux.kind) { + seneca.add("aim:app,on:BasicLed,modify:edit,view:" + spec.name, function modify_edit_Datetime(msg) { + return __async(this, null, function* () { + const out = yield this.prior(msg); + let { item } = out; + item = __spreadValues({}, item); + if (!item[field.name + "_orig$"]) { + const dt = util$2.dateTimeFromUTC(item[field.name]); + item[field.name + "_orig$"] = item[field.name]; + item[field.name + "_udm$"] = dt.udm; + item[field.name] = dt.locald + "T" + dt.localt; + } + return __spreadProps(__spreadValues({}, msg), { item }); + }); + }); + } else if ("Slider" === field.ux.kind) { + seneca.add("aim:app,on:BasicLed,modify:edit,view:" + spec.name, function modify_edit_Slider(msg) { + return __async(this, null, function* () { + const out = yield this.prior(msg); + let { item } = out; + item = __spreadValues({}, item); + if (!item[field.name + "_orig$"]) { + item[field.name + "_orig$"] = item[field.name]; + item[field.name] = Number(item[field.name]) / 60; + } + return __spreadProps(__spreadValues({}, msg), { item }); + }); + }); + } + } options.setPlugin(true); return { exports: { @@ -65673,6 +65731,41 @@ function fixField(name, field, spec) { field.ux = field.ux || {}; field.ux.size = null == field.ux.size ? 4 : parseInt(field.ux.size, 10); } +const util$2 = { + dateTimeFromUTC: (utc, tz) => { + const date = new Date(utc); + const iso = date.toISOString(); + const isod = iso.split("T")[0]; + const isot = iso.split("T")[1].split(".")[0]; + const udm = date.getUTCHours() * 60 * 60 * 1e3 + date.getUTCMinutes() * 60 * 1e3 + date.getUTCSeconds() * 1e3 + date.getUTCMilliseconds(); + let out = { + utc, + date, + isod, + isot, + udm + }; + tz = tz || Intl.DateTimeFormat().resolvedOptions().timeZone; + const dateFormatter = new Intl.DateTimeFormat("en-GB", { + timeZone: tz, + year: "numeric", + month: "2-digit", + day: "2-digit" + }); + const timeFormatter = new Intl.DateTimeFormat("en-GB", { + timeZone: tz, + hour: "2-digit", + minute: "2-digit", + second: "2-digit", + hour12: false + }); + const [{ value: day }, , { value: month }, , { value: year }] = dateFormatter.formatToParts(date); + const [{ value: hour }, , { value: minute }, , { value: second }] = timeFormatter.formatToParts(date); + out.locald = `${year}-${month}-${day}`; + out.localt = `${hour}:${minute}:${second}`; + return out; + } +}; Object.assign(VxgBasicEntityEditPlugin, { defaults: { spec: {}, @@ -65708,7 +65801,6 @@ const makeResolver = (seneca, spec) => useCallback( values: values2, errors }; - console.log("makeResolver", out); return out; }), [spec.ent] @@ -65741,28 +65833,33 @@ function BasicEntityEdit(props) { const slotSelectors = seneca.export("Redux/slotSelectors"); let { selectItem, selectList, selectMeta } = slotSelectors(slot); let item = useSelector((state) => selectItem(state)); - if (item && name) { - console.log("BasicEntityEdit", "useEffect", "modify:edit"); - item = seneca.direct("aim:app,on:BasicLed,modify:edit", { - view: name, - item, - fields + useEffect(() => { + const fetchData = () => __async(this, null, function* () { + if (item && name) { + const res = yield seneca.direct("aim:app,on:BasicLed,modify:edit", { + view: name, + item, + fields + }); + item = res.item; + reset(item); + } }); - } + fetchData(); + }, [item, fields, name]); + useEffect(() => { + console.log("BasicEntityEdit", "useEffect", "reset", item); + }, [item]); const params = useParams(); useEffect(() => { if (ready) { - console.log("BasicEntityEdit", "useEffect", "ready"); if (null == item && null != params.item) { - console.log("BasicEntityEdit", "useEffect", "edit:item"); seneca.act("aim:app,on:BasicLed,edit:item", { view: name, fields, item_id: params.item }); } - console.log("BasicEntityEdit", "useEffect", "reset(item)"); - reset(item); } }, [null == item, ready]); const resolver = makeResolver(seneca, spec); @@ -65778,12 +65875,16 @@ function BasicEntityEdit(props) { resolver }); const onSubmit = (data) => { - const formItem = seneca.direct("aim:app,on:BasicLed,modify:save", { + console.log("BasicEntityEdit", "onSubmit", "data", data); + const modifiedData = seneca.direct("aim:app,on:BasicLed,modify:save", { view: name, data, fields }); - seneca.act("aim:app,on:BasicLed,save:item", { view: name, data: formItem }); + seneca.act("aim:app,on:BasicLed,save:item", { + view: name, + data: modifiedData + }); }; return /* @__PURE__ */ jsxRuntimeExports.jsx(Box$2, { className: "vxg-BasicEntityEdit", children: item ? /* @__PURE__ */ jsxRuntimeExports.jsxs( "form", @@ -65958,32 +66059,9 @@ function VxgBasicLedPlugin(options) { } ).add("aim:app,on:BasicLed,modify:edit", function modify_edit(msg) { let item = msg.item; - let fields = msg.fields; if (null == item) return item; item = __spreadValues({}, item); - for (const field of fields) { - if ("Date" === field.ux.kind) { - const dt = util$1.dateTimeFromUTC(item[field.name]); - item[field.name + "_orig$"] = item[field.name]; - item[field.name + "_udm$"] = dt.udm; - item[field.name] = dt.locald; - } else if ("Time" === field.ux.kind) { - const dt = util$1.dateTimeFromUTC(item[field.name]); - item[field.name + "_orig$"] = item[field.name]; - item[field.name + "_udm$"] = dt.udm; - item[field.name] = dt.localt; - } else if ("DateTime" === field.ux.kind) { - const dt = util$1.dateTimeFromUTC(item[field.name]); - item[field.name + "_orig$"] = item[field.name]; - item[field.name + "_udm$"] = dt.udm; - item[field.name] = dt.locald + "T" + dt.localt; - } else if ("Slider" === field.ux.kind) { - item[field.name + "_orig$"] = item[field.name]; - item[field.name] = Number(item[field.name]) / 60; - } - } - console.log("VxgBasicLedPlugin", "modify:edit", "item", item); - return item; + return __spreadProps(__spreadValues({}, msg), { item }); }).add("aim:app,on:BasicLed,modify:save", function modify_save(msg) { let item = msg.data; let fields = msg.fields; @@ -65991,6 +66069,8 @@ function VxgBasicLedPlugin(options) { item = __spreadValues({}, item); for (const field of fields) { if ("Slider" === field.ux.kind) { + console.log("VxgBasicLedPlugin", "modify:save", "field", field); + console.log("VxgBasicLedPlugin", "modify:save", "item", item); item[field.name] = Number(item[field.name]) * 60; } } diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index 2ae022b..255c580 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -65573,7 +65573,6 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const spec = Shape$2(options.spec); const field = spec.field; const Field = fieldMap[field.ux.kind]; - console.log("VxgBasicEntityFieldPlugin", "init", field.name, field.ux.kind); options.setPlugin(true); return { exports: { @@ -65664,10 +65663,69 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const seneca = this; const spec = Shape$1(options.spec); const slot = spec.prefix + spec.name; - const fields = spec.order.reduce( - (a, fn) => (fixField(fn, spec.field[fn], spec), a.push(spec.field[fn]), a), - [] - ); + const fields = spec.order.reduce((a, fn) => (fixField(fn, spec.field[fn], spec), a.push(spec.field[fn]), a), []); + console.log("VxgBasicEntityEditPlugin", "init", spec.name, fields); + for (const field of fields) { + if ("Date" === field.ux.kind) { + seneca.add("aim:app,on:BasicLed,modify:edit,view:" + spec.name, function modify_edit_Date(msg) { + return __async(this, null, function* () { + const out = yield this.prior(msg); + let { item } = out; + item = __spreadValues({}, item); + if (!item[field.name + "_orig$"]) { + const dt = util$2.dateTimeFromUTC(item[field.name]); + item[field.name + "_orig$"] = item[field.name]; + item[field.name + "_udm$"] = dt.udm; + item[field.name] = dt.localt; + } + return __spreadProps(__spreadValues({}, msg), { item }); + }); + }); + } else if ("Time" === field.ux.kind) { + seneca.add("aim:app,on:BasicLed,modify:edit,view:" + spec.name, function modify_edit_Time(msg) { + return __async(this, null, function* () { + const out = yield this.prior(msg); + let { item } = out; + item = __spreadValues({}, item); + if (!item[field.name + "_orig$"]) { + const dt = util$2.dateTimeFromUTC(item[field.name]); + item[field.name + "_orig$"] = item[field.name]; + item[field.name + "_udm$"] = dt.udm; + item[field.name] = dt.localt; + } + return __spreadProps(__spreadValues({}, msg), { item }); + }); + }); + } else if ("DateTime" === field.ux.kind) { + seneca.add("aim:app,on:BasicLed,modify:edit,view:" + spec.name, function modify_edit_Datetime(msg) { + return __async(this, null, function* () { + const out = yield this.prior(msg); + let { item } = out; + item = __spreadValues({}, item); + if (!item[field.name + "_orig$"]) { + const dt = util$2.dateTimeFromUTC(item[field.name]); + item[field.name + "_orig$"] = item[field.name]; + item[field.name + "_udm$"] = dt.udm; + item[field.name] = dt.locald + "T" + dt.localt; + } + return __spreadProps(__spreadValues({}, msg), { item }); + }); + }); + } else if ("Slider" === field.ux.kind) { + seneca.add("aim:app,on:BasicLed,modify:edit,view:" + spec.name, function modify_edit_Slider(msg) { + return __async(this, null, function* () { + const out = yield this.prior(msg); + let { item } = out; + item = __spreadValues({}, item); + if (!item[field.name + "_orig$"]) { + item[field.name + "_orig$"] = item[field.name]; + item[field.name] = Number(item[field.name]) / 60; + } + return __spreadProps(__spreadValues({}, msg), { item }); + }); + }); + } + } options.setPlugin(true); return { exports: { @@ -65685,6 +65743,41 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha field.ux = field.ux || {}; field.ux.size = null == field.ux.size ? 4 : parseInt(field.ux.size, 10); } + const util$2 = { + dateTimeFromUTC: (utc, tz) => { + const date = new Date(utc); + const iso = date.toISOString(); + const isod = iso.split("T")[0]; + const isot = iso.split("T")[1].split(".")[0]; + const udm = date.getUTCHours() * 60 * 60 * 1e3 + date.getUTCMinutes() * 60 * 1e3 + date.getUTCSeconds() * 1e3 + date.getUTCMilliseconds(); + let out = { + utc, + date, + isod, + isot, + udm + }; + tz = tz || Intl.DateTimeFormat().resolvedOptions().timeZone; + const dateFormatter = new Intl.DateTimeFormat("en-GB", { + timeZone: tz, + year: "numeric", + month: "2-digit", + day: "2-digit" + }); + const timeFormatter = new Intl.DateTimeFormat("en-GB", { + timeZone: tz, + hour: "2-digit", + minute: "2-digit", + second: "2-digit", + hour12: false + }); + const [{ value: day }, , { value: month }, , { value: year }] = dateFormatter.formatToParts(date); + const [{ value: hour }, , { value: minute }, , { value: second }] = timeFormatter.formatToParts(date); + out.locald = `${year}-${month}-${day}`; + out.localt = `${hour}:${minute}:${second}`; + return out; + } + }; Object.assign(VxgBasicEntityEditPlugin, { defaults: { spec: {}, @@ -65720,7 +65813,6 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha values: values2, errors }; - console.log("makeResolver", out); return out; }), [spec.ent] @@ -65753,28 +65845,33 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const slotSelectors = seneca.export("Redux/slotSelectors"); let { selectItem, selectList, selectMeta } = slotSelectors(slot); let item = reactRedux.useSelector((state) => selectItem(state)); - if (item && name) { - console.log("BasicEntityEdit", "useEffect", "modify:edit"); - item = seneca.direct("aim:app,on:BasicLed,modify:edit", { - view: name, - item, - fields + React$1.useEffect(() => { + const fetchData = () => __async(this, null, function* () { + if (item && name) { + const res = yield seneca.direct("aim:app,on:BasicLed,modify:edit", { + view: name, + item, + fields + }); + item = res.item; + reset(item); + } }); - } + fetchData(); + }, [item, fields, name]); + React$1.useEffect(() => { + console.log("BasicEntityEdit", "useEffect", "reset", item); + }, [item]); const params = reactRouterDom.useParams(); React$1.useEffect(() => { if (ready) { - console.log("BasicEntityEdit", "useEffect", "ready"); if (null == item && null != params.item) { - console.log("BasicEntityEdit", "useEffect", "edit:item"); seneca.act("aim:app,on:BasicLed,edit:item", { view: name, fields, item_id: params.item }); } - console.log("BasicEntityEdit", "useEffect", "reset(item)"); - reset(item); } }, [null == item, ready]); const resolver = makeResolver(seneca, spec); @@ -65790,12 +65887,16 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha resolver }); const onSubmit = (data) => { - const formItem = seneca.direct("aim:app,on:BasicLed,modify:save", { + console.log("BasicEntityEdit", "onSubmit", "data", data); + const modifiedData = seneca.direct("aim:app,on:BasicLed,modify:save", { view: name, data, fields }); - seneca.act("aim:app,on:BasicLed,save:item", { view: name, data: formItem }); + seneca.act("aim:app,on:BasicLed,save:item", { + view: name, + data: modifiedData + }); }; return /* @__PURE__ */ jsxRuntimeExports.jsx(material.Box, { className: "vxg-BasicEntityEdit", children: item ? /* @__PURE__ */ jsxRuntimeExports.jsxs( "form", @@ -65970,32 +66071,9 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } ).add("aim:app,on:BasicLed,modify:edit", function modify_edit(msg) { let item = msg.item; - let fields = msg.fields; if (null == item) return item; item = __spreadValues({}, item); - for (const field of fields) { - if ("Date" === field.ux.kind) { - const dt = util$1.dateTimeFromUTC(item[field.name]); - item[field.name + "_orig$"] = item[field.name]; - item[field.name + "_udm$"] = dt.udm; - item[field.name] = dt.locald; - } else if ("Time" === field.ux.kind) { - const dt = util$1.dateTimeFromUTC(item[field.name]); - item[field.name + "_orig$"] = item[field.name]; - item[field.name + "_udm$"] = dt.udm; - item[field.name] = dt.localt; - } else if ("DateTime" === field.ux.kind) { - const dt = util$1.dateTimeFromUTC(item[field.name]); - item[field.name + "_orig$"] = item[field.name]; - item[field.name + "_udm$"] = dt.udm; - item[field.name] = dt.locald + "T" + dt.localt; - } else if ("Slider" === field.ux.kind) { - item[field.name + "_orig$"] = item[field.name]; - item[field.name] = Number(item[field.name]) / 60; - } - } - console.log("VxgBasicLedPlugin", "modify:edit", "item", item); - return item; + return __spreadProps(__spreadValues({}, msg), { item }); }).add("aim:app,on:BasicLed,modify:save", function modify_save(msg) { let item = msg.data; let fields = msg.fields; @@ -66003,6 +66081,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha item = __spreadValues({}, item); for (const field of fields) { if ("Slider" === field.ux.kind) { + console.log("VxgBasicLedPlugin", "modify:save", "field", field); + console.log("VxgBasicLedPlugin", "modify:save", "item", item); item[field.name] = Number(item[field.name]) * 60; } } diff --git a/src/lib/BasicEntityEdit.tsx b/src/lib/BasicEntityEdit.tsx index 96607a7..9b5f8c5 100644 --- a/src/lib/BasicEntityEdit.tsx +++ b/src/lib/BasicEntityEdit.tsx @@ -59,12 +59,14 @@ const makeResolver = (seneca: any, spec: any) => ) const values = entity.data$(false) + // console.log('makeResolver', 'data', data) + // console.log('makeResolver', 'values', values) const out = { values, errors, } - console.log('makeResolver', out) + // console.log('makeResolver', 'out', out) return out }, @@ -107,30 +109,51 @@ function BasicEntityEdit (props: any) { let item = useSelector((state: any) => selectItem(state)) - if (item && name) { - console.log('BasicEntityEdit', 'useEffect', 'modify:edit') - item = seneca.direct('aim:app,on:BasicLed,modify:edit', { - view: name, - item, - fields, - }) - } + // if (item && name) { + // console.log('BasicEntityEdit', 'useEffect', 'modify:edit') + // item = seneca.direct('aim:app,on:BasicLed,modify:edit', { + // view: name, + // item, + // fields, + // }) + // } + + useEffect(() => { + const fetchData = async () => { + if (item && name) { + // console.log('BasicEntityEdit', 'useEffect', 'modify:edit', 'init') + const res = await seneca.direct('aim:app,on:BasicLed,modify:edit', { + view: name, + item, + fields, + }) + item = res.item + // console.log('BasicEntityEdit', 'useEffect', 'modify:edit', 'got-item') + // console.log('BasicEntityEdit', 'useEffect', 'resetting') + reset(item) + } + } + + fetchData() + }, [item, fields, name]) + + useEffect(() => { + console.log('BasicEntityEdit', 'useEffect', 'reset', item) + }, [item]) const params: any = useParams() useEffect(() => { if (ready) { - console.log('BasicEntityEdit', 'useEffect', 'ready') + // console.log('BasicEntityEdit', 'useEffect', 'ready') if (null == item && null != params.item) { - console.log('BasicEntityEdit', 'useEffect', 'edit:item') + // console.log('BasicEntityEdit', 'useEffect', 'edit:item') seneca.act('aim:app,on:BasicLed,edit:item', { view: name, fields, item_id: params.item, }) } - console.log('BasicEntityEdit', 'useEffect', 'reset(item)') - reset(item) } }, [null == item, ready]) @@ -149,12 +172,17 @@ function BasicEntityEdit (props: any) { }) const onSubmit = (data: any) => { - const formItem = seneca.direct('aim:app,on:BasicLed,modify:save', { + console.log('BasicEntityEdit', 'onSubmit', 'data', data) + const modifiedData = seneca.direct('aim:app,on:BasicLed,modify:save', { view: name, data, fields, }) - seneca.act('aim:app,on:BasicLed,save:item', { view: name, data: formItem }) + // console.log('BasicEntityEdit', 'onSubmit', 'formItem', formItem) + seneca.act('aim:app,on:BasicLed,save:item', { + view: name, + data: modifiedData, + }) } return ( diff --git a/src/lib/VxgBasicEntityEditPlugin.ts b/src/lib/VxgBasicEntityEditPlugin.ts index eb1906f..9fbc5d3 100644 --- a/src/lib/VxgBasicEntityEditPlugin.ts +++ b/src/lib/VxgBasicEntityEditPlugin.ts @@ -22,12 +22,80 @@ function VxgBasicEntityEditPlugin (this: any, options: any) { const slot = spec.prefix + spec.name - const fields = spec.order.reduce( - (a: any, fn: any) => ( - fixField(fn, spec.field[fn], spec), a.push(spec.field[fn]), a - ), - [] - ) + const fields = spec.order.reduce((a: any, fn: any) => (fixField(fn, spec.field[fn], spec), a.push(spec.field[fn]), a), []) + + console.log('VxgBasicEntityEditPlugin', 'init', spec.name, fields) + + for (const field of fields) { + if ('Date' === field.ux.kind) { + seneca.add('aim:app,on:BasicLed,modify:edit,view:' + spec.name, async function modify_edit_Date (this: any, msg: any) { + const out = await this.prior(msg) + + let { item } = out + + item = { ...item } + + if (!item[field.name + '_orig$']) { + const dt = util.dateTimeFromUTC(item[field.name]) + item[field.name + '_orig$'] = item[field.name] + item[field.name + '_udm$'] = dt.udm + item[field.name] = dt.localt + } + + return { ...msg, item } + }) + } else if ('Time' === field.ux.kind) { + seneca.add('aim:app,on:BasicLed,modify:edit,view:' + spec.name, async function modify_edit_Time (this: any, msg: any) { + const out = await this.prior(msg) + + let { item } = out + + item = { ...item } + + if (!item[field.name + '_orig$']) { + const dt = util.dateTimeFromUTC(item[field.name]) + item[field.name + '_orig$'] = item[field.name] + item[field.name + '_udm$'] = dt.udm + item[field.name] = dt.localt + } + + return { ...msg, item } + }) + } else if ('DateTime' === field.ux.kind) { + seneca.add('aim:app,on:BasicLed,modify:edit,view:' + spec.name, async function modify_edit_Datetime (this: any, msg: any) { + const out = await this.prior(msg) + + let { item } = out + + item = { ...item } + + if (!item[field.name + '_orig$']) { + const dt = util.dateTimeFromUTC(item[field.name]) + item[field.name + '_orig$'] = item[field.name] + item[field.name + '_udm$'] = dt.udm + item[field.name] = dt.locald + 'T' + dt.localt + } + + return { ...msg, item } + }) + } else if ('Slider' === field.ux.kind) { + // console.log('VxgBasicEntityEditPlugin', 'Slider') + seneca.add('aim:app,on:BasicLed,modify:edit,view:' + spec.name, async function modify_edit_Slider (this: any, msg: any) { + const out = await this.prior(msg) + + let { item } = out + + item = { ...item } + + if (!item[field.name + '_orig$']) { + item[field.name + '_orig$'] = item[field.name] + item[field.name] = Number(item[field.name]) / 60 + } + + return { ...msg, item } + }) + } + } options.setPlugin(true) @@ -49,6 +117,50 @@ function fixField (name: string, field: any, spec: any) { field.ux.size = null == field.ux.size ? 4 : parseInt(field.ux.size, 10) } +const util = { + dateTimeFromUTC: (utc: number, tz?: string) => { + const date = new Date(utc) + const iso = date.toISOString() + const isod = iso.split('T')[0] + const isot = iso.split('T')[1].split('.')[0] + + // UTC millis into day (since midnight) + const udm = date.getUTCHours() * 60 * 60 * 1000 + date.getUTCMinutes() * 60 * 1000 + date.getUTCSeconds() * 1000 + date.getUTCMilliseconds() + + let out: any = { + utc, + date, + isod, + isot, + udm, + } + + tz = tz || Intl.DateTimeFormat().resolvedOptions().timeZone + const dateFormatter = new Intl.DateTimeFormat('en-GB', { + timeZone: tz, + year: 'numeric', + month: '2-digit', + day: '2-digit', + }) + + const timeFormatter = new Intl.DateTimeFormat('en-GB', { + timeZone: tz, + hour: '2-digit', + minute: '2-digit', + second: '2-digit', + hour12: false, + }) + + const [{ value: day }, , { value: month }, , { value: year }] = dateFormatter.formatToParts(date) + const [{ value: hour }, , { value: minute }, , { value: second }] = timeFormatter.formatToParts(date) + + out.locald = `${year}-${month}-${day}` + out.localt = `${hour}:${minute}:${second}` + + return out + }, +} + Object.assign(VxgBasicEntityEditPlugin, { defaults: { spec: {}, diff --git a/src/lib/VxgBasicLedPlugin.ts b/src/lib/VxgBasicLedPlugin.ts index e7761fa..62e92cf 100644 --- a/src/lib/VxgBasicLedPlugin.ts +++ b/src/lib/VxgBasicLedPlugin.ts @@ -92,38 +92,13 @@ function VxgBasicLedPlugin (this: any, options: any) { .add('aim:app,on:BasicLed,modify:edit', function modify_edit (msg: any) { let item = msg.item - let fields = msg.fields + // let fields = msg.fields if (null == item) return item item = { ...item } - // This code does not belong here - for (const field of fields) { - if ('Date' === field.ux.kind) { - const dt = util.dateTimeFromUTC(item[field.name]) - item[field.name + '_orig$'] = item[field.name] - item[field.name + '_udm$'] = dt.udm - item[field.name] = dt.locald - } else if ('Time' === field.ux.kind) { - const dt = util.dateTimeFromUTC(item[field.name]) - item[field.name + '_orig$'] = item[field.name] - item[field.name + '_udm$'] = dt.udm - item[field.name] = dt.localt - } else if ('DateTime' === field.ux.kind) { - const dt = util.dateTimeFromUTC(item[field.name]) - item[field.name + '_orig$'] = item[field.name] - item[field.name + '_udm$'] = dt.udm - item[field.name] = dt.locald + 'T' + dt.localt - } else if ('Slider' === field.ux.kind) { - item[field.name + '_orig$'] = item[field.name] - item[field.name] = Number(item[field.name]) / 60 - } - } - - console.log('VxgBasicLedPlugin', 'modify:edit', 'item', item) - - return item + return { ...msg, item } }) .add('aim:app,on:BasicLed,modify:save', function modify_save (msg: any) { @@ -137,6 +112,8 @@ function VxgBasicLedPlugin (this: any, options: any) { // This code does not belong here for (const field of fields) { if ('Slider' === field.ux.kind) { + console.log('VxgBasicLedPlugin', 'modify:save', 'field', field) + console.log('VxgBasicLedPlugin', 'modify:save', 'item', item) item[field.name] = Number(item[field.name]) * 60 } } From 57edfd418028005cc2475a05dda97c14a5c356a6 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 1 Aug 2024 20:00:02 +0100 Subject: [PATCH 092/122] Refactor BasicEntityEdit to improve code readability and remove console logs --- src/lib/BasicEntityEdit.tsx | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/lib/BasicEntityEdit.tsx b/src/lib/BasicEntityEdit.tsx index 9b5f8c5..2683e8e 100644 --- a/src/lib/BasicEntityEdit.tsx +++ b/src/lib/BasicEntityEdit.tsx @@ -100,7 +100,7 @@ function BasicEntityEdit (props: any) { const { ent, name } = spec if (plugin && !ready) { - console.log('BasicEntityEdit', 'useEffect', 'ready:edit') + // console.log('BasicEntityEdit', 'useEffect', 'ready:edit') seneca.act('aim:app,on:BasicLed,ready:edit', { view: name, setReady }) } @@ -120,6 +120,16 @@ function BasicEntityEdit (props: any) { useEffect(() => { const fetchData = async () => { + console.log( + 'BasicEntityEdit', + 'useEffect', + 'modify:edit', + 'init', + 'view', + name, + 'item', + item?.title + ) if (item && name) { // console.log('BasicEntityEdit', 'useEffect', 'modify:edit', 'init') const res = await seneca.direct('aim:app,on:BasicLed,modify:edit', { @@ -130,16 +140,12 @@ function BasicEntityEdit (props: any) { item = res.item // console.log('BasicEntityEdit', 'useEffect', 'modify:edit', 'got-item') // console.log('BasicEntityEdit', 'useEffect', 'resetting') - reset(item) } + reset(item) } fetchData() - }, [item, fields, name]) - - useEffect(() => { - console.log('BasicEntityEdit', 'useEffect', 'reset', item) - }, [item]) + }, [item, name]) const params: any = useParams() From 327d05be9ed26bbb715c3e8443dff6fd85031598 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 1 Aug 2024 20:00:25 +0100 Subject: [PATCH 093/122] Pass spec.name dynamically when defining seneca overrides --- dist/voxgig-model-react.es.js | 145 ++++++++++++++++------------ dist/voxgig-model-react.umd.js | 145 ++++++++++++++++------------ src/lib/VxgBasicEntityEditPlugin.ts | 125 ++++++++++++++---------- src/lib/VxgBasicLedPlugin.ts | 2 +- 4 files changed, 238 insertions(+), 179 deletions(-) diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index 23fb82d..c92a277 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -65651,67 +65651,81 @@ function VxgBasicEntityEditPlugin(options) { const seneca = this; const spec = Shape$1(options.spec); const slot = spec.prefix + spec.name; - const fields = spec.order.reduce((a, fn2) => (fixField(fn2, spec.field[fn2], spec), a.push(spec.field[fn2]), a), []); - console.log("VxgBasicEntityEditPlugin", "init", spec.name, fields); + const fields = spec.order.reduce( + (a, fn2) => (fixField(fn2, spec.field[fn2], spec), a.push(spec.field[fn2]), a), + [] + ); for (const field of fields) { if ("Date" === field.ux.kind) { - seneca.add("aim:app,on:BasicLed,modify:edit,view:" + spec.name, function modify_edit_Date(msg) { - return __async(this, null, function* () { - const out = yield this.prior(msg); - let { item } = out; - item = __spreadValues({}, item); - if (!item[field.name + "_orig$"]) { - const dt = util$2.dateTimeFromUTC(item[field.name]); - item[field.name + "_orig$"] = item[field.name]; - item[field.name + "_udm$"] = dt.udm; - item[field.name] = dt.localt; - } - return __spreadProps(__spreadValues({}, msg), { item }); - }); - }); + seneca.add( + "aim:app,on:BasicLed,modify:edit,view:" + spec.name, + function modify_edit_Date(msg) { + return __async(this, null, function* () { + const out = yield this.prior(msg); + let { item } = out; + item = __spreadValues({}, item); + if (!item[field.name + "_orig$"]) { + const dt = util$2.dateTimeFromUTC(item[field.name]); + item[field.name + "_orig$"] = item[field.name]; + item[field.name + "_udm$"] = dt.udm; + item[field.name] = dt.localt; + } + return __spreadProps(__spreadValues({}, msg), { item }); + }); + } + ); } else if ("Time" === field.ux.kind) { - seneca.add("aim:app,on:BasicLed,modify:edit,view:" + spec.name, function modify_edit_Time(msg) { - return __async(this, null, function* () { - const out = yield this.prior(msg); - let { item } = out; - item = __spreadValues({}, item); - if (!item[field.name + "_orig$"]) { - const dt = util$2.dateTimeFromUTC(item[field.name]); - item[field.name + "_orig$"] = item[field.name]; - item[field.name + "_udm$"] = dt.udm; - item[field.name] = dt.localt; - } - return __spreadProps(__spreadValues({}, msg), { item }); - }); - }); + seneca.add( + "aim:app,on:BasicLed,modify:edit,view:" + spec.name, + function modify_edit_Time(msg) { + return __async(this, null, function* () { + const out = yield this.prior(msg); + let { item } = out; + item = __spreadValues({}, item); + if (!item[field.name + "_orig$"]) { + const dt = util$2.dateTimeFromUTC(item[field.name]); + item[field.name + "_orig$"] = item[field.name]; + item[field.name + "_udm$"] = dt.udm; + item[field.name] = dt.localt; + } + return __spreadProps(__spreadValues({}, msg), { item }); + }); + } + ); } else if ("DateTime" === field.ux.kind) { - seneca.add("aim:app,on:BasicLed,modify:edit,view:" + spec.name, function modify_edit_Datetime(msg) { - return __async(this, null, function* () { - const out = yield this.prior(msg); - let { item } = out; - item = __spreadValues({}, item); - if (!item[field.name + "_orig$"]) { - const dt = util$2.dateTimeFromUTC(item[field.name]); - item[field.name + "_orig$"] = item[field.name]; - item[field.name + "_udm$"] = dt.udm; - item[field.name] = dt.locald + "T" + dt.localt; - } - return __spreadProps(__spreadValues({}, msg), { item }); - }); - }); + seneca.add( + "aim:app,on:BasicLed,modify:edit,view:" + spec.name, + function modify_edit_Datetime(msg) { + return __async(this, null, function* () { + const out = yield this.prior(msg); + let { item } = out; + item = __spreadValues({}, item); + if (!item[field.name + "_orig$"]) { + const dt = util$2.dateTimeFromUTC(item[field.name]); + item[field.name + "_orig$"] = item[field.name]; + item[field.name + "_udm$"] = dt.udm; + item[field.name] = dt.locald + "T" + dt.localt; + } + return __spreadProps(__spreadValues({}, msg), { item }); + }); + } + ); } else if ("Slider" === field.ux.kind) { - seneca.add("aim:app,on:BasicLed,modify:edit,view:" + spec.name, function modify_edit_Slider(msg) { - return __async(this, null, function* () { - const out = yield this.prior(msg); - let { item } = out; - item = __spreadValues({}, item); - if (!item[field.name + "_orig$"]) { - item[field.name + "_orig$"] = item[field.name]; - item[field.name] = Number(item[field.name]) / 60; - } - return __spreadProps(__spreadValues({}, msg), { item }); - }); - }); + seneca.add( + "aim:app,on:BasicLed,modify:edit,view:" + spec.name, + function modify_edit_Slider(msg) { + return __async(this, null, function* () { + const out = yield this.prior(msg); + let { item } = out; + item = __spreadValues({}, item); + if (!item[field.name + "_orig$"]) { + item[field.name + "_orig$"] = item[field.name]; + item[field.name] = Number(item[field.name]) / 60; + } + return __spreadProps(__spreadValues({}, msg), { item }); + }); + } + ); } } options.setPlugin(true); @@ -65827,7 +65841,6 @@ function BasicEntityEdit(props) { ) || { spec: {}, slot: null, fields: [] }; const { ent, name } = spec; if (plugin && !ready) { - console.log("BasicEntityEdit", "useEffect", "ready:edit"); seneca.act("aim:app,on:BasicLed,ready:edit", { view: name, setReady }); } const slotSelectors = seneca.export("Redux/slotSelectors"); @@ -65835,6 +65848,16 @@ function BasicEntityEdit(props) { let item = useSelector((state) => selectItem(state)); useEffect(() => { const fetchData = () => __async(this, null, function* () { + console.log( + "BasicEntityEdit", + "useEffect", + "modify:edit", + "init", + "view", + name, + "item", + item == null ? void 0 : item.title + ); if (item && name) { const res = yield seneca.direct("aim:app,on:BasicLed,modify:edit", { view: name, @@ -65842,14 +65865,11 @@ function BasicEntityEdit(props) { fields }); item = res.item; - reset(item); } + reset(item); }); fetchData(); - }, [item, fields, name]); - useEffect(() => { - console.log("BasicEntityEdit", "useEffect", "reset", item); - }, [item]); + }, [item, name]); const params = useParams(); useEffect(() => { if (ready) { @@ -66025,7 +66045,6 @@ function VxgBasicLedPlugin(options) { const name = spec.name; const entCanon = spec.def.ent; const slotName = "BasicLed_" + name; - console.log("VxgBasicLedPlugin", "name", name, "init"); seneca.add("on:BasicLed").fix({ view: name }).add( "aim:app,on:view,init:state,redux$:true", function(_msg, reply, meta) { diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index 255c580..0f28131 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -65663,67 +65663,81 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const seneca = this; const spec = Shape$1(options.spec); const slot = spec.prefix + spec.name; - const fields = spec.order.reduce((a, fn) => (fixField(fn, spec.field[fn], spec), a.push(spec.field[fn]), a), []); - console.log("VxgBasicEntityEditPlugin", "init", spec.name, fields); + const fields = spec.order.reduce( + (a, fn) => (fixField(fn, spec.field[fn], spec), a.push(spec.field[fn]), a), + [] + ); for (const field of fields) { if ("Date" === field.ux.kind) { - seneca.add("aim:app,on:BasicLed,modify:edit,view:" + spec.name, function modify_edit_Date(msg) { - return __async(this, null, function* () { - const out = yield this.prior(msg); - let { item } = out; - item = __spreadValues({}, item); - if (!item[field.name + "_orig$"]) { - const dt = util$2.dateTimeFromUTC(item[field.name]); - item[field.name + "_orig$"] = item[field.name]; - item[field.name + "_udm$"] = dt.udm; - item[field.name] = dt.localt; - } - return __spreadProps(__spreadValues({}, msg), { item }); - }); - }); + seneca.add( + "aim:app,on:BasicLed,modify:edit,view:" + spec.name, + function modify_edit_Date(msg) { + return __async(this, null, function* () { + const out = yield this.prior(msg); + let { item } = out; + item = __spreadValues({}, item); + if (!item[field.name + "_orig$"]) { + const dt = util$2.dateTimeFromUTC(item[field.name]); + item[field.name + "_orig$"] = item[field.name]; + item[field.name + "_udm$"] = dt.udm; + item[field.name] = dt.localt; + } + return __spreadProps(__spreadValues({}, msg), { item }); + }); + } + ); } else if ("Time" === field.ux.kind) { - seneca.add("aim:app,on:BasicLed,modify:edit,view:" + spec.name, function modify_edit_Time(msg) { - return __async(this, null, function* () { - const out = yield this.prior(msg); - let { item } = out; - item = __spreadValues({}, item); - if (!item[field.name + "_orig$"]) { - const dt = util$2.dateTimeFromUTC(item[field.name]); - item[field.name + "_orig$"] = item[field.name]; - item[field.name + "_udm$"] = dt.udm; - item[field.name] = dt.localt; - } - return __spreadProps(__spreadValues({}, msg), { item }); - }); - }); + seneca.add( + "aim:app,on:BasicLed,modify:edit,view:" + spec.name, + function modify_edit_Time(msg) { + return __async(this, null, function* () { + const out = yield this.prior(msg); + let { item } = out; + item = __spreadValues({}, item); + if (!item[field.name + "_orig$"]) { + const dt = util$2.dateTimeFromUTC(item[field.name]); + item[field.name + "_orig$"] = item[field.name]; + item[field.name + "_udm$"] = dt.udm; + item[field.name] = dt.localt; + } + return __spreadProps(__spreadValues({}, msg), { item }); + }); + } + ); } else if ("DateTime" === field.ux.kind) { - seneca.add("aim:app,on:BasicLed,modify:edit,view:" + spec.name, function modify_edit_Datetime(msg) { - return __async(this, null, function* () { - const out = yield this.prior(msg); - let { item } = out; - item = __spreadValues({}, item); - if (!item[field.name + "_orig$"]) { - const dt = util$2.dateTimeFromUTC(item[field.name]); - item[field.name + "_orig$"] = item[field.name]; - item[field.name + "_udm$"] = dt.udm; - item[field.name] = dt.locald + "T" + dt.localt; - } - return __spreadProps(__spreadValues({}, msg), { item }); - }); - }); + seneca.add( + "aim:app,on:BasicLed,modify:edit,view:" + spec.name, + function modify_edit_Datetime(msg) { + return __async(this, null, function* () { + const out = yield this.prior(msg); + let { item } = out; + item = __spreadValues({}, item); + if (!item[field.name + "_orig$"]) { + const dt = util$2.dateTimeFromUTC(item[field.name]); + item[field.name + "_orig$"] = item[field.name]; + item[field.name + "_udm$"] = dt.udm; + item[field.name] = dt.locald + "T" + dt.localt; + } + return __spreadProps(__spreadValues({}, msg), { item }); + }); + } + ); } else if ("Slider" === field.ux.kind) { - seneca.add("aim:app,on:BasicLed,modify:edit,view:" + spec.name, function modify_edit_Slider(msg) { - return __async(this, null, function* () { - const out = yield this.prior(msg); - let { item } = out; - item = __spreadValues({}, item); - if (!item[field.name + "_orig$"]) { - item[field.name + "_orig$"] = item[field.name]; - item[field.name] = Number(item[field.name]) / 60; - } - return __spreadProps(__spreadValues({}, msg), { item }); - }); - }); + seneca.add( + "aim:app,on:BasicLed,modify:edit,view:" + spec.name, + function modify_edit_Slider(msg) { + return __async(this, null, function* () { + const out = yield this.prior(msg); + let { item } = out; + item = __spreadValues({}, item); + if (!item[field.name + "_orig$"]) { + item[field.name + "_orig$"] = item[field.name]; + item[field.name] = Number(item[field.name]) / 60; + } + return __spreadProps(__spreadValues({}, msg), { item }); + }); + } + ); } } options.setPlugin(true); @@ -65839,7 +65853,6 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ) || { spec: {}, slot: null, fields: [] }; const { ent, name } = spec; if (plugin && !ready) { - console.log("BasicEntityEdit", "useEffect", "ready:edit"); seneca.act("aim:app,on:BasicLed,ready:edit", { view: name, setReady }); } const slotSelectors = seneca.export("Redux/slotSelectors"); @@ -65847,6 +65860,16 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha let item = reactRedux.useSelector((state) => selectItem(state)); React$1.useEffect(() => { const fetchData = () => __async(this, null, function* () { + console.log( + "BasicEntityEdit", + "useEffect", + "modify:edit", + "init", + "view", + name, + "item", + item == null ? void 0 : item.title + ); if (item && name) { const res = yield seneca.direct("aim:app,on:BasicLed,modify:edit", { view: name, @@ -65854,14 +65877,11 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha fields }); item = res.item; - reset(item); } + reset(item); }); fetchData(); - }, [item, fields, name]); - React$1.useEffect(() => { - console.log("BasicEntityEdit", "useEffect", "reset", item); - }, [item]); + }, [item, name]); const params = reactRouterDom.useParams(); React$1.useEffect(() => { if (ready) { @@ -66037,7 +66057,6 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const name = spec.name; const entCanon = spec.def.ent; const slotName = "BasicLed_" + name; - console.log("VxgBasicLedPlugin", "name", name, "init"); seneca.add("on:BasicLed").fix({ view: name }).add( "aim:app,on:view,init:state,redux$:true", function(_msg, reply, meta) { diff --git a/src/lib/VxgBasicEntityEditPlugin.ts b/src/lib/VxgBasicEntityEditPlugin.ts index 9fbc5d3..05fa52c 100644 --- a/src/lib/VxgBasicEntityEditPlugin.ts +++ b/src/lib/VxgBasicEntityEditPlugin.ts @@ -22,78 +22,93 @@ function VxgBasicEntityEditPlugin (this: any, options: any) { const slot = spec.prefix + spec.name - const fields = spec.order.reduce((a: any, fn: any) => (fixField(fn, spec.field[fn], spec), a.push(spec.field[fn]), a), []) - - console.log('VxgBasicEntityEditPlugin', 'init', spec.name, fields) + const fields = spec.order.reduce( + (a: any, fn: any) => ( + fixField(fn, spec.field[fn], spec), a.push(spec.field[fn]), a + ), + [] + ) for (const field of fields) { if ('Date' === field.ux.kind) { - seneca.add('aim:app,on:BasicLed,modify:edit,view:' + spec.name, async function modify_edit_Date (this: any, msg: any) { - const out = await this.prior(msg) + seneca.add( + 'aim:app,on:BasicLed,modify:edit,view:' + spec.name, + async function modify_edit_Date (this: any, msg: any) { + const out = await this.prior(msg) - let { item } = out + let { item } = out - item = { ...item } + item = { ...item } - if (!item[field.name + '_orig$']) { - const dt = util.dateTimeFromUTC(item[field.name]) - item[field.name + '_orig$'] = item[field.name] - item[field.name + '_udm$'] = dt.udm - item[field.name] = dt.localt - } + if (!item[field.name + '_orig$']) { + const dt = util.dateTimeFromUTC(item[field.name]) + item[field.name + '_orig$'] = item[field.name] + item[field.name + '_udm$'] = dt.udm + item[field.name] = dt.localt + } - return { ...msg, item } - }) + return { ...msg, item } + } + ) } else if ('Time' === field.ux.kind) { - seneca.add('aim:app,on:BasicLed,modify:edit,view:' + spec.name, async function modify_edit_Time (this: any, msg: any) { - const out = await this.prior(msg) + seneca.add( + 'aim:app,on:BasicLed,modify:edit,view:' + spec.name, + async function modify_edit_Time (this: any, msg: any) { + const out = await this.prior(msg) - let { item } = out + let { item } = out - item = { ...item } + item = { ...item } - if (!item[field.name + '_orig$']) { - const dt = util.dateTimeFromUTC(item[field.name]) - item[field.name + '_orig$'] = item[field.name] - item[field.name + '_udm$'] = dt.udm - item[field.name] = dt.localt - } + if (!item[field.name + '_orig$']) { + const dt = util.dateTimeFromUTC(item[field.name]) + item[field.name + '_orig$'] = item[field.name] + item[field.name + '_udm$'] = dt.udm + item[field.name] = dt.localt + } - return { ...msg, item } - }) + return { ...msg, item } + } + ) } else if ('DateTime' === field.ux.kind) { - seneca.add('aim:app,on:BasicLed,modify:edit,view:' + spec.name, async function modify_edit_Datetime (this: any, msg: any) { - const out = await this.prior(msg) + seneca.add( + 'aim:app,on:BasicLed,modify:edit,view:' + spec.name, + async function modify_edit_Datetime (this: any, msg: any) { + const out = await this.prior(msg) - let { item } = out + let { item } = out - item = { ...item } + item = { ...item } - if (!item[field.name + '_orig$']) { - const dt = util.dateTimeFromUTC(item[field.name]) - item[field.name + '_orig$'] = item[field.name] - item[field.name + '_udm$'] = dt.udm - item[field.name] = dt.locald + 'T' + dt.localt - } + if (!item[field.name + '_orig$']) { + const dt = util.dateTimeFromUTC(item[field.name]) + item[field.name + '_orig$'] = item[field.name] + item[field.name + '_udm$'] = dt.udm + item[field.name] = dt.locald + 'T' + dt.localt + } - return { ...msg, item } - }) + return { ...msg, item } + } + ) } else if ('Slider' === field.ux.kind) { // console.log('VxgBasicEntityEditPlugin', 'Slider') - seneca.add('aim:app,on:BasicLed,modify:edit,view:' + spec.name, async function modify_edit_Slider (this: any, msg: any) { - const out = await this.prior(msg) + seneca.add( + 'aim:app,on:BasicLed,modify:edit,view:' + spec.name, + async function modify_edit_Slider (this: any, msg: any) { + const out = await this.prior(msg) - let { item } = out + let { item } = out - item = { ...item } + item = { ...item } - if (!item[field.name + '_orig$']) { - item[field.name + '_orig$'] = item[field.name] - item[field.name] = Number(item[field.name]) / 60 - } + if (!item[field.name + '_orig$']) { + item[field.name + '_orig$'] = item[field.name] + item[field.name] = Number(item[field.name]) / 60 + } - return { ...msg, item } - }) + return { ...msg, item } + } + ) } } @@ -125,7 +140,11 @@ const util = { const isot = iso.split('T')[1].split('.')[0] // UTC millis into day (since midnight) - const udm = date.getUTCHours() * 60 * 60 * 1000 + date.getUTCMinutes() * 60 * 1000 + date.getUTCSeconds() * 1000 + date.getUTCMilliseconds() + const udm = + date.getUTCHours() * 60 * 60 * 1000 + + date.getUTCMinutes() * 60 * 1000 + + date.getUTCSeconds() * 1000 + + date.getUTCMilliseconds() let out: any = { utc, @@ -151,8 +170,10 @@ const util = { hour12: false, }) - const [{ value: day }, , { value: month }, , { value: year }] = dateFormatter.formatToParts(date) - const [{ value: hour }, , { value: minute }, , { value: second }] = timeFormatter.formatToParts(date) + const [{ value: day }, , { value: month }, , { value: year }] = + dateFormatter.formatToParts(date) + const [{ value: hour }, , { value: minute }, , { value: second }] = + timeFormatter.formatToParts(date) out.locald = `${year}-${month}-${day}` out.localt = `${hour}:${minute}:${second}` diff --git a/src/lib/VxgBasicLedPlugin.ts b/src/lib/VxgBasicLedPlugin.ts index 62e92cf..3e94b23 100644 --- a/src/lib/VxgBasicLedPlugin.ts +++ b/src/lib/VxgBasicLedPlugin.ts @@ -39,7 +39,7 @@ function VxgBasicLedPlugin (this: any, options: any) { const entCanon = spec.def.ent const slotName = 'BasicLed_' + name - console.log('VxgBasicLedPlugin', 'name', name, 'init') + // console.log('VxgBasicLedPlugin', 'name', name, 'init') seneca .add('on:BasicLed') From 13ccbd8c1543cac23f54a49a3d2c3a77a4866116 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 1 Aug 2024 20:17:09 +0100 Subject: [PATCH 094/122] Remove console logs --- dist/voxgig-model-react.es.js | 13 ++++++-- dist/voxgig-model-react.umd.js | 13 ++++++-- src/lib/BasicEntityEdit.tsx | 4 --- src/lib/BasicEntitySliderField.tsx | 49 ++---------------------------- 4 files changed, 22 insertions(+), 57 deletions(-) diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index c92a277..44abc7f 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -64780,7 +64780,11 @@ function BasicEntityAutocompleteField(props) { getOptionLabel: (option) => option.title, value: resolveValue$1(controllerField.value, field.cat), disabled: !field.ux.edit, - onChange: (_2, newVal) => controllerField.onChange(newVal), + onChange: (_2, v) => { + controllerField.onChange( + Array.isArray(v) ? v.map((val) => val.key).join(",") : v == null ? void 0 : v.key + ); + }, renderInput: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx(TextField$1, __spreadProps(__spreadValues({}, params), { label: field.label })) }, field.ux.props) ), @@ -65365,7 +65369,10 @@ function BasicEntitySelectField(props) { value: resolveValue(controllerField.value, field.cat), multiple: field.cat.multiple !== 1, label: field.name, - onChange: (event) => controllerField.onChange(event.target.value), + onChange: (event) => { + const v = event.target.value; + controllerField.onChange(Array.isArray(v) ? v.join(",") : v); + }, disabled: !field.ux.edit }, field.ux.props), { children: resolveCategories(field.cat).map((opt) => /* @__PURE__ */ jsxRuntimeExports.jsx(MenuItem$1, { value: opt.key, children: opt.title }, opt.key)) @@ -66128,7 +66135,7 @@ function VxgBasicLedPlugin(options) { return __async(this, null, function* () { const data = Object.entries(spec.def.edit.field).filter((n) => false !== n[1].ux.edit).reduce((a, n) => (a[n[0]] = msg.data[n[0]], a), {}); const item = yield seneca.entity(entCanon).save$(data); - navigate("/view/" + name + "/edit/" + item.id); + navigate("/view/" + name); }); } ); diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index 0f28131..195a2dc 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -64792,7 +64792,11 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha getOptionLabel: (option) => option.title, value: resolveValue$1(controllerField.value, field.cat), disabled: !field.ux.edit, - onChange: (_2, newVal) => controllerField.onChange(newVal), + onChange: (_2, v) => { + controllerField.onChange( + Array.isArray(v) ? v.map((val) => val.key).join(",") : v == null ? void 0 : v.key + ); + }, renderInput: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.TextField, __spreadProps(__spreadValues({}, params), { label: field.label })) }, field.ux.props) ), @@ -65377,7 +65381,10 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha value: resolveValue(controllerField.value, field.cat), multiple: field.cat.multiple !== 1, label: field.name, - onChange: (event) => controllerField.onChange(event.target.value), + onChange: (event) => { + const v = event.target.value; + controllerField.onChange(Array.isArray(v) ? v.join(",") : v); + }, disabled: !field.ux.edit }, field.ux.props), { children: resolveCategories(field.cat).map((opt) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.MenuItem, { value: opt.key, children: opt.title }, opt.key)) @@ -66140,7 +66147,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha return __async(this, null, function* () { const data = Object.entries(spec.def.edit.field).filter((n) => false !== n[1].ux.edit).reduce((a, n) => (a[n[0]] = msg.data[n[0]], a), {}); const item = yield seneca.entity(entCanon).save$(data); - navigate("/view/" + name + "/edit/" + item.id); + navigate("/view/" + name); }); } ); diff --git a/src/lib/BasicEntityEdit.tsx b/src/lib/BasicEntityEdit.tsx index 2683e8e..7a86927 100644 --- a/src/lib/BasicEntityEdit.tsx +++ b/src/lib/BasicEntityEdit.tsx @@ -59,15 +59,11 @@ const makeResolver = (seneca: any, spec: any) => ) const values = entity.data$(false) - // console.log('makeResolver', 'data', data) - // console.log('makeResolver', 'values', values) const out = { values, errors, } - // console.log('makeResolver', 'out', out) - return out }, [spec.ent] diff --git a/src/lib/BasicEntitySliderField.tsx b/src/lib/BasicEntitySliderField.tsx index 7659fce..7f294fd 100644 --- a/src/lib/BasicEntitySliderField.tsx +++ b/src/lib/BasicEntitySliderField.tsx @@ -43,7 +43,8 @@ function BasicEntitySliderField (props: any) { const { control, field, getValues, errors } = basicEntityAutocompleteField // if cmp not ready, call seneca.add('modify:edit') and seneca.add('modify:save') - const val = getValues(field.name) // field.name + '_uival$' + // const val = getValues(field.name + '_uival$') + const val = getValues(field.name) const err = errors[field.name] const { field: controllerField } = useController({ @@ -52,12 +53,6 @@ function BasicEntitySliderField (props: any) { defaultValue: val || field.ux.min, }) - // console.log( - // 'BasicEntitySliderField', - // 'controllerField', - // controllerField.value - // ) - return (
{field.label} @@ -79,46 +74,6 @@ function BasicEntitySliderField (props: any) { ) } -// function BasicEntitySliderField (props: any) { -// const { spec } = props - -// const basicEntityAutocompleteField: Spec = -// BasicEntitySliderFieldSpecShape(spec) -// const { control, field, getValues, errors } = basicEntityAutocompleteField - -// // if cmp not ready, call seneca.add('modify:edit') and seneca.add('modify:save') -// const val = getValues(field.name) // field.name + '_uival$' - -// const err = errors[field.name] - -// return ( -// <> -// {field.label} -// ( -// onChange(newVal)} -// disabled={!field.ux.edit} -// orientation={field.ux.direction} -// track={field.ux.track} -// valueLabelDisplay={field.ux.props.valueLabelDisplay} -// /> -// )} -// /> -// -// -// ) -// } - function resolveMarks (marks: any) { if ( !marks || From 29736439933f50e29cc1b6effd03dab3b26efe37 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 1 Aug 2024 20:17:56 +0100 Subject: [PATCH 095/122] Transform values in BasicEntityAutocompleteField onChange handler --- src/lib/BasicEntityAutocompleteField.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/BasicEntityAutocompleteField.tsx b/src/lib/BasicEntityAutocompleteField.tsx index dc39f1e..468571f 100644 --- a/src/lib/BasicEntityAutocompleteField.tsx +++ b/src/lib/BasicEntityAutocompleteField.tsx @@ -69,7 +69,11 @@ function BasicEntityAutocompleteField (props: any) { getOptionLabel={(option: any) => option.title} value={resolveValue(controllerField.value, field.cat)} disabled={!field.ux.edit} - onChange={(_, newVal: any) => controllerField.onChange(newVal)} + onChange={(_, v: any) => { + controllerField.onChange( + Array.isArray(v) ? v.map((val) => val.key).join(',') : v?.key + ) + }} renderInput={(params: any) => ( )} From a20f54459c885cef460a179220728aee1f53ea02 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 1 Aug 2024 20:18:08 +0100 Subject: [PATCH 096/122] Transform values in BasicEntitySelectField onChange handler --- src/lib/BasicEntitySelectField.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/BasicEntitySelectField.tsx b/src/lib/BasicEntitySelectField.tsx index 00e40b5..25d09f5 100644 --- a/src/lib/BasicEntitySelectField.tsx +++ b/src/lib/BasicEntitySelectField.tsx @@ -63,9 +63,10 @@ function BasicEntitySelectField (props: any) { value={resolveValue(controllerField.value, field.cat)} multiple={field.cat.multiple !== 1} label={field.name} - onChange={(event: any) => - controllerField.onChange(event.target.value) - } + onChange={(event: any) => { + const v = event.target.value + controllerField.onChange(Array.isArray(v) ? v.join(',') : v) + }} disabled={!field.ux.edit} {...field.ux.props} > From 440704a96b0f2b60d57262bdfa3b14fd1f8e1f5a Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 1 Aug 2024 20:18:16 +0100 Subject: [PATCH 097/122] Remove navigation to edit view in VxgBasicLedPlugin --- src/lib/VxgBasicLedPlugin.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/VxgBasicLedPlugin.ts b/src/lib/VxgBasicLedPlugin.ts index 3e94b23..6570d46 100644 --- a/src/lib/VxgBasicLedPlugin.ts +++ b/src/lib/VxgBasicLedPlugin.ts @@ -160,7 +160,9 @@ function VxgBasicLedPlugin (this: any, options: any) { .reduce((a: any, n: any[]) => ((a[n[0]] = msg.data[n[0]]), a), {}) const item = await seneca.entity(entCanon).save$(data) - navigate('/view/' + name + '/edit/' + item.id) + // TODO: navigate to edit view + // navigate('/view/' + name + '/edit/' + item.id) + navigate('/view/' + name) } ) From 62540563bdc3669c59ef913b46bb5300c0fb13b6 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 1 Aug 2024 21:08:07 +0100 Subject: [PATCH 098/122] Move React login from plugin back to component --- dist-plain/lib/VxgBasicAdminPlugin.js | 5 +- dist-plain/lib/VxgBasicAdminPlugin.js.map | 2 +- dist-plain/lib/VxgBasicAuthPlugin.js | 5 +- dist-plain/lib/VxgBasicAuthPlugin.js.map | 2 +- dist-plain/lib/VxgBasicEntityEditPlugin.js | 115 ++++++++++++-- .../lib/VxgBasicEntityEditPlugin.js.map | 2 +- dist-plain/lib/VxgBasicEntityFieldPlugin.d.ts | 6 + dist-plain/lib/VxgBasicEntityFieldPlugin.js | 28 ++++ .../lib/VxgBasicEntityFieldPlugin.js.map | 1 + dist-plain/lib/VxgBasicEntityListPlugin.js | 8 +- .../lib/VxgBasicEntityListPlugin.js.map | 2 +- dist-plain/lib/VxgBasicLedPlugin.d.ts | 2 +- dist-plain/lib/VxgBasicLedPlugin.js | 69 +++++---- dist-plain/lib/VxgBasicLedPlugin.js.map | 2 +- dist-plain/lib/vxg-util.js | 7 +- dist-plain/lib/vxg-util.js.map | 2 +- dist/VxgBasicEntityFieldPlugin.d.ts | 4 +- dist/voxgig-model-react.es.js | 145 ++++++++---------- dist/voxgig-model-react.umd.js | 145 ++++++++---------- src/lib/BasicEntityField.tsx | 43 +++++- src/lib/VxgBasicEntityFieldPlugin.ts | 39 +---- 21 files changed, 364 insertions(+), 270 deletions(-) create mode 100644 dist-plain/lib/VxgBasicEntityFieldPlugin.d.ts create mode 100644 dist-plain/lib/VxgBasicEntityFieldPlugin.js create mode 100644 dist-plain/lib/VxgBasicEntityFieldPlugin.js.map diff --git a/dist-plain/lib/VxgBasicAdminPlugin.js b/dist-plain/lib/VxgBasicAdminPlugin.js index 074e181..f53d44b 100644 --- a/dist-plain/lib/VxgBasicAdminPlugin.js +++ b/dist-plain/lib/VxgBasicAdminPlugin.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.VxgBasicAdminPlugin = void 0; +exports.VxgBasicAdminPlugin = VxgBasicAdminPlugin; const vxg_util_1 = require("./vxg-util"); function VxgBasicAdminPlugin() { const seneca = this; @@ -20,7 +20,6 @@ function VxgBasicAdminPlugin() { .reduce((s, n) => (s + ('' === s ? '?' : '') + (encodeURIComponent(n[0]) + '=' + encodeURIComponent(n[1]))), ''); const path = '/view/' + msg.view + q; - console.log('PATH', path); msg.navigate(path); } async function setMode(msg, meta) { @@ -30,7 +29,6 @@ function VxgBasicAdminPlugin() { meta.custom.state().current.view.name = msg.name; meta.custom.state().current.view.query = msg.query; meta.custom.state().current.view.hash = msg.hash; - console.log('syncView', msg.name); } async function prepareApp(_msg, meta) { let state = meta.custom.state(); @@ -65,5 +63,4 @@ function VxgBasicAdminPlugin() { }; } } -exports.VxgBasicAdminPlugin = VxgBasicAdminPlugin; //# sourceMappingURL=VxgBasicAdminPlugin.js.map \ No newline at end of file diff --git a/dist-plain/lib/VxgBasicAdminPlugin.js.map b/dist-plain/lib/VxgBasicAdminPlugin.js.map index ed46348..10e2c5e 100644 --- a/dist-plain/lib/VxgBasicAdminPlugin.js.map +++ b/dist-plain/lib/VxgBasicAdminPlugin.js.map @@ -1 +1 @@ -{"version":3,"file":"VxgBasicAdminPlugin.js","sourceRoot":"","sources":["../../src/lib/VxgBasicAdminPlugin.ts"],"names":[],"mappings":";;;AACA,yCAAuC;AAGvC,SAAS,mBAAmB;IAC1B,MAAM,MAAM,GAAG,IAAI,CAAA;IACnB,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC,KAAK,CAAA;IAEvC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,eAAI,CAAA;IAC/B,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,eAAI,CAAA;IAE/B,MAAM;SACH,OAAO,CAAC,iCAAiC,EAAE,UAAU,CAAC;SAEtD,OAAO,CACN,+BAA+B,EAC/B,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC,EAAE,EAC9C,QAAQ,CACT;SAEA,OAAO,CACN,uCAAuC,EACvC,EAAE,IAAI,EAAE,KAAK,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,EAClC,OAAO,CACR;SAGA,OAAO,CACN,yBAAyB,EACzB,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,EACpC,OAAO,CACR;SAGA,OAAO,CAAC,KAAK;QACZ,MAAM,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAA;IACxC,CAAC,CAAC,CAAA;IAGJ,KAAK,UAAU,OAAO,CAAC,GAAQ,EAAE,IAAS;QACxC,MAAM,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC;aAChC,MAAM,CAAC,CAAC,CAAM,EAAE,CAAM,EAAE,EAAE,CAC3B,CAAC,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;YACxB,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;QACrE,MAAM,IAAI,GAAG,QAAQ,GAAG,GAAG,CAAC,IAAI,GAAG,CAAC,CAAA;QACpC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;QACzB,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;IACpB,CAAC;IAGD,KAAK,UAAU,OAAO,CAAC,GAAQ,EAAE,IAAS;QACxC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;IACzC,CAAC;IAGD,KAAK,UAAU,QAAQ,CAAC,GAAQ,EAAE,IAAS;QACzC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;QAChD,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAA;QAClD,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;QAChD,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,IAAI,CAAC,CAAA;IACnC,CAAC;IAED,KAAK,UAAU,UAAU,CAAC,IAAS,EAAE,IAAS;QAC5C,IAAI,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;QAE/B,IAAI,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAA;QAChC,IAAI,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAA;QACvC,IAAI,OAAO,GAAG,KAAK,CAAC,IAAI,CAAA;QACxB,2BAA2B;QAC3B,IAAI,UAAU,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAAA;QAElC,KAAK,CAAC,OAAO,GAAG;YACd,IAAI,EAAE;gBACJ,IAAI,EAAE,EAAE;gBACR,KAAK,EAAE,EAAE;gBACT,IAAI,EAAE,EAAE;aACT;SACF,CAAA;QAED,MAAM,SAAS,GAAG,IAAA,eAAI,EAAC,OAAO,EAAE;YAC9B,IAAI,EAAE,eAAI,CAAC,IAAI;YACf,MAAM,EAAE,eAAI,CAAC,MAAM;SACpB,CAAC,CAAA;QACF,KAAK,CAAC,IAAI,GAAG,SAAS,CAAA;QAEtB,KAAK,CAAC,GAAG,GAAG;YACV,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,IAAA,eAAI,EAAC,UAAU,EAAE;gBACxB,IAAI,EAAE,eAAI,CAAC,IAAI;gBACf,MAAM,EAAE,eAAI,CAAC,MAAM;gBACnB,IAAI,EAAE,CAAC,CAAM,EAAE,EAAE,CAAC,IAAA,eAAI,EAAC,CAAC,EAAE;oBACxB,MAAM,EAAE,eAAI,CAAC,MAAM;oBACnB,IAAI,EAAE,eAAI,CAAC,IAAI;oBACf,IAAI,EAAE,eAAI,CAAC,IAAI;iBAChB,CAAC;aACH,CAAC;SACH,CAAA;IACH,CAAC;AAEH,CAAC;AAMC,kDAAmB"} \ No newline at end of file +{"version":3,"file":"VxgBasicAdminPlugin.js","sourceRoot":"","sources":["../../src/lib/VxgBasicAdminPlugin.ts"],"names":[],"mappings":";;AAwGE,kDAAmB;AAvGrB,yCAAuC;AAGvC,SAAS,mBAAmB;IAC1B,MAAM,MAAM,GAAG,IAAI,CAAA;IACnB,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC,KAAK,CAAA;IAEvC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,eAAI,CAAA;IAC/B,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,eAAI,CAAA;IAE/B,MAAM;SACH,OAAO,CAAC,iCAAiC,EAAE,UAAU,CAAC;SAEtD,OAAO,CACN,+BAA+B,EAC/B,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC,EAAE,EAC9C,QAAQ,CACT;SAEA,OAAO,CACN,uCAAuC,EACvC,EAAE,IAAI,EAAE,KAAK,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,EAClC,OAAO,CACR;SAGA,OAAO,CACN,yBAAyB,EACzB,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,EACpC,OAAO,CACR;SAGA,OAAO,CAAC,KAAK;QACZ,MAAM,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAA;IACxC,CAAC,CAAC,CAAA;IAGJ,KAAK,UAAU,OAAO,CAAC,GAAQ,EAAE,IAAS;QACxC,MAAM,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC;aAChC,MAAM,CAAC,CAAC,CAAM,EAAE,CAAM,EAAE,EAAE,CAC3B,CAAC,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;YACxB,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;QACrE,MAAM,IAAI,GAAG,QAAQ,GAAG,GAAG,CAAC,IAAI,GAAG,CAAC,CAAA;QACpC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;IACpB,CAAC;IAGD,KAAK,UAAU,OAAO,CAAC,GAAQ,EAAE,IAAS;QACxC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;IACzC,CAAC;IAGD,KAAK,UAAU,QAAQ,CAAC,GAAQ,EAAE,IAAS;QACzC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;QAChD,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAA;QAClD,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;IAClD,CAAC;IAGD,KAAK,UAAU,UAAU,CAAC,IAAS,EAAE,IAAS;QAC5C,IAAI,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;QAE/B,IAAI,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAA;QAChC,IAAI,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAA;QACvC,IAAI,OAAO,GAAG,KAAK,CAAC,IAAI,CAAA;QACxB,2BAA2B;QAC3B,IAAI,UAAU,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAAA;QAElC,KAAK,CAAC,OAAO,GAAG;YACd,IAAI,EAAE;gBACJ,IAAI,EAAE,EAAE;gBACR,KAAK,EAAE,EAAE;gBACT,IAAI,EAAE,EAAE;aACT;SACF,CAAA;QAED,MAAM,SAAS,GAAG,IAAA,eAAI,EAAC,OAAO,EAAE;YAC9B,IAAI,EAAE,eAAI,CAAC,IAAI;YACf,MAAM,EAAE,eAAI,CAAC,MAAM;SACpB,CAAC,CAAA;QACF,KAAK,CAAC,IAAI,GAAG,SAAS,CAAA;QAEtB,KAAK,CAAC,GAAG,GAAG;YACV,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,IAAA,eAAI,EAAC,UAAU,EAAE;gBACxB,IAAI,EAAE,eAAI,CAAC,IAAI;gBACf,MAAM,EAAE,eAAI,CAAC,MAAM;gBACnB,IAAI,EAAE,CAAC,CAAM,EAAE,EAAE,CAAC,IAAA,eAAI,EAAC,CAAC,EAAE;oBACxB,MAAM,EAAE,eAAI,CAAC,MAAM;oBACnB,IAAI,EAAE,eAAI,CAAC,IAAI;oBACf,IAAI,EAAE,eAAI,CAAC,IAAI;iBAChB,CAAC;aACH,CAAC;SACH,CAAA;IACH,CAAC;AAEH,CAAC"} \ No newline at end of file diff --git a/dist-plain/lib/VxgBasicAuthPlugin.js b/dist-plain/lib/VxgBasicAuthPlugin.js index 532e276..3822731 100644 --- a/dist-plain/lib/VxgBasicAuthPlugin.js +++ b/dist-plain/lib/VxgBasicAuthPlugin.js @@ -1,13 +1,11 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.VxgBasicAuthPlugin = void 0; +exports.VxgBasicAuthPlugin = VxgBasicAuthPlugin; const gubu_1 = require("gubu"); function VxgBasicAuthPlugin(options) { const seneca = this; const { spec, setSigninStatus, setReady } = options; - console.log('VxgBasicAuthPlugin define', spec); function handleSignin(event) { - console.log('handleSignin'); event.preventDefault(); const data = new FormData(event.currentTarget); const email = data.get('email'); @@ -39,7 +37,6 @@ function VxgBasicAuthPlugin(options) { } }; } -exports.VxgBasicAuthPlugin = VxgBasicAuthPlugin; VxgBasicAuthPlugin.default = { setSigninStatus: Function, setReady: Function, diff --git a/dist-plain/lib/VxgBasicAuthPlugin.js.map b/dist-plain/lib/VxgBasicAuthPlugin.js.map index 74dfee4..b424030 100644 --- a/dist-plain/lib/VxgBasicAuthPlugin.js.map +++ b/dist-plain/lib/VxgBasicAuthPlugin.js.map @@ -1 +1 @@ -{"version":3,"file":"VxgBasicAuthPlugin.js","sourceRoot":"","sources":["../../src/lib/VxgBasicAuthPlugin.ts"],"names":[],"mappings":";;;AAEA,+BAA2B;AAG3B,SAAS,kBAAkB,CAAY,OAAY;IACjD,MAAM,MAAM,GAAG,IAAI,CAAA;IAEnB,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAA;IAEnD,OAAO,CAAC,GAAG,CAAC,2BAA2B,EAAE,IAAI,CAAC,CAAA;IAG9C,SAAS,YAAY,CAAC,KAAU;QAC9B,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAA;QAC3B,KAAK,CAAC,cAAc,EAAE,CAAA;QACtB,MAAM,IAAI,GAAG,IAAI,QAAQ,CAAC,KAAK,CAAC,aAAa,CAAC,CAAA;QAE9C,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;QAC/B,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;QAErC,MAAM,CAAC,QAAQ,EAAE,CAAC,GAAG,CACnB,6BAA6B,EAC7B,EAAE,KAAK,EAAE,QAAQ,EAAE,EACnB,UAAS,GAAQ,EAAE,GAAQ;YACzB,IAAI,IAAI,IAAI,GAAG,IAAI,IAAI,IAAI,GAAG,IAAI,GAAG,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;gBAC/D,QAAQ,CAAC,QAAQ,CAAC,IAAI,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM;oBAC/C,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAA;gBAC7B,OAAM;YACR,CAAC;iBAEI,IAAI,IAAI,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;gBAChC,eAAe,CAAC,SAAS,CAAC,CAAA;gBAC1B,OAAM;YACR,CAAC;iBAEI,IAAI,IAAI,IAAI,GAAG,IAAI,GAAG,CAAC,EAAE,IAAI,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;gBACpD,eAAe,CAAC,OAAO,CAAC,CAAA;gBACxB,OAAM;YACR,CAAC;YAED,IAAI,IAAI,IAAI,GAAG,EAAE,CAAC;gBAChB,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,CAAC,CAAA;YACjD,CAAC;YAED,eAAe,CAAC,aAAa,CAAC,CAAA;QAChC,CAAC,CACF,CAAA;IACH,CAAC;IAED,QAAQ,CAAC,IAAI,CAAC,CAAA;IAEd,OAAO;QACL,OAAO,EAAE;YACP,YAAY;SACb;KACF,CAAA;AACH,CAAC;AAgBC,gDAAkB;AAdpB,kBAAkB,CAAC,OAAO,GAAG;IAC3B,eAAe,EAAE,QAAQ;IACzB,QAAQ,EAAE,QAAQ;IAClB,IAAI,EAAE,IAAA,WAAI,EAAC;QACT,MAAM,EAAE,IAAA,WAAI,EAAC;YACX,KAAK,EAAE,KAAK;SACb,CAAC;KACH,CAAC;CACH,CAAA;AAGD,MAAM,CAAC,cAAc,CAAC,kBAAkB,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,oBAAoB,EAAE,CAAC,CAAA"} \ No newline at end of file +{"version":3,"file":"VxgBasicAuthPlugin.js","sourceRoot":"","sources":["../../src/lib/VxgBasicAuthPlugin.ts"],"names":[],"mappings":";;AAsEE,gDAAkB;AApEpB,+BAA2B;AAG3B,SAAS,kBAAkB,CAAY,OAAY;IACjD,MAAM,MAAM,GAAG,IAAI,CAAA;IAEnB,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAA;IAGnD,SAAS,YAAY,CAAC,KAAU;QAC9B,KAAK,CAAC,cAAc,EAAE,CAAA;QACtB,MAAM,IAAI,GAAG,IAAI,QAAQ,CAAC,KAAK,CAAC,aAAa,CAAC,CAAA;QAE9C,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;QAC/B,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;QAErC,MAAM,CAAC,QAAQ,EAAE,CAAC,GAAG,CACnB,6BAA6B,EAC7B,EAAE,KAAK,EAAE,QAAQ,EAAE,EACnB,UAAS,GAAQ,EAAE,GAAQ;YACzB,IAAI,IAAI,IAAI,GAAG,IAAI,IAAI,IAAI,GAAG,IAAI,GAAG,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;gBAC/D,QAAQ,CAAC,QAAQ,CAAC,IAAI,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM;oBAC/C,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAA;gBAC7B,OAAM;YACR,CAAC;iBAEI,IAAI,IAAI,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;gBAChC,eAAe,CAAC,SAAS,CAAC,CAAA;gBAC1B,OAAM;YACR,CAAC;iBAEI,IAAI,IAAI,IAAI,GAAG,IAAI,GAAG,CAAC,EAAE,IAAI,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;gBACpD,eAAe,CAAC,OAAO,CAAC,CAAA;gBACxB,OAAM;YACR,CAAC;YAED,IAAI,IAAI,IAAI,GAAG,EAAE,CAAC;gBAChB,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,CAAC,CAAA;YACjD,CAAC;YAED,eAAe,CAAC,aAAa,CAAC,CAAA;QAChC,CAAC,CACF,CAAA;IACH,CAAC;IAED,QAAQ,CAAC,IAAI,CAAC,CAAA;IAEd,OAAO;QACL,OAAO,EAAE;YACP,YAAY;SACb;KACF,CAAA;AACH,CAAC;AAED,kBAAkB,CAAC,OAAO,GAAG;IAC3B,eAAe,EAAE,QAAQ;IACzB,QAAQ,EAAE,QAAQ;IAClB,IAAI,EAAE,IAAA,WAAI,EAAC;QACT,MAAM,EAAE,IAAA,WAAI,EAAC;YACX,KAAK,EAAE,KAAK;SACb,CAAC;KACH,CAAC;CACH,CAAA;AAGD,MAAM,CAAC,cAAc,CAAC,kBAAkB,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,oBAAoB,EAAE,CAAC,CAAA"} \ No newline at end of file diff --git a/dist-plain/lib/VxgBasicEntityEditPlugin.js b/dist-plain/lib/VxgBasicEntityEditPlugin.js index bd08070..0aab72d 100644 --- a/dist-plain/lib/VxgBasicEntityEditPlugin.js +++ b/dist-plain/lib/VxgBasicEntityEditPlugin.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.VxgBasicEntityEditPlugin = void 0; +exports.VxgBasicEntityEditPlugin = VxgBasicEntityEditPlugin; const gubu_1 = require("gubu"); const { Open, Child } = gubu_1.Gubu; const Shape = (0, gubu_1.Gubu)(Open({ @@ -8,14 +8,71 @@ const Shape = (0, gubu_1.Gubu)(Open({ prefix: String, ent: String, order: [String], - field: Child({}, {}) -}), { prefix: 'BasicEntityEdit' }); + field: Child({}, {}), +}), { name: 'BasicEntityEdit' }); function VxgBasicEntityEditPlugin(options) { const seneca = this; + console.log('VxgBasicEntityEditPlugin', 'options', options); const spec = Shape(options.spec); - console.log('QQQ', spec); const slot = spec.prefix + spec.name; const fields = spec.order.reduce((a, fn) => (fixField(fn, spec.field[fn], spec), a.push(spec.field[fn]), a), []); + for (const field of fields) { + if ('Date' === field.ux.kind) { + seneca.add('aim:app,on:BasicLed,modify:edit,view:' + spec.name, async function modify_edit_Date(msg) { + const out = await this.prior(msg); + let { item } = out; + item = { ...item }; + if (!item[field.name + '_orig$']) { + const dt = util.dateTimeFromUTC(item[field.name]); + item[field.name + '_orig$'] = item[field.name]; + item[field.name + '_udm$'] = dt.udm; + item[field.name] = dt.localt; + } + return { ...msg, item }; + }); + } + else if ('Time' === field.ux.kind) { + seneca.add('aim:app,on:BasicLed,modify:edit,view:' + spec.name, async function modify_edit_Time(msg) { + const out = await this.prior(msg); + let { item } = out; + item = { ...item }; + if (!item[field.name + '_orig$']) { + const dt = util.dateTimeFromUTC(item[field.name]); + item[field.name + '_orig$'] = item[field.name]; + item[field.name + '_udm$'] = dt.udm; + item[field.name] = dt.localt; + } + return { ...msg, item }; + }); + } + else if ('DateTime' === field.ux.kind) { + seneca.add('aim:app,on:BasicLed,modify:edit,view:' + spec.name, async function modify_edit_Datetime(msg) { + const out = await this.prior(msg); + let { item } = out; + item = { ...item }; + if (!item[field.name + '_orig$']) { + const dt = util.dateTimeFromUTC(item[field.name]); + item[field.name + '_orig$'] = item[field.name]; + item[field.name + '_udm$'] = dt.udm; + item[field.name] = dt.locald + 'T' + dt.localt; + } + return { ...msg, item }; + }); + } + else if ('Slider' === field.ux.kind) { + // console.log('VxgBasicEntityEditPlugin', 'Slider') + seneca.add('aim:app,on:BasicLed,modify:edit,view:' + spec.name, async function modify_edit_Slider(msg) { + const out = await this.prior(msg); + let { item } = out; + item = { ...item }; + if (!item[field.name + '_orig$']) { + item[field.name + '_orig$'] = item[field.name]; + item[field.name] = Number(item[field.name]) / 60; + } + return { ...msg, item }; + }); + } + } options.setPlugin(true); return { exports: { @@ -23,22 +80,62 @@ function VxgBasicEntityEditPlugin(options) { spec, slot, fields, - } - } + }, + }, }; } -exports.VxgBasicEntityEditPlugin = VxgBasicEntityEditPlugin; function fixField(name, field, spec) { field.id = 'vxg-field-' + spec.name + '-' + name; field.name = name; field.ux = field.ux || {}; field.ux.size = null == field.ux.size ? 4 : parseInt(field.ux.size, 10); } +const util = { + dateTimeFromUTC: (utc, tz) => { + const date = new Date(utc); + const iso = date.toISOString(); + const isod = iso.split('T')[0]; + const isot = iso.split('T')[1].split('.')[0]; + // UTC millis into day (since midnight) + const udm = date.getUTCHours() * 60 * 60 * 1000 + + date.getUTCMinutes() * 60 * 1000 + + date.getUTCSeconds() * 1000 + + date.getUTCMilliseconds(); + let out = { + utc, + date, + isod, + isot, + udm, + }; + tz = tz || Intl.DateTimeFormat().resolvedOptions().timeZone; + const dateFormatter = new Intl.DateTimeFormat('en-GB', { + timeZone: tz, + year: 'numeric', + month: '2-digit', + day: '2-digit', + }); + const timeFormatter = new Intl.DateTimeFormat('en-GB', { + timeZone: tz, + hour: '2-digit', + minute: '2-digit', + second: '2-digit', + hour12: false, + }); + const [{ value: day }, , { value: month }, , { value: year }] = dateFormatter.formatToParts(date); + const [{ value: hour }, , { value: minute }, , { value: second }] = timeFormatter.formatToParts(date); + out.locald = `${year}-${month}-${day}`; + out.localt = `${hour}:${minute}:${second}`; + return out; + }, +}; Object.assign(VxgBasicEntityEditPlugin, { defaults: { spec: {}, setPlugin: Function, - } + }, +}); +Object.defineProperty(VxgBasicEntityEditPlugin, 'name', { + value: 'VxgBasicEntityEditPlugin', }); -Object.defineProperty(VxgBasicEntityEditPlugin, 'name', { value: 'VxgBasicEntityEditPlugin' }); //# sourceMappingURL=VxgBasicEntityEditPlugin.js.map \ No newline at end of file diff --git a/dist-plain/lib/VxgBasicEntityEditPlugin.js.map b/dist-plain/lib/VxgBasicEntityEditPlugin.js.map index 65f3204..a5cef9a 100644 --- a/dist-plain/lib/VxgBasicEntityEditPlugin.js.map +++ b/dist-plain/lib/VxgBasicEntityEditPlugin.js.map @@ -1 +1 @@ -{"version":3,"file":"VxgBasicEntityEditPlugin.js","sourceRoot":"","sources":["../../src/lib/VxgBasicEntityEditPlugin.ts"],"names":[],"mappings":";;;AAGA,+BAA2B;AAE3B,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,WAAI,CAAA;AAE5B,MAAM,KAAK,GAAG,IAAA,WAAI,EAAC,IAAI,CAAC;IACtB,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,MAAM;IACd,GAAG,EAAE,MAAM;IACX,KAAK,EAAE,CAAC,MAAM,CAAC;IACf,KAAK,EAAE,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC;CACrB,CAAC,EAAE,EAAE,MAAM,EAAE,iBAAiB,EAAE,CAAC,CAAA;AAGlC,SAAS,wBAAwB,CAAY,OAAY;IACvD,MAAM,MAAM,GAAG,IAAI,CAAA;IAEnB,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IAEhC,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;IAExB,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,CAAA;IAEpC,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAM,EAAE,EAAO,EAAE,EAAE,CACnD,CAAC,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;IAEtE,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;IAEvB,OAAO;QACL,OAAO,EAAE;YACP,MAAM,EAAE;gBACN,IAAI;gBACJ,IAAI;gBACJ,MAAM;aACP;SACF;KACF,CAAA;AACH,CAAC;AAyBC,4DAAwB;AArB1B,SAAS,QAAQ,CAAC,IAAY,EAAE,KAAU,EAAE,IAAS;IACnD,KAAK,CAAC,EAAE,GAAG,YAAY,GAAG,IAAI,CAAC,IAAI,GAAG,GAAG,GAAG,IAAI,CAAA;IAChD,KAAK,CAAC,IAAI,GAAG,IAAI,CAAA;IACjB,KAAK,CAAC,EAAE,GAAG,KAAK,CAAC,EAAE,IAAI,EAAE,CAAA;IACzB,KAAK,CAAC,EAAE,CAAC,IAAI,GAAG,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;AACzE,CAAC;AAKD,MAAM,CAAC,MAAM,CAAC,wBAAwB,EAAE;IACtC,QAAQ,EAAE;QACR,IAAI,EAAE,EAAE;QACR,SAAS,EAAE,QAAQ;KACpB;CACF,CAAC,CAAA;AAGF,MAAM,CAAC,cAAc,CAAC,wBAAwB,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,0BAA0B,EAAE,CAAC,CAAA"} \ No newline at end of file +{"version":3,"file":"VxgBasicEntityEditPlugin.js","sourceRoot":"","sources":["../../src/lib/VxgBasicEntityEditPlugin.ts"],"names":[],"mappings":";;AAqMS,4DAAwB;AAnMjC,+BAA2B;AAE3B,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,WAAI,CAAA;AAE5B,MAAM,KAAK,GAAG,IAAA,WAAI,EAChB,IAAI,CAAC;IACH,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,MAAM;IACd,GAAG,EAAE,MAAM;IACX,KAAK,EAAE,CAAC,MAAM,CAAC;IACf,KAAK,EAAE,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC;CACrB,CAAC,EACF,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAC5B,CAAA;AAED,SAAS,wBAAwB,CAAa,OAAY;IACxD,MAAM,MAAM,GAAG,IAAI,CAAA;IAEnB,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE,SAAS,EAAE,OAAO,CAAC,CAAA;IAE3D,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IAEhC,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,CAAA;IAEpC,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAC9B,CAAC,CAAM,EAAE,EAAO,EAAE,EAAE,CAAC,CACnB,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAC9D,EACD,EAAE,CACH,CAAA;IAED,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,MAAM,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;YAC7B,MAAM,CAAC,GAAG,CACR,uCAAuC,GAAG,IAAI,CAAC,IAAI,EACnD,KAAK,UAAU,gBAAgB,CAAa,GAAQ;gBAClD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,EAAE,IAAI,EAAE,GAAG,GAAG,CAAA;gBAElB,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,CAAA;gBAElB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,EAAE,CAAC;oBACjC,MAAM,EAAE,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;oBACjD,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;oBAC9C,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,CAAA;oBACnC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAA;gBAC9B,CAAC;gBAED,OAAO,EAAE,GAAG,GAAG,EAAE,IAAI,EAAE,CAAA;YACzB,CAAC,CACF,CAAA;QACH,CAAC;aAAM,IAAI,MAAM,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;YACpC,MAAM,CAAC,GAAG,CACR,uCAAuC,GAAG,IAAI,CAAC,IAAI,EACnD,KAAK,UAAU,gBAAgB,CAAa,GAAQ;gBAClD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,EAAE,IAAI,EAAE,GAAG,GAAG,CAAA;gBAElB,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,CAAA;gBAElB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,EAAE,CAAC;oBACjC,MAAM,EAAE,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;oBACjD,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;oBAC9C,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,CAAA;oBACnC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAA;gBAC9B,CAAC;gBAED,OAAO,EAAE,GAAG,GAAG,EAAE,IAAI,EAAE,CAAA;YACzB,CAAC,CACF,CAAA;QACH,CAAC;aAAM,IAAI,UAAU,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;YACxC,MAAM,CAAC,GAAG,CACR,uCAAuC,GAAG,IAAI,CAAC,IAAI,EACnD,KAAK,UAAU,oBAAoB,CAAa,GAAQ;gBACtD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,EAAE,IAAI,EAAE,GAAG,GAAG,CAAA;gBAElB,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,CAAA;gBAElB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,EAAE,CAAC;oBACjC,MAAM,EAAE,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;oBACjD,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;oBAC9C,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,CAAA;oBACnC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,GAAG,GAAG,GAAG,EAAE,CAAC,MAAM,CAAA;gBAChD,CAAC;gBAED,OAAO,EAAE,GAAG,GAAG,EAAE,IAAI,EAAE,CAAA;YACzB,CAAC,CACF,CAAA;QACH,CAAC;aAAM,IAAI,QAAQ,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;YACtC,oDAAoD;YACpD,MAAM,CAAC,GAAG,CACR,uCAAuC,GAAG,IAAI,CAAC,IAAI,EACnD,KAAK,UAAU,kBAAkB,CAAa,GAAQ;gBACpD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,EAAE,IAAI,EAAE,GAAG,GAAG,CAAA;gBAElB,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,CAAA;gBAElB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,EAAE,CAAC;oBACjC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;oBAC9C,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,CAAA;gBAClD,CAAC;gBAED,OAAO,EAAE,GAAG,GAAG,EAAE,IAAI,EAAE,CAAA;YACzB,CAAC,CACF,CAAA;QACH,CAAC;IACH,CAAC;IAED,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;IAEvB,OAAO;QACL,OAAO,EAAE;YACP,MAAM,EAAE;gBACN,IAAI;gBACJ,IAAI;gBACJ,MAAM;aACP;SACF;KACF,CAAA;AACH,CAAC;AAED,SAAS,QAAQ,CAAE,IAAY,EAAE,KAAU,EAAE,IAAS;IACpD,KAAK,CAAC,EAAE,GAAG,YAAY,GAAG,IAAI,CAAC,IAAI,GAAG,GAAG,GAAG,IAAI,CAAA;IAChD,KAAK,CAAC,IAAI,GAAG,IAAI,CAAA;IACjB,KAAK,CAAC,EAAE,GAAG,KAAK,CAAC,EAAE,IAAI,EAAE,CAAA;IACzB,KAAK,CAAC,EAAE,CAAC,IAAI,GAAG,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;AACzE,CAAC;AAED,MAAM,IAAI,GAAG;IACX,eAAe,EAAE,CAAC,GAAW,EAAE,EAAW,EAAE,EAAE;QAC5C,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,CAAA;QAC1B,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,EAAE,CAAA;QAC9B,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QAC9B,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QAE5C,uCAAuC;QACvC,MAAM,GAAG,GACP,IAAI,CAAC,WAAW,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI;YACnC,IAAI,CAAC,aAAa,EAAE,GAAG,EAAE,GAAG,IAAI;YAChC,IAAI,CAAC,aAAa,EAAE,GAAG,IAAI;YAC3B,IAAI,CAAC,kBAAkB,EAAE,CAAA;QAE3B,IAAI,GAAG,GAAQ;YACb,GAAG;YACH,IAAI;YACJ,IAAI;YACJ,IAAI;YACJ,GAAG;SACJ,CAAA;QAED,EAAE,GAAG,EAAE,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC,eAAe,EAAE,CAAC,QAAQ,CAAA;QAC3D,MAAM,aAAa,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE;YACrD,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,SAAS;YAChB,GAAG,EAAE,SAAS;SACf,CAAC,CAAA;QAEF,MAAM,aAAa,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE;YACrD,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,SAAS;YACf,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,KAAK;SACd,CAAC,CAAA;QAEF,MAAM,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,GAC3D,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;QACnC,MAAM,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,GAC/D,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;QAEnC,GAAG,CAAC,MAAM,GAAG,GAAG,IAAI,IAAI,KAAK,IAAI,GAAG,EAAE,CAAA;QACtC,GAAG,CAAC,MAAM,GAAG,GAAG,IAAI,IAAI,MAAM,IAAI,MAAM,EAAE,CAAA;QAE1C,OAAO,GAAG,CAAA;IACZ,CAAC;CACF,CAAA;AAED,MAAM,CAAC,MAAM,CAAC,wBAAwB,EAAE;IACtC,QAAQ,EAAE;QACR,IAAI,EAAE,EAAE;QACR,SAAS,EAAE,QAAQ;KACpB;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,cAAc,CAAC,wBAAwB,EAAE,MAAM,EAAE;IACtD,KAAK,EAAE,0BAA0B;CAClC,CAAC,CAAA"} \ No newline at end of file diff --git a/dist-plain/lib/VxgBasicEntityFieldPlugin.d.ts b/dist-plain/lib/VxgBasicEntityFieldPlugin.d.ts new file mode 100644 index 0000000..3725ec0 --- /dev/null +++ b/dist-plain/lib/VxgBasicEntityFieldPlugin.d.ts @@ -0,0 +1,6 @@ +declare function VxgBasicEntityFieldPlugin(this: any, options: any): { + exports: { + handle: {}; + }; +}; +export { VxgBasicEntityFieldPlugin }; diff --git a/dist-plain/lib/VxgBasicEntityFieldPlugin.js b/dist-plain/lib/VxgBasicEntityFieldPlugin.js new file mode 100644 index 0000000..0747dbc --- /dev/null +++ b/dist-plain/lib/VxgBasicEntityFieldPlugin.js @@ -0,0 +1,28 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.VxgBasicEntityFieldPlugin = VxgBasicEntityFieldPlugin; +const gubu_1 = require("gubu"); +const { Open, Child } = gubu_1.Gubu; +const Shape = (0, gubu_1.Gubu)(Open({ + field: {}, +}), { name: 'BasicEntityField' }); +function VxgBasicEntityFieldPlugin(options) { + const seneca = this; + const spec = Shape(options.spec); + options.setPlugin(true); + return { + exports: { + handle: {}, + }, + }; +} +Object.assign(VxgBasicEntityFieldPlugin, { + defaults: { + spec: {}, + setPlugin: Function, + }, +}); +Object.defineProperty(VxgBasicEntityFieldPlugin, 'name', { + value: 'VxgBasicEntityFieldPlugin', +}); +//# sourceMappingURL=VxgBasicEntityFieldPlugin.js.map \ No newline at end of file diff --git a/dist-plain/lib/VxgBasicEntityFieldPlugin.js.map b/dist-plain/lib/VxgBasicEntityFieldPlugin.js.map new file mode 100644 index 0000000..7b4f982 --- /dev/null +++ b/dist-plain/lib/VxgBasicEntityFieldPlugin.js.map @@ -0,0 +1 @@ +{"version":3,"file":"VxgBasicEntityFieldPlugin.js","sourceRoot":"","sources":["../../src/lib/VxgBasicEntityFieldPlugin.ts"],"names":[],"mappings":";;AAsCS,8DAAyB;AApClC,+BAA2B;AAE3B,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,WAAI,CAAA;AAE5B,MAAM,KAAK,GAAG,IAAA,WAAI,EAChB,IAAI,CAAC;IACH,KAAK,EAAE,EAAE;CACV,CAAC,EACF,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAC7B,CAAA;AAED,SAAS,yBAAyB,CAAa,OAAY;IACzD,MAAM,MAAM,GAAG,IAAI,CAAA;IAEnB,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IAEhC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;IAEvB,OAAO;QACL,OAAO,EAAE;YACP,MAAM,EAAE,EAAE;SACX;KACF,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,CAAC,yBAAyB,EAAE;IACvC,QAAQ,EAAE;QACR,IAAI,EAAE,EAAE;QACR,SAAS,EAAE,QAAQ;KACpB;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,cAAc,CAAC,yBAAyB,EAAE,MAAM,EAAE;IACvD,KAAK,EAAE,2BAA2B;CACnC,CAAC,CAAA"} \ No newline at end of file diff --git a/dist-plain/lib/VxgBasicEntityListPlugin.js b/dist-plain/lib/VxgBasicEntityListPlugin.js index 7ab6991..3105507 100644 --- a/dist-plain/lib/VxgBasicEntityListPlugin.js +++ b/dist-plain/lib/VxgBasicEntityListPlugin.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.VxgBasicEntityListPlugin = void 0; +exports.VxgBasicEntityListPlugin = VxgBasicEntityListPlugin; const gubu_1 = require("gubu"); const { Open, Child } = gubu_1.Gubu; const Shape = (0, gubu_1.Gubu)(Open({ @@ -9,16 +9,14 @@ const Shape = (0, gubu_1.Gubu)(Open({ ent: String, order: [String], field: Child({}, {}) -}), { prefix: 'BasicEntityList' }); +}), { name: 'BasicEntityList' }); function VxgBasicEntityListPlugin(options) { const seneca = this; const spec = Shape(options.spec); - console.log('BasicEntityList spec', spec); const slot = spec.prefix + spec.name; // TODO: error if field missing const columns = spec.order.reduce((a, fn) => { const field = spec.field[fn]; - // console.log('CF', fn, field) a.push({ accessorKey: fn, header: field.label, @@ -26,7 +24,6 @@ function VxgBasicEntityListPlugin(options) { }); return a; }, []); - // console.log('BasicEntityList columns', columns) options.setPlugin(true); return { exports: { @@ -39,7 +36,6 @@ function VxgBasicEntityListPlugin(options) { } }; } -exports.VxgBasicEntityListPlugin = VxgBasicEntityListPlugin; function buildFilter(query) { const filter = Object.entries(query) .reduce((a, n) => ((n[0].startsWith('f_') ? a[n[0].substring(2)] = n[1] : null), a), {}); diff --git a/dist-plain/lib/VxgBasicEntityListPlugin.js.map b/dist-plain/lib/VxgBasicEntityListPlugin.js.map index b8162e5..9f666a7 100644 --- a/dist-plain/lib/VxgBasicEntityListPlugin.js.map +++ b/dist-plain/lib/VxgBasicEntityListPlugin.js.map @@ -1 +1 @@ -{"version":3,"file":"VxgBasicEntityListPlugin.js","sourceRoot":"","sources":["../../src/lib/VxgBasicEntityListPlugin.ts"],"names":[],"mappings":";;;AAGA,+BAA2B;AAE3B,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,WAAI,CAAA;AAE5B,MAAM,KAAK,GAAG,IAAA,WAAI,EAAC,IAAI,CAAC;IACtB,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,MAAM;IACd,GAAG,EAAE,MAAM;IACX,KAAK,EAAE,CAAC,MAAM,CAAC;IACf,KAAK,EAAE,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC;CACrB,CAAC,EAAE,EAAE,MAAM,EAAE,iBAAiB,EAAE,CAAC,CAAA;AAGlC,SAAS,wBAAwB,CAAY,OAAY;IACvD,MAAM,MAAM,GAAG,IAAI,CAAA;IAEnB,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IAEhC,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,IAAI,CAAC,CAAA;IAEzC,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,CAAA;IAEpC,+BAA+B;IAC/B,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAM,EAAE,EAAO,EAAE,EAAE;QACpD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;QAC5B,+BAA+B;QAC/B,CAAC,CAAC,IAAI,CAAC;YACL,WAAW,EAAE,EAAE;YACf,MAAM,EAAE,KAAK,CAAC,KAAK;YACnB,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;SACvB,CAAC,CAAA;QACF,OAAO,CAAC,CAAA;IACV,CAAC,EAAE,EAAE,CAAC,CAAA;IAEN,kDAAkD;IAElD,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;IAEvB,OAAO;QACL,OAAO,EAAE;YACP,MAAM,EAAE;gBACN,IAAI;gBACJ,IAAI;gBACJ,OAAO;gBACP,WAAW;aACZ;SACF;KACF,CAAA;AACH,CAAC;AA0BC,4DAAwB;AAvB1B,SAAS,WAAW,CAAC,KAAU;IAC7B,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;SACjC,MAAM,CAAC,CAAC,CAAM,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;IAE/F,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;SACtC,MAAM,CAAC,CAAC,CAAM,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;IAEzD,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,CAAA;AAC/B,CAAC;AAGD,MAAM,CAAC,MAAM,CAAC,wBAAwB,EAAE;IACtC,QAAQ,EAAE;QACR,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,EAAE;QACR,SAAS,EAAE,QAAQ;KACpB;CACF,CAAC,CAAA;AAGF,MAAM,CAAC,cAAc,CAAC,wBAAwB,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,0BAA0B,EAAE,CAAC,CAAA"} \ No newline at end of file +{"version":3,"file":"VxgBasicEntityListPlugin.js","sourceRoot":"","sources":["../../src/lib/VxgBasicEntityListPlugin.ts"],"names":[],"mappings":";;AAwEE,4DAAwB;AArE1B,+BAA2B;AAE3B,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,WAAI,CAAA;AAE5B,MAAM,KAAK,GAAG,IAAA,WAAI,EAAC,IAAI,CAAC;IACtB,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,MAAM;IACd,GAAG,EAAE,MAAM;IACX,KAAK,EAAE,CAAC,MAAM,CAAC;IACf,KAAK,EAAE,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC;CACrB,CAAC,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC,CAAA;AAGhC,SAAS,wBAAwB,CAAY,OAAY;IACvD,MAAM,MAAM,GAAG,IAAI,CAAA;IAEnB,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IAEhC,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,CAAA;IAEpC,+BAA+B;IAC/B,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAM,EAAE,EAAO,EAAE,EAAE;QACpD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;QAC5B,CAAC,CAAC,IAAI,CAAC;YACL,WAAW,EAAE,EAAE;YACf,MAAM,EAAE,KAAK,CAAC,KAAK;YACnB,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;SACvB,CAAC,CAAA;QACF,OAAO,CAAC,CAAA;IACV,CAAC,EAAE,EAAE,CAAC,CAAA;IAEN,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;IAEvB,OAAO;QACL,OAAO,EAAE;YACP,MAAM,EAAE;gBACN,IAAI;gBACJ,IAAI;gBACJ,OAAO;gBACP,WAAW;aACZ;SACF;KACF,CAAA;AACH,CAAC;AAGD,SAAS,WAAW,CAAC,KAAU;IAC7B,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;SACjC,MAAM,CAAC,CAAC,CAAM,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;IAE/F,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;SACtC,MAAM,CAAC,CAAC,CAAM,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;IAEzD,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,CAAA;AAC/B,CAAC;AAGD,MAAM,CAAC,MAAM,CAAC,wBAAwB,EAAE;IACtC,QAAQ,EAAE;QACR,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,EAAE;QACR,SAAS,EAAE,QAAQ;KACpB;CACF,CAAC,CAAA;AAGF,MAAM,CAAC,cAAc,CAAC,wBAAwB,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,0BAA0B,EAAE,CAAC,CAAA"} \ No newline at end of file diff --git a/dist-plain/lib/VxgBasicLedPlugin.d.ts b/dist-plain/lib/VxgBasicLedPlugin.d.ts index f21d9f1..06eb567 100644 --- a/dist-plain/lib/VxgBasicLedPlugin.d.ts +++ b/dist-plain/lib/VxgBasicLedPlugin.d.ts @@ -7,7 +7,7 @@ declare function VxgBasicLedPlugin(this: any, options: any): { foot: any; }; util: { - dateTimeFromUTC: (utc: number, tz?: string | undefined) => any; + dateTimeFromUTC: (utc: number, tz?: string) => any; }; }; }; diff --git a/dist-plain/lib/VxgBasicLedPlugin.js b/dist-plain/lib/VxgBasicLedPlugin.js index f8b6528..b89c1fa 100644 --- a/dist-plain/lib/VxgBasicLedPlugin.js +++ b/dist-plain/lib/VxgBasicLedPlugin.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.VxgBasicLedPlugin = void 0; +exports.VxgBasicLedPlugin = VxgBasicLedPlugin; const gubu_1 = require("gubu"); const { Open } = gubu_1.Gubu; const Shape = (0, gubu_1.Gubu)({ @@ -23,7 +23,7 @@ const Shape = (0, gubu_1.Gubu)({ active: false, }), }, -}, { prefix: 'BasicLed' }); +}, { name: 'BasicLed' }); function VxgBasicLedPlugin(options) { const seneca = this; const spec = Shape(options.spec); @@ -31,7 +31,9 @@ function VxgBasicLedPlugin(options) { const name = spec.name; const entCanon = spec.def.ent; const slotName = 'BasicLed_' + name; + // console.log('VxgBasicLedPlugin', 'name', name, 'init') seneca + .add('on:BasicLed') .fix({ view: name }) .add('aim:app,on:view,init:state,redux$:true', function (_msg, reply, meta) { const state = meta.custom.state(); @@ -52,38 +54,36 @@ function VxgBasicLedPlugin(options) { }) .add('aim:app,on:BasicLed,ready:edit,redux$:true', function (msg, reply, meta) { const setReady = msg.setReady; + // Update the view state const view = meta.custom.state().view[name]; view.mode = 'edit'; view.status = 'edit-item'; setReady(true); reply(); }) - .add('aim:app,on:BasicLed,modify:edit', function (msg) { + .add('aim:app,on:BasicLed,modify:edit', function modify_edit(msg) { let item = msg.item; + // let fields = msg.fields + if (null == item) + return item; + item = { ...item }; + return { ...msg, item }; + }) + .add('aim:app,on:BasicLed,modify:save', function modify_save(msg) { + let item = msg.data; let fields = msg.fields; if (null == item) return item; item = { ...item }; + // This code does not belong here for (const field of fields) { - if ('Date' === field.ux.kind) { - const dt = util.dateTimeFromUTC(item[field.name]); - item[field.name + '_orig$'] = item[field.name]; - item[field.name + '_udm$'] = dt.udm; - item[field.name] = dt.locald; - } - else if ('Time' === field.ux.kind) { - const dt = util.dateTimeFromUTC(item[field.name]); - item[field.name + '_orig$'] = item[field.name]; - item[field.name + '_udm$'] = dt.udm; - item[field.name] = dt.localt; - } - else if ('DateTime' === field.ux.kind) { - const dt = util.dateTimeFromUTC(item[field.name]); - item[field.name + '_orig$'] = item[field.name]; - item[field.name + '_udm$'] = dt.udm; - item[field.name] = dt.locald + 'T' + dt.localt; + if ('Slider' === field.ux.kind) { + console.log('VxgBasicLedPlugin', 'modify:save', 'field', field); + console.log('VxgBasicLedPlugin', 'modify:save', 'item', item); + item[field.name] = Number(item[field.name]) * 60; } } + console.log('modify:save', 'item', item); return item; }) .message('aim:app,on:BasicLed,edit:item,redux$:true', { item_id: String }, async function (msg, meta) { @@ -91,19 +91,29 @@ function VxgBasicLedPlugin(options) { let view = state.view[name]; const { item_id } = msg; view.mode = 'edit'; + const fields$ = Object.keys(spec.def.edit.field); navigate('/view/' + name + '/edit/' + item_id); const item = await this.entity(entCanon).load$({ id: msg.item_id, slot$: slotName, + fields$, }); return item; }) - .message('aim:app,on:view,add:item', async function (_msg) { + .message('aim:app,on:BasicLed,add:item', async function (_msg) { await seneca.entity(entCanon).save$({ add$: true, slot$: slotName }); navigate('/view/' + name + '/add'); + }) + .message('aim:app,on:BasicLed,save:item', async function (msg) { + const data = Object.entries(spec.def.edit.field) + .filter((n) => false !== n[1].ux.edit) + .reduce((a, n) => ((a[n[0]] = msg.data[n[0]]), a), {}); + const item = await seneca.entity(entCanon).save$(data); + // TODO: navigate to edit view + // navigate('/view/' + name + '/edit/' + item.id) + navigate('/view/' + name); }); - seneca - .prepare(async function () { + seneca.prepare(async function () { this.act('aim:app,on:view,init:state,direct$:true', { view: name }); }); const sharedSpec = { @@ -136,10 +146,9 @@ function VxgBasicLedPlugin(options) { foot: footSpec, }, util, - } + }, }; } -exports.VxgBasicLedPlugin = VxgBasicLedPlugin; const util = { dateTimeFromUTC: (utc, tz) => { const date = new Date(utc); @@ -147,9 +156,9 @@ const util = { const isod = iso.split('T')[0]; const isot = iso.split('T')[1].split('.')[0]; // UTC millis into day (since midnight) - const udm = (date.getUTCHours() * 60 * 60 * 1000) + - (date.getUTCMinutes() * 60 * 1000) + - (date.getUTCSeconds() * 1000) + + const udm = date.getUTCHours() * 60 * 60 * 1000 + + date.getUTCMinutes() * 60 * 1000 + + date.getUTCSeconds() * 1000 + date.getUTCMilliseconds(); let out = { utc, @@ -163,14 +172,14 @@ const util = { timeZone: tz, year: 'numeric', month: '2-digit', - day: '2-digit' + day: '2-digit', }); const timeFormatter = new Intl.DateTimeFormat('en-GB', { timeZone: tz, hour: '2-digit', minute: '2-digit', second: '2-digit', - hour12: false + hour12: false, }); const [{ value: day }, , { value: month }, , { value: year }] = dateFormatter.formatToParts(date); const [{ value: hour }, , { value: minute }, , { value: second }] = timeFormatter.formatToParts(date); diff --git a/dist-plain/lib/VxgBasicLedPlugin.js.map b/dist-plain/lib/VxgBasicLedPlugin.js.map index 5c9b7ac..f93eab1 100644 --- a/dist-plain/lib/VxgBasicLedPlugin.js.map +++ b/dist-plain/lib/VxgBasicLedPlugin.js.map @@ -1 +1 @@ -{"version":3,"file":"VxgBasicLedPlugin.js","sourceRoot":"","sources":["../../src/lib/VxgBasicLedPlugin.ts"],"names":[],"mappings":";;;AAGA,+BAA2B;AAE3B,MAAM,EAAE,IAAI,EAAE,GAAG,WAAI,CAAA;AAErB,MAAM,KAAK,GAAG,IAAA,WAAI,EAAC;IACjB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,OAAO;IACf,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE;QACH,GAAG,EAAE,MAAM;QACX,IAAI,EAAE,IAAI,CAAC;YACT,MAAM,EAAE,KAAK;SACd,CAAC;QACF,IAAI,EAAE,IAAI,CAAC;YACT,MAAM,EAAE,KAAK;SACd,CAAC;QACF,IAAI,EAAE,IAAI,CAAC;YACT,MAAM,EAAE,KAAK;SACd,CAAC;QACF,IAAI,EAAE,IAAI,CAAC;YACT,MAAM,EAAE,KAAK;SACd,CAAC;KACH;CACF,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,CAAA;AAG1B,SAAS,iBAAiB,CAAY,OAAY;IAChD,MAAM,MAAM,GAAG,IAAI,CAAA;IAEnB,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IAChC,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAA;IAEjC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAA;IACtB,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAA;IAC7B,MAAM,QAAQ,GAAG,WAAW,GAAG,IAAI,CAAA;IAEnC,MAAM;SACH,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;SAEnB,GAAG,CAAC,wCAAwC,EAC3C,UAAoB,IAAS,EAAE,KAAU,EAAE,IAAS;QAClD,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;QACjC,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3B,IAAI,CAAC,IAAI,GAAG,MAAM,CAAA;QAClB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA;QAEjB,IAAI,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;QACnD,KAAK,EAAE,CAAA;IACT,CAAC,CAAC;SAEH,GAAG,CAAC,4CAA4C,EAC/C,UAAoB,GAAQ,EAAE,KAAU,EAAE,IAAS;QACjD,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAA;QAC7B,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAE3C,IAAI,CAAC,IAAI,GAAG,MAAM,CAAA;QAClB,IAAI,CAAC,MAAM,GAAG,WAAW,CAAA;QAEzB,QAAQ,CAAC,IAAI,CAAC,CAAA;QACd,KAAK,EAAE,CAAA;IACT,CAAC,CAAC;SAEH,GAAG,CAAC,4CAA4C,EAC/C,UAAS,GAAQ,EAAE,KAAU,EAAE,IAAS;QACtC,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAA;QAC7B,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAE3C,IAAI,CAAC,IAAI,GAAG,MAAM,CAAA;QAClB,IAAI,CAAC,MAAM,GAAG,WAAW,CAAA;QAEzB,QAAQ,CAAC,IAAI,CAAC,CAAA;QACd,KAAK,EAAE,CAAA;IACT,CAAC,CAAC;SAEH,GAAG,CAAC,iCAAiC,EACpC,UAAS,GAAQ;QACf,IAAI,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;QACnB,IAAI,MAAM,GAAG,GAAG,CAAC,MAAM,CAAA;QAEvB,IAAI,IAAI,IAAI,IAAI;YAAE,OAAO,IAAI,CAAC;QAE9B,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,CAAA;QAElB,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC3B,IAAI,MAAM,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;gBAC7B,MAAM,EAAE,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;gBACjD,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;gBAC9C,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,CAAA;gBACnC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAA;YAC9B,CAAC;iBACI,IAAI,MAAM,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;gBAClC,MAAM,EAAE,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;gBACjD,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;gBAC9C,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,CAAA;gBACnC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAA;YAC9B,CAAC;iBACI,IAAI,UAAU,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;gBACtC,MAAM,EAAE,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;gBACjD,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;gBAC9C,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,CAAA;gBACnC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,GAAG,GAAG,GAAG,EAAE,CAAC,MAAM,CAAA;YAChD,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAA;IACb,CAAC,CAAC;SAEH,OAAO,CAAC,2CAA2C,EAClD,EAAE,OAAO,EAAE,MAAM,EAAE,EACnB,KAAK,WAAqB,GAAQ,EAAE,IAAS;QAC3C,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;QACjC,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3B,MAAM,EAAE,OAAO,EAAE,GAAG,GAAG,CAAA;QACvB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAA;QAClB,QAAQ,CAAC,QAAQ,GAAG,IAAI,GAAG,QAAQ,GAAG,OAAO,CAAC,CAAA;QAE9C,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC;YAC7C,EAAE,EAAE,GAAG,CAAC,OAAO;YACf,KAAK,EAAE,QAAQ;SAChB,CAAC,CAAA;QAEF,OAAO,IAAI,CAAA;IACb,CAAC,CAAC;SAEH,OAAO,CAAC,0BAA0B,EACjC,KAAK,WAAqB,IAAS;QACjC,MAAM,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAA;QACpE,QAAQ,CAAC,QAAQ,GAAG,IAAI,GAAG,MAAM,CAAC,CAAA;IACpC,CAAC,CAAC,CAAA;IAEN,MAAM;SACH,OAAO,CAAC,KAAK;QACZ,IAAI,CAAC,GAAG,CAAC,yCAAyC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAA;IACrE,CAAC,CAAC,CAAA;IAGJ,MAAM,UAAU,GAAG;QACjB,IAAI;QACJ,GAAG,EAAE,QAAQ;QACb,MAAM,EAAE,WAAW;KACpB,CAAA;IAGD,MAAM,QAAQ,GAAG;QACf,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI;QAChB,GAAG,UAAU;KACd,CAAA;IAED,MAAM,QAAQ,GAAG;QACf,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI;QAChB,GAAG,UAAU;KAEd,CAAA;IAED,MAAM,QAAQ,GAAG;QACf,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI;QAChB,GAAG,UAAU;KACd,CAAA;IAED,MAAM,QAAQ,GAAG;QACf,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI;QAChB,GAAG,UAAU;KACd,CAAA;IAGD,OAAO;QACL,OAAO,EAAE;YACP,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;aACf;YACD,IAAI;SACL;KACF,CAAA;AACH,CAAC;AA+DC,8CAAiB;AA5DnB,MAAM,IAAI,GAAG;IACX,eAAe,EAAE,CAAC,GAAW,EAAE,EAAW,EAAE,EAAE;QAC5C,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,CAAA;QAC1B,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,EAAE,CAAA;QAC9B,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QAC9B,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QAE5C,uCAAuC;QACvC,MAAM,GAAG,GACP,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;YACrC,CAAC,IAAI,CAAC,aAAa,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;YAClC,CAAC,IAAI,CAAC,aAAa,EAAE,GAAG,IAAI,CAAC;YAC7B,IAAI,CAAC,kBAAkB,EAAE,CAAA;QAE3B,IAAI,GAAG,GAAQ;YACb,GAAG;YACH,IAAI;YACJ,IAAI;YACJ,IAAI;YACJ,GAAG;SACJ,CAAA;QAED,EAAE,GAAG,EAAE,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC,eAAe,EAAE,CAAC,QAAQ,CAAA;QAC3D,MAAM,aAAa,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE;YACrD,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,SAAS;YAChB,GAAG,EAAE,SAAS;SACf,CAAC,CAAA;QAEF,MAAM,aAAa,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE;YACrD,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,SAAS;YACf,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,KAAK;SACd,CAAC,CAAA;QAEF,MAAM,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,GAC3D,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;QACnC,MAAM,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,GAC/D,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;QAEnC,GAAG,CAAC,MAAM,GAAG,GAAG,IAAI,IAAI,KAAK,IAAI,GAAG,EAAE,CAAA;QACtC,GAAG,CAAC,MAAM,GAAG,GAAG,IAAI,IAAI,MAAM,IAAI,MAAM,EAAE,CAAA;QAE1C,OAAO,GAAG,CAAA;IACZ,CAAC;CACF,CAAA;AAGD,iBAAiB,CAAC,QAAQ,GAAG;IAC3B,IAAI,EAAE,EAAE;IACR,QAAQ,EAAE,QAAQ;CACnB,CAAA;AAGD,MAAM,CAAC,cAAc,CAAC,iBAAiB,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,CAAC,CAAA"} \ No newline at end of file +{"version":3,"file":"VxgBasicLedPlugin.js","sourceRoot":"","sources":["../../src/lib/VxgBasicLedPlugin.ts"],"names":[],"mappings":";;AA4QS,8CAAiB;AA1Q1B,+BAA2B;AAE3B,MAAM,EAAE,IAAI,EAAE,GAAG,WAAI,CAAA;AAErB,MAAM,KAAK,GAAG,IAAA,WAAI,EAChB;IACE,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,OAAO;IACf,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE;QACH,GAAG,EAAE,MAAM;QACX,IAAI,EAAE,IAAI,CAAC;YACT,MAAM,EAAE,KAAK;SACd,CAAC;QACF,IAAI,EAAE,IAAI,CAAC;YACT,MAAM,EAAE,KAAK;SACd,CAAC;QACF,IAAI,EAAE,IAAI,CAAC;YACT,MAAM,EAAE,KAAK;SACd,CAAC;QACF,IAAI,EAAE,IAAI,CAAC;YACT,MAAM,EAAE,KAAK;SACd,CAAC;KACH;CACF,EACD,EAAE,IAAI,EAAE,UAAU,EAAE,CACrB,CAAA;AAED,SAAS,iBAAiB,CAAa,OAAY;IACjD,MAAM,MAAM,GAAG,IAAI,CAAA;IAEnB,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IAChC,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAA;IAEjC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAA;IACtB,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAA;IAC7B,MAAM,QAAQ,GAAG,WAAW,GAAG,IAAI,CAAA;IAEnC,yDAAyD;IAEzD,MAAM;SACH,GAAG,CAAC,aAAa,CAAC;SAElB,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;SAEnB,GAAG,CACF,wCAAwC,EACxC,UAAqB,IAAS,EAAE,KAAU,EAAE,IAAS;QACnD,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;QACjC,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAE3B,IAAI,CAAC,IAAI,GAAG,MAAM,CAAA;QAClB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA;QAEjB,IAAI,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;QACnD,KAAK,EAAE,CAAA;IACT,CAAC,CACF;SAEA,GAAG,CACF,4CAA4C,EAC5C,UAAqB,GAAQ,EAAE,KAAU,EAAE,IAAS;QAClD,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAA;QAC7B,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAE3C,IAAI,CAAC,IAAI,GAAG,MAAM,CAAA;QAClB,IAAI,CAAC,MAAM,GAAG,WAAW,CAAA;QAEzB,QAAQ,CAAC,IAAI,CAAC,CAAA;QACd,KAAK,EAAE,CAAA;IACT,CAAC,CACF;SAEA,GAAG,CACF,4CAA4C,EAC5C,UAAU,GAAQ,EAAE,KAAU,EAAE,IAAS;QACvC,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAA;QAE7B,wBAAwB;QACxB,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3C,IAAI,CAAC,IAAI,GAAG,MAAM,CAAA;QAClB,IAAI,CAAC,MAAM,GAAG,WAAW,CAAA;QAEzB,QAAQ,CAAC,IAAI,CAAC,CAAA;QACd,KAAK,EAAE,CAAA;IACT,CAAC,CACF;SAEA,GAAG,CAAC,iCAAiC,EAAE,SAAS,WAAW,CAAE,GAAQ;QACpE,IAAI,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;QACnB,0BAA0B;QAE1B,IAAI,IAAI,IAAI,IAAI;YAAE,OAAO,IAAI,CAAA;QAE7B,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,CAAA;QAElB,OAAO,EAAE,GAAG,GAAG,EAAE,IAAI,EAAE,CAAA;IACzB,CAAC,CAAC;SAED,GAAG,CAAC,iCAAiC,EAAE,SAAS,WAAW,CAAE,GAAQ;QACpE,IAAI,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;QACnB,IAAI,MAAM,GAAG,GAAG,CAAC,MAAM,CAAA;QAEvB,IAAI,IAAI,IAAI,IAAI;YAAE,OAAO,IAAI,CAAA;QAE7B,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,CAAA;QAElB,iCAAiC;QACjC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC3B,IAAI,QAAQ,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;gBAC/B,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,aAAa,EAAE,OAAO,EAAE,KAAK,CAAC,CAAA;gBAC/D,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,aAAa,EAAE,MAAM,EAAE,IAAI,CAAC,CAAA;gBAC7D,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,CAAA;YAClD,CAAC;QACH,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,MAAM,EAAE,IAAI,CAAC,CAAA;QAExC,OAAO,IAAI,CAAA;IACb,CAAC,CAAC;SAED,OAAO,CACN,2CAA2C,EAC3C,EAAE,OAAO,EAAE,MAAM,EAAE,EACnB,KAAK,WAAsB,GAAQ,EAAE,IAAS;QAC5C,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;QACjC,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3B,MAAM,EAAE,OAAO,EAAE,GAAG,GAAG,CAAA;QACvB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAA;QAClB,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QAEhD,QAAQ,CAAC,QAAQ,GAAG,IAAI,GAAG,QAAQ,GAAG,OAAO,CAAC,CAAA;QAC9C,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC;YAC7C,EAAE,EAAE,GAAG,CAAC,OAAO;YACf,KAAK,EAAE,QAAQ;YACf,OAAO;SACR,CAAC,CAAA;QAEF,OAAO,IAAI,CAAA;IACb,CAAC,CACF;SAEA,OAAO,CACN,8BAA8B,EAC9B,KAAK,WAAsB,IAAS;QAClC,MAAM,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAA;QACpE,QAAQ,CAAC,QAAQ,GAAG,IAAI,GAAG,MAAM,CAAC,CAAA;IACpC,CAAC,CACF;SAEA,OAAO,CACN,+BAA+B,EAC/B,KAAK,WAAsB,GAAQ;QACjC,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;aAC7C,MAAM,CAAC,CAAC,CAAQ,EAAE,EAAE,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC;aAC5C,MAAM,CAAC,CAAC,CAAM,EAAE,CAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;QAEpE,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QACtD,8BAA8B;QAC9B,iDAAiD;QACjD,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAA;IAC3B,CAAC,CACF,CAAA;IAEH,MAAM,CAAC,OAAO,CAAC,KAAK;QAClB,IAAI,CAAC,GAAG,CAAC,yCAAyC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAA;IACrE,CAAC,CAAC,CAAA;IAEF,MAAM,UAAU,GAAG;QACjB,IAAI;QACJ,GAAG,EAAE,QAAQ;QACb,MAAM,EAAE,WAAW;KACpB,CAAA;IAED,MAAM,QAAQ,GAAG;QACf,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI;QAChB,GAAG,UAAU;KACd,CAAA;IAED,MAAM,QAAQ,GAAG;QACf,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI;QAChB,GAAG,UAAU;KACd,CAAA;IAED,MAAM,QAAQ,GAAG;QACf,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI;QAChB,GAAG,UAAU;KACd,CAAA;IAED,MAAM,QAAQ,GAAG;QACf,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI;QAChB,GAAG,UAAU;KACd,CAAA;IAED,OAAO;QACL,OAAO,EAAE;YACP,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;aACf;YACD,IAAI;SACL;KACF,CAAA;AACH,CAAC;AAED,MAAM,IAAI,GAAG;IACX,eAAe,EAAE,CAAC,GAAW,EAAE,EAAW,EAAE,EAAE;QAC5C,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,CAAA;QAC1B,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,EAAE,CAAA;QAC9B,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QAC9B,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QAE5C,uCAAuC;QACvC,MAAM,GAAG,GACP,IAAI,CAAC,WAAW,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI;YACnC,IAAI,CAAC,aAAa,EAAE,GAAG,EAAE,GAAG,IAAI;YAChC,IAAI,CAAC,aAAa,EAAE,GAAG,IAAI;YAC3B,IAAI,CAAC,kBAAkB,EAAE,CAAA;QAE3B,IAAI,GAAG,GAAQ;YACb,GAAG;YACH,IAAI;YACJ,IAAI;YACJ,IAAI;YACJ,GAAG;SACJ,CAAA;QAED,EAAE,GAAG,EAAE,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC,eAAe,EAAE,CAAC,QAAQ,CAAA;QAC3D,MAAM,aAAa,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE;YACrD,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,SAAS;YAChB,GAAG,EAAE,SAAS;SACf,CAAC,CAAA;QAEF,MAAM,aAAa,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE;YACrD,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,SAAS;YACf,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,KAAK;SACd,CAAC,CAAA;QAEF,MAAM,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,GAC3D,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;QACnC,MAAM,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,GAC/D,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;QAEnC,GAAG,CAAC,MAAM,GAAG,GAAG,IAAI,IAAI,KAAK,IAAI,GAAG,EAAE,CAAA;QACtC,GAAG,CAAC,MAAM,GAAG,GAAG,IAAI,IAAI,MAAM,IAAI,MAAM,EAAE,CAAA;QAE1C,OAAO,GAAG,CAAA;IACZ,CAAC;CACF,CAAA;AAED,iBAAiB,CAAC,QAAQ,GAAG;IAC3B,IAAI,EAAE,EAAE;IACR,QAAQ,EAAE,QAAQ;CACnB,CAAA;AAED,MAAM,CAAC,cAAc,CAAC,iBAAiB,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,CAAC,CAAA"} \ No newline at end of file diff --git a/dist-plain/lib/vxg-util.js b/dist-plain/lib/vxg-util.js index 44a8cb2..1b6aad4 100644 --- a/dist-plain/lib/vxg-util.js +++ b/dist-plain/lib/vxg-util.js @@ -1,7 +1,9 @@ "use strict"; // TODO: cmap,vmap probably belong in @voxgig/model utils Object.defineProperty(exports, "__esModule", { value: true }); -exports.searchParamsToObject = exports.vmap = exports.cmap = void 0; +exports.cmap = cmap; +exports.vmap = vmap; +exports.searchParamsToObject = searchParamsToObject; // Map child objects to new child objects function cmap(o, p) { return Object @@ -15,7 +17,6 @@ function cmap(o, p) { }) : m[1]), (cmap.FILTER === s[m[0]] ? cmap.FILTER : s))), {}) , (cmap.FILTER === _ ? 0 : r[n[0]] = _), r), {}); } -exports.cmap = cmap; cmap.COPY = (x) => x; // keep self if x is truthy, or function returning truthy-new-value or [truthy,new-value] cmap.FILTER = (x) => 'function' === typeof x ? ((y, p, _) => (_ = x(y, p), Array.isArray(_) ? !_[0] ? _[1] : cmap.FILTER : _)) : (x ? x : cmap.FILTER); @@ -34,7 +35,6 @@ function vmap(o, p) { }) : m[1]), (vmap.FILTER === s[m[0]] ? vmap.FILTER : s))), {}) , (vmap.FILTER === _ ? 0 : r.push(_)), r), []); } -exports.vmap = vmap; vmap.COPY = (x) => x; vmap.FILTER = (x) => 'function' === typeof x ? ((y, p, _) => (_ = x(y, p), Array.isArray(_) ? !_[0] ? _[1] : vmap.FILTER : _)) : (x ? x : vmap.FILTER); vmap.KEY = (_, p) => p.key; @@ -45,5 +45,4 @@ function searchParamsToObject(searchParams) { } return params; } -exports.searchParamsToObject = searchParamsToObject; //# sourceMappingURL=vxg-util.js.map \ No newline at end of file diff --git a/dist-plain/lib/vxg-util.js.map b/dist-plain/lib/vxg-util.js.map index 550d8af..bc3cc0b 100644 --- a/dist-plain/lib/vxg-util.js.map +++ b/dist-plain/lib/vxg-util.js.map @@ -1 +1 @@ -{"version":3,"file":"vxg-util.js","sourceRoot":"","sources":["../../src/lib/vxg-util.ts"],"names":[],"mappings":";AAEA,yDAAyD;;;AAEzD,yCAAyC;AACzC,SAAS,IAAI,CAAC,CAAM,EAAE,CAAM;IAC1B,OAAO,MAAM;SACV,OAAO,CAAC,CAAC,CAAC;SACV,MAAM,CAAC,CAAC,CAAM,EAAE,CAAM,EAAE,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,MAAM;SAC5C,OAAO,CAAC,CAAC,CAAC;SACV,MAAM,CAAC,CAAC,CAAM,EAAE,CAAM,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;IAC9D,6CAA6C;IAC7C,UAAU,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;QAC5C,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC;KAC7C,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CACV,EAAE,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;UACnD,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;AACtD,CAAC;AA2CC,oBAAI;AAzCN,IAAI,CAAC,IAAI,GAAG,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAA;AACzB,yFAAyF;AACzF,IAAI,CAAC,MAAM,GAAG,CAAC,CAAM,EAAE,EAAE,CAAC,UAAU,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAM,EAAE,CAAM,EAAE,CAAM,EAAE,EAAE,CAC9E,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;AAC3F,IAAI,CAAC,GAAG,GAAG,CAAC,CAAM,EAAE,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAA;AAGpC,+CAA+C;AAC/C,SAAS,IAAI,CAAC,CAAM,EAAE,CAAM;IAC1B,OAAO,MAAM;SACV,OAAO,CAAC,CAAC,CAAC;SACV,MAAM,CAAC,CAAC,CAAM,EAAE,CAAM,EAAE,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,MAAM;SAC5C,OAAO,CAAC,CAAC,CAAC;SACV,MAAM,CAAC,CAAC,CAAM,EAAE,CAAM,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;IAC9D,6CAA6C;IAC7C,4EAA4E;IAC5E,UAAU,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;QAC5C,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC;KAC7C,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CACV,EAAE,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;UACnD,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;AAEpD,CAAC;AAoBC,oBAAI;AAnBN,IAAI,CAAC,IAAI,GAAG,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAA;AACzB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAM,EAAE,EAAE,CAAC,UAAU,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAM,EAAE,CAAM,EAAE,CAAM,EAAE,EAAE,CAC9E,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;AAC3F,IAAI,CAAC,GAAG,GAAG,CAAC,CAAM,EAAE,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAA;AAIpC,SAAS,oBAAoB,CAAC,YAA6B;IACzD,IAAI,MAAM,GAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IACrC,KAAK,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,YAAY,CAAC,OAAO,EAAE,EAAE,CAAC;QAChD,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;IACrB,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AAOC,oDAAoB"} \ No newline at end of file +{"version":3,"file":"vxg-util.js","sourceRoot":"","sources":["../../src/lib/vxg-util.ts"],"names":[],"mappings":";AAEA,yDAAyD;;AA0DvD,oBAAI;AACJ,oBAAI;AACJ,oDAAoB;AA1DtB,yCAAyC;AACzC,SAAS,IAAI,CAAC,CAAM,EAAE,CAAM;IAC1B,OAAO,MAAM;SACV,OAAO,CAAC,CAAC,CAAC;SACV,MAAM,CAAC,CAAC,CAAM,EAAE,CAAM,EAAE,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,MAAM;SAC5C,OAAO,CAAC,CAAC,CAAC;SACV,MAAM,CAAC,CAAC,CAAM,EAAE,CAAM,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;IAC9D,6CAA6C;IAC7C,UAAU,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;QAC5C,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC;KAC7C,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CACV,EAAE,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;UACnD,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;AACtD,CAAC;AAED,IAAI,CAAC,IAAI,GAAG,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAA;AACzB,yFAAyF;AACzF,IAAI,CAAC,MAAM,GAAG,CAAC,CAAM,EAAE,EAAE,CAAC,UAAU,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAM,EAAE,CAAM,EAAE,CAAM,EAAE,EAAE,CAC9E,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;AAC3F,IAAI,CAAC,GAAG,GAAG,CAAC,CAAM,EAAE,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAA;AAGpC,+CAA+C;AAC/C,SAAS,IAAI,CAAC,CAAM,EAAE,CAAM;IAC1B,OAAO,MAAM;SACV,OAAO,CAAC,CAAC,CAAC;SACV,MAAM,CAAC,CAAC,CAAM,EAAE,CAAM,EAAE,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,MAAM;SAC5C,OAAO,CAAC,CAAC,CAAC;SACV,MAAM,CAAC,CAAC,CAAM,EAAE,CAAM,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;IAC9D,6CAA6C;IAC7C,4EAA4E;IAC5E,UAAU,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;QAC5C,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC;KAC7C,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CACV,EAAE,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;UACnD,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;AAEpD,CAAC;AACD,IAAI,CAAC,IAAI,GAAG,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAA;AACzB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAM,EAAE,EAAE,CAAC,UAAU,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAM,EAAE,CAAM,EAAE,CAAM,EAAE,EAAE,CAC9E,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;AAC3F,IAAI,CAAC,GAAG,GAAG,CAAC,CAAM,EAAE,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAA;AAIpC,SAAS,oBAAoB,CAAC,YAA6B;IACzD,IAAI,MAAM,GAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IACrC,KAAK,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,YAAY,CAAC,OAAO,EAAE,EAAE,CAAC;QAChD,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;IACrB,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC"} \ No newline at end of file diff --git a/dist/VxgBasicEntityFieldPlugin.d.ts b/dist/VxgBasicEntityFieldPlugin.d.ts index b133986..3725ec0 100644 --- a/dist/VxgBasicEntityFieldPlugin.d.ts +++ b/dist/VxgBasicEntityFieldPlugin.d.ts @@ -1,8 +1,6 @@ declare function VxgBasicEntityFieldPlugin(this: any, options: any): { exports: { - handle: { - Field: any; - }; + handle: {}; }; }; export { VxgBasicEntityFieldPlugin }; diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index 44abc7f..a4447e1 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -1030,21 +1030,15 @@ function requireReactJsxRuntime_development() { } return reactJsxRuntime_development; } -var jsxRuntime$1 = jsxRuntime$2.exports; -var hasRequiredJsxRuntime; -function requireJsxRuntime() { - if (hasRequiredJsxRuntime) return jsxRuntime$2.exports; - hasRequiredJsxRuntime = 1; - "use strict"; - if (process.env.NODE_ENV === "production") { - jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); - } else { - jsxRuntime$2.exports = requireReactJsxRuntime_development(); - } - return jsxRuntime$2.exports; +var jsxRuntime = jsxRuntime$2.exports; +"use strict"; +if (process.env.NODE_ENV === "production") { + jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); +} else { + jsxRuntime$2.exports = requireReactJsxRuntime_development(); } -var jsxRuntimeExports = requireJsxRuntime(); -const jsxRuntime = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); +var jsxRuntimeExports = jsxRuntime$2.exports; +const jsxRuntime$1 = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); var gubu_min$2 = { exports: {} }; var gubu_min = gubu_min$2.exports; (function(module, exports) { @@ -25311,7 +25305,7 @@ Object.defineProperty(ArrowDownward, "__esModule", { }); var default_1$x = ArrowDownward.default = void 0; var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); -var _jsxRuntime$x = requireJsxRuntime(); +var _jsxRuntime$x = jsxRuntimeExports; var _default$x = default_1$x = ArrowDownward.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); @@ -25324,7 +25318,7 @@ Object.defineProperty(ArrowRight, "__esModule", { }); var default_1$w = ArrowRight.default = void 0; var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); -var _jsxRuntime$w = requireJsxRuntime(); +var _jsxRuntime$w = jsxRuntimeExports; var _default$w = default_1$w = ArrowRight.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); @@ -25337,7 +25331,7 @@ Object.defineProperty(Cancel, "__esModule", { }); var default_1$v = Cancel.default = void 0; var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); -var _jsxRuntime$v = requireJsxRuntime(); +var _jsxRuntime$v = jsxRuntimeExports; var _default$v = default_1$v = Cancel.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); @@ -25350,7 +25344,7 @@ Object.defineProperty(ChevronLeft, "__esModule", { }); var default_1$u = ChevronLeft.default = void 0; var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); -var _jsxRuntime$u = requireJsxRuntime(); +var _jsxRuntime$u = jsxRuntimeExports; var _default$u = default_1$u = ChevronLeft.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); @@ -25363,7 +25357,7 @@ Object.defineProperty(ChevronRight, "__esModule", { }); var default_1$t = ChevronRight.default = void 0; var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); -var _jsxRuntime$t = requireJsxRuntime(); +var _jsxRuntime$t = jsxRuntimeExports; var _default$t = default_1$t = ChevronRight.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); @@ -25376,7 +25370,7 @@ Object.defineProperty(ClearAll, "__esModule", { }); var default_1$s = ClearAll.default = void 0; var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); -var _jsxRuntime$s = requireJsxRuntime(); +var _jsxRuntime$s = jsxRuntimeExports; var _default$s = default_1$s = ClearAll.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); @@ -25389,7 +25383,7 @@ Object.defineProperty(Close, "__esModule", { }); var default_1$r = Close.default = void 0; var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); -var _jsxRuntime$r = requireJsxRuntime(); +var _jsxRuntime$r = jsxRuntimeExports; var _default$r = default_1$r = Close.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); @@ -25402,7 +25396,7 @@ Object.defineProperty(ContentCopy, "__esModule", { }); var default_1$q = ContentCopy.default = void 0; var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); -var _jsxRuntime$q = requireJsxRuntime(); +var _jsxRuntime$q = jsxRuntimeExports; var _default$q = default_1$q = ContentCopy.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); @@ -25415,7 +25409,7 @@ Object.defineProperty(DensityLarge, "__esModule", { }); var default_1$p = DensityLarge.default = void 0; var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); -var _jsxRuntime$p = requireJsxRuntime(); +var _jsxRuntime$p = jsxRuntimeExports; var _default$p = default_1$p = DensityLarge.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); @@ -25428,7 +25422,7 @@ Object.defineProperty(DensityMedium, "__esModule", { }); var default_1$o = DensityMedium.default = void 0; var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); -var _jsxRuntime$o = requireJsxRuntime(); +var _jsxRuntime$o = jsxRuntimeExports; var _default$o = default_1$o = DensityMedium.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); @@ -25441,7 +25435,7 @@ Object.defineProperty(DensitySmall, "__esModule", { }); var default_1$n = DensitySmall.default = void 0; var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); -var _jsxRuntime$n = requireJsxRuntime(); +var _jsxRuntime$n = jsxRuntimeExports; var _default$n = default_1$n = DensitySmall.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); @@ -25454,7 +25448,7 @@ Object.defineProperty(DragHandle, "__esModule", { }); var default_1$m = DragHandle.default = void 0; var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); -var _jsxRuntime$m = requireJsxRuntime(); +var _jsxRuntime$m = jsxRuntimeExports; var _default$m = default_1$m = DragHandle.default = (0, _createSvgIcon$m.default)(/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); @@ -25467,7 +25461,7 @@ Object.defineProperty(DynamicFeed, "__esModule", { }); var default_1$l = DynamicFeed.default = void 0; var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); -var _jsxRuntime$l = requireJsxRuntime(); +var _jsxRuntime$l = jsxRuntimeExports; var _default$l = default_1$l = DynamicFeed.default = (0, _createSvgIcon$l.default)([/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { @@ -25482,7 +25476,7 @@ Object.defineProperty(Edit, "__esModule", { }); var default_1$k = Edit.default = void 0; var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); -var _jsxRuntime$k = requireJsxRuntime(); +var _jsxRuntime$k = jsxRuntimeExports; var _default$k = default_1$k = Edit.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); @@ -25495,7 +25489,7 @@ Object.defineProperty(ExpandMore, "__esModule", { }); var default_1$j = ExpandMore.default = void 0; var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); -var _jsxRuntime$j = requireJsxRuntime(); +var _jsxRuntime$j = jsxRuntimeExports; var _default$j = default_1$j = ExpandMore.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); @@ -25508,7 +25502,7 @@ Object.defineProperty(FilterAlt, "__esModule", { }); var default_1$i = FilterAlt.default = void 0; var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); -var _jsxRuntime$i = requireJsxRuntime(); +var _jsxRuntime$i = jsxRuntimeExports; var _default$i = default_1$i = FilterAlt.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); @@ -25521,7 +25515,7 @@ Object.defineProperty(FilterList, "__esModule", { }); var default_1$h = FilterList.default = void 0; var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); -var _jsxRuntime$h = requireJsxRuntime(); +var _jsxRuntime$h = jsxRuntimeExports; var _default$h = default_1$h = FilterList.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); @@ -25534,7 +25528,7 @@ Object.defineProperty(FilterListOff, "__esModule", { }); var default_1$g = FilterListOff.default = void 0; var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); -var _jsxRuntime$g = requireJsxRuntime(); +var _jsxRuntime$g = jsxRuntimeExports; var _default$g = default_1$g = FilterListOff.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); @@ -25547,7 +25541,7 @@ Object.defineProperty(FirstPage, "__esModule", { }); var default_1$f = FirstPage.default = void 0; var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); -var _jsxRuntime$f = requireJsxRuntime(); +var _jsxRuntime$f = jsxRuntimeExports; var _default$f = default_1$f = FirstPage.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); @@ -25560,7 +25554,7 @@ Object.defineProperty(Fullscreen, "__esModule", { }); var default_1$e = Fullscreen.default = void 0; var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); -var _jsxRuntime$e = requireJsxRuntime(); +var _jsxRuntime$e = jsxRuntimeExports; var _default$e = default_1$e = Fullscreen.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); @@ -25573,7 +25567,7 @@ Object.defineProperty(FullscreenExit, "__esModule", { }); var default_1$d = FullscreenExit.default = void 0; var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); -var _jsxRuntime$d = requireJsxRuntime(); +var _jsxRuntime$d = jsxRuntimeExports; var _default$d = default_1$d = FullscreenExit.default = (0, _createSvgIcon$d.default)(/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); @@ -25586,7 +25580,7 @@ Object.defineProperty(KeyboardDoubleArrowDown, "__esModule", { }); var default_1$c = KeyboardDoubleArrowDown.default = void 0; var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); -var _jsxRuntime$c = requireJsxRuntime(); +var _jsxRuntime$c = jsxRuntimeExports; var _default$c = default_1$c = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$c.default)([/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { @@ -25601,7 +25595,7 @@ Object.defineProperty(LastPage, "__esModule", { }); var default_1$b = LastPage.default = void 0; var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); -var _jsxRuntime$b = requireJsxRuntime(); +var _jsxRuntime$b = jsxRuntimeExports; var _default$b = default_1$b = LastPage.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); @@ -25614,7 +25608,7 @@ Object.defineProperty(MoreHoriz, "__esModule", { }); var default_1$a = MoreHoriz.default = void 0; var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); -var _jsxRuntime$a = requireJsxRuntime(); +var _jsxRuntime$a = jsxRuntimeExports; var _default$a = default_1$a = MoreHoriz.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); @@ -25627,7 +25621,7 @@ Object.defineProperty(MoreVert, "__esModule", { }); var default_1$9 = MoreVert.default = void 0; var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); -var _jsxRuntime$9 = requireJsxRuntime(); +var _jsxRuntime$9 = jsxRuntimeExports; var _default$9 = default_1$9 = MoreVert.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); @@ -25640,7 +25634,7 @@ Object.defineProperty(PushPin, "__esModule", { }); var default_1$8 = PushPin.default = void 0; var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); -var _jsxRuntime$8 = requireJsxRuntime(); +var _jsxRuntime$8 = jsxRuntimeExports; var _default$8 = default_1$8 = PushPin.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" @@ -25654,7 +25648,7 @@ Object.defineProperty(RestartAlt, "__esModule", { }); var default_1$7 = RestartAlt.default = void 0; var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); -var _jsxRuntime$7 = requireJsxRuntime(); +var _jsxRuntime$7 = jsxRuntimeExports; var _default$7 = default_1$7 = RestartAlt.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); @@ -25667,7 +25661,7 @@ Object.defineProperty(Save, "__esModule", { }); var default_1$6 = Save.default = void 0; var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); -var _jsxRuntime$6 = requireJsxRuntime(); +var _jsxRuntime$6 = jsxRuntimeExports; var _default$6 = default_1$6 = Save.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); @@ -25680,7 +25674,7 @@ Object.defineProperty(Search, "__esModule", { }); var default_1$5 = Search.default = void 0; var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); -var _jsxRuntime$5 = requireJsxRuntime(); +var _jsxRuntime$5 = jsxRuntimeExports; var _default$5 = default_1$5 = Search.default = (0, _createSvgIcon$5.default)(/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); @@ -25693,7 +25687,7 @@ Object.defineProperty(SearchOff, "__esModule", { }); var default_1$4 = SearchOff.default = void 0; var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); -var _jsxRuntime$4 = requireJsxRuntime(); +var _jsxRuntime$4 = jsxRuntimeExports; var _default$4 = default_1$4 = SearchOff.default = (0, _createSvgIcon$4.default)([/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { @@ -25708,7 +25702,7 @@ Object.defineProperty(Sort, "__esModule", { }); var default_1$3 = Sort.default = void 0; var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); -var _jsxRuntime$3 = requireJsxRuntime(); +var _jsxRuntime$3 = jsxRuntimeExports; var _default$3 = default_1$3 = Sort.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); @@ -25721,7 +25715,7 @@ Object.defineProperty(SyncAlt, "__esModule", { }); var default_1$2 = SyncAlt.default = void 0; var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); -var _jsxRuntime$2 = requireJsxRuntime(); +var _jsxRuntime$2 = jsxRuntimeExports; var _default$2 = default_1$2 = SyncAlt.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); @@ -25734,7 +25728,7 @@ Object.defineProperty(ViewColumn, "__esModule", { }); var default_1$1 = ViewColumn.default = void 0; var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); -var _jsxRuntime$1 = requireJsxRuntime(); +var _jsxRuntime$1 = jsxRuntimeExports; var _default$1 = default_1$1 = ViewColumn.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); @@ -25747,7 +25741,7 @@ Object.defineProperty(VisibilityOff, "__esModule", { }); var default_1 = VisibilityOff.default = void 0; var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); -var _jsxRuntime = requireJsxRuntime(); +var _jsxRuntime = jsxRuntimeExports; var _default = default_1 = VisibilityOff.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); @@ -65546,32 +65540,13 @@ const Shape$2 = gubu_minExports.Gubu( }), { name: "BasicEntityField" } ); -const fieldMap = { - Text: BasicEntityTextField, - TextBox: BasicEntityTextBoxField, - Date: BasicEntityDateField, - DateTime: BasicEntityDateTimeField, - Time: BasicEntityTimeField, - Checkbox: BasicEntityCheckboxField, - Autocomplete: BasicEntityAutocompleteField, - Slider: BasicEntitySliderField, - RadioGroup: BasicEntityRadioGroupField, - Rating: BasicEntityRatingField, - Button: BasicEntityButtonField, - ButtonGroup: BasicEntityButtonGroupField, - Select: BasicEntitySelectField, - Switch: BasicEntitySwitchField, - ToggleButton: BasicEntityToggleButtonField -}; function VxgBasicEntityFieldPlugin(options) { const seneca = this; const spec = Shape$2(options.spec); - const field = spec.field; - const Field = fieldMap[field.ux.kind]; options.setPlugin(true); return { exports: { - handle: { Field } + handle: {} } }; } @@ -65619,6 +65594,23 @@ const BasicEntityFieldSpecShape = gubu_minExports.Gubu( }), { name: CMPNAME$8 } ); +const fieldMap = { + Text: BasicEntityTextField, + TextBox: BasicEntityTextBoxField, + Date: BasicEntityDateField, + DateTime: BasicEntityDateTimeField, + Time: BasicEntityTimeField, + Checkbox: BasicEntityCheckboxField, + Autocomplete: BasicEntityAutocompleteField, + Slider: BasicEntitySliderField, + RadioGroup: BasicEntityRadioGroupField, + Rating: BasicEntityRatingField, + Button: BasicEntityButtonField, + ButtonGroup: BasicEntityButtonGroupField, + Select: BasicEntitySelectField, + Switch: BasicEntitySwitchField, + ToggleButton: BasicEntityToggleButtonField +}; function BasicEntityField(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -65638,25 +65630,16 @@ function BasicEntityField(props) { }); } }, []); - const { Field } = seneca.export( - "VxgBasicEntityFieldPlugin$" + spec.field.name + "/handle" - ) || { Field: null }; + const field = spec.field; + const Field = fieldMap[field.ux.kind]; return Field ? /* @__PURE__ */ jsxRuntimeExports.jsx(Field, { ctx, spec: basicEntityField }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", {}); } const { Open: Open$5, Child: Child$3 } = gubu_minExports.Gubu; -const Shape$1 = gubu_minExports.Gubu( - Open$5({ - name: String, - prefix: String, - ent: String, - order: [String], - field: Child$3({}, {}) - }), - { name: "BasicEntityEdit" } -); +const Shape$1 = gubu_minExports.Gubu(Open$5({}), { name: "BasicEntityEdit" }); function VxgBasicEntityEditPlugin(options) { const seneca = this; const spec = Shape$1(options.spec); + console.log("VxgBasicEntityEditPlugin", "options", options); const slot = spec.prefix + spec.name; const fields = spec.order.reduce( (a, fn2) => (fixField(fn2, spec.field[fn2], spec), a.push(spec.field[fn2]), a), diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index 195a2dc..3351a95 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -1042,21 +1042,15 @@ var __async = (__this, __arguments, generator) => { } return reactJsxRuntime_development; } - var jsxRuntime$1 = jsxRuntime$2.exports; - var hasRequiredJsxRuntime; - function requireJsxRuntime() { - if (hasRequiredJsxRuntime) return jsxRuntime$2.exports; - hasRequiredJsxRuntime = 1; - "use strict"; - if (process.env.NODE_ENV === "production") { - jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); - } else { - jsxRuntime$2.exports = requireReactJsxRuntime_development(); - } - return jsxRuntime$2.exports; + var jsxRuntime = jsxRuntime$2.exports; + "use strict"; + if (process.env.NODE_ENV === "production") { + jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); + } else { + jsxRuntime$2.exports = requireReactJsxRuntime_development(); } - var jsxRuntimeExports = requireJsxRuntime(); - const jsxRuntime = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); + var jsxRuntimeExports = jsxRuntime$2.exports; + const jsxRuntime$1 = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); var gubu_min$2 = { exports: {} }; var gubu_min = gubu_min$2.exports; (function(module2, exports3) { @@ -25323,7 +25317,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$x = ArrowDownward.default = void 0; var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); - var _jsxRuntime$x = requireJsxRuntime(); + var _jsxRuntime$x = jsxRuntimeExports; var _default$x = default_1$x = ArrowDownward.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); @@ -25336,7 +25330,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$w = ArrowRight.default = void 0; var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); - var _jsxRuntime$w = requireJsxRuntime(); + var _jsxRuntime$w = jsxRuntimeExports; var _default$w = default_1$w = ArrowRight.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); @@ -25349,7 +25343,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$v = Cancel.default = void 0; var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); - var _jsxRuntime$v = requireJsxRuntime(); + var _jsxRuntime$v = jsxRuntimeExports; var _default$v = default_1$v = Cancel.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); @@ -25362,7 +25356,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$u = ChevronLeft.default = void 0; var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); - var _jsxRuntime$u = requireJsxRuntime(); + var _jsxRuntime$u = jsxRuntimeExports; var _default$u = default_1$u = ChevronLeft.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); @@ -25375,7 +25369,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$t = ChevronRight.default = void 0; var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); - var _jsxRuntime$t = requireJsxRuntime(); + var _jsxRuntime$t = jsxRuntimeExports; var _default$t = default_1$t = ChevronRight.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); @@ -25388,7 +25382,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$s = ClearAll.default = void 0; var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); - var _jsxRuntime$s = requireJsxRuntime(); + var _jsxRuntime$s = jsxRuntimeExports; var _default$s = default_1$s = ClearAll.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); @@ -25401,7 +25395,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$r = Close.default = void 0; var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); - var _jsxRuntime$r = requireJsxRuntime(); + var _jsxRuntime$r = jsxRuntimeExports; var _default$r = default_1$r = Close.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); @@ -25414,7 +25408,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$q = ContentCopy.default = void 0; var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); - var _jsxRuntime$q = requireJsxRuntime(); + var _jsxRuntime$q = jsxRuntimeExports; var _default$q = default_1$q = ContentCopy.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); @@ -25427,7 +25421,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$p = DensityLarge.default = void 0; var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); - var _jsxRuntime$p = requireJsxRuntime(); + var _jsxRuntime$p = jsxRuntimeExports; var _default$p = default_1$p = DensityLarge.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); @@ -25440,7 +25434,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$o = DensityMedium.default = void 0; var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); - var _jsxRuntime$o = requireJsxRuntime(); + var _jsxRuntime$o = jsxRuntimeExports; var _default$o = default_1$o = DensityMedium.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); @@ -25453,7 +25447,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$n = DensitySmall.default = void 0; var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); - var _jsxRuntime$n = requireJsxRuntime(); + var _jsxRuntime$n = jsxRuntimeExports; var _default$n = default_1$n = DensitySmall.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); @@ -25466,7 +25460,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$m = DragHandle.default = void 0; var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); - var _jsxRuntime$m = requireJsxRuntime(); + var _jsxRuntime$m = jsxRuntimeExports; var _default$m = default_1$m = DragHandle.default = (0, _createSvgIcon$m.default)(/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); @@ -25479,7 +25473,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$l = DynamicFeed.default = void 0; var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); - var _jsxRuntime$l = requireJsxRuntime(); + var _jsxRuntime$l = jsxRuntimeExports; var _default$l = default_1$l = DynamicFeed.default = (0, _createSvgIcon$l.default)([/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { @@ -25494,7 +25488,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$k = Edit.default = void 0; var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); - var _jsxRuntime$k = requireJsxRuntime(); + var _jsxRuntime$k = jsxRuntimeExports; var _default$k = default_1$k = Edit.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); @@ -25507,7 +25501,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$j = ExpandMore.default = void 0; var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); - var _jsxRuntime$j = requireJsxRuntime(); + var _jsxRuntime$j = jsxRuntimeExports; var _default$j = default_1$j = ExpandMore.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); @@ -25520,7 +25514,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$i = FilterAlt.default = void 0; var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); - var _jsxRuntime$i = requireJsxRuntime(); + var _jsxRuntime$i = jsxRuntimeExports; var _default$i = default_1$i = FilterAlt.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); @@ -25533,7 +25527,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$h = FilterList.default = void 0; var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); - var _jsxRuntime$h = requireJsxRuntime(); + var _jsxRuntime$h = jsxRuntimeExports; var _default$h = default_1$h = FilterList.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); @@ -25546,7 +25540,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$g = FilterListOff.default = void 0; var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); - var _jsxRuntime$g = requireJsxRuntime(); + var _jsxRuntime$g = jsxRuntimeExports; var _default$g = default_1$g = FilterListOff.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); @@ -25559,7 +25553,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$f = FirstPage.default = void 0; var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); - var _jsxRuntime$f = requireJsxRuntime(); + var _jsxRuntime$f = jsxRuntimeExports; var _default$f = default_1$f = FirstPage.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); @@ -25572,7 +25566,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$e = Fullscreen.default = void 0; var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); - var _jsxRuntime$e = requireJsxRuntime(); + var _jsxRuntime$e = jsxRuntimeExports; var _default$e = default_1$e = Fullscreen.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); @@ -25585,7 +25579,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$d = FullscreenExit.default = void 0; var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); - var _jsxRuntime$d = requireJsxRuntime(); + var _jsxRuntime$d = jsxRuntimeExports; var _default$d = default_1$d = FullscreenExit.default = (0, _createSvgIcon$d.default)(/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); @@ -25598,7 +25592,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$c = KeyboardDoubleArrowDown.default = void 0; var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); - var _jsxRuntime$c = requireJsxRuntime(); + var _jsxRuntime$c = jsxRuntimeExports; var _default$c = default_1$c = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$c.default)([/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { @@ -25613,7 +25607,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$b = LastPage.default = void 0; var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); - var _jsxRuntime$b = requireJsxRuntime(); + var _jsxRuntime$b = jsxRuntimeExports; var _default$b = default_1$b = LastPage.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); @@ -25626,7 +25620,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$a = MoreHoriz.default = void 0; var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); - var _jsxRuntime$a = requireJsxRuntime(); + var _jsxRuntime$a = jsxRuntimeExports; var _default$a = default_1$a = MoreHoriz.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); @@ -25639,7 +25633,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$9 = MoreVert.default = void 0; var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); - var _jsxRuntime$9 = requireJsxRuntime(); + var _jsxRuntime$9 = jsxRuntimeExports; var _default$9 = default_1$9 = MoreVert.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); @@ -25652,7 +25646,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$8 = PushPin.default = void 0; var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); - var _jsxRuntime$8 = requireJsxRuntime(); + var _jsxRuntime$8 = jsxRuntimeExports; var _default$8 = default_1$8 = PushPin.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" @@ -25666,7 +25660,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$7 = RestartAlt.default = void 0; var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); - var _jsxRuntime$7 = requireJsxRuntime(); + var _jsxRuntime$7 = jsxRuntimeExports; var _default$7 = default_1$7 = RestartAlt.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); @@ -25679,7 +25673,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$6 = Save.default = void 0; var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); - var _jsxRuntime$6 = requireJsxRuntime(); + var _jsxRuntime$6 = jsxRuntimeExports; var _default$6 = default_1$6 = Save.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); @@ -25692,7 +25686,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$5 = Search.default = void 0; var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); - var _jsxRuntime$5 = requireJsxRuntime(); + var _jsxRuntime$5 = jsxRuntimeExports; var _default$5 = default_1$5 = Search.default = (0, _createSvgIcon$5.default)(/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); @@ -25705,7 +25699,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$4 = SearchOff.default = void 0; var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); - var _jsxRuntime$4 = requireJsxRuntime(); + var _jsxRuntime$4 = jsxRuntimeExports; var _default$4 = default_1$4 = SearchOff.default = (0, _createSvgIcon$4.default)([/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { @@ -25720,7 +25714,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$3 = Sort.default = void 0; var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); - var _jsxRuntime$3 = requireJsxRuntime(); + var _jsxRuntime$3 = jsxRuntimeExports; var _default$3 = default_1$3 = Sort.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); @@ -25733,7 +25727,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$2 = SyncAlt.default = void 0; var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); - var _jsxRuntime$2 = requireJsxRuntime(); + var _jsxRuntime$2 = jsxRuntimeExports; var _default$2 = default_1$2 = SyncAlt.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); @@ -25746,7 +25740,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$1 = ViewColumn.default = void 0; var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); - var _jsxRuntime$1 = requireJsxRuntime(); + var _jsxRuntime$1 = jsxRuntimeExports; var _default$1 = default_1$1 = ViewColumn.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); @@ -25759,7 +25753,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1 = VisibilityOff.default = void 0; var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); - var _jsxRuntime = requireJsxRuntime(); + var _jsxRuntime = jsxRuntimeExports; var _default = default_1 = VisibilityOff.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); @@ -65558,32 +65552,13 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }), { name: "BasicEntityField" } ); - const fieldMap = { - Text: BasicEntityTextField, - TextBox: BasicEntityTextBoxField, - Date: BasicEntityDateField, - DateTime: BasicEntityDateTimeField, - Time: BasicEntityTimeField, - Checkbox: BasicEntityCheckboxField, - Autocomplete: BasicEntityAutocompleteField, - Slider: BasicEntitySliderField, - RadioGroup: BasicEntityRadioGroupField, - Rating: BasicEntityRatingField, - Button: BasicEntityButtonField, - ButtonGroup: BasicEntityButtonGroupField, - Select: BasicEntitySelectField, - Switch: BasicEntitySwitchField, - ToggleButton: BasicEntityToggleButtonField - }; function VxgBasicEntityFieldPlugin(options) { const seneca = this; const spec = Shape$2(options.spec); - const field = spec.field; - const Field = fieldMap[field.ux.kind]; options.setPlugin(true); return { exports: { - handle: { Field } + handle: {} } }; } @@ -65631,6 +65606,23 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }), { name: CMPNAME$8 } ); + const fieldMap = { + Text: BasicEntityTextField, + TextBox: BasicEntityTextBoxField, + Date: BasicEntityDateField, + DateTime: BasicEntityDateTimeField, + Time: BasicEntityTimeField, + Checkbox: BasicEntityCheckboxField, + Autocomplete: BasicEntityAutocompleteField, + Slider: BasicEntitySliderField, + RadioGroup: BasicEntityRadioGroupField, + Rating: BasicEntityRatingField, + Button: BasicEntityButtonField, + ButtonGroup: BasicEntityButtonGroupField, + Select: BasicEntitySelectField, + Switch: BasicEntitySwitchField, + ToggleButton: BasicEntityToggleButtonField + }; function BasicEntityField(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -65650,25 +65642,16 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); } }, []); - const { Field } = seneca.export( - "VxgBasicEntityFieldPlugin$" + spec.field.name + "/handle" - ) || { Field: null }; + const field = spec.field; + const Field = fieldMap[field.ux.kind]; return Field ? /* @__PURE__ */ jsxRuntimeExports.jsx(Field, { ctx, spec: basicEntityField }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", {}); } const { Open: Open$5, Child: Child$3 } = gubu_minExports.Gubu; - const Shape$1 = gubu_minExports.Gubu( - Open$5({ - name: String, - prefix: String, - ent: String, - order: [String], - field: Child$3({}, {}) - }), - { name: "BasicEntityEdit" } - ); + const Shape$1 = gubu_minExports.Gubu(Open$5({}), { name: "BasicEntityEdit" }); function VxgBasicEntityEditPlugin(options) { const seneca = this; const spec = Shape$1(options.spec); + console.log("VxgBasicEntityEditPlugin", "options", options); const slot = spec.prefix + spec.name; const fields = spec.order.reduce( (a, fn) => (fixField(fn, spec.field[fn], spec), a.push(spec.field[fn]), a), diff --git a/src/lib/BasicEntityField.tsx b/src/lib/BasicEntityField.tsx index c6c5ec7..9eafcb6 100644 --- a/src/lib/BasicEntityField.tsx +++ b/src/lib/BasicEntityField.tsx @@ -1,5 +1,21 @@ import React, { useEffect, useState } from 'react' +import { BasicEntityCheckboxField } from './BasicEntityCheckboxField' +import { BasicEntityAutocompleteField } from './BasicEntityAutocompleteField' +import { BasicEntitySliderField } from './BasicEntitySliderField' +import { BasicEntityRadioGroupField } from './BasicEntityRadioGroupField' +import { BasicEntityTextBoxField } from './BasicEntityTextBoxField' +import { BasicEntityTextField } from './BasicEntityTextField' +import { BasicEntityDateField } from './BasicEntityDateField' +import { BasicEntityTimeField } from './BasicEntityTimeField' +import { BasicEntityDateTimeField } from './BasicEntityDateTimeField' +import { BasicEntityRatingField } from './BasicEntityRatingField' +import { BasicEntityButtonField } from './BasicEntityButtonField' +import { BasicEntityButtonGroupField } from './BasicEntityButtonGroupField' +import { BasicEntitySelectField } from './BasicEntitySelectField' +import { BasicEntitySwitchField } from './BasicEntitySwitchField' +import { BasicEntityToggleButtonField } from './BasicEntityToggleButtonField' + import type { Spec } from './basic-types' import { Default, Exact, Gubu, Skip } from 'gubu' @@ -42,6 +58,24 @@ const BasicEntityFieldSpecShape = Gubu( { name: CMPNAME } ) +const fieldMap: any = { + Text: BasicEntityTextField, + TextBox: BasicEntityTextBoxField, + Date: BasicEntityDateField, + DateTime: BasicEntityDateTimeField, + Time: BasicEntityTimeField, + Checkbox: BasicEntityCheckboxField, + Autocomplete: BasicEntityAutocompleteField, + Slider: BasicEntitySliderField, + RadioGroup: BasicEntityRadioGroupField, + Rating: BasicEntityRatingField, + Button: BasicEntityButtonField, + ButtonGroup: BasicEntityButtonGroupField, + Select: BasicEntitySelectField, + Switch: BasicEntitySwitchField, + ToggleButton: BasicEntityToggleButtonField, +} + function BasicEntityField (props: any) { const { ctx, spec } = props const { seneca } = ctx() @@ -65,9 +99,12 @@ function BasicEntityField (props: any) { } }, []) - const { Field } = seneca.export( - 'VxgBasicEntityFieldPlugin$' + spec.field.name + '/handle' - ) || { Field: null } + // const { Field } = seneca.export( + // 'VxgBasicEntityFieldPlugin$' + spec.field.name + '/handle' + // ) || { Field: null } + + const field: any = spec.field + const Field: any = fieldMap[field.ux.kind] return Field ? :
} diff --git a/src/lib/VxgBasicEntityFieldPlugin.ts b/src/lib/VxgBasicEntityFieldPlugin.ts index 91bdc61..da3677e 100644 --- a/src/lib/VxgBasicEntityFieldPlugin.ts +++ b/src/lib/VxgBasicEntityFieldPlugin.ts @@ -1,19 +1,3 @@ -import { BasicEntityCheckboxField } from './BasicEntityCheckboxField' -import { BasicEntityAutocompleteField } from './BasicEntityAutocompleteField' -import { BasicEntitySliderField } from './BasicEntitySliderField' -import { BasicEntityRadioGroupField } from './BasicEntityRadioGroupField' -import { BasicEntityTextBoxField } from './BasicEntityTextBoxField' -import { BasicEntityTextField } from './BasicEntityTextField' -import { BasicEntityDateField } from './BasicEntityDateField' -import { BasicEntityTimeField } from './BasicEntityTimeField' -import { BasicEntityDateTimeField } from './BasicEntityDateTimeField' -import { BasicEntityRatingField } from './BasicEntityRatingField' -import { BasicEntityButtonField } from './BasicEntityButtonField' -import { BasicEntityButtonGroupField } from './BasicEntityButtonGroupField' -import { BasicEntitySelectField } from './BasicEntitySelectField' -import { BasicEntitySwitchField } from './BasicEntitySwitchField' -import { BasicEntityToggleButtonField } from './BasicEntityToggleButtonField' - import type { Spec } from './basic-types' import { Gubu } from 'gubu' @@ -27,37 +11,16 @@ const Shape = Gubu( { name: 'BasicEntityField' } ) -const fieldMap: any = { - Text: BasicEntityTextField, - TextBox: BasicEntityTextBoxField, - Date: BasicEntityDateField, - DateTime: BasicEntityDateTimeField, - Time: BasicEntityTimeField, - Checkbox: BasicEntityCheckboxField, - Autocomplete: BasicEntityAutocompleteField, - Slider: BasicEntitySliderField, - RadioGroup: BasicEntityRadioGroupField, - Rating: BasicEntityRatingField, - Button: BasicEntityButtonField, - ButtonGroup: BasicEntityButtonGroupField, - Select: BasicEntitySelectField, - Switch: BasicEntitySwitchField, - ToggleButton: BasicEntityToggleButtonField, -} - function VxgBasicEntityFieldPlugin (this: any, options: any) { const seneca = this const spec = Shape(options.spec) - const field: any = spec.field - const Field: any = fieldMap[field.ux.kind] - options.setPlugin(true) return { exports: { - handle: { Field }, + handle: {}, }, } } From 2a200ce9e0c418f7774cfec5301c131886fa26cc Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Fri, 2 Aug 2024 11:09:19 +0100 Subject: [PATCH 099/122] Add new tests for plugins --- dist-plain/lib/VxgBasicEntityEditPlugin.d.ts | 3 + dist-plain/lib/VxgBasicEntityEditPlugin.js | 2 +- .../lib/VxgBasicEntityEditPlugin.js.map | 2 +- dist-plain/lib/VxgBasicLedPlugin.d.ts | 3 - dist-plain/lib/VxgBasicLedPlugin.js | 40 ------ dist-plain/lib/VxgBasicLedPlugin.js.map | 2 +- dist/VxgBasicEntityEditPlugin.d.ts | 3 + dist/VxgBasicLedPlugin.d.ts | 3 - dist/voxgig-model-react.es.js | 61 +++----- dist/voxgig-model-react.umd.js | 61 +++----- src/lib/VxgBasicEntityEditPlugin.ts | 1 + src/lib/VxgBasicLedPlugin.ts | 51 ------- test-plain/VxgBasicEntityEditPlugin.test.js | 85 +++++++++++ test-plain/VxgBasicLedPlugin.test.js | 134 ++++++++++-------- 14 files changed, 201 insertions(+), 250 deletions(-) create mode 100644 test-plain/VxgBasicEntityEditPlugin.test.js diff --git a/dist-plain/lib/VxgBasicEntityEditPlugin.d.ts b/dist-plain/lib/VxgBasicEntityEditPlugin.d.ts index 3c35bac..77d9312 100644 --- a/dist-plain/lib/VxgBasicEntityEditPlugin.d.ts +++ b/dist-plain/lib/VxgBasicEntityEditPlugin.d.ts @@ -5,6 +5,9 @@ declare function VxgBasicEntityEditPlugin(this: any, options: any): { slot: any; fields: any; }; + util: { + dateTimeFromUTC: (utc: number, tz?: string) => any; + }; }; }; export { VxgBasicEntityEditPlugin }; diff --git a/dist-plain/lib/VxgBasicEntityEditPlugin.js b/dist-plain/lib/VxgBasicEntityEditPlugin.js index 0aab72d..6a9f876 100644 --- a/dist-plain/lib/VxgBasicEntityEditPlugin.js +++ b/dist-plain/lib/VxgBasicEntityEditPlugin.js @@ -12,7 +12,6 @@ const Shape = (0, gubu_1.Gubu)(Open({ }), { name: 'BasicEntityEdit' }); function VxgBasicEntityEditPlugin(options) { const seneca = this; - console.log('VxgBasicEntityEditPlugin', 'options', options); const spec = Shape(options.spec); const slot = spec.prefix + spec.name; const fields = spec.order.reduce((a, fn) => (fixField(fn, spec.field[fn], spec), a.push(spec.field[fn]), a), []); @@ -81,6 +80,7 @@ function VxgBasicEntityEditPlugin(options) { slot, fields, }, + util, }, }; } diff --git a/dist-plain/lib/VxgBasicEntityEditPlugin.js.map b/dist-plain/lib/VxgBasicEntityEditPlugin.js.map index a5cef9a..5239e47 100644 --- a/dist-plain/lib/VxgBasicEntityEditPlugin.js.map +++ b/dist-plain/lib/VxgBasicEntityEditPlugin.js.map @@ -1 +1 @@ -{"version":3,"file":"VxgBasicEntityEditPlugin.js","sourceRoot":"","sources":["../../src/lib/VxgBasicEntityEditPlugin.ts"],"names":[],"mappings":";;AAqMS,4DAAwB;AAnMjC,+BAA2B;AAE3B,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,WAAI,CAAA;AAE5B,MAAM,KAAK,GAAG,IAAA,WAAI,EAChB,IAAI,CAAC;IACH,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,MAAM;IACd,GAAG,EAAE,MAAM;IACX,KAAK,EAAE,CAAC,MAAM,CAAC;IACf,KAAK,EAAE,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC;CACrB,CAAC,EACF,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAC5B,CAAA;AAED,SAAS,wBAAwB,CAAa,OAAY;IACxD,MAAM,MAAM,GAAG,IAAI,CAAA;IAEnB,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE,SAAS,EAAE,OAAO,CAAC,CAAA;IAE3D,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IAEhC,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,CAAA;IAEpC,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAC9B,CAAC,CAAM,EAAE,EAAO,EAAE,EAAE,CAAC,CACnB,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAC9D,EACD,EAAE,CACH,CAAA;IAED,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,MAAM,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;YAC7B,MAAM,CAAC,GAAG,CACR,uCAAuC,GAAG,IAAI,CAAC,IAAI,EACnD,KAAK,UAAU,gBAAgB,CAAa,GAAQ;gBAClD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,EAAE,IAAI,EAAE,GAAG,GAAG,CAAA;gBAElB,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,CAAA;gBAElB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,EAAE,CAAC;oBACjC,MAAM,EAAE,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;oBACjD,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;oBAC9C,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,CAAA;oBACnC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAA;gBAC9B,CAAC;gBAED,OAAO,EAAE,GAAG,GAAG,EAAE,IAAI,EAAE,CAAA;YACzB,CAAC,CACF,CAAA;QACH,CAAC;aAAM,IAAI,MAAM,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;YACpC,MAAM,CAAC,GAAG,CACR,uCAAuC,GAAG,IAAI,CAAC,IAAI,EACnD,KAAK,UAAU,gBAAgB,CAAa,GAAQ;gBAClD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,EAAE,IAAI,EAAE,GAAG,GAAG,CAAA;gBAElB,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,CAAA;gBAElB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,EAAE,CAAC;oBACjC,MAAM,EAAE,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;oBACjD,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;oBAC9C,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,CAAA;oBACnC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAA;gBAC9B,CAAC;gBAED,OAAO,EAAE,GAAG,GAAG,EAAE,IAAI,EAAE,CAAA;YACzB,CAAC,CACF,CAAA;QACH,CAAC;aAAM,IAAI,UAAU,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;YACxC,MAAM,CAAC,GAAG,CACR,uCAAuC,GAAG,IAAI,CAAC,IAAI,EACnD,KAAK,UAAU,oBAAoB,CAAa,GAAQ;gBACtD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,EAAE,IAAI,EAAE,GAAG,GAAG,CAAA;gBAElB,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,CAAA;gBAElB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,EAAE,CAAC;oBACjC,MAAM,EAAE,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;oBACjD,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;oBAC9C,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,CAAA;oBACnC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,GAAG,GAAG,GAAG,EAAE,CAAC,MAAM,CAAA;gBAChD,CAAC;gBAED,OAAO,EAAE,GAAG,GAAG,EAAE,IAAI,EAAE,CAAA;YACzB,CAAC,CACF,CAAA;QACH,CAAC;aAAM,IAAI,QAAQ,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;YACtC,oDAAoD;YACpD,MAAM,CAAC,GAAG,CACR,uCAAuC,GAAG,IAAI,CAAC,IAAI,EACnD,KAAK,UAAU,kBAAkB,CAAa,GAAQ;gBACpD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,EAAE,IAAI,EAAE,GAAG,GAAG,CAAA;gBAElB,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,CAAA;gBAElB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,EAAE,CAAC;oBACjC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;oBAC9C,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,CAAA;gBAClD,CAAC;gBAED,OAAO,EAAE,GAAG,GAAG,EAAE,IAAI,EAAE,CAAA;YACzB,CAAC,CACF,CAAA;QACH,CAAC;IACH,CAAC;IAED,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;IAEvB,OAAO;QACL,OAAO,EAAE;YACP,MAAM,EAAE;gBACN,IAAI;gBACJ,IAAI;gBACJ,MAAM;aACP;SACF;KACF,CAAA;AACH,CAAC;AAED,SAAS,QAAQ,CAAE,IAAY,EAAE,KAAU,EAAE,IAAS;IACpD,KAAK,CAAC,EAAE,GAAG,YAAY,GAAG,IAAI,CAAC,IAAI,GAAG,GAAG,GAAG,IAAI,CAAA;IAChD,KAAK,CAAC,IAAI,GAAG,IAAI,CAAA;IACjB,KAAK,CAAC,EAAE,GAAG,KAAK,CAAC,EAAE,IAAI,EAAE,CAAA;IACzB,KAAK,CAAC,EAAE,CAAC,IAAI,GAAG,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;AACzE,CAAC;AAED,MAAM,IAAI,GAAG;IACX,eAAe,EAAE,CAAC,GAAW,EAAE,EAAW,EAAE,EAAE;QAC5C,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,CAAA;QAC1B,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,EAAE,CAAA;QAC9B,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QAC9B,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QAE5C,uCAAuC;QACvC,MAAM,GAAG,GACP,IAAI,CAAC,WAAW,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI;YACnC,IAAI,CAAC,aAAa,EAAE,GAAG,EAAE,GAAG,IAAI;YAChC,IAAI,CAAC,aAAa,EAAE,GAAG,IAAI;YAC3B,IAAI,CAAC,kBAAkB,EAAE,CAAA;QAE3B,IAAI,GAAG,GAAQ;YACb,GAAG;YACH,IAAI;YACJ,IAAI;YACJ,IAAI;YACJ,GAAG;SACJ,CAAA;QAED,EAAE,GAAG,EAAE,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC,eAAe,EAAE,CAAC,QAAQ,CAAA;QAC3D,MAAM,aAAa,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE;YACrD,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,SAAS;YAChB,GAAG,EAAE,SAAS;SACf,CAAC,CAAA;QAEF,MAAM,aAAa,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE;YACrD,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,SAAS;YACf,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,KAAK;SACd,CAAC,CAAA;QAEF,MAAM,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,GAC3D,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;QACnC,MAAM,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,GAC/D,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;QAEnC,GAAG,CAAC,MAAM,GAAG,GAAG,IAAI,IAAI,KAAK,IAAI,GAAG,EAAE,CAAA;QACtC,GAAG,CAAC,MAAM,GAAG,GAAG,IAAI,IAAI,MAAM,IAAI,MAAM,EAAE,CAAA;QAE1C,OAAO,GAAG,CAAA;IACZ,CAAC;CACF,CAAA;AAED,MAAM,CAAC,MAAM,CAAC,wBAAwB,EAAE;IACtC,QAAQ,EAAE;QACR,IAAI,EAAE,EAAE;QACR,SAAS,EAAE,QAAQ;KACpB;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,cAAc,CAAC,wBAAwB,EAAE,MAAM,EAAE;IACtD,KAAK,EAAE,0BAA0B;CAClC,CAAC,CAAA"} \ No newline at end of file +{"version":3,"file":"VxgBasicEntityEditPlugin.js","sourceRoot":"","sources":["../../src/lib/VxgBasicEntityEditPlugin.ts"],"names":[],"mappings":";;AAoMS,4DAAwB;AAlMjC,+BAA2B;AAE3B,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,WAAI,CAAA;AAE5B,MAAM,KAAK,GAAG,IAAA,WAAI,EAChB,IAAI,CAAC;IACH,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,MAAM;IACd,GAAG,EAAE,MAAM;IACX,KAAK,EAAE,CAAC,MAAM,CAAC;IACf,KAAK,EAAE,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC;CACrB,CAAC,EACF,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAC5B,CAAA;AAED,SAAS,wBAAwB,CAAa,OAAY;IACxD,MAAM,MAAM,GAAG,IAAI,CAAA;IAEnB,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IAEhC,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,CAAA;IAEpC,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAC9B,CAAC,CAAM,EAAE,EAAO,EAAE,EAAE,CAAC,CACnB,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAC9D,EACD,EAAE,CACH,CAAA;IAED,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,MAAM,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;YAC7B,MAAM,CAAC,GAAG,CACR,uCAAuC,GAAG,IAAI,CAAC,IAAI,EACnD,KAAK,UAAU,gBAAgB,CAAa,GAAQ;gBAClD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,EAAE,IAAI,EAAE,GAAG,GAAG,CAAA;gBAElB,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,CAAA;gBAElB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,EAAE,CAAC;oBACjC,MAAM,EAAE,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;oBACjD,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;oBAC9C,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,CAAA;oBACnC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAA;gBAC9B,CAAC;gBAED,OAAO,EAAE,GAAG,GAAG,EAAE,IAAI,EAAE,CAAA;YACzB,CAAC,CACF,CAAA;QACH,CAAC;aAAM,IAAI,MAAM,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;YACpC,MAAM,CAAC,GAAG,CACR,uCAAuC,GAAG,IAAI,CAAC,IAAI,EACnD,KAAK,UAAU,gBAAgB,CAAa,GAAQ;gBAClD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,EAAE,IAAI,EAAE,GAAG,GAAG,CAAA;gBAElB,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,CAAA;gBAElB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,EAAE,CAAC;oBACjC,MAAM,EAAE,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;oBACjD,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;oBAC9C,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,CAAA;oBACnC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAA;gBAC9B,CAAC;gBAED,OAAO,EAAE,GAAG,GAAG,EAAE,IAAI,EAAE,CAAA;YACzB,CAAC,CACF,CAAA;QACH,CAAC;aAAM,IAAI,UAAU,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;YACxC,MAAM,CAAC,GAAG,CACR,uCAAuC,GAAG,IAAI,CAAC,IAAI,EACnD,KAAK,UAAU,oBAAoB,CAAa,GAAQ;gBACtD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,EAAE,IAAI,EAAE,GAAG,GAAG,CAAA;gBAElB,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,CAAA;gBAElB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,EAAE,CAAC;oBACjC,MAAM,EAAE,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;oBACjD,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;oBAC9C,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,CAAA;oBACnC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,GAAG,GAAG,GAAG,EAAE,CAAC,MAAM,CAAA;gBAChD,CAAC;gBAED,OAAO,EAAE,GAAG,GAAG,EAAE,IAAI,EAAE,CAAA;YACzB,CAAC,CACF,CAAA;QACH,CAAC;aAAM,IAAI,QAAQ,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;YACtC,oDAAoD;YACpD,MAAM,CAAC,GAAG,CACR,uCAAuC,GAAG,IAAI,CAAC,IAAI,EACnD,KAAK,UAAU,kBAAkB,CAAa,GAAQ;gBACpD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,EAAE,IAAI,EAAE,GAAG,GAAG,CAAA;gBAElB,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,CAAA;gBAElB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,EAAE,CAAC;oBACjC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;oBAC9C,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,CAAA;gBAClD,CAAC;gBAED,OAAO,EAAE,GAAG,GAAG,EAAE,IAAI,EAAE,CAAA;YACzB,CAAC,CACF,CAAA;QACH,CAAC;IACH,CAAC;IAED,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;IAEvB,OAAO;QACL,OAAO,EAAE;YACP,MAAM,EAAE;gBACN,IAAI;gBACJ,IAAI;gBACJ,MAAM;aACP;YACD,IAAI;SACL;KACF,CAAA;AACH,CAAC;AAED,SAAS,QAAQ,CAAE,IAAY,EAAE,KAAU,EAAE,IAAS;IACpD,KAAK,CAAC,EAAE,GAAG,YAAY,GAAG,IAAI,CAAC,IAAI,GAAG,GAAG,GAAG,IAAI,CAAA;IAChD,KAAK,CAAC,IAAI,GAAG,IAAI,CAAA;IACjB,KAAK,CAAC,EAAE,GAAG,KAAK,CAAC,EAAE,IAAI,EAAE,CAAA;IACzB,KAAK,CAAC,EAAE,CAAC,IAAI,GAAG,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;AACzE,CAAC;AAED,MAAM,IAAI,GAAG;IACX,eAAe,EAAE,CAAC,GAAW,EAAE,EAAW,EAAE,EAAE;QAC5C,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,CAAA;QAC1B,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,EAAE,CAAA;QAC9B,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QAC9B,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QAE5C,uCAAuC;QACvC,MAAM,GAAG,GACP,IAAI,CAAC,WAAW,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI;YACnC,IAAI,CAAC,aAAa,EAAE,GAAG,EAAE,GAAG,IAAI;YAChC,IAAI,CAAC,aAAa,EAAE,GAAG,IAAI;YAC3B,IAAI,CAAC,kBAAkB,EAAE,CAAA;QAE3B,IAAI,GAAG,GAAQ;YACb,GAAG;YACH,IAAI;YACJ,IAAI;YACJ,IAAI;YACJ,GAAG;SACJ,CAAA;QAED,EAAE,GAAG,EAAE,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC,eAAe,EAAE,CAAC,QAAQ,CAAA;QAC3D,MAAM,aAAa,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE;YACrD,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,SAAS;YAChB,GAAG,EAAE,SAAS;SACf,CAAC,CAAA;QAEF,MAAM,aAAa,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE;YACrD,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,SAAS;YACf,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,KAAK;SACd,CAAC,CAAA;QAEF,MAAM,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,GAC3D,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;QACnC,MAAM,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,GAC/D,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;QAEnC,GAAG,CAAC,MAAM,GAAG,GAAG,IAAI,IAAI,KAAK,IAAI,GAAG,EAAE,CAAA;QACtC,GAAG,CAAC,MAAM,GAAG,GAAG,IAAI,IAAI,MAAM,IAAI,MAAM,EAAE,CAAA;QAE1C,OAAO,GAAG,CAAA;IACZ,CAAC;CACF,CAAA;AAED,MAAM,CAAC,MAAM,CAAC,wBAAwB,EAAE;IACtC,QAAQ,EAAE;QACR,IAAI,EAAE,EAAE;QACR,SAAS,EAAE,QAAQ;KACpB;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,cAAc,CAAC,wBAAwB,EAAE,MAAM,EAAE;IACtD,KAAK,EAAE,0BAA0B;CAClC,CAAC,CAAA"} \ No newline at end of file diff --git a/dist-plain/lib/VxgBasicLedPlugin.d.ts b/dist-plain/lib/VxgBasicLedPlugin.d.ts index 06eb567..7268897 100644 --- a/dist-plain/lib/VxgBasicLedPlugin.d.ts +++ b/dist-plain/lib/VxgBasicLedPlugin.d.ts @@ -6,9 +6,6 @@ declare function VxgBasicLedPlugin(this: any, options: any): { head: any; foot: any; }; - util: { - dateTimeFromUTC: (utc: number, tz?: string) => any; - }; }; }; declare namespace VxgBasicLedPlugin { diff --git a/dist-plain/lib/VxgBasicLedPlugin.js b/dist-plain/lib/VxgBasicLedPlugin.js index b89c1fa..8f91962 100644 --- a/dist-plain/lib/VxgBasicLedPlugin.js +++ b/dist-plain/lib/VxgBasicLedPlugin.js @@ -145,49 +145,9 @@ function VxgBasicLedPlugin(options) { head: headSpec, foot: footSpec, }, - util, }, }; } -const util = { - dateTimeFromUTC: (utc, tz) => { - const date = new Date(utc); - const iso = date.toISOString(); - const isod = iso.split('T')[0]; - const isot = iso.split('T')[1].split('.')[0]; - // UTC millis into day (since midnight) - const udm = date.getUTCHours() * 60 * 60 * 1000 + - date.getUTCMinutes() * 60 * 1000 + - date.getUTCSeconds() * 1000 + - date.getUTCMilliseconds(); - let out = { - utc, - date, - isod, - isot, - udm, - }; - tz = tz || Intl.DateTimeFormat().resolvedOptions().timeZone; - const dateFormatter = new Intl.DateTimeFormat('en-GB', { - timeZone: tz, - year: 'numeric', - month: '2-digit', - day: '2-digit', - }); - const timeFormatter = new Intl.DateTimeFormat('en-GB', { - timeZone: tz, - hour: '2-digit', - minute: '2-digit', - second: '2-digit', - hour12: false, - }); - const [{ value: day }, , { value: month }, , { value: year }] = dateFormatter.formatToParts(date); - const [{ value: hour }, , { value: minute }, , { value: second }] = timeFormatter.formatToParts(date); - out.locald = `${year}-${month}-${day}`; - out.localt = `${hour}:${minute}:${second}`; - return out; - }, -}; VxgBasicLedPlugin.defaults = { spec: {}, navigate: Function, diff --git a/dist-plain/lib/VxgBasicLedPlugin.js.map b/dist-plain/lib/VxgBasicLedPlugin.js.map index f93eab1..d6b2a7e 100644 --- a/dist-plain/lib/VxgBasicLedPlugin.js.map +++ b/dist-plain/lib/VxgBasicLedPlugin.js.map @@ -1 +1 @@ -{"version":3,"file":"VxgBasicLedPlugin.js","sourceRoot":"","sources":["../../src/lib/VxgBasicLedPlugin.ts"],"names":[],"mappings":";;AA4QS,8CAAiB;AA1Q1B,+BAA2B;AAE3B,MAAM,EAAE,IAAI,EAAE,GAAG,WAAI,CAAA;AAErB,MAAM,KAAK,GAAG,IAAA,WAAI,EAChB;IACE,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,OAAO;IACf,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE;QACH,GAAG,EAAE,MAAM;QACX,IAAI,EAAE,IAAI,CAAC;YACT,MAAM,EAAE,KAAK;SACd,CAAC;QACF,IAAI,EAAE,IAAI,CAAC;YACT,MAAM,EAAE,KAAK;SACd,CAAC;QACF,IAAI,EAAE,IAAI,CAAC;YACT,MAAM,EAAE,KAAK;SACd,CAAC;QACF,IAAI,EAAE,IAAI,CAAC;YACT,MAAM,EAAE,KAAK;SACd,CAAC;KACH;CACF,EACD,EAAE,IAAI,EAAE,UAAU,EAAE,CACrB,CAAA;AAED,SAAS,iBAAiB,CAAa,OAAY;IACjD,MAAM,MAAM,GAAG,IAAI,CAAA;IAEnB,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IAChC,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAA;IAEjC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAA;IACtB,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAA;IAC7B,MAAM,QAAQ,GAAG,WAAW,GAAG,IAAI,CAAA;IAEnC,yDAAyD;IAEzD,MAAM;SACH,GAAG,CAAC,aAAa,CAAC;SAElB,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;SAEnB,GAAG,CACF,wCAAwC,EACxC,UAAqB,IAAS,EAAE,KAAU,EAAE,IAAS;QACnD,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;QACjC,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAE3B,IAAI,CAAC,IAAI,GAAG,MAAM,CAAA;QAClB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA;QAEjB,IAAI,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;QACnD,KAAK,EAAE,CAAA;IACT,CAAC,CACF;SAEA,GAAG,CACF,4CAA4C,EAC5C,UAAqB,GAAQ,EAAE,KAAU,EAAE,IAAS;QAClD,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAA;QAC7B,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAE3C,IAAI,CAAC,IAAI,GAAG,MAAM,CAAA;QAClB,IAAI,CAAC,MAAM,GAAG,WAAW,CAAA;QAEzB,QAAQ,CAAC,IAAI,CAAC,CAAA;QACd,KAAK,EAAE,CAAA;IACT,CAAC,CACF;SAEA,GAAG,CACF,4CAA4C,EAC5C,UAAU,GAAQ,EAAE,KAAU,EAAE,IAAS;QACvC,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAA;QAE7B,wBAAwB;QACxB,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3C,IAAI,CAAC,IAAI,GAAG,MAAM,CAAA;QAClB,IAAI,CAAC,MAAM,GAAG,WAAW,CAAA;QAEzB,QAAQ,CAAC,IAAI,CAAC,CAAA;QACd,KAAK,EAAE,CAAA;IACT,CAAC,CACF;SAEA,GAAG,CAAC,iCAAiC,EAAE,SAAS,WAAW,CAAE,GAAQ;QACpE,IAAI,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;QACnB,0BAA0B;QAE1B,IAAI,IAAI,IAAI,IAAI;YAAE,OAAO,IAAI,CAAA;QAE7B,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,CAAA;QAElB,OAAO,EAAE,GAAG,GAAG,EAAE,IAAI,EAAE,CAAA;IACzB,CAAC,CAAC;SAED,GAAG,CAAC,iCAAiC,EAAE,SAAS,WAAW,CAAE,GAAQ;QACpE,IAAI,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;QACnB,IAAI,MAAM,GAAG,GAAG,CAAC,MAAM,CAAA;QAEvB,IAAI,IAAI,IAAI,IAAI;YAAE,OAAO,IAAI,CAAA;QAE7B,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,CAAA;QAElB,iCAAiC;QACjC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC3B,IAAI,QAAQ,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;gBAC/B,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,aAAa,EAAE,OAAO,EAAE,KAAK,CAAC,CAAA;gBAC/D,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,aAAa,EAAE,MAAM,EAAE,IAAI,CAAC,CAAA;gBAC7D,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,CAAA;YAClD,CAAC;QACH,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,MAAM,EAAE,IAAI,CAAC,CAAA;QAExC,OAAO,IAAI,CAAA;IACb,CAAC,CAAC;SAED,OAAO,CACN,2CAA2C,EAC3C,EAAE,OAAO,EAAE,MAAM,EAAE,EACnB,KAAK,WAAsB,GAAQ,EAAE,IAAS;QAC5C,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;QACjC,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3B,MAAM,EAAE,OAAO,EAAE,GAAG,GAAG,CAAA;QACvB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAA;QAClB,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QAEhD,QAAQ,CAAC,QAAQ,GAAG,IAAI,GAAG,QAAQ,GAAG,OAAO,CAAC,CAAA;QAC9C,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC;YAC7C,EAAE,EAAE,GAAG,CAAC,OAAO;YACf,KAAK,EAAE,QAAQ;YACf,OAAO;SACR,CAAC,CAAA;QAEF,OAAO,IAAI,CAAA;IACb,CAAC,CACF;SAEA,OAAO,CACN,8BAA8B,EAC9B,KAAK,WAAsB,IAAS;QAClC,MAAM,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAA;QACpE,QAAQ,CAAC,QAAQ,GAAG,IAAI,GAAG,MAAM,CAAC,CAAA;IACpC,CAAC,CACF;SAEA,OAAO,CACN,+BAA+B,EAC/B,KAAK,WAAsB,GAAQ;QACjC,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;aAC7C,MAAM,CAAC,CAAC,CAAQ,EAAE,EAAE,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC;aAC5C,MAAM,CAAC,CAAC,CAAM,EAAE,CAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;QAEpE,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QACtD,8BAA8B;QAC9B,iDAAiD;QACjD,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAA;IAC3B,CAAC,CACF,CAAA;IAEH,MAAM,CAAC,OAAO,CAAC,KAAK;QAClB,IAAI,CAAC,GAAG,CAAC,yCAAyC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAA;IACrE,CAAC,CAAC,CAAA;IAEF,MAAM,UAAU,GAAG;QACjB,IAAI;QACJ,GAAG,EAAE,QAAQ;QACb,MAAM,EAAE,WAAW;KACpB,CAAA;IAED,MAAM,QAAQ,GAAG;QACf,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI;QAChB,GAAG,UAAU;KACd,CAAA;IAED,MAAM,QAAQ,GAAG;QACf,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI;QAChB,GAAG,UAAU;KACd,CAAA;IAED,MAAM,QAAQ,GAAG;QACf,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI;QAChB,GAAG,UAAU;KACd,CAAA;IAED,MAAM,QAAQ,GAAG;QACf,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI;QAChB,GAAG,UAAU;KACd,CAAA;IAED,OAAO;QACL,OAAO,EAAE;YACP,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;aACf;YACD,IAAI;SACL;KACF,CAAA;AACH,CAAC;AAED,MAAM,IAAI,GAAG;IACX,eAAe,EAAE,CAAC,GAAW,EAAE,EAAW,EAAE,EAAE;QAC5C,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,CAAA;QAC1B,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,EAAE,CAAA;QAC9B,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QAC9B,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QAE5C,uCAAuC;QACvC,MAAM,GAAG,GACP,IAAI,CAAC,WAAW,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI;YACnC,IAAI,CAAC,aAAa,EAAE,GAAG,EAAE,GAAG,IAAI;YAChC,IAAI,CAAC,aAAa,EAAE,GAAG,IAAI;YAC3B,IAAI,CAAC,kBAAkB,EAAE,CAAA;QAE3B,IAAI,GAAG,GAAQ;YACb,GAAG;YACH,IAAI;YACJ,IAAI;YACJ,IAAI;YACJ,GAAG;SACJ,CAAA;QAED,EAAE,GAAG,EAAE,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC,eAAe,EAAE,CAAC,QAAQ,CAAA;QAC3D,MAAM,aAAa,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE;YACrD,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,SAAS;YAChB,GAAG,EAAE,SAAS;SACf,CAAC,CAAA;QAEF,MAAM,aAAa,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE;YACrD,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,SAAS;YACf,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,KAAK;SACd,CAAC,CAAA;QAEF,MAAM,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,GAC3D,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;QACnC,MAAM,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,GAC/D,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;QAEnC,GAAG,CAAC,MAAM,GAAG,GAAG,IAAI,IAAI,KAAK,IAAI,GAAG,EAAE,CAAA;QACtC,GAAG,CAAC,MAAM,GAAG,GAAG,IAAI,IAAI,MAAM,IAAI,MAAM,EAAE,CAAA;QAE1C,OAAO,GAAG,CAAA;IACZ,CAAC;CACF,CAAA;AAED,iBAAiB,CAAC,QAAQ,GAAG;IAC3B,IAAI,EAAE,EAAE;IACR,QAAQ,EAAE,QAAQ;CACnB,CAAA;AAED,MAAM,CAAC,cAAc,CAAC,iBAAiB,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,CAAC,CAAA"} \ No newline at end of file +{"version":3,"file":"VxgBasicLedPlugin.js","sourceRoot":"","sources":["../../src/lib/VxgBasicLedPlugin.ts"],"names":[],"mappings":";;AAyNS,8CAAiB;AAvN1B,+BAA2B;AAE3B,MAAM,EAAE,IAAI,EAAE,GAAG,WAAI,CAAA;AAErB,MAAM,KAAK,GAAG,IAAA,WAAI,EAChB;IACE,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,OAAO;IACf,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE;QACH,GAAG,EAAE,MAAM;QACX,IAAI,EAAE,IAAI,CAAC;YACT,MAAM,EAAE,KAAK;SACd,CAAC;QACF,IAAI,EAAE,IAAI,CAAC;YACT,MAAM,EAAE,KAAK;SACd,CAAC;QACF,IAAI,EAAE,IAAI,CAAC;YACT,MAAM,EAAE,KAAK;SACd,CAAC;QACF,IAAI,EAAE,IAAI,CAAC;YACT,MAAM,EAAE,KAAK;SACd,CAAC;KACH;CACF,EACD,EAAE,IAAI,EAAE,UAAU,EAAE,CACrB,CAAA;AAED,SAAS,iBAAiB,CAAa,OAAY;IACjD,MAAM,MAAM,GAAG,IAAI,CAAA;IAEnB,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IAChC,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAA;IAEjC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAA;IACtB,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAA;IAC7B,MAAM,QAAQ,GAAG,WAAW,GAAG,IAAI,CAAA;IAEnC,yDAAyD;IAEzD,MAAM;SACH,GAAG,CAAC,aAAa,CAAC;SAElB,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;SAEnB,GAAG,CACF,wCAAwC,EACxC,UAAqB,IAAS,EAAE,KAAU,EAAE,IAAS;QACnD,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;QACjC,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAE3B,IAAI,CAAC,IAAI,GAAG,MAAM,CAAA;QAClB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA;QAEjB,IAAI,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;QACnD,KAAK,EAAE,CAAA;IACT,CAAC,CACF;SAEA,GAAG,CACF,4CAA4C,EAC5C,UAAqB,GAAQ,EAAE,KAAU,EAAE,IAAS;QAClD,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAA;QAC7B,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAE3C,IAAI,CAAC,IAAI,GAAG,MAAM,CAAA;QAClB,IAAI,CAAC,MAAM,GAAG,WAAW,CAAA;QAEzB,QAAQ,CAAC,IAAI,CAAC,CAAA;QACd,KAAK,EAAE,CAAA;IACT,CAAC,CACF;SAEA,GAAG,CACF,4CAA4C,EAC5C,UAAU,GAAQ,EAAE,KAAU,EAAE,IAAS;QACvC,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAA;QAE7B,wBAAwB;QACxB,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3C,IAAI,CAAC,IAAI,GAAG,MAAM,CAAA;QAClB,IAAI,CAAC,MAAM,GAAG,WAAW,CAAA;QAEzB,QAAQ,CAAC,IAAI,CAAC,CAAA;QACd,KAAK,EAAE,CAAA;IACT,CAAC,CACF;SAEA,GAAG,CAAC,iCAAiC,EAAE,SAAS,WAAW,CAAE,GAAQ;QACpE,IAAI,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;QACnB,0BAA0B;QAE1B,IAAI,IAAI,IAAI,IAAI;YAAE,OAAO,IAAI,CAAA;QAE7B,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,CAAA;QAElB,OAAO,EAAE,GAAG,GAAG,EAAE,IAAI,EAAE,CAAA;IACzB,CAAC,CAAC;SAED,GAAG,CAAC,iCAAiC,EAAE,SAAS,WAAW,CAAE,GAAQ;QACpE,IAAI,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;QACnB,IAAI,MAAM,GAAG,GAAG,CAAC,MAAM,CAAA;QAEvB,IAAI,IAAI,IAAI,IAAI;YAAE,OAAO,IAAI,CAAA;QAE7B,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,CAAA;QAElB,iCAAiC;QACjC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC3B,IAAI,QAAQ,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;gBAC/B,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,aAAa,EAAE,OAAO,EAAE,KAAK,CAAC,CAAA;gBAC/D,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,aAAa,EAAE,MAAM,EAAE,IAAI,CAAC,CAAA;gBAC7D,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,CAAA;YAClD,CAAC;QACH,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,MAAM,EAAE,IAAI,CAAC,CAAA;QAExC,OAAO,IAAI,CAAA;IACb,CAAC,CAAC;SAED,OAAO,CACN,2CAA2C,EAC3C,EAAE,OAAO,EAAE,MAAM,EAAE,EACnB,KAAK,WAAsB,GAAQ,EAAE,IAAS;QAC5C,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;QACjC,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3B,MAAM,EAAE,OAAO,EAAE,GAAG,GAAG,CAAA;QACvB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAA;QAClB,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QAEhD,QAAQ,CAAC,QAAQ,GAAG,IAAI,GAAG,QAAQ,GAAG,OAAO,CAAC,CAAA;QAC9C,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC;YAC7C,EAAE,EAAE,GAAG,CAAC,OAAO;YACf,KAAK,EAAE,QAAQ;YACf,OAAO;SACR,CAAC,CAAA;QAEF,OAAO,IAAI,CAAA;IACb,CAAC,CACF;SAEA,OAAO,CACN,8BAA8B,EAC9B,KAAK,WAAsB,IAAS;QAClC,MAAM,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAA;QACpE,QAAQ,CAAC,QAAQ,GAAG,IAAI,GAAG,MAAM,CAAC,CAAA;IACpC,CAAC,CACF;SAEA,OAAO,CACN,+BAA+B,EAC/B,KAAK,WAAsB,GAAQ;QACjC,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;aAC7C,MAAM,CAAC,CAAC,CAAQ,EAAE,EAAE,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC;aAC5C,MAAM,CAAC,CAAC,CAAM,EAAE,CAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;QAEpE,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QACtD,8BAA8B;QAC9B,iDAAiD;QACjD,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAA;IAC3B,CAAC,CACF,CAAA;IAEH,MAAM,CAAC,OAAO,CAAC,KAAK;QAClB,IAAI,CAAC,GAAG,CAAC,yCAAyC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAA;IACrE,CAAC,CAAC,CAAA;IAEF,MAAM,UAAU,GAAG;QACjB,IAAI;QACJ,GAAG,EAAE,QAAQ;QACb,MAAM,EAAE,WAAW;KACpB,CAAA;IAED,MAAM,QAAQ,GAAG;QACf,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI;QAChB,GAAG,UAAU;KACd,CAAA;IAED,MAAM,QAAQ,GAAG;QACf,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI;QAChB,GAAG,UAAU;KACd,CAAA;IAED,MAAM,QAAQ,GAAG;QACf,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI;QAChB,GAAG,UAAU;KACd,CAAA;IAED,MAAM,QAAQ,GAAG;QACf,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI;QAChB,GAAG,UAAU;KACd,CAAA;IAED,OAAO;QACL,OAAO,EAAE;YACP,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;aACf;SACF;KACF,CAAA;AACH,CAAC;AAED,iBAAiB,CAAC,QAAQ,GAAG;IAC3B,IAAI,EAAE,EAAE;IACR,QAAQ,EAAE,QAAQ;CACnB,CAAA;AAED,MAAM,CAAC,cAAc,CAAC,iBAAiB,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,CAAC,CAAA"} \ No newline at end of file diff --git a/dist/VxgBasicEntityEditPlugin.d.ts b/dist/VxgBasicEntityEditPlugin.d.ts index 3c35bac..77d9312 100644 --- a/dist/VxgBasicEntityEditPlugin.d.ts +++ b/dist/VxgBasicEntityEditPlugin.d.ts @@ -5,6 +5,9 @@ declare function VxgBasicEntityEditPlugin(this: any, options: any): { slot: any; fields: any; }; + util: { + dateTimeFromUTC: (utc: number, tz?: string) => any; + }; }; }; export { VxgBasicEntityEditPlugin }; diff --git a/dist/VxgBasicLedPlugin.d.ts b/dist/VxgBasicLedPlugin.d.ts index 06eb567..7268897 100644 --- a/dist/VxgBasicLedPlugin.d.ts +++ b/dist/VxgBasicLedPlugin.d.ts @@ -6,9 +6,6 @@ declare function VxgBasicLedPlugin(this: any, options: any): { head: any; foot: any; }; - util: { - dateTimeFromUTC: (utc: number, tz?: string) => any; - }; }; }; declare namespace VxgBasicLedPlugin { diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index a4447e1..22682cd 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -65635,11 +65635,19 @@ function BasicEntityField(props) { return Field ? /* @__PURE__ */ jsxRuntimeExports.jsx(Field, { ctx, spec: basicEntityField }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", {}); } const { Open: Open$5, Child: Child$3 } = gubu_minExports.Gubu; -const Shape$1 = gubu_minExports.Gubu(Open$5({}), { name: "BasicEntityEdit" }); +const Shape$1 = gubu_minExports.Gubu( + Open$5({ + name: String, + prefix: String, + ent: String, + order: [String], + field: Child$3({}, {}) + }), + { name: "BasicEntityEdit" } +); function VxgBasicEntityEditPlugin(options) { const seneca = this; const spec = Shape$1(options.spec); - console.log("VxgBasicEntityEditPlugin", "options", options); const slot = spec.prefix + spec.name; const fields = spec.order.reduce( (a, fn2) => (fixField(fn2, spec.field[fn2], spec), a.push(spec.field[fn2]), a), @@ -65655,7 +65663,7 @@ function VxgBasicEntityEditPlugin(options) { let { item } = out; item = __spreadValues({}, item); if (!item[field.name + "_orig$"]) { - const dt = util$2.dateTimeFromUTC(item[field.name]); + const dt = util$1.dateTimeFromUTC(item[field.name]); item[field.name + "_orig$"] = item[field.name]; item[field.name + "_udm$"] = dt.udm; item[field.name] = dt.localt; @@ -65673,7 +65681,7 @@ function VxgBasicEntityEditPlugin(options) { let { item } = out; item = __spreadValues({}, item); if (!item[field.name + "_orig$"]) { - const dt = util$2.dateTimeFromUTC(item[field.name]); + const dt = util$1.dateTimeFromUTC(item[field.name]); item[field.name + "_orig$"] = item[field.name]; item[field.name + "_udm$"] = dt.udm; item[field.name] = dt.localt; @@ -65691,7 +65699,7 @@ function VxgBasicEntityEditPlugin(options) { let { item } = out; item = __spreadValues({}, item); if (!item[field.name + "_orig$"]) { - const dt = util$2.dateTimeFromUTC(item[field.name]); + const dt = util$1.dateTimeFromUTC(item[field.name]); item[field.name + "_orig$"] = item[field.name]; item[field.name + "_udm$"] = dt.udm; item[field.name] = dt.locald + "T" + dt.localt; @@ -65725,7 +65733,8 @@ function VxgBasicEntityEditPlugin(options) { spec, slot, fields - } + }, + util: util$1 } }; } @@ -65735,7 +65744,7 @@ function fixField(name, field, spec) { field.ux = field.ux || {}; field.ux.size = null == field.ux.size ? 4 : parseInt(field.ux.size, 10); } -const util$2 = { +const util$1 = { dateTimeFromUTC: (utc, tz) => { const date = new Date(utc); const iso = date.toISOString(); @@ -66143,46 +66152,10 @@ function VxgBasicLedPlugin(options) { edit: editSpec, head: headSpec, foot: footSpec - }, - util: util$1 + } } }; } -const util$1 = { - dateTimeFromUTC: (utc, tz) => { - const date = new Date(utc); - const iso = date.toISOString(); - const isod = iso.split("T")[0]; - const isot = iso.split("T")[1].split(".")[0]; - const udm = date.getUTCHours() * 60 * 60 * 1e3 + date.getUTCMinutes() * 60 * 1e3 + date.getUTCSeconds() * 1e3 + date.getUTCMilliseconds(); - let out = { - utc, - date, - isod, - isot, - udm - }; - tz = tz || Intl.DateTimeFormat().resolvedOptions().timeZone; - const dateFormatter = new Intl.DateTimeFormat("en-GB", { - timeZone: tz, - year: "numeric", - month: "2-digit", - day: "2-digit" - }); - const timeFormatter = new Intl.DateTimeFormat("en-GB", { - timeZone: tz, - hour: "2-digit", - minute: "2-digit", - second: "2-digit", - hour12: false - }); - const [{ value: day }, , { value: month }, , { value: year }] = dateFormatter.formatToParts(date); - const [{ value: hour }, , { value: minute }, , { value: second }] = timeFormatter.formatToParts(date); - out.locald = `${year}-${month}-${day}`; - out.localt = `${hour}:${minute}:${second}`; - return out; - } -}; VxgBasicLedPlugin.defaults = { spec: {}, navigate: Function diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index 3351a95..be8768e 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -65647,11 +65647,19 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha return Field ? /* @__PURE__ */ jsxRuntimeExports.jsx(Field, { ctx, spec: basicEntityField }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", {}); } const { Open: Open$5, Child: Child$3 } = gubu_minExports.Gubu; - const Shape$1 = gubu_minExports.Gubu(Open$5({}), { name: "BasicEntityEdit" }); + const Shape$1 = gubu_minExports.Gubu( + Open$5({ + name: String, + prefix: String, + ent: String, + order: [String], + field: Child$3({}, {}) + }), + { name: "BasicEntityEdit" } + ); function VxgBasicEntityEditPlugin(options) { const seneca = this; const spec = Shape$1(options.spec); - console.log("VxgBasicEntityEditPlugin", "options", options); const slot = spec.prefix + spec.name; const fields = spec.order.reduce( (a, fn) => (fixField(fn, spec.field[fn], spec), a.push(spec.field[fn]), a), @@ -65667,7 +65675,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha let { item } = out; item = __spreadValues({}, item); if (!item[field.name + "_orig$"]) { - const dt = util$2.dateTimeFromUTC(item[field.name]); + const dt = util$1.dateTimeFromUTC(item[field.name]); item[field.name + "_orig$"] = item[field.name]; item[field.name + "_udm$"] = dt.udm; item[field.name] = dt.localt; @@ -65685,7 +65693,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha let { item } = out; item = __spreadValues({}, item); if (!item[field.name + "_orig$"]) { - const dt = util$2.dateTimeFromUTC(item[field.name]); + const dt = util$1.dateTimeFromUTC(item[field.name]); item[field.name + "_orig$"] = item[field.name]; item[field.name + "_udm$"] = dt.udm; item[field.name] = dt.localt; @@ -65703,7 +65711,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha let { item } = out; item = __spreadValues({}, item); if (!item[field.name + "_orig$"]) { - const dt = util$2.dateTimeFromUTC(item[field.name]); + const dt = util$1.dateTimeFromUTC(item[field.name]); item[field.name + "_orig$"] = item[field.name]; item[field.name + "_udm$"] = dt.udm; item[field.name] = dt.locald + "T" + dt.localt; @@ -65737,7 +65745,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha spec, slot, fields - } + }, + util: util$1 } }; } @@ -65747,7 +65756,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha field.ux = field.ux || {}; field.ux.size = null == field.ux.size ? 4 : parseInt(field.ux.size, 10); } - const util$2 = { + const util$1 = { dateTimeFromUTC: (utc, tz) => { const date = new Date(utc); const iso = date.toISOString(); @@ -66155,46 +66164,10 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha edit: editSpec, head: headSpec, foot: footSpec - }, - util: util$1 + } } }; } - const util$1 = { - dateTimeFromUTC: (utc, tz) => { - const date = new Date(utc); - const iso = date.toISOString(); - const isod = iso.split("T")[0]; - const isot = iso.split("T")[1].split(".")[0]; - const udm = date.getUTCHours() * 60 * 60 * 1e3 + date.getUTCMinutes() * 60 * 1e3 + date.getUTCSeconds() * 1e3 + date.getUTCMilliseconds(); - let out = { - utc, - date, - isod, - isot, - udm - }; - tz = tz || Intl.DateTimeFormat().resolvedOptions().timeZone; - const dateFormatter = new Intl.DateTimeFormat("en-GB", { - timeZone: tz, - year: "numeric", - month: "2-digit", - day: "2-digit" - }); - const timeFormatter = new Intl.DateTimeFormat("en-GB", { - timeZone: tz, - hour: "2-digit", - minute: "2-digit", - second: "2-digit", - hour12: false - }); - const [{ value: day }, , { value: month }, , { value: year }] = dateFormatter.formatToParts(date); - const [{ value: hour }, , { value: minute }, , { value: second }] = timeFormatter.formatToParts(date); - out.locald = `${year}-${month}-${day}`; - out.localt = `${hour}:${minute}:${second}`; - return out; - } - }; VxgBasicLedPlugin.defaults = { spec: {}, navigate: Function diff --git a/src/lib/VxgBasicEntityEditPlugin.ts b/src/lib/VxgBasicEntityEditPlugin.ts index 05fa52c..317b87f 100644 --- a/src/lib/VxgBasicEntityEditPlugin.ts +++ b/src/lib/VxgBasicEntityEditPlugin.ts @@ -121,6 +121,7 @@ function VxgBasicEntityEditPlugin (this: any, options: any) { slot, fields, }, + util, }, } } diff --git a/src/lib/VxgBasicLedPlugin.ts b/src/lib/VxgBasicLedPlugin.ts index 6570d46..e20ce32 100644 --- a/src/lib/VxgBasicLedPlugin.ts +++ b/src/lib/VxgBasicLedPlugin.ts @@ -204,61 +204,10 @@ function VxgBasicLedPlugin (this: any, options: any) { head: headSpec, foot: footSpec, }, - util, }, } } -const util = { - dateTimeFromUTC: (utc: number, tz?: string) => { - const date = new Date(utc) - const iso = date.toISOString() - const isod = iso.split('T')[0] - const isot = iso.split('T')[1].split('.')[0] - - // UTC millis into day (since midnight) - const udm = - date.getUTCHours() * 60 * 60 * 1000 + - date.getUTCMinutes() * 60 * 1000 + - date.getUTCSeconds() * 1000 + - date.getUTCMilliseconds() - - let out: any = { - utc, - date, - isod, - isot, - udm, - } - - tz = tz || Intl.DateTimeFormat().resolvedOptions().timeZone - const dateFormatter = new Intl.DateTimeFormat('en-GB', { - timeZone: tz, - year: 'numeric', - month: '2-digit', - day: '2-digit', - }) - - const timeFormatter = new Intl.DateTimeFormat('en-GB', { - timeZone: tz, - hour: '2-digit', - minute: '2-digit', - second: '2-digit', - hour12: false, - }) - - const [{ value: day }, , { value: month }, , { value: year }] = - dateFormatter.formatToParts(date) - const [{ value: hour }, , { value: minute }, , { value: second }] = - timeFormatter.formatToParts(date) - - out.locald = `${year}-${month}-${day}` - out.localt = `${hour}:${minute}:${second}` - - return out - }, -} - VxgBasicLedPlugin.defaults = { spec: {}, navigate: Function, diff --git a/test-plain/VxgBasicEntityEditPlugin.test.js b/test-plain/VxgBasicEntityEditPlugin.test.js new file mode 100644 index 0000000..bd0da6a --- /dev/null +++ b/test-plain/VxgBasicEntityEditPlugin.test.js @@ -0,0 +1,85 @@ +require('ts-node') + +const { test, describe } = require('node:test') + +const { expect } = require('@hapi/code') + +const Seneca = require('seneca') + +const { + VxgBasicEntityEditPlugin, +} = require('../dist-plain/lib/VxgBasicEntityEditPlugin') + +describe('VxgBasicEntityEditPlugin', () => { + test('load-plugin', async () => { + const seneca = await makeSeneca() + expect(seneca.find_plugin('VxgBasicEntityEditPlugin$foo')).exist() + await seneca.close() + }) + + test('util-datetime', async () => { + const seneca = await makeSeneca() + const { dateTimeFromUTC } = seneca.export('VxgBasicEntityEditPlugin/util') + const d0 = new Date(1717173005742) + const o0 = dateTimeFromUTC(d0, 'Europe/Dublin') + // console.log(new Date(d0), o0) + expect(o0).contains({ + udm: 59405742, + isod: '2024-05-31', + isot: '16:30:05', + locald: '2024-05-31', + localt: '17:30:05', + }) + await seneca.close() + }) +}) + +async function makeSeneca (opts) { + const { deep } = Seneca.util + return Seneca({ legacy: false }) + .test() + .use('promisify') + .use('entity') + .use('redux', { + name: 'main', + state: { + view: { + foo: {}, + }, + }, + }) + .use({ + name: 'VxgBasicEntityEditPlugin$foo', + define: VxgBasicEntityEditPlugin, + options: deep( + { + setPlugin: () => null, + spec: { + active: false, + name: 'foo', + prefix: 'BasicLed_', + ent: 'foo/bar', + order: ['title'], + field: { + title: { + label: 'Title', + kind: 'String', + valid: 'Min(2).Max(1111)', + ux: { + kind: 'Text', + edit: true, + rows: 3, + size: 4, + props: {}, + }, + id: 'vxg-field-podcast-title', + name: 'title', + }, + }, + }, + }, + opts + ), + }) + .ready() +} diff --git a/test-plain/VxgBasicLedPlugin.test.js b/test-plain/VxgBasicLedPlugin.test.js index 87fbf86..6a79f52 100644 --- a/test-plain/VxgBasicLedPlugin.test.js +++ b/test-plain/VxgBasicLedPlugin.test.js @@ -1,4 +1,3 @@ - require('ts-node') const { test, describe } = require('node:test') @@ -9,8 +8,6 @@ const Seneca = require('seneca') const { VxgBasicLedPlugin } = require('../dist-plain/lib/VxgBasicLedPlugin') - - describe('VxgBasicLedPlugin', () => { test('load-plugin', async () => { const seneca = await makeSeneca() @@ -18,97 +15,110 @@ describe('VxgBasicLedPlugin', () => { await seneca.close() }) - test('ready-list', async () => { const seneca = await makeSeneca() const store = seneca.export('Redux/store') - expect(store.getState().main.view.foo) - .equal({ mode: 'list', status: 'init', ready: true }) + expect(store.getState().main.view.foo).equal({ + mode: 'list', + status: 'init', + ready: true, + }) - await seneca.post('aim:app,on:BasicLed,ready:list,view:foo',{setReady:()=>null}) - expect(store.getState().main.view.foo) - .equal({ mode: 'list', status: 'list-item', ready: true }) + await seneca.post('aim:app,on:BasicLed,ready:list,view:foo', { + setReady: () => null, + }) + expect(store.getState().main.view.foo).equal({ + mode: 'list', + status: 'list-item', + ready: true, + }) await seneca.close() }) - test('ready-edit', async () => { const seneca = await makeSeneca() const store = seneca.export('Redux/store') - expect(store.getState().main.view.foo) - .equal({ mode: 'list', status: 'init', ready: true }) + expect(store.getState().main.view.foo).equal({ + mode: 'list', + status: 'init', + ready: true, + }) - await seneca.post('aim:app,on:BasicLed,ready:edit,view:foo',{setReady:()=>null}) - expect(store.getState().main.view.foo) - .equal({ mode: 'edit', status: 'edit-item', ready: true }) + await seneca.post('aim:app,on:BasicLed,ready:edit,view:foo', { + setReady: () => null, + }) + expect(store.getState().main.view.foo).equal({ + mode: 'edit', + status: 'edit-item', + ready: true, + }) await seneca.close() }) + // test('util-datetime', async () => { + // const seneca = await makeSeneca() + // const { dateTimeFromUTC } = seneca.export('VxgBasicLedPlugin/util') - test('util-datetime', async () => { - const seneca = await makeSeneca() - const { dateTimeFromUTC } = seneca.export('VxgBasicLedPlugin/util') - - const d0 = new Date(1717173005742) - const o0 = dateTimeFromUTC(d0,'Europe/Dublin') + // const d0 = new Date(1717173005742) + // const o0 = dateTimeFromUTC(d0,'Europe/Dublin') - // console.log(new Date(d0), o0) - expect(o0).contains({ - udm: 59405742, - isod: '2024-05-31', - isot: '16:30:05', - locald: '2024-05-31', - localt: '17:30:05' - }) + // // console.log(new Date(d0), o0) + // expect(o0).contains({ + // udm: 59405742, + // isod: '2024-05-31', + // isot: '16:30:05', + // locald: '2024-05-31', + // localt: '17:30:05' + // }) - - await seneca.close() - }) - + // await seneca.close() + // }) }) - -async function makeSeneca(opts) { +async function makeSeneca (opts) { const { deep } = Seneca.util - return Seneca({legacy:false}) + return Seneca({ legacy: false }) .test() .use('promisify') .use('entity') - .use('redux',{ + .use('redux', { name: 'main', state: { view: { - foo: {} - } + foo: {}, + }, }, }) .use({ name: 'VxgBasicLedPlugin$foo', define: VxgBasicLedPlugin, - options: deep({ - navigate: ()=>null, - spec: { - name: 'foo', - title: 'title', - active: true, - kind: 'led', - def: { - ent: 'foo', - head: { - active: true, - }, - list: { - active: true, - }, - edit: { - active: true, - }, - foot: { - active: true, + options: deep( + { + navigate: () => null, + spec: { + name: 'foo', + title: 'title', + active: true, + kind: 'led', + def: { + ent: 'foo', + head: { + active: true, + }, + list: { + active: true, + }, + edit: { + active: true, + }, + foot: { + active: true, + }, }, - } - } - }, opts) + }, + }, + opts + ), }) .ready() } From 25358fe99e8974be2bdef7d806c1cb3dd3d85564 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Fri, 2 Aug 2024 11:09:35 +0100 Subject: [PATCH 100/122] Remove unnecessary code from BasicEntityAutocompleteField --- src/lib/BasicEntityAutocompleteField.tsx | 40 ------------------------ 1 file changed, 40 deletions(-) diff --git a/src/lib/BasicEntityAutocompleteField.tsx b/src/lib/BasicEntityAutocompleteField.tsx index 468571f..c0b6946 100644 --- a/src/lib/BasicEntityAutocompleteField.tsx +++ b/src/lib/BasicEntityAutocompleteField.tsx @@ -84,46 +84,6 @@ function BasicEntityAutocompleteField (props: any) { ) } -// function BasicEntityAutocompleteField (props: any) { -// const { spec } = props - -// const basicEntityAutocompleteField: Spec = BasicEntityAutocompleteFieldSpecShape(spec) -// const { control, field, errors } = basicEntityAutocompleteField - -// const err = errors[field.name] - -// return ( -// -// ( -// -// opt === val || -// (opt?.id != null && val?.id != null && opt.id === val.id) || -// (opt?.key != null && val?.key != null && opt.key === val.key) -// } -// getOptionLabel={(option: any) => option.title} -// value={resolveValue(value, field.cat)} -// disabled={!field.ux.edit} -// {...field.ux.props} -// onChange={(_, newVal: any) => onChange(newVal)} -// renderInput={(params: any) => } -// /> -// )} -// /> -// -// -// ) -// } - export function resolveCategories (cat: { item: Record }) { From a749efc72f57cf38e929ca251dbbc713599e8813 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Fri, 2 Aug 2024 15:42:43 +0100 Subject: [PATCH 101/122] Simplify returned value from modify:edit actions --- dist/voxgig-model-react.es.js | 164 +++++++++++++++------------- dist/voxgig-model-react.umd.js | 164 +++++++++++++++------------- src/lib/BasicEntityEdit.tsx | 22 +--- src/lib/BasicLed.tsx | 49 +++++---- src/lib/VxgBasicEntityEditPlugin.ts | 28 ++--- src/lib/VxgBasicLedPlugin.ts | 10 +- 6 files changed, 219 insertions(+), 218 deletions(-) diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index 22682cd..e05345f 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -1030,15 +1030,21 @@ function requireReactJsxRuntime_development() { } return reactJsxRuntime_development; } -var jsxRuntime = jsxRuntime$2.exports; -"use strict"; -if (process.env.NODE_ENV === "production") { - jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); -} else { - jsxRuntime$2.exports = requireReactJsxRuntime_development(); +var jsxRuntime$1 = jsxRuntime$2.exports; +var hasRequiredJsxRuntime; +function requireJsxRuntime() { + if (hasRequiredJsxRuntime) return jsxRuntime$2.exports; + hasRequiredJsxRuntime = 1; + "use strict"; + if (process.env.NODE_ENV === "production") { + jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); + } else { + jsxRuntime$2.exports = requireReactJsxRuntime_development(); + } + return jsxRuntime$2.exports; } -var jsxRuntimeExports = jsxRuntime$2.exports; -const jsxRuntime$1 = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); +var jsxRuntimeExports = requireJsxRuntime(); +const jsxRuntime = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); var gubu_min$2 = { exports: {} }; var gubu_min = gubu_min$2.exports; (function(module, exports) { @@ -25305,7 +25311,7 @@ Object.defineProperty(ArrowDownward, "__esModule", { }); var default_1$x = ArrowDownward.default = void 0; var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); -var _jsxRuntime$x = jsxRuntimeExports; +var _jsxRuntime$x = requireJsxRuntime(); var _default$x = default_1$x = ArrowDownward.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); @@ -25318,7 +25324,7 @@ Object.defineProperty(ArrowRight, "__esModule", { }); var default_1$w = ArrowRight.default = void 0; var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); -var _jsxRuntime$w = jsxRuntimeExports; +var _jsxRuntime$w = requireJsxRuntime(); var _default$w = default_1$w = ArrowRight.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); @@ -25331,7 +25337,7 @@ Object.defineProperty(Cancel, "__esModule", { }); var default_1$v = Cancel.default = void 0; var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); -var _jsxRuntime$v = jsxRuntimeExports; +var _jsxRuntime$v = requireJsxRuntime(); var _default$v = default_1$v = Cancel.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); @@ -25344,7 +25350,7 @@ Object.defineProperty(ChevronLeft, "__esModule", { }); var default_1$u = ChevronLeft.default = void 0; var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); -var _jsxRuntime$u = jsxRuntimeExports; +var _jsxRuntime$u = requireJsxRuntime(); var _default$u = default_1$u = ChevronLeft.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); @@ -25357,7 +25363,7 @@ Object.defineProperty(ChevronRight, "__esModule", { }); var default_1$t = ChevronRight.default = void 0; var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); -var _jsxRuntime$t = jsxRuntimeExports; +var _jsxRuntime$t = requireJsxRuntime(); var _default$t = default_1$t = ChevronRight.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); @@ -25370,7 +25376,7 @@ Object.defineProperty(ClearAll, "__esModule", { }); var default_1$s = ClearAll.default = void 0; var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); -var _jsxRuntime$s = jsxRuntimeExports; +var _jsxRuntime$s = requireJsxRuntime(); var _default$s = default_1$s = ClearAll.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); @@ -25383,7 +25389,7 @@ Object.defineProperty(Close, "__esModule", { }); var default_1$r = Close.default = void 0; var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); -var _jsxRuntime$r = jsxRuntimeExports; +var _jsxRuntime$r = requireJsxRuntime(); var _default$r = default_1$r = Close.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); @@ -25396,7 +25402,7 @@ Object.defineProperty(ContentCopy, "__esModule", { }); var default_1$q = ContentCopy.default = void 0; var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); -var _jsxRuntime$q = jsxRuntimeExports; +var _jsxRuntime$q = requireJsxRuntime(); var _default$q = default_1$q = ContentCopy.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); @@ -25409,7 +25415,7 @@ Object.defineProperty(DensityLarge, "__esModule", { }); var default_1$p = DensityLarge.default = void 0; var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); -var _jsxRuntime$p = jsxRuntimeExports; +var _jsxRuntime$p = requireJsxRuntime(); var _default$p = default_1$p = DensityLarge.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); @@ -25422,7 +25428,7 @@ Object.defineProperty(DensityMedium, "__esModule", { }); var default_1$o = DensityMedium.default = void 0; var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); -var _jsxRuntime$o = jsxRuntimeExports; +var _jsxRuntime$o = requireJsxRuntime(); var _default$o = default_1$o = DensityMedium.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); @@ -25435,7 +25441,7 @@ Object.defineProperty(DensitySmall, "__esModule", { }); var default_1$n = DensitySmall.default = void 0; var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); -var _jsxRuntime$n = jsxRuntimeExports; +var _jsxRuntime$n = requireJsxRuntime(); var _default$n = default_1$n = DensitySmall.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); @@ -25448,7 +25454,7 @@ Object.defineProperty(DragHandle, "__esModule", { }); var default_1$m = DragHandle.default = void 0; var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); -var _jsxRuntime$m = jsxRuntimeExports; +var _jsxRuntime$m = requireJsxRuntime(); var _default$m = default_1$m = DragHandle.default = (0, _createSvgIcon$m.default)(/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); @@ -25461,7 +25467,7 @@ Object.defineProperty(DynamicFeed, "__esModule", { }); var default_1$l = DynamicFeed.default = void 0; var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); -var _jsxRuntime$l = jsxRuntimeExports; +var _jsxRuntime$l = requireJsxRuntime(); var _default$l = default_1$l = DynamicFeed.default = (0, _createSvgIcon$l.default)([/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { @@ -25476,7 +25482,7 @@ Object.defineProperty(Edit, "__esModule", { }); var default_1$k = Edit.default = void 0; var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); -var _jsxRuntime$k = jsxRuntimeExports; +var _jsxRuntime$k = requireJsxRuntime(); var _default$k = default_1$k = Edit.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); @@ -25489,7 +25495,7 @@ Object.defineProperty(ExpandMore, "__esModule", { }); var default_1$j = ExpandMore.default = void 0; var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); -var _jsxRuntime$j = jsxRuntimeExports; +var _jsxRuntime$j = requireJsxRuntime(); var _default$j = default_1$j = ExpandMore.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); @@ -25502,7 +25508,7 @@ Object.defineProperty(FilterAlt, "__esModule", { }); var default_1$i = FilterAlt.default = void 0; var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); -var _jsxRuntime$i = jsxRuntimeExports; +var _jsxRuntime$i = requireJsxRuntime(); var _default$i = default_1$i = FilterAlt.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); @@ -25515,7 +25521,7 @@ Object.defineProperty(FilterList, "__esModule", { }); var default_1$h = FilterList.default = void 0; var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); -var _jsxRuntime$h = jsxRuntimeExports; +var _jsxRuntime$h = requireJsxRuntime(); var _default$h = default_1$h = FilterList.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); @@ -25528,7 +25534,7 @@ Object.defineProperty(FilterListOff, "__esModule", { }); var default_1$g = FilterListOff.default = void 0; var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); -var _jsxRuntime$g = jsxRuntimeExports; +var _jsxRuntime$g = requireJsxRuntime(); var _default$g = default_1$g = FilterListOff.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); @@ -25541,7 +25547,7 @@ Object.defineProperty(FirstPage, "__esModule", { }); var default_1$f = FirstPage.default = void 0; var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); -var _jsxRuntime$f = jsxRuntimeExports; +var _jsxRuntime$f = requireJsxRuntime(); var _default$f = default_1$f = FirstPage.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); @@ -25554,7 +25560,7 @@ Object.defineProperty(Fullscreen, "__esModule", { }); var default_1$e = Fullscreen.default = void 0; var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); -var _jsxRuntime$e = jsxRuntimeExports; +var _jsxRuntime$e = requireJsxRuntime(); var _default$e = default_1$e = Fullscreen.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); @@ -25567,7 +25573,7 @@ Object.defineProperty(FullscreenExit, "__esModule", { }); var default_1$d = FullscreenExit.default = void 0; var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); -var _jsxRuntime$d = jsxRuntimeExports; +var _jsxRuntime$d = requireJsxRuntime(); var _default$d = default_1$d = FullscreenExit.default = (0, _createSvgIcon$d.default)(/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); @@ -25580,7 +25586,7 @@ Object.defineProperty(KeyboardDoubleArrowDown, "__esModule", { }); var default_1$c = KeyboardDoubleArrowDown.default = void 0; var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); -var _jsxRuntime$c = jsxRuntimeExports; +var _jsxRuntime$c = requireJsxRuntime(); var _default$c = default_1$c = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$c.default)([/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { @@ -25595,7 +25601,7 @@ Object.defineProperty(LastPage, "__esModule", { }); var default_1$b = LastPage.default = void 0; var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); -var _jsxRuntime$b = jsxRuntimeExports; +var _jsxRuntime$b = requireJsxRuntime(); var _default$b = default_1$b = LastPage.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); @@ -25608,7 +25614,7 @@ Object.defineProperty(MoreHoriz, "__esModule", { }); var default_1$a = MoreHoriz.default = void 0; var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); -var _jsxRuntime$a = jsxRuntimeExports; +var _jsxRuntime$a = requireJsxRuntime(); var _default$a = default_1$a = MoreHoriz.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); @@ -25621,7 +25627,7 @@ Object.defineProperty(MoreVert, "__esModule", { }); var default_1$9 = MoreVert.default = void 0; var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); -var _jsxRuntime$9 = jsxRuntimeExports; +var _jsxRuntime$9 = requireJsxRuntime(); var _default$9 = default_1$9 = MoreVert.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); @@ -25634,7 +25640,7 @@ Object.defineProperty(PushPin, "__esModule", { }); var default_1$8 = PushPin.default = void 0; var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); -var _jsxRuntime$8 = jsxRuntimeExports; +var _jsxRuntime$8 = requireJsxRuntime(); var _default$8 = default_1$8 = PushPin.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" @@ -25648,7 +25654,7 @@ Object.defineProperty(RestartAlt, "__esModule", { }); var default_1$7 = RestartAlt.default = void 0; var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); -var _jsxRuntime$7 = jsxRuntimeExports; +var _jsxRuntime$7 = requireJsxRuntime(); var _default$7 = default_1$7 = RestartAlt.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); @@ -25661,7 +25667,7 @@ Object.defineProperty(Save, "__esModule", { }); var default_1$6 = Save.default = void 0; var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); -var _jsxRuntime$6 = jsxRuntimeExports; +var _jsxRuntime$6 = requireJsxRuntime(); var _default$6 = default_1$6 = Save.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); @@ -25674,7 +25680,7 @@ Object.defineProperty(Search, "__esModule", { }); var default_1$5 = Search.default = void 0; var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); -var _jsxRuntime$5 = jsxRuntimeExports; +var _jsxRuntime$5 = requireJsxRuntime(); var _default$5 = default_1$5 = Search.default = (0, _createSvgIcon$5.default)(/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); @@ -25687,7 +25693,7 @@ Object.defineProperty(SearchOff, "__esModule", { }); var default_1$4 = SearchOff.default = void 0; var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); -var _jsxRuntime$4 = jsxRuntimeExports; +var _jsxRuntime$4 = requireJsxRuntime(); var _default$4 = default_1$4 = SearchOff.default = (0, _createSvgIcon$4.default)([/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { @@ -25702,7 +25708,7 @@ Object.defineProperty(Sort, "__esModule", { }); var default_1$3 = Sort.default = void 0; var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); -var _jsxRuntime$3 = jsxRuntimeExports; +var _jsxRuntime$3 = requireJsxRuntime(); var _default$3 = default_1$3 = Sort.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); @@ -25715,7 +25721,7 @@ Object.defineProperty(SyncAlt, "__esModule", { }); var default_1$2 = SyncAlt.default = void 0; var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); -var _jsxRuntime$2 = jsxRuntimeExports; +var _jsxRuntime$2 = requireJsxRuntime(); var _default$2 = default_1$2 = SyncAlt.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); @@ -25728,7 +25734,7 @@ Object.defineProperty(ViewColumn, "__esModule", { }); var default_1$1 = ViewColumn.default = void 0; var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); -var _jsxRuntime$1 = jsxRuntimeExports; +var _jsxRuntime$1 = requireJsxRuntime(); var _default$1 = default_1$1 = ViewColumn.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); @@ -25741,7 +25747,7 @@ Object.defineProperty(VisibilityOff, "__esModule", { }); var default_1 = VisibilityOff.default = void 0; var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); -var _jsxRuntime = jsxRuntimeExports; +var _jsxRuntime = requireJsxRuntime(); var _default = default_1 = VisibilityOff.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); @@ -64872,10 +64878,10 @@ function BasicEntitySliderField(props) { const { spec } = props; const basicEntityAutocompleteField = BasicEntitySliderFieldSpecShape(spec); const { control, field, getValues, errors } = basicEntityAutocompleteField; - const val = getValues(field.name); + const val = getValues(field.name + "_uival$"); const err = errors[field.name]; const { field: controllerField } = useController({ - name: field.name, + name: field.name + "_uival$", control, defaultValue: val || field.ux.min }); @@ -65660,15 +65666,14 @@ function VxgBasicEntityEditPlugin(options) { function modify_edit_Date(msg) { return __async(this, null, function* () { const out = yield this.prior(msg); - let { item } = out; - item = __spreadValues({}, item); + let item = __spreadValues({}, out); if (!item[field.name + "_orig$"]) { const dt = util$1.dateTimeFromUTC(item[field.name]); item[field.name + "_orig$"] = item[field.name]; item[field.name + "_udm$"] = dt.udm; item[field.name] = dt.localt; } - return __spreadProps(__spreadValues({}, msg), { item }); + return item; }); } ); @@ -65678,15 +65683,14 @@ function VxgBasicEntityEditPlugin(options) { function modify_edit_Time(msg) { return __async(this, null, function* () { const out = yield this.prior(msg); - let { item } = out; - item = __spreadValues({}, item); + let item = __spreadValues({}, out); if (!item[field.name + "_orig$"]) { const dt = util$1.dateTimeFromUTC(item[field.name]); item[field.name + "_orig$"] = item[field.name]; item[field.name + "_udm$"] = dt.udm; item[field.name] = dt.localt; } - return __spreadProps(__spreadValues({}, msg), { item }); + return item; }); } ); @@ -65696,31 +65700,30 @@ function VxgBasicEntityEditPlugin(options) { function modify_edit_Datetime(msg) { return __async(this, null, function* () { const out = yield this.prior(msg); - let { item } = out; - item = __spreadValues({}, item); + console.log("out", out); + let item = __spreadValues({}, out); if (!item[field.name + "_orig$"]) { const dt = util$1.dateTimeFromUTC(item[field.name]); item[field.name + "_orig$"] = item[field.name]; item[field.name + "_udm$"] = dt.udm; item[field.name] = dt.locald + "T" + dt.localt; } - return __spreadProps(__spreadValues({}, msg), { item }); + return item; }); } ); } else if ("Slider" === field.ux.kind) { seneca.add( - "aim:app,on:BasicLed,modify:edit,view:" + spec.name, + "aim:app,on:BasicLed,modify:edit", + { view: spec.name }, function modify_edit_Slider(msg) { return __async(this, null, function* () { const out = yield this.prior(msg); - let { item } = out; - item = __spreadValues({}, item); - if (!item[field.name + "_orig$"]) { - item[field.name + "_orig$"] = item[field.name]; - item[field.name] = Number(item[field.name]) / 60; + let item = __spreadValues({}, out); + if (!item[field.name + "_uival$"]) { + item[field.name + "_uival$"] = Number(item[field.name]) / 60; } - return __spreadProps(__spreadValues({}, msg), { item }); + return item; }); } ); @@ -65794,6 +65797,7 @@ const makeResolver = (seneca, spec) => useCallback( const { ent, name } = spec; const view = name; let entity = seneca.entity(ent); + console.log("makeResolver", "data", data); entity = entity.make$().data$(data); let errors = entity.valid$({ errors: true }); seneca.act("aim:app,on:BasicLed,entity:valid", { @@ -65847,25 +65851,17 @@ function BasicEntityEdit(props) { let item = useSelector((state) => selectItem(state)); useEffect(() => { const fetchData = () => __async(this, null, function* () { - console.log( - "BasicEntityEdit", - "useEffect", - "modify:edit", - "init", - "view", - name, - "item", - item == null ? void 0 : item.title - ); + console.log("BEE", "effect", "mod:edit", "init", "view", name); + console.log("BEE", "effect", "mod:edit", "init", "item", item == null ? void 0 : item.title); if (item && name) { - const res = yield seneca.direct("aim:app,on:BasicLed,modify:edit", { + item = yield seneca.direct("aim:app,on:BasicLed,modify:edit", { view: name, item, fields }); - item = res.item; + console.log("BEE", "effect", "resetting", item); + reset(item); } - reset(item); }); fetchData(); }, [item, name]); @@ -66079,7 +66075,7 @@ function VxgBasicLedPlugin(options) { let item = msg.item; if (null == item) return item; item = __spreadValues({}, item); - return __spreadProps(__spreadValues({}, msg), { item }); + return item; }).add("aim:app,on:BasicLed,modify:save", function modify_save(msg) { let item = msg.data; let fields = msg.fields; @@ -66089,7 +66085,7 @@ function VxgBasicLedPlugin(options) { if ("Slider" === field.ux.kind) { console.log("VxgBasicLedPlugin", "modify:save", "field", field); console.log("VxgBasicLedPlugin", "modify:save", "item", item); - item[field.name] = Number(item[field.name]) * 60; + item[field.name] = Number(item[field.name + "_uival$"]) * 60; } } console.log("modify:save", "item", item); @@ -66127,7 +66123,7 @@ function VxgBasicLedPlugin(options) { return __async(this, null, function* () { const data = Object.entries(spec.def.edit.field).filter((n) => false !== n[1].ux.edit).reduce((a, n) => (a[n[0]] = msg.data[n[0]], a), {}); const item = yield seneca.entity(entCanon).save$(data); - navigate("/view/" + name); + navigate("/view/" + name + "/edit/" + item.id); }); } ); @@ -66184,8 +66180,20 @@ function BasicLed(props) { head.active && /* @__PURE__ */ jsxRuntimeExports.jsx(BasicLedHead, { ctx, spec: head }), /* @__PURE__ */ jsxRuntimeExports.jsxs(Routes, { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: "/", element: /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityList, { ctx, spec: list }) }), - /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: "/edit/:item", element: /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityEdit, { ctx, spec: edit }) }), - /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: "/add", element: /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityEdit, { ctx, spec: edit }) }) + /* @__PURE__ */ jsxRuntimeExports.jsx( + Route, + { + path: "/edit/:item", + element: /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityEdit, { ctx, spec: edit }) + } + ), + /* @__PURE__ */ jsxRuntimeExports.jsx( + Route, + { + path: "/add", + element: /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityEdit, { ctx, spec: edit }) + } + ) ] }), foot.active && /* @__PURE__ */ jsxRuntimeExports.jsx(BasicLedFoot, { ctx, spec: foot }) ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(BasicLoading, {}); diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index be8768e..cb0c7da 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -1042,15 +1042,21 @@ var __async = (__this, __arguments, generator) => { } return reactJsxRuntime_development; } - var jsxRuntime = jsxRuntime$2.exports; - "use strict"; - if (process.env.NODE_ENV === "production") { - jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); - } else { - jsxRuntime$2.exports = requireReactJsxRuntime_development(); + var jsxRuntime$1 = jsxRuntime$2.exports; + var hasRequiredJsxRuntime; + function requireJsxRuntime() { + if (hasRequiredJsxRuntime) return jsxRuntime$2.exports; + hasRequiredJsxRuntime = 1; + "use strict"; + if (process.env.NODE_ENV === "production") { + jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); + } else { + jsxRuntime$2.exports = requireReactJsxRuntime_development(); + } + return jsxRuntime$2.exports; } - var jsxRuntimeExports = jsxRuntime$2.exports; - const jsxRuntime$1 = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); + var jsxRuntimeExports = requireJsxRuntime(); + const jsxRuntime = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); var gubu_min$2 = { exports: {} }; var gubu_min = gubu_min$2.exports; (function(module2, exports3) { @@ -25317,7 +25323,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$x = ArrowDownward.default = void 0; var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); - var _jsxRuntime$x = jsxRuntimeExports; + var _jsxRuntime$x = requireJsxRuntime(); var _default$x = default_1$x = ArrowDownward.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); @@ -25330,7 +25336,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$w = ArrowRight.default = void 0; var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); - var _jsxRuntime$w = jsxRuntimeExports; + var _jsxRuntime$w = requireJsxRuntime(); var _default$w = default_1$w = ArrowRight.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); @@ -25343,7 +25349,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$v = Cancel.default = void 0; var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); - var _jsxRuntime$v = jsxRuntimeExports; + var _jsxRuntime$v = requireJsxRuntime(); var _default$v = default_1$v = Cancel.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); @@ -25356,7 +25362,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$u = ChevronLeft.default = void 0; var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); - var _jsxRuntime$u = jsxRuntimeExports; + var _jsxRuntime$u = requireJsxRuntime(); var _default$u = default_1$u = ChevronLeft.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); @@ -25369,7 +25375,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$t = ChevronRight.default = void 0; var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); - var _jsxRuntime$t = jsxRuntimeExports; + var _jsxRuntime$t = requireJsxRuntime(); var _default$t = default_1$t = ChevronRight.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); @@ -25382,7 +25388,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$s = ClearAll.default = void 0; var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); - var _jsxRuntime$s = jsxRuntimeExports; + var _jsxRuntime$s = requireJsxRuntime(); var _default$s = default_1$s = ClearAll.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); @@ -25395,7 +25401,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$r = Close.default = void 0; var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); - var _jsxRuntime$r = jsxRuntimeExports; + var _jsxRuntime$r = requireJsxRuntime(); var _default$r = default_1$r = Close.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); @@ -25408,7 +25414,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$q = ContentCopy.default = void 0; var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); - var _jsxRuntime$q = jsxRuntimeExports; + var _jsxRuntime$q = requireJsxRuntime(); var _default$q = default_1$q = ContentCopy.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); @@ -25421,7 +25427,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$p = DensityLarge.default = void 0; var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); - var _jsxRuntime$p = jsxRuntimeExports; + var _jsxRuntime$p = requireJsxRuntime(); var _default$p = default_1$p = DensityLarge.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); @@ -25434,7 +25440,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$o = DensityMedium.default = void 0; var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); - var _jsxRuntime$o = jsxRuntimeExports; + var _jsxRuntime$o = requireJsxRuntime(); var _default$o = default_1$o = DensityMedium.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); @@ -25447,7 +25453,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$n = DensitySmall.default = void 0; var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); - var _jsxRuntime$n = jsxRuntimeExports; + var _jsxRuntime$n = requireJsxRuntime(); var _default$n = default_1$n = DensitySmall.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); @@ -25460,7 +25466,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$m = DragHandle.default = void 0; var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); - var _jsxRuntime$m = jsxRuntimeExports; + var _jsxRuntime$m = requireJsxRuntime(); var _default$m = default_1$m = DragHandle.default = (0, _createSvgIcon$m.default)(/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); @@ -25473,7 +25479,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$l = DynamicFeed.default = void 0; var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); - var _jsxRuntime$l = jsxRuntimeExports; + var _jsxRuntime$l = requireJsxRuntime(); var _default$l = default_1$l = DynamicFeed.default = (0, _createSvgIcon$l.default)([/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { @@ -25488,7 +25494,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$k = Edit.default = void 0; var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); - var _jsxRuntime$k = jsxRuntimeExports; + var _jsxRuntime$k = requireJsxRuntime(); var _default$k = default_1$k = Edit.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); @@ -25501,7 +25507,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$j = ExpandMore.default = void 0; var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); - var _jsxRuntime$j = jsxRuntimeExports; + var _jsxRuntime$j = requireJsxRuntime(); var _default$j = default_1$j = ExpandMore.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); @@ -25514,7 +25520,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$i = FilterAlt.default = void 0; var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); - var _jsxRuntime$i = jsxRuntimeExports; + var _jsxRuntime$i = requireJsxRuntime(); var _default$i = default_1$i = FilterAlt.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); @@ -25527,7 +25533,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$h = FilterList.default = void 0; var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); - var _jsxRuntime$h = jsxRuntimeExports; + var _jsxRuntime$h = requireJsxRuntime(); var _default$h = default_1$h = FilterList.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); @@ -25540,7 +25546,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$g = FilterListOff.default = void 0; var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); - var _jsxRuntime$g = jsxRuntimeExports; + var _jsxRuntime$g = requireJsxRuntime(); var _default$g = default_1$g = FilterListOff.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); @@ -25553,7 +25559,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$f = FirstPage.default = void 0; var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); - var _jsxRuntime$f = jsxRuntimeExports; + var _jsxRuntime$f = requireJsxRuntime(); var _default$f = default_1$f = FirstPage.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); @@ -25566,7 +25572,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$e = Fullscreen.default = void 0; var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); - var _jsxRuntime$e = jsxRuntimeExports; + var _jsxRuntime$e = requireJsxRuntime(); var _default$e = default_1$e = Fullscreen.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); @@ -25579,7 +25585,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$d = FullscreenExit.default = void 0; var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); - var _jsxRuntime$d = jsxRuntimeExports; + var _jsxRuntime$d = requireJsxRuntime(); var _default$d = default_1$d = FullscreenExit.default = (0, _createSvgIcon$d.default)(/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); @@ -25592,7 +25598,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$c = KeyboardDoubleArrowDown.default = void 0; var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); - var _jsxRuntime$c = jsxRuntimeExports; + var _jsxRuntime$c = requireJsxRuntime(); var _default$c = default_1$c = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$c.default)([/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { @@ -25607,7 +25613,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$b = LastPage.default = void 0; var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); - var _jsxRuntime$b = jsxRuntimeExports; + var _jsxRuntime$b = requireJsxRuntime(); var _default$b = default_1$b = LastPage.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); @@ -25620,7 +25626,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$a = MoreHoriz.default = void 0; var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); - var _jsxRuntime$a = jsxRuntimeExports; + var _jsxRuntime$a = requireJsxRuntime(); var _default$a = default_1$a = MoreHoriz.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); @@ -25633,7 +25639,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$9 = MoreVert.default = void 0; var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); - var _jsxRuntime$9 = jsxRuntimeExports; + var _jsxRuntime$9 = requireJsxRuntime(); var _default$9 = default_1$9 = MoreVert.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); @@ -25646,7 +25652,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$8 = PushPin.default = void 0; var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); - var _jsxRuntime$8 = jsxRuntimeExports; + var _jsxRuntime$8 = requireJsxRuntime(); var _default$8 = default_1$8 = PushPin.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" @@ -25660,7 +25666,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$7 = RestartAlt.default = void 0; var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); - var _jsxRuntime$7 = jsxRuntimeExports; + var _jsxRuntime$7 = requireJsxRuntime(); var _default$7 = default_1$7 = RestartAlt.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); @@ -25673,7 +25679,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$6 = Save.default = void 0; var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); - var _jsxRuntime$6 = jsxRuntimeExports; + var _jsxRuntime$6 = requireJsxRuntime(); var _default$6 = default_1$6 = Save.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); @@ -25686,7 +25692,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$5 = Search.default = void 0; var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); - var _jsxRuntime$5 = jsxRuntimeExports; + var _jsxRuntime$5 = requireJsxRuntime(); var _default$5 = default_1$5 = Search.default = (0, _createSvgIcon$5.default)(/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); @@ -25699,7 +25705,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$4 = SearchOff.default = void 0; var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); - var _jsxRuntime$4 = jsxRuntimeExports; + var _jsxRuntime$4 = requireJsxRuntime(); var _default$4 = default_1$4 = SearchOff.default = (0, _createSvgIcon$4.default)([/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { @@ -25714,7 +25720,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$3 = Sort.default = void 0; var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); - var _jsxRuntime$3 = jsxRuntimeExports; + var _jsxRuntime$3 = requireJsxRuntime(); var _default$3 = default_1$3 = Sort.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); @@ -25727,7 +25733,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$2 = SyncAlt.default = void 0; var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); - var _jsxRuntime$2 = jsxRuntimeExports; + var _jsxRuntime$2 = requireJsxRuntime(); var _default$2 = default_1$2 = SyncAlt.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); @@ -25740,7 +25746,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$1 = ViewColumn.default = void 0; var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); - var _jsxRuntime$1 = jsxRuntimeExports; + var _jsxRuntime$1 = requireJsxRuntime(); var _default$1 = default_1$1 = ViewColumn.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); @@ -25753,7 +25759,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1 = VisibilityOff.default = void 0; var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); - var _jsxRuntime = jsxRuntimeExports; + var _jsxRuntime = requireJsxRuntime(); var _default = default_1 = VisibilityOff.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); @@ -64884,10 +64890,10 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const { spec } = props; const basicEntityAutocompleteField = BasicEntitySliderFieldSpecShape(spec); const { control, field, getValues, errors } = basicEntityAutocompleteField; - const val = getValues(field.name); + const val = getValues(field.name + "_uival$"); const err = errors[field.name]; const { field: controllerField } = useController({ - name: field.name, + name: field.name + "_uival$", control, defaultValue: val || field.ux.min }); @@ -65672,15 +65678,14 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha function modify_edit_Date(msg) { return __async(this, null, function* () { const out = yield this.prior(msg); - let { item } = out; - item = __spreadValues({}, item); + let item = __spreadValues({}, out); if (!item[field.name + "_orig$"]) { const dt = util$1.dateTimeFromUTC(item[field.name]); item[field.name + "_orig$"] = item[field.name]; item[field.name + "_udm$"] = dt.udm; item[field.name] = dt.localt; } - return __spreadProps(__spreadValues({}, msg), { item }); + return item; }); } ); @@ -65690,15 +65695,14 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha function modify_edit_Time(msg) { return __async(this, null, function* () { const out = yield this.prior(msg); - let { item } = out; - item = __spreadValues({}, item); + let item = __spreadValues({}, out); if (!item[field.name + "_orig$"]) { const dt = util$1.dateTimeFromUTC(item[field.name]); item[field.name + "_orig$"] = item[field.name]; item[field.name + "_udm$"] = dt.udm; item[field.name] = dt.localt; } - return __spreadProps(__spreadValues({}, msg), { item }); + return item; }); } ); @@ -65708,31 +65712,30 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha function modify_edit_Datetime(msg) { return __async(this, null, function* () { const out = yield this.prior(msg); - let { item } = out; - item = __spreadValues({}, item); + console.log("out", out); + let item = __spreadValues({}, out); if (!item[field.name + "_orig$"]) { const dt = util$1.dateTimeFromUTC(item[field.name]); item[field.name + "_orig$"] = item[field.name]; item[field.name + "_udm$"] = dt.udm; item[field.name] = dt.locald + "T" + dt.localt; } - return __spreadProps(__spreadValues({}, msg), { item }); + return item; }); } ); } else if ("Slider" === field.ux.kind) { seneca.add( - "aim:app,on:BasicLed,modify:edit,view:" + spec.name, + "aim:app,on:BasicLed,modify:edit", + { view: spec.name }, function modify_edit_Slider(msg) { return __async(this, null, function* () { const out = yield this.prior(msg); - let { item } = out; - item = __spreadValues({}, item); - if (!item[field.name + "_orig$"]) { - item[field.name + "_orig$"] = item[field.name]; - item[field.name] = Number(item[field.name]) / 60; + let item = __spreadValues({}, out); + if (!item[field.name + "_uival$"]) { + item[field.name + "_uival$"] = Number(item[field.name]) / 60; } - return __spreadProps(__spreadValues({}, msg), { item }); + return item; }); } ); @@ -65806,6 +65809,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const { ent, name } = spec; const view = name; let entity = seneca.entity(ent); + console.log("makeResolver", "data", data); entity = entity.make$().data$(data); let errors = entity.valid$({ errors: true }); seneca.act("aim:app,on:BasicLed,entity:valid", { @@ -65859,25 +65863,17 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha let item = reactRedux.useSelector((state) => selectItem(state)); React$1.useEffect(() => { const fetchData = () => __async(this, null, function* () { - console.log( - "BasicEntityEdit", - "useEffect", - "modify:edit", - "init", - "view", - name, - "item", - item == null ? void 0 : item.title - ); + console.log("BEE", "effect", "mod:edit", "init", "view", name); + console.log("BEE", "effect", "mod:edit", "init", "item", item == null ? void 0 : item.title); if (item && name) { - const res = yield seneca.direct("aim:app,on:BasicLed,modify:edit", { + item = yield seneca.direct("aim:app,on:BasicLed,modify:edit", { view: name, item, fields }); - item = res.item; + console.log("BEE", "effect", "resetting", item); + reset(item); } - reset(item); }); fetchData(); }, [item, name]); @@ -66091,7 +66087,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha let item = msg.item; if (null == item) return item; item = __spreadValues({}, item); - return __spreadProps(__spreadValues({}, msg), { item }); + return item; }).add("aim:app,on:BasicLed,modify:save", function modify_save(msg) { let item = msg.data; let fields = msg.fields; @@ -66101,7 +66097,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha if ("Slider" === field.ux.kind) { console.log("VxgBasicLedPlugin", "modify:save", "field", field); console.log("VxgBasicLedPlugin", "modify:save", "item", item); - item[field.name] = Number(item[field.name]) * 60; + item[field.name] = Number(item[field.name + "_uival$"]) * 60; } } console.log("modify:save", "item", item); @@ -66139,7 +66135,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha return __async(this, null, function* () { const data = Object.entries(spec.def.edit.field).filter((n) => false !== n[1].ux.edit).reduce((a, n) => (a[n[0]] = msg.data[n[0]], a), {}); const item = yield seneca.entity(entCanon).save$(data); - navigate("/view/" + name); + navigate("/view/" + name + "/edit/" + item.id); }); } ); @@ -66196,8 +66192,20 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha head.active && /* @__PURE__ */ jsxRuntimeExports.jsx(BasicLedHead, { ctx, spec: head }), /* @__PURE__ */ jsxRuntimeExports.jsxs(reactRouterDom.Routes, { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx(reactRouterDom.Route, { path: "/", element: /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityList, { ctx, spec: list }) }), - /* @__PURE__ */ jsxRuntimeExports.jsx(reactRouterDom.Route, { path: "/edit/:item", element: /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityEdit, { ctx, spec: edit }) }), - /* @__PURE__ */ jsxRuntimeExports.jsx(reactRouterDom.Route, { path: "/add", element: /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityEdit, { ctx, spec: edit }) }) + /* @__PURE__ */ jsxRuntimeExports.jsx( + reactRouterDom.Route, + { + path: "/edit/:item", + element: /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityEdit, { ctx, spec: edit }) + } + ), + /* @__PURE__ */ jsxRuntimeExports.jsx( + reactRouterDom.Route, + { + path: "/add", + element: /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityEdit, { ctx, spec: edit }) + } + ) ] }), foot.active && /* @__PURE__ */ jsxRuntimeExports.jsx(BasicLedFoot, { ctx, spec: foot }) ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(BasicLoading, {}); diff --git a/src/lib/BasicEntityEdit.tsx b/src/lib/BasicEntityEdit.tsx index 7a86927..003a981 100644 --- a/src/lib/BasicEntityEdit.tsx +++ b/src/lib/BasicEntityEdit.tsx @@ -116,28 +116,18 @@ function BasicEntityEdit (props: any) { useEffect(() => { const fetchData = async () => { - console.log( - 'BasicEntityEdit', - 'useEffect', - 'modify:edit', - 'init', - 'view', - name, - 'item', - item?.title - ) + console.log('BEE', 'effect', 'mod:edit', 'init', 'view', name) + console.log('BEE', 'effect', 'mod:edit', 'init', 'item', item?.title) if (item && name) { - // console.log('BasicEntityEdit', 'useEffect', 'modify:edit', 'init') - const res = await seneca.direct('aim:app,on:BasicLed,modify:edit', { + // console.log('BEE', 'effect', 'modify:edit', 'init') + item = await seneca.direct('aim:app,on:BasicLed,modify:edit', { view: name, item, fields, }) - item = res.item - // console.log('BasicEntityEdit', 'useEffect', 'modify:edit', 'got-item') - // console.log('BasicEntityEdit', 'useEffect', 'resetting') + console.log('BEE', 'effect', 'resetting', item) + reset(item) } - reset(item) } fetchData() diff --git a/src/lib/BasicLed.tsx b/src/lib/BasicLed.tsx index 189c079..d6eaeac 100644 --- a/src/lib/BasicLed.tsx +++ b/src/lib/BasicLed.tsx @@ -5,7 +5,6 @@ import { Box } from '@mui/material' import { Gubu } from 'gubu' - import type { BasicProps, Spec } from './basic-types' import { BasicEntityList } from './BasicEntityList' @@ -16,50 +15,54 @@ import { BasicLoading } from './BasicLoading' import { VxgBasicLedPlugin } from './VxgBasicLedPlugin' - const CMPNAME = 'BasicLed' - // BasicLed renders a list of entities (with BasicList) or a form to edit them (with BasicEdit) function BasicLed (props: any) { const { ctx } = props const { seneca } = ctx() const name = props.spec.name + // TODO: const cid = seneca.util.nid() - + // tag = props.spec.name + const navigate = useNavigate() - - const led = useSelector((state:any)=>state.main.view[name]) + + const led = useSelector((state: any) => state.main.view[name]) const ready = true === led?.ready - - if(!ready) { + + if (!ready) { seneca.use({ tag: name, define: VxgBasicLedPlugin, - options:{ + options: { spec: props.spec, navigate, - } + }, }) } - const { head, list, edit, foot } = seneca.export('VxgBasicLedPlugin$'+name+'/spec') || {} + const { head, list, edit, foot } = + seneca.export('VxgBasicLedPlugin$' + name + '/spec') || {} - return ( - ready ? - - { head.active && } + return ready ? ( + + {head.active && } - } /> - } /> - } /> + } /> + } + /> + } + /> - { foot.active && } + {foot.active && } - : - + ) : ( + ) } -export { - BasicLed -} +export { BasicLed } diff --git a/src/lib/VxgBasicEntityEditPlugin.ts b/src/lib/VxgBasicEntityEditPlugin.ts index 317b87f..2e303f5 100644 --- a/src/lib/VxgBasicEntityEditPlugin.ts +++ b/src/lib/VxgBasicEntityEditPlugin.ts @@ -36,9 +36,7 @@ function VxgBasicEntityEditPlugin (this: any, options: any) { async function modify_edit_Date (this: any, msg: any) { const out = await this.prior(msg) - let { item } = out - - item = { ...item } + let item = { ...out } if (!item[field.name + '_orig$']) { const dt = util.dateTimeFromUTC(item[field.name]) @@ -47,7 +45,7 @@ function VxgBasicEntityEditPlugin (this: any, options: any) { item[field.name] = dt.localt } - return { ...msg, item } + return item } ) } else if ('Time' === field.ux.kind) { @@ -56,9 +54,7 @@ function VxgBasicEntityEditPlugin (this: any, options: any) { async function modify_edit_Time (this: any, msg: any) { const out = await this.prior(msg) - let { item } = out - - item = { ...item } + let item = { ...out } if (!item[field.name + '_orig$']) { const dt = util.dateTimeFromUTC(item[field.name]) @@ -67,7 +63,7 @@ function VxgBasicEntityEditPlugin (this: any, options: any) { item[field.name] = dt.localt } - return { ...msg, item } + return item } ) } else if ('DateTime' === field.ux.kind) { @@ -76,9 +72,7 @@ function VxgBasicEntityEditPlugin (this: any, options: any) { async function modify_edit_Datetime (this: any, msg: any) { const out = await this.prior(msg) - let { item } = out - - item = { ...item } + let item = { ...out } if (!item[field.name + '_orig$']) { const dt = util.dateTimeFromUTC(item[field.name]) @@ -87,26 +81,26 @@ function VxgBasicEntityEditPlugin (this: any, options: any) { item[field.name] = dt.locald + 'T' + dt.localt } - return { ...msg, item } + return item } ) } else if ('Slider' === field.ux.kind) { // console.log('VxgBasicEntityEditPlugin', 'Slider') seneca.add( - 'aim:app,on:BasicLed,modify:edit,view:' + spec.name, + 'aim:app,on:BasicLed,modify:edit', + { view: spec.name }, async function modify_edit_Slider (this: any, msg: any) { const out = await this.prior(msg) - let { item } = out - - item = { ...item } + let item = { ...out } if (!item[field.name + '_orig$']) { item[field.name + '_orig$'] = item[field.name] item[field.name] = Number(item[field.name]) / 60 } - return { ...msg, item } + // return { ...msg, item } + return item } ) } diff --git a/src/lib/VxgBasicLedPlugin.ts b/src/lib/VxgBasicLedPlugin.ts index e20ce32..ad8820d 100644 --- a/src/lib/VxgBasicLedPlugin.ts +++ b/src/lib/VxgBasicLedPlugin.ts @@ -98,7 +98,7 @@ function VxgBasicLedPlugin (this: any, options: any) { item = { ...item } - return { ...msg, item } + return item }) .add('aim:app,on:BasicLed,modify:save', function modify_save (msg: any) { @@ -112,8 +112,8 @@ function VxgBasicLedPlugin (this: any, options: any) { // This code does not belong here for (const field of fields) { if ('Slider' === field.ux.kind) { - console.log('VxgBasicLedPlugin', 'modify:save', 'field', field) - console.log('VxgBasicLedPlugin', 'modify:save', 'item', item) + // console.log('VxgBasicLedPlugin', 'modify:save', 'field', field) + // console.log('VxgBasicLedPlugin', 'modify:save', 'item', item) item[field.name] = Number(item[field.name]) * 60 } } @@ -160,9 +160,7 @@ function VxgBasicLedPlugin (this: any, options: any) { .reduce((a: any, n: any[]) => ((a[n[0]] = msg.data[n[0]]), a), {}) const item = await seneca.entity(entCanon).save$(data) - // TODO: navigate to edit view - // navigate('/view/' + name + '/edit/' + item.id) - navigate('/view/' + name) + navigate('/view/' + name + '/edit/' + item.id) } ) From 388b3f9e5a85be71960a7b83c7f924fc0ec4b3a3 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Fri, 2 Aug 2024 16:36:03 +0100 Subject: [PATCH 102/122] Move modify:save to VxgBasicEntityEditPlugin --- dist/VxgBasicEntityEditPlugin.d.ts | 2 + dist/voxgig-model-react.es.js | 123 ++++++++++++--- dist/voxgig-model-react.umd.js | 123 ++++++++++++--- src/lib/BasicEntityEdit.tsx | 17 ++- src/lib/VxgBasicEntityEditPlugin.ts | 229 +++++++++++++++++++++------- src/lib/VxgBasicLedPlugin.ts | 12 -- 6 files changed, 382 insertions(+), 124 deletions(-) diff --git a/dist/VxgBasicEntityEditPlugin.d.ts b/dist/VxgBasicEntityEditPlugin.d.ts index 77d9312..1c29b3f 100644 --- a/dist/VxgBasicEntityEditPlugin.d.ts +++ b/dist/VxgBasicEntityEditPlugin.d.ts @@ -7,6 +7,8 @@ declare function VxgBasicEntityEditPlugin(this: any, options: any): { }; util: { dateTimeFromUTC: (utc: number, tz?: string) => any; + localTimeToUTC: (timeString: string, tz?: string) => number; + localDateTimeToUTC: (dateOrDateTimeString: string, tz?: string) => number; }; }; }; diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index e05345f..f9e15f3 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -64878,10 +64878,10 @@ function BasicEntitySliderField(props) { const { spec } = props; const basicEntityAutocompleteField = BasicEntitySliderFieldSpecShape(spec); const { control, field, getValues, errors } = basicEntityAutocompleteField; - const val = getValues(field.name + "_uival$"); + const val = getValues(field.name); const err = errors[field.name]; const { field: controllerField } = useController({ - name: field.name + "_uival$", + name: field.name, control, defaultValue: val || field.ux.min }); @@ -65671,11 +65671,24 @@ function VxgBasicEntityEditPlugin(options) { const dt = util$1.dateTimeFromUTC(item[field.name]); item[field.name + "_orig$"] = item[field.name]; item[field.name + "_udm$"] = dt.udm; - item[field.name] = dt.localt; + item[field.name] = dt.locald; + console.log("modify_edit_Date", item[field.name]); } return item; }); } + ).add( + "aim:app,on:BasicLed,modify:save", + { view: spec.name }, + function modify_save_Date(msg) { + return __async(this, null, function* () { + const out = yield this.prior(msg); + let item = __spreadValues({}, out); + const dt = util$1.localDateTimeToUTC(item[field.name]); + item[field.name] = dt; + return item; + }); + } ); } else if ("Time" === field.ux.kind) { seneca.add( @@ -65689,10 +65702,23 @@ function VxgBasicEntityEditPlugin(options) { item[field.name + "_orig$"] = item[field.name]; item[field.name + "_udm$"] = dt.udm; item[field.name] = dt.localt; + console.log("modify_edit_Time", item[field.name]); } return item; }); } + ).add( + "aim:app,on:BasicLed,modify:save", + { view: spec.name }, + function modify_save_Time(msg) { + return __async(this, null, function* () { + const out = yield this.prior(msg); + let item = __spreadValues({}, out); + const dt = util$1.localTimeToUTC(item[field.name]); + item[field.name] = dt; + return item; + }); + } ); } else if ("DateTime" === field.ux.kind) { seneca.add( @@ -65700,7 +65726,6 @@ function VxgBasicEntityEditPlugin(options) { function modify_edit_Datetime(msg) { return __async(this, null, function* () { const out = yield this.prior(msg); - console.log("out", out); let item = __spreadValues({}, out); if (!item[field.name + "_orig$"]) { const dt = util$1.dateTimeFromUTC(item[field.name]); @@ -65711,6 +65736,18 @@ function VxgBasicEntityEditPlugin(options) { return item; }); } + ).add( + "aim:app,on:BasicLed,modify:save", + { view: spec.name }, + function modify_save_Datetime(msg) { + return __async(this, null, function* () { + const out = yield this.prior(msg); + let item = __spreadValues({}, out); + const dt = util$1.localDateTimeToUTC(item[field.name]); + item[field.name] = dt; + return item; + }); + } ); } else if ("Slider" === field.ux.kind) { seneca.add( @@ -65720,12 +65757,24 @@ function VxgBasicEntityEditPlugin(options) { return __async(this, null, function* () { const out = yield this.prior(msg); let item = __spreadValues({}, out); - if (!item[field.name + "_uival$"]) { - item[field.name + "_uival$"] = Number(item[field.name]) / 60; + if (!item[field.name + "_orig$"]) { + item[field.name + "_orig$"] = item[field.name]; + item[field.name] = Number(item[field.name]) / 60; } return item; }); } + ).add( + "aim:app,on:BasicLed,modify:save", + { view: spec.name }, + function modify_save_Slider(msg) { + return __async(this, null, function* () { + const out = yield this.prior(msg); + let item = __spreadValues({}, out); + item[field.name] = Number(item[field.name]) * 60; + return item; + }); + } ); } } @@ -65780,6 +65829,41 @@ const util$1 = { out.locald = `${year}-${month}-${day}`; out.localt = `${hour}:${minute}:${second}`; return out; + }, + localTimeToUTC: (timeString, tz) => { + tz = tz || Intl.DateTimeFormat().resolvedOptions().timeZone; + const now = /* @__PURE__ */ new Date(); + const [hours, minutes, seconds] = timeString.split(":").map(Number); + const localDate = new Date( + now.getFullYear(), + now.getMonth(), + now.getDate(), + hours, + minutes, + seconds + ); + const utcTimestamp = Date.UTC( + localDate.getFullYear(), + localDate.getMonth(), + localDate.getDate(), + localDate.getHours(), + localDate.getMinutes(), + localDate.getSeconds() + ); + const tzOffset = new Date(utcTimestamp).getTimezoneOffset() * 6e4; + return utcTimestamp - tzOffset; + }, + localDateTimeToUTC: (dateOrDateTimeString, tz) => { + const date = new Date(dateOrDateTimeString); + if (isNaN(date.getTime())) { + throw new Error("Invalid date or datetime string"); + } + if (tz) { + const tzDate = new Date(date.toLocaleString("en-GB", { timeZone: tz })); + const offset2 = date.getTime() - tzDate.getTime(); + return date.getTime() + offset2; + } + return date.getTime(); } }; Object.assign(VxgBasicEntityEditPlugin, { @@ -65797,7 +65881,6 @@ const makeResolver = (seneca, spec) => useCallback( const { ent, name } = spec; const view = name; let entity = seneca.entity(ent); - console.log("makeResolver", "data", data); entity = entity.make$().data$(data); let errors = entity.valid$({ errors: true }); seneca.act("aim:app,on:BasicLed,entity:valid", { @@ -65889,18 +65972,21 @@ function BasicEntityEdit(props) { mode: "onChange", resolver }); - const onSubmit = (data) => { + const onSubmit = (data) => __async(this, null, function* () { console.log("BasicEntityEdit", "onSubmit", "data", data); - const modifiedData = seneca.direct("aim:app,on:BasicLed,modify:save", { - view: name, - data, - fields - }); + const modifiedData = yield seneca.direct( + "aim:app,on:BasicLed,modify:save", + { + view: name, + data, + fields + } + ); seneca.act("aim:app,on:BasicLed,save:item", { view: name, data: modifiedData }); - }; + }); return /* @__PURE__ */ jsxRuntimeExports.jsx(Box$2, { className: "vxg-BasicEntityEdit", children: item ? /* @__PURE__ */ jsxRuntimeExports.jsxs( "form", { @@ -66078,17 +66164,8 @@ function VxgBasicLedPlugin(options) { return item; }).add("aim:app,on:BasicLed,modify:save", function modify_save(msg) { let item = msg.data; - let fields = msg.fields; if (null == item) return item; item = __spreadValues({}, item); - for (const field of fields) { - if ("Slider" === field.ux.kind) { - console.log("VxgBasicLedPlugin", "modify:save", "field", field); - console.log("VxgBasicLedPlugin", "modify:save", "item", item); - item[field.name] = Number(item[field.name + "_uival$"]) * 60; - } - } - console.log("modify:save", "item", item); return item; }).message( "aim:app,on:BasicLed,edit:item,redux$:true", diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index cb0c7da..c524b48 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -64890,10 +64890,10 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const { spec } = props; const basicEntityAutocompleteField = BasicEntitySliderFieldSpecShape(spec); const { control, field, getValues, errors } = basicEntityAutocompleteField; - const val = getValues(field.name + "_uival$"); + const val = getValues(field.name); const err = errors[field.name]; const { field: controllerField } = useController({ - name: field.name + "_uival$", + name: field.name, control, defaultValue: val || field.ux.min }); @@ -65683,11 +65683,24 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const dt = util$1.dateTimeFromUTC(item[field.name]); item[field.name + "_orig$"] = item[field.name]; item[field.name + "_udm$"] = dt.udm; - item[field.name] = dt.localt; + item[field.name] = dt.locald; + console.log("modify_edit_Date", item[field.name]); } return item; }); } + ).add( + "aim:app,on:BasicLed,modify:save", + { view: spec.name }, + function modify_save_Date(msg) { + return __async(this, null, function* () { + const out = yield this.prior(msg); + let item = __spreadValues({}, out); + const dt = util$1.localDateTimeToUTC(item[field.name]); + item[field.name] = dt; + return item; + }); + } ); } else if ("Time" === field.ux.kind) { seneca.add( @@ -65701,10 +65714,23 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha item[field.name + "_orig$"] = item[field.name]; item[field.name + "_udm$"] = dt.udm; item[field.name] = dt.localt; + console.log("modify_edit_Time", item[field.name]); } return item; }); } + ).add( + "aim:app,on:BasicLed,modify:save", + { view: spec.name }, + function modify_save_Time(msg) { + return __async(this, null, function* () { + const out = yield this.prior(msg); + let item = __spreadValues({}, out); + const dt = util$1.localTimeToUTC(item[field.name]); + item[field.name] = dt; + return item; + }); + } ); } else if ("DateTime" === field.ux.kind) { seneca.add( @@ -65712,7 +65738,6 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha function modify_edit_Datetime(msg) { return __async(this, null, function* () { const out = yield this.prior(msg); - console.log("out", out); let item = __spreadValues({}, out); if (!item[field.name + "_orig$"]) { const dt = util$1.dateTimeFromUTC(item[field.name]); @@ -65723,6 +65748,18 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha return item; }); } + ).add( + "aim:app,on:BasicLed,modify:save", + { view: spec.name }, + function modify_save_Datetime(msg) { + return __async(this, null, function* () { + const out = yield this.prior(msg); + let item = __spreadValues({}, out); + const dt = util$1.localDateTimeToUTC(item[field.name]); + item[field.name] = dt; + return item; + }); + } ); } else if ("Slider" === field.ux.kind) { seneca.add( @@ -65732,12 +65769,24 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha return __async(this, null, function* () { const out = yield this.prior(msg); let item = __spreadValues({}, out); - if (!item[field.name + "_uival$"]) { - item[field.name + "_uival$"] = Number(item[field.name]) / 60; + if (!item[field.name + "_orig$"]) { + item[field.name + "_orig$"] = item[field.name]; + item[field.name] = Number(item[field.name]) / 60; } return item; }); } + ).add( + "aim:app,on:BasicLed,modify:save", + { view: spec.name }, + function modify_save_Slider(msg) { + return __async(this, null, function* () { + const out = yield this.prior(msg); + let item = __spreadValues({}, out); + item[field.name] = Number(item[field.name]) * 60; + return item; + }); + } ); } } @@ -65792,6 +65841,41 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha out.locald = `${year}-${month}-${day}`; out.localt = `${hour}:${minute}:${second}`; return out; + }, + localTimeToUTC: (timeString, tz) => { + tz = tz || Intl.DateTimeFormat().resolvedOptions().timeZone; + const now = /* @__PURE__ */ new Date(); + const [hours, minutes, seconds] = timeString.split(":").map(Number); + const localDate = new Date( + now.getFullYear(), + now.getMonth(), + now.getDate(), + hours, + minutes, + seconds + ); + const utcTimestamp = Date.UTC( + localDate.getFullYear(), + localDate.getMonth(), + localDate.getDate(), + localDate.getHours(), + localDate.getMinutes(), + localDate.getSeconds() + ); + const tzOffset = new Date(utcTimestamp).getTimezoneOffset() * 6e4; + return utcTimestamp - tzOffset; + }, + localDateTimeToUTC: (dateOrDateTimeString, tz) => { + const date = new Date(dateOrDateTimeString); + if (isNaN(date.getTime())) { + throw new Error("Invalid date or datetime string"); + } + if (tz) { + const tzDate = new Date(date.toLocaleString("en-GB", { timeZone: tz })); + const offset2 = date.getTime() - tzDate.getTime(); + return date.getTime() + offset2; + } + return date.getTime(); } }; Object.assign(VxgBasicEntityEditPlugin, { @@ -65809,7 +65893,6 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const { ent, name } = spec; const view = name; let entity = seneca.entity(ent); - console.log("makeResolver", "data", data); entity = entity.make$().data$(data); let errors = entity.valid$({ errors: true }); seneca.act("aim:app,on:BasicLed,entity:valid", { @@ -65901,18 +65984,21 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha mode: "onChange", resolver }); - const onSubmit = (data) => { + const onSubmit = (data) => __async(this, null, function* () { console.log("BasicEntityEdit", "onSubmit", "data", data); - const modifiedData = seneca.direct("aim:app,on:BasicLed,modify:save", { - view: name, - data, - fields - }); + const modifiedData = yield seneca.direct( + "aim:app,on:BasicLed,modify:save", + { + view: name, + data, + fields + } + ); seneca.act("aim:app,on:BasicLed,save:item", { view: name, data: modifiedData }); - }; + }); return /* @__PURE__ */ jsxRuntimeExports.jsx(material.Box, { className: "vxg-BasicEntityEdit", children: item ? /* @__PURE__ */ jsxRuntimeExports.jsxs( "form", { @@ -66090,17 +66176,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha return item; }).add("aim:app,on:BasicLed,modify:save", function modify_save(msg) { let item = msg.data; - let fields = msg.fields; if (null == item) return item; item = __spreadValues({}, item); - for (const field of fields) { - if ("Slider" === field.ux.kind) { - console.log("VxgBasicLedPlugin", "modify:save", "field", field); - console.log("VxgBasicLedPlugin", "modify:save", "item", item); - item[field.name] = Number(item[field.name + "_uival$"]) * 60; - } - } - console.log("modify:save", "item", item); return item; }).message( "aim:app,on:BasicLed,edit:item,redux$:true", diff --git a/src/lib/BasicEntityEdit.tsx b/src/lib/BasicEntityEdit.tsx index 003a981..a435d15 100644 --- a/src/lib/BasicEntityEdit.tsx +++ b/src/lib/BasicEntityEdit.tsx @@ -163,14 +163,17 @@ function BasicEntityEdit (props: any) { resolver, }) - const onSubmit = (data: any) => { + const onSubmit = async (data: any) => { console.log('BasicEntityEdit', 'onSubmit', 'data', data) - const modifiedData = seneca.direct('aim:app,on:BasicLed,modify:save', { - view: name, - data, - fields, - }) - // console.log('BasicEntityEdit', 'onSubmit', 'formItem', formItem) + const modifiedData = await seneca.direct( + 'aim:app,on:BasicLed,modify:save', + { + view: name, + data, + fields, + } + ) + // console.log('BasicEntityEdit', 'onSubmit', 'modifiedData', modifiedData) seneca.act('aim:app,on:BasicLed,save:item', { view: name, data: modifiedData, diff --git a/src/lib/VxgBasicEntityEditPlugin.ts b/src/lib/VxgBasicEntityEditPlugin.ts index 2e303f5..200d64f 100644 --- a/src/lib/VxgBasicEntityEditPlugin.ts +++ b/src/lib/VxgBasicEntityEditPlugin.ts @@ -31,78 +31,143 @@ function VxgBasicEntityEditPlugin (this: any, options: any) { for (const field of fields) { if ('Date' === field.ux.kind) { - seneca.add( - 'aim:app,on:BasicLed,modify:edit,view:' + spec.name, - async function modify_edit_Date (this: any, msg: any) { - const out = await this.prior(msg) - - let item = { ...out } - - if (!item[field.name + '_orig$']) { - const dt = util.dateTimeFromUTC(item[field.name]) - item[field.name + '_orig$'] = item[field.name] - item[field.name + '_udm$'] = dt.udm - item[field.name] = dt.localt + seneca + .add( + 'aim:app,on:BasicLed,modify:edit,view:' + spec.name, + async function modify_edit_Date (this: any, msg: any) { + const out = await this.prior(msg) + + let item = { ...out } + + if (!item[field.name + '_orig$']) { + const dt = util.dateTimeFromUTC(item[field.name]) + item[field.name + '_orig$'] = item[field.name] + item[field.name + '_udm$'] = dt.udm + item[field.name] = dt.locald + console.log('modify_edit_Date', item[field.name]) + } + + return item } + ) - return item - } - ) + .add( + 'aim:app,on:BasicLed,modify:save', + { view: spec.name }, + async function modify_save_Date (this: any, msg: any) { + const out = await this.prior(msg) + + let item = { ...out } + + const dt = util.localDateTimeToUTC(item[field.name]) + item[field.name] = dt + + return item + } + ) } else if ('Time' === field.ux.kind) { - seneca.add( - 'aim:app,on:BasicLed,modify:edit,view:' + spec.name, - async function modify_edit_Time (this: any, msg: any) { - const out = await this.prior(msg) - - let item = { ...out } - - if (!item[field.name + '_orig$']) { - const dt = util.dateTimeFromUTC(item[field.name]) - item[field.name + '_orig$'] = item[field.name] - item[field.name + '_udm$'] = dt.udm - item[field.name] = dt.localt + seneca + .add( + 'aim:app,on:BasicLed,modify:edit,view:' + spec.name, + async function modify_edit_Time (this: any, msg: any) { + const out = await this.prior(msg) + + let item = { ...out } + + if (!item[field.name + '_orig$']) { + const dt = util.dateTimeFromUTC(item[field.name]) + item[field.name + '_orig$'] = item[field.name] + item[field.name + '_udm$'] = dt.udm + item[field.name] = dt.localt + console.log('modify_edit_Time', item[field.name]) + } + + return item } + ) + + .add( + 'aim:app,on:BasicLed,modify:save', + { view: spec.name }, + async function modify_save_Time (this: any, msg: any) { + const out = await this.prior(msg) + + let item = { ...out } - return item - } - ) + const dt = util.localTimeToUTC(item[field.name]) + item[field.name] = dt + + return item + } + ) } else if ('DateTime' === field.ux.kind) { - seneca.add( - 'aim:app,on:BasicLed,modify:edit,view:' + spec.name, - async function modify_edit_Datetime (this: any, msg: any) { - const out = await this.prior(msg) - - let item = { ...out } - - if (!item[field.name + '_orig$']) { - const dt = util.dateTimeFromUTC(item[field.name]) - item[field.name + '_orig$'] = item[field.name] - item[field.name + '_udm$'] = dt.udm - item[field.name] = dt.locald + 'T' + dt.localt + seneca + .add( + 'aim:app,on:BasicLed,modify:edit,view:' + spec.name, + async function modify_edit_Datetime (this: any, msg: any) { + const out = await this.prior(msg) + + let item = { ...out } + + if (!item[field.name + '_orig$']) { + const dt = util.dateTimeFromUTC(item[field.name]) + item[field.name + '_orig$'] = item[field.name] + item[field.name + '_udm$'] = dt.udm + item[field.name] = dt.locald + 'T' + dt.localt + } + + return item } + ) + + .add( + 'aim:app,on:BasicLed,modify:save', + { view: spec.name }, + async function modify_save_Datetime (this: any, msg: any) { + const out = await this.prior(msg) - return item - } - ) + let item = { ...out } + + const dt = util.localDateTimeToUTC(item[field.name]) + item[field.name] = dt + + return item + } + ) } else if ('Slider' === field.ux.kind) { // console.log('VxgBasicEntityEditPlugin', 'Slider') - seneca.add( - 'aim:app,on:BasicLed,modify:edit', - { view: spec.name }, - async function modify_edit_Slider (this: any, msg: any) { - const out = await this.prior(msg) + seneca + .add( + 'aim:app,on:BasicLed,modify:edit', + { view: spec.name }, + async function modify_edit_Slider (this: any, msg: any) { + const out = await this.prior(msg) + + let item = { ...out } + + if (!item[field.name + '_orig$']) { + item[field.name + '_orig$'] = item[field.name] + item[field.name] = Number(item[field.name]) / 60 + } + + // return { ...msg, item } + return item + } + ) - let item = { ...out } + .add( + 'aim:app,on:BasicLed,modify:save', + { view: spec.name }, + async function modify_save_Slider (this: any, msg: any) { + const out = await this.prior(msg) - if (!item[field.name + '_orig$']) { - item[field.name + '_orig$'] = item[field.name] - item[field.name] = Number(item[field.name]) / 60 - } + let item = { ...out } + + item[field.name] = Number(item[field.name]) * 60 - // return { ...msg, item } - return item - } - ) + return item + } + ) } } @@ -175,6 +240,52 @@ const util = { return out }, + localTimeToUTC: (timeString: string, tz?: string) => { + tz = tz || Intl.DateTimeFormat().resolvedOptions().timeZone + const now = new Date() + + const [hours, minutes, seconds] = timeString.split(':').map(Number) + + const localDate = new Date( + now.getFullYear(), + now.getMonth(), + now.getDate(), + hours, + minutes, + seconds + ) + + const utcTimestamp = Date.UTC( + localDate.getFullYear(), + localDate.getMonth(), + localDate.getDate(), + localDate.getHours(), + localDate.getMinutes(), + localDate.getSeconds() + ) + + const tzOffset = new Date(utcTimestamp).getTimezoneOffset() * 60000 + + return utcTimestamp - tzOffset + }, + localDateTimeToUTC: (dateOrDateTimeString: string, tz?: string) => { + const date = new Date(dateOrDateTimeString) + + // Check if the date is valid + if (isNaN(date.getTime())) { + throw new Error('Invalid date or datetime string') + } + + // If a timezone is provided, adjust the date + if (tz) { + const tzDate = new Date(date.toLocaleString('en-GB', { timeZone: tz })) + const offset = date.getTime() - tzDate.getTime() + return date.getTime() + offset + } + + // If no timezone is provided, assume the input is already in local time + return date.getTime() + }, } Object.assign(VxgBasicEntityEditPlugin, { diff --git a/src/lib/VxgBasicLedPlugin.ts b/src/lib/VxgBasicLedPlugin.ts index ad8820d..6c84201 100644 --- a/src/lib/VxgBasicLedPlugin.ts +++ b/src/lib/VxgBasicLedPlugin.ts @@ -103,23 +103,11 @@ function VxgBasicLedPlugin (this: any, options: any) { .add('aim:app,on:BasicLed,modify:save', function modify_save (msg: any) { let item = msg.data - let fields = msg.fields if (null == item) return item item = { ...item } - // This code does not belong here - for (const field of fields) { - if ('Slider' === field.ux.kind) { - // console.log('VxgBasicLedPlugin', 'modify:save', 'field', field) - // console.log('VxgBasicLedPlugin', 'modify:save', 'item', item) - item[field.name] = Number(item[field.name]) * 60 - } - } - - console.log('modify:save', 'item', item) - return item }) From 8a66bc35f819cd583a65a817c8360ab15d0f1afa Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Wed, 7 Aug 2024 19:47:39 +0100 Subject: [PATCH 103/122] Remove unnecessary code --- src/lib/BasicEntityRadioGroupField.tsx | 41 -------------------------- test/BasicEntitySelectField.test.tsx | 6 +++- 2 files changed, 5 insertions(+), 42 deletions(-) diff --git a/src/lib/BasicEntityRadioGroupField.tsx b/src/lib/BasicEntityRadioGroupField.tsx index 213756b..96a2e84 100644 --- a/src/lib/BasicEntityRadioGroupField.tsx +++ b/src/lib/BasicEntityRadioGroupField.tsx @@ -80,47 +80,6 @@ function BasicEntityRadioGroupField (props: any) { ) } -// function BasicEntityRadioGroupField (props: any) { -// const { spec } = props - -// const basicEntityRadioGroupField: Spec = BasicEntityRadioGroupFieldSpecShape(spec) -// const { control, field, errors } = basicEntityRadioGroupField - -// const err = errors[field.name] - -// return ( -// <> -// {field.label} -// ( -// -// {resolveCategories(field.cat).map((option: any) => ( -// } -// label={option.title} -// /> -// ))} -// -// )} -// /> -// -// -// ) -// } - export function resolveCategories (cat: any) { return Object.keys(cat.item).map((key) => ({ title: cat.item?.[key]?.title, diff --git a/test/BasicEntitySelectField.test.tsx b/test/BasicEntitySelectField.test.tsx index 672385f..1d66b56 100644 --- a/test/BasicEntitySelectField.test.tsx +++ b/test/BasicEntitySelectField.test.tsx @@ -1,6 +1,10 @@ import { describe, it, expect, beforeEach } from 'vitest' -import { resolveCategories, resolveDefault, resolveValue } from '../src/lib/BasicEntitySelectField' +import { + resolveCategories, + resolveDefault, + resolveValue, +} from '../src/lib/BasicEntitySelectField' describe('resolveValue', () => { let value: any From 99ba0ca93fc7af7f5d830891c474f4622179e9ef Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Wed, 7 Aug 2024 19:48:09 +0100 Subject: [PATCH 104/122] Refactor resolveValue and resolveDefault to use util's resvalue and resdefault --- dist/vxg-util.d.ts | 19 ++- src/lib/BasicEntityAutocompleteField.tsx | 173 +++++++++++++------- src/lib/BasicEntitySelectField.tsx | 193 ++++++++++++----------- src/lib/vxg-util.ts | 178 ++++++++++++++++----- 4 files changed, 373 insertions(+), 190 deletions(-) diff --git a/dist/vxg-util.d.ts b/dist/vxg-util.d.ts index 22c3ccc..0d64223 100644 --- a/dist/vxg-util.d.ts +++ b/dist/vxg-util.d.ts @@ -11,4 +11,21 @@ declare namespace vmap { var KEY: (_: any, p: any) => any; } declare function searchParamsToObject(searchParams: URLSearchParams): any; -export { cmap, vmap, searchParamsToObject, }; +declare function resvalue(value: object | any[] | string, cat: { + multiple: number; + item: Record; +}, mapFn: (val: string, item: { + title: string; +}) => any): any; +declare function resdefault(cat: { + multiple: number; + item: Record; + default: string; +}, mapFn: (val: string, item: { + title: string; +}) => any): any; +export { cmap, vmap, searchParamsToObject, resvalue, resdefault }; diff --git a/src/lib/BasicEntityAutocompleteField.tsx b/src/lib/BasicEntityAutocompleteField.tsx index c0b6946..de5863b 100644 --- a/src/lib/BasicEntityAutocompleteField.tsx +++ b/src/lib/BasicEntityAutocompleteField.tsx @@ -7,6 +7,7 @@ import type { Spec } from './basic-types' import { Default, Exact, Gubu } from 'gubu' import { BasicEntityFieldError } from './BasicEntityFieldError' +import { resvalue, resdefault } from './vxg-util' const CMPNAME = 'BasicEntityAutocompleteField' const { Open } = Gubu @@ -84,79 +85,131 @@ function BasicEntityAutocompleteField (props: any) { ) } -export function resolveCategories (cat: { +export const resolveCategories = ({ + item, +}: { item: Record -}) { - return Object.keys(cat.item).map((key) => ({ - title: cat.item?.[key]?.title, - key: key, - })) -} +}) => Object.entries(item).map(([key, { title }]) => ({ key, title })) export function resolveDefault (cat: { multiple: number item: any default: string }) { - const { multiple, item: items, default: defaultValues } = cat - - if (Object.keys(items).length === 0) { - return multiple === 1 ? '' : [] - } - - const defaultItems = defaultValues.split(',') - - const mapResolvedDefault = (list: string[]) => - list.map((val: any) => ({ - title: items[val]?.title, - key: val, - })) - - switch (multiple) { - case 1: - return defaultItems[0] - ? { - key: defaultItems[0], - title: items[defaultItems[0]]?.title, - } - : '' - case -1: - return mapResolvedDefault(defaultItems) || [] - default: - return mapResolvedDefault(defaultItems.slice(0, multiple)) || [] - } + return resdefault(cat, (val: string, item: { title: string }) => ({ + key: val, + title: item.title, + })) } export function resolveValue ( value: any, cat: { multiple: number; item: Record } ) { - const { item: items, multiple } = cat - - if (Object.keys(items).length === 0) { - return multiple === 1 ? '' : [] - } - - if (Array.isArray(value)) { - return multiple === 1 && value[0] ? value[0] : value.slice(0, multiple) - } - - if (typeof value === 'object') { - return multiple === 1 ? value : [value] - } - - const mapValue = (val: string) => - items[val] ? { key: val, title: items[val].title } : undefined - const splitValue = value.split(',') - - switch (multiple) { - case 1: - return mapValue(splitValue[0]) || '' - case -1: - return splitValue.map(mapValue).filter(Boolean) || [] - default: - return splitValue.slice(0, multiple).map(mapValue).filter(Boolean) - } + return resvalue(value, cat, (val: string, item: { title: string }) => ({ + key: val, + title: item.title, + })) } +// export function resolveDefault (cat: { +// multiple: number +// item: any +// default: string +// }) { +// const { multiple, item: items, default: defaultValues } = cat + +// if (Object.keys(items).length === 0) { +// return multiple === 1 ? '' : [] +// } + +// const defaultItems = defaultValues.split(',') + +// const mapResolvedDefault = (list: string[]) => +// list.map((val: any) => ({ +// title: items[val]?.title, +// key: val, +// })) + +// switch (multiple) { +// case 1: +// return defaultItems[0] +// ? { +// key: defaultItems[0], +// title: items[defaultItems[0]]?.title, +// } +// : '' +// case -1: +// return mapResolvedDefault(defaultItems) || [] +// default: +// return mapResolvedDefault(defaultItems.slice(0, multiple)) || [] +// } +// } + +// export function resolveValueUtil ( +// value: any, +// cat: { multiple: number; item: Record }, +// mapFn: (val: string, item: { title: string }) => any +// ) { +// const { item: items, multiple } = cat + +// if (Object.keys(items).length === 0) { +// return multiple === 1 ? '' : [] +// } + +// if (Array.isArray(value)) { +// return multiple === 1 && value[0] ? value[0] : value.slice(0, multiple) +// } + +// if (typeof value === 'object') { +// return multiple === 1 ? value : [value] +// } + +// const splitValue = value.split(',') + +// const mapValue = (val: string) => +// items[val] ? mapFn(val, items[val]) : undefined + +// switch (multiple) { +// case 1: +// return mapValue(splitValue[0]) || '' +// case -1: +// return splitValue.map(mapValue).filter(Boolean) || [] +// default: +// return splitValue.slice(0, multiple).map(mapValue).filter(Boolean) +// } +// } + +// function resolveValueToObject ( +// value: any, +// cat: { multiple: number; item: Record } +// ) { +// const { item: items, multiple } = cat + +// if (Object.keys(items).length === 0) { +// return multiple === 1 ? '' : [] +// } + +// if (Array.isArray(value)) { +// return multiple === 1 && value[0] ? value[0] : value.slice(0, multiple) +// } + +// if (typeof value === 'object') { +// return multiple === 1 ? value : [value] +// } + +// const mapValue = (val: string) => +// items[val] ? { key: val, title: items[val].title } : undefined +// const splitValue = value.split(',') + +// switch (multiple) { +// case 1: +// return mapValue(splitValue[0]) || '' +// case -1: +// return splitValue.map(mapValue).filter(Boolean) || [] +// default: +// return splitValue.slice(0, multiple).map(mapValue).filter(Boolean) +// } +// } + export { BasicEntityAutocompleteField } diff --git a/src/lib/BasicEntitySelectField.tsx b/src/lib/BasicEntitySelectField.tsx index 25d09f5..cfab38e 100644 --- a/src/lib/BasicEntitySelectField.tsx +++ b/src/lib/BasicEntitySelectField.tsx @@ -7,6 +7,7 @@ import type { Spec } from './basic-types' import { Default, Exact, Gubu } from 'gubu' import { BasicEntityFieldError } from './BasicEntityFieldError' +import { resvalue, resdefault } from './vxg-util' const CMPNAME = 'BasicEntitySelectField' const { Open } = Gubu @@ -82,48 +83,6 @@ function BasicEntitySelectField (props: any) { ) } -// function BasicEntitySelectField (props: any) { -// const { spec } = props - -// const basicEntitySelectField: Spec = BasicEntitySelectFieldSpecShape(spec) -// const { control, field, errors } = basicEntitySelectField - -// const err = errors[field.name] - -// return ( -// -// ( -// -// {field.label} -// -// -// )} -// /> -// -// -// ) -// } - // Returns array of options based on field.cat object export function resolveCategories (cat: any) { return Object.keys(cat.item).map((key) => ({ @@ -137,59 +96,115 @@ export function resolveDefault (cat: { item: any default: string }) { - const { multiple, item: items, default: defaultValues } = cat - - if (Object.keys(items).length === 0) { - return multiple === 1 ? '' : [] - } - - const defaultItems = defaultValues.split(',') - - const mapResolvedDefault = (list: string[]) => - list.map((val: any) => (items[val] ? val : undefined)) - - switch (multiple) { - case 1: - return defaultItems[0] ? defaultItems[0] : '' - case -1: - return mapResolvedDefault(defaultItems).filter(Boolean) || [] - default: - return ( - mapResolvedDefault(defaultItems.slice(0, multiple)).filter(Boolean) || - [] - ) - } + return resdefault(cat, (val: string, item: { title: string }) => val) } export function resolveValue ( value: any, cat: { multiple: number; item: Record } ) { - const { item: items, multiple } = cat - - if (Object.keys(items).length === 0) { - return multiple === 1 ? '' : [] - } - - if (Array.isArray(value)) { - return multiple === 1 && value[0] ? value[0] : value.slice(0, multiple) - } - - if (typeof value === 'object') { - return multiple === 1 ? value : [value] - } - - const mapValue = (val: string) => (items[val] ? val : undefined) - const splitValue = value.split(',') - - switch (multiple) { - case 1: - return mapValue(splitValue[0]) || '' - case -1: - return splitValue.map(mapValue).filter(Boolean) || [] - default: - return splitValue.slice(0, multiple).map(mapValue).filter(Boolean) || [] - } + return resvalue(value, cat, (val: string, item: { title: string }) => val) } +// export function resolveDefault (cat: { +// multiple: number +// item: any +// default: string +// }) { +// const { multiple, item: items, default: defaultValues } = cat + +// if (Object.keys(items).length === 0) { +// return multiple === 1 ? '' : [] +// } + +// const defaultItems = defaultValues.split(',') + +// const mapResolvedDefault = (list: string[]) => +// list.map((val: any) => (items[val] ? val : undefined)) + +// switch (multiple) { +// case 1: +// return defaultItems[0] ? defaultItems[0] : '' +// case -1: +// return mapResolvedDefault(defaultItems).filter(Boolean) || [] +// default: +// return ( +// mapResolvedDefault(defaultItems.slice(0, multiple)).filter(Boolean) || +// [] +// ) +// } +// } + +// export function resolveValueUtil ( +// value: any, +// cat: { multiple: number; item: Record }, +// mapFn: (val: string, item: { title: string }) => any +// ) { +// const { item: items, multiple } = cat + +// if (Object.keys(items).length === 0) { +// return multiple === 1 ? '' : [] +// } + +// if (Array.isArray(value)) { +// return multiple === 1 && value[0] ? value[0] : value.slice(0, multiple) +// } + +// if (typeof value === 'object') { +// return multiple === 1 ? value : [value] +// } + +// const splitValue = value.split(',') + +// const mapValue = (val: string) => +// items[val] ? mapFn(val, items[val]) : undefined + +// switch (multiple) { +// case 1: +// return mapValue(splitValue[0]) || '' +// case -1: +// console.log('splitValue', splitValue) +// console.log('items', items[splitValue[0]]) +// console.log( +// 'splitValue.map(mapValue)', +// splitValue.map(mapValue).filter(Boolean) +// ) +// return splitValue.map(mapValue).filter(Boolean) || [] +// default: +// console.log('splitValue', splitValue) +// return splitValue.slice(0, multiple).map(mapValue).filter(Boolean) +// } +// } + +// function resolveValueToKey ( +// value: any, +// cat: { multiple: number; item: Record } +// ) { +// const { item: items, multiple } = cat + +// if (Object.keys(items).length === 0) { +// return multiple === 1 ? '' : [] +// } + +// if (Array.isArray(value)) { +// return multiple === 1 && value[0] ? value[0] : value.slice(0, multiple) +// } + +// if (typeof value === 'object') { +// return multiple === 1 ? value : [value] +// } + +// const mapValue = (val: string) => (items[val] ? val : undefined) +// const splitValue = value.split(',') + +// switch (multiple) { +// case 1: +// return mapValue(splitValue[0]) || '' +// case -1: +// return splitValue.map(mapValue).filter(Boolean) || [] +// default: +// return splitValue.slice(0, multiple).map(mapValue).filter(Boolean) || [] +// } +// } + export { BasicEntitySelectField } diff --git a/src/lib/vxg-util.ts b/src/lib/vxg-util.ts index a6bf093..601ed9f 100644 --- a/src/lib/vxg-util.ts +++ b/src/lib/vxg-util.ts @@ -1,53 +1,85 @@ - - // TODO: cmap,vmap probably belong in @voxgig/model utils // Map child objects to new child objects -function cmap(o: any, p: any) { - return Object - .entries(o) - .reduce((r: any, n: any, _: any) => (_ = Object - .entries(p) - .reduce((s: any, m: any) => (cmap.FILTER === s ? s : (s[m[0]] = ( - // transfom(val,key,current,parentkey,parent) - 'function' === typeof m[1] ? m[1](n[1][m[0]], { - skey: m[0], self: n[1], key: n[0], parent: o - }) : m[1] - ), (cmap.FILTER === s[m[0]] ? cmap.FILTER : s))), {}) - , (cmap.FILTER === _ ? 0 : r[n[0]] = _), r), {}) +function cmap (o: any, p: any) { + return Object.entries(o).reduce( + (r: any, n: any, _: any) => ( + (_ = Object.entries(p).reduce( + (s: any, m: any) => + cmap.FILTER === s + ? s + : ((s[m[0]] = + // transfom(val,key,current,parentkey,parent) + 'function' === typeof m[1] + ? m[1](n[1][m[0]], { + skey: m[0], + self: n[1], + key: n[0], + parent: o, + }) + : m[1]), + cmap.FILTER === s[m[0]] ? cmap.FILTER : s), + {} + )), + cmap.FILTER === _ ? 0 : (r[n[0]] = _), + r + ), + {} + ) } cmap.COPY = (x: any) => x // keep self if x is truthy, or function returning truthy-new-value or [truthy,new-value] -cmap.FILTER = (x: any) => 'function' === typeof x ? ((y: any, p: any, _: any) => - (_ = x(y, p), Array.isArray(_) ? !_[0] ? _[1] : cmap.FILTER : _)) : (x ? x : cmap.FILTER) +cmap.FILTER = (x: any) => + 'function' === typeof x + ? (y: any, p: any, _: any) => ( + (_ = x(y, p)), Array.isArray(_) ? (!_[0] ? _[1] : cmap.FILTER) : _ + ) + : x + ? x + : cmap.FILTER cmap.KEY = (_: any, p: any) => p.key - // Map child objects to a list of child objects -function vmap(o: any, p: any) { - return Object - .entries(o) - .reduce((r: any, n: any, _: any) => (_ = Object - .entries(p) - .reduce((s: any, m: any) => (vmap.FILTER === s ? s : (s[m[0]] = ( - // transfom(val,key,current,parentkey,parent) - // 'function' === typeof m[1] ? m[1](n[1][m[0]], m[0], n[1], n[0], o) : m[1] - 'function' === typeof m[1] ? m[1](n[1][m[0]], { - skey: m[0], self: n[1], key: n[0], parent: o - }) : m[1] - ), (vmap.FILTER === s[m[0]] ? vmap.FILTER : s))), {}) - , (vmap.FILTER === _ ? 0 : r.push(_)), r), []) - +function vmap (o: any, p: any) { + return Object.entries(o).reduce( + (r: any, n: any, _: any) => ( + (_ = Object.entries(p).reduce( + (s: any, m: any) => + vmap.FILTER === s + ? s + : ((s[m[0]] = + // transfom(val,key,current,parentkey,parent) + // 'function' === typeof m[1] ? m[1](n[1][m[0]], m[0], n[1], n[0], o) : m[1] + 'function' === typeof m[1] + ? m[1](n[1][m[0]], { + skey: m[0], + self: n[1], + key: n[0], + parent: o, + }) + : m[1]), + vmap.FILTER === s[m[0]] ? vmap.FILTER : s), + {} + )), + vmap.FILTER === _ ? 0 : r.push(_), + r + ), + [] + ) } vmap.COPY = (x: any) => x -vmap.FILTER = (x: any) => 'function' === typeof x ? ((y: any, p: any, _: any) => - (_ = x(y, p), Array.isArray(_) ? !_[0] ? _[1] : vmap.FILTER : _)) : (x ? x : vmap.FILTER) +vmap.FILTER = (x: any) => + 'function' === typeof x + ? (y: any, p: any, _: any) => ( + (_ = x(y, p)), Array.isArray(_) ? (!_[0] ? _[1] : vmap.FILTER) : _ + ) + : x + ? x + : vmap.FILTER vmap.KEY = (_: any, p: any) => p.key - - -function searchParamsToObject(searchParams: URLSearchParams) { +function searchParamsToObject (searchParams: URLSearchParams) { let params: any = Object.create(null) for (let [key, value] of searchParams.entries()) { params[key] = value @@ -55,10 +87,76 @@ function searchParamsToObject(searchParams: URLSearchParams) { return params } +// Map a value (object, array, or string) to a value or array of values using a map function +// TODO: possibly not the best place for this, maybe in a plugin? +function resvalue ( + value: object | any[] | string, + cat: { multiple: number; item: Record }, + mapFn: (val: string, item: { title: string }) => any +) { + const { item: items, multiple } = cat + + if (Object.keys(items).length === 0) { + return multiple === 1 ? '' : [] + } + + if (Array.isArray(value)) { + return multiple === 1 && value[0] ? value[0] : value.slice(0, multiple) + } + + if (typeof value === 'object') { + return multiple === 1 ? value : [value] + } + const splitValue = value.split(',') -export { - cmap, - vmap, - searchParamsToObject, + const mapValue = (val: string) => + items[val] ? mapFn(val, items[val]) : undefined + + switch (multiple) { + case 1: + return mapValue(splitValue[0]) || '' + case -1: + return splitValue.map(mapValue).filter(Boolean) || [] + default: + return splitValue.slice(0, multiple).map(mapValue).filter(Boolean) + } } + +// Map a string to a value or array of values using a map function +// TODO: possibly not the best place for this, maybe in a plugin? +function resdefault ( + cat: { + multiple: number + item: Record + default: string + }, + mapFn: (val: string, item: { title: string }) => any +) { + const { multiple, item: items, default: defaultValues } = cat + + if (Object.keys(items).length === 0) { + return multiple === 1 ? '' : [] + } + + const defaultItems = defaultValues.split(',') + + const mapResolvedDefault = (list: string[]) => + list.map((val: string) => (items[val] ? mapFn(val, items[val]) : undefined)) + + switch (multiple) { + case 1: + return defaultItems[0] + ? mapFn(defaultItems[0], items[defaultItems[0]]) + : '' + case -1: + return mapResolvedDefault(defaultItems).filter(Boolean) || [] + default: + return ( + mapResolvedDefault(defaultItems.slice(0, multiple)).filter(Boolean) || + [] + ) + } +} + +export { cmap, vmap, searchParamsToObject, resvalue, resdefault } From c345b1ba930155473747c73770fb00489201f8c2 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Wed, 7 Aug 2024 19:48:16 +0100 Subject: [PATCH 105/122] Update dist files --- dist-plain/lib/VxgBasicEntityEditPlugin.d.ts | 2 + dist-plain/lib/VxgBasicEntityEditPlugin.js | 88 +++++++-- .../lib/VxgBasicEntityEditPlugin.js.map | 2 +- dist-plain/lib/VxgBasicLedPlugin.js | 16 +- dist-plain/lib/VxgBasicLedPlugin.js.map | 2 +- dist/BasicEntityAutocompleteField.d.ts | 14 +- dist/BasicEntitySelectField.d.ts | 2 +- dist/voxgig-model-react.es.js | 180 ++++++++---------- dist/voxgig-model-react.umd.js | 180 ++++++++---------- 9 files changed, 238 insertions(+), 248 deletions(-) diff --git a/dist-plain/lib/VxgBasicEntityEditPlugin.d.ts b/dist-plain/lib/VxgBasicEntityEditPlugin.d.ts index 77d9312..1c29b3f 100644 --- a/dist-plain/lib/VxgBasicEntityEditPlugin.d.ts +++ b/dist-plain/lib/VxgBasicEntityEditPlugin.d.ts @@ -7,6 +7,8 @@ declare function VxgBasicEntityEditPlugin(this: any, options: any): { }; util: { dateTimeFromUTC: (utc: number, tz?: string) => any; + localTimeToUTC: (timeString: string, tz?: string) => number; + localDateTimeToUTC: (dateOrDateTimeString: string, tz?: string) => number; }; }; }; diff --git a/dist-plain/lib/VxgBasicEntityEditPlugin.js b/dist-plain/lib/VxgBasicEntityEditPlugin.js index 6a9f876..374d99c 100644 --- a/dist-plain/lib/VxgBasicEntityEditPlugin.js +++ b/dist-plain/lib/VxgBasicEntityEditPlugin.js @@ -17,58 +17,88 @@ function VxgBasicEntityEditPlugin(options) { const fields = spec.order.reduce((a, fn) => (fixField(fn, spec.field[fn], spec), a.push(spec.field[fn]), a), []); for (const field of fields) { if ('Date' === field.ux.kind) { - seneca.add('aim:app,on:BasicLed,modify:edit,view:' + spec.name, async function modify_edit_Date(msg) { + seneca + .add('aim:app,on:BasicLed,modify:edit,view:' + spec.name, async function modify_edit_Date(msg) { const out = await this.prior(msg); - let { item } = out; - item = { ...item }; + let item = { ...out }; if (!item[field.name + '_orig$']) { const dt = util.dateTimeFromUTC(item[field.name]); item[field.name + '_orig$'] = item[field.name]; item[field.name + '_udm$'] = dt.udm; - item[field.name] = dt.localt; + item[field.name] = dt.locald; + console.log('modify_edit_Date', item[field.name]); } - return { ...msg, item }; + return item; + }) + .add('aim:app,on:BasicLed,modify:save', { view: spec.name }, async function modify_save_Date(msg) { + const out = await this.prior(msg); + let item = { ...out }; + const dt = util.localDateTimeToUTC(item[field.name]); + item[field.name] = dt; + return item; }); } else if ('Time' === field.ux.kind) { - seneca.add('aim:app,on:BasicLed,modify:edit,view:' + spec.name, async function modify_edit_Time(msg) { + seneca + .add('aim:app,on:BasicLed,modify:edit,view:' + spec.name, async function modify_edit_Time(msg) { const out = await this.prior(msg); - let { item } = out; - item = { ...item }; + let item = { ...out }; if (!item[field.name + '_orig$']) { const dt = util.dateTimeFromUTC(item[field.name]); item[field.name + '_orig$'] = item[field.name]; item[field.name + '_udm$'] = dt.udm; item[field.name] = dt.localt; + console.log('modify_edit_Time', item[field.name]); } - return { ...msg, item }; + return item; + }) + .add('aim:app,on:BasicLed,modify:save', { view: spec.name }, async function modify_save_Time(msg) { + const out = await this.prior(msg); + let item = { ...out }; + const dt = util.localTimeToUTC(item[field.name]); + item[field.name] = dt; + return item; }); } else if ('DateTime' === field.ux.kind) { - seneca.add('aim:app,on:BasicLed,modify:edit,view:' + spec.name, async function modify_edit_Datetime(msg) { + seneca + .add('aim:app,on:BasicLed,modify:edit,view:' + spec.name, async function modify_edit_Datetime(msg) { const out = await this.prior(msg); - let { item } = out; - item = { ...item }; + let item = { ...out }; if (!item[field.name + '_orig$']) { const dt = util.dateTimeFromUTC(item[field.name]); item[field.name + '_orig$'] = item[field.name]; item[field.name + '_udm$'] = dt.udm; item[field.name] = dt.locald + 'T' + dt.localt; } - return { ...msg, item }; + return item; + }) + .add('aim:app,on:BasicLed,modify:save', { view: spec.name }, async function modify_save_Datetime(msg) { + const out = await this.prior(msg); + let item = { ...out }; + const dt = util.localDateTimeToUTC(item[field.name]); + item[field.name] = dt; + return item; }); } else if ('Slider' === field.ux.kind) { // console.log('VxgBasicEntityEditPlugin', 'Slider') - seneca.add('aim:app,on:BasicLed,modify:edit,view:' + spec.name, async function modify_edit_Slider(msg) { + seneca + .add('aim:app,on:BasicLed,modify:edit', { view: spec.name }, async function modify_edit_Slider(msg) { const out = await this.prior(msg); - let { item } = out; - item = { ...item }; + let item = { ...out }; if (!item[field.name + '_orig$']) { item[field.name + '_orig$'] = item[field.name]; item[field.name] = Number(item[field.name]) / 60; } - return { ...msg, item }; + // return { ...msg, item } + return item; + }) + .add('aim:app,on:BasicLed,modify:save', { view: spec.name }, async function modify_save_Slider(msg) { + const out = await this.prior(msg); + let item = { ...out }; + item[field.name] = Number(item[field.name]) * 60; + return item; }); } } @@ -128,6 +158,30 @@ const util = { out.localt = `${hour}:${minute}:${second}`; return out; }, + localTimeToUTC: (timeString, tz) => { + tz = tz || Intl.DateTimeFormat().resolvedOptions().timeZone; + const now = new Date(); + const [hours, minutes, seconds] = timeString.split(':').map(Number); + const localDate = new Date(now.getFullYear(), now.getMonth(), now.getDate(), hours, minutes, seconds); + const utcTimestamp = Date.UTC(localDate.getFullYear(), localDate.getMonth(), localDate.getDate(), localDate.getHours(), localDate.getMinutes(), localDate.getSeconds()); + const tzOffset = new Date(utcTimestamp).getTimezoneOffset() * 60000; + return utcTimestamp - tzOffset; + }, + localDateTimeToUTC: (dateOrDateTimeString, tz) => { + const date = new Date(dateOrDateTimeString); + // Check if the date is valid + if (isNaN(date.getTime())) { + throw new Error('Invalid date or datetime string'); + } + // If a timezone is provided, adjust the date + if (tz) { + const tzDate = new Date(date.toLocaleString('en-GB', { timeZone: tz })); + const offset = date.getTime() - tzDate.getTime(); + return date.getTime() + offset; + } + // If no timezone is provided, assume the input is already in local time + return date.getTime(); + }, }; Object.assign(VxgBasicEntityEditPlugin, { defaults: { diff --git a/dist-plain/lib/VxgBasicEntityEditPlugin.js.map b/dist-plain/lib/VxgBasicEntityEditPlugin.js.map index 5239e47..edbf6c3 100644 --- a/dist-plain/lib/VxgBasicEntityEditPlugin.js.map +++ b/dist-plain/lib/VxgBasicEntityEditPlugin.js.map @@ -1 +1 @@ -{"version":3,"file":"VxgBasicEntityEditPlugin.js","sourceRoot":"","sources":["../../src/lib/VxgBasicEntityEditPlugin.ts"],"names":[],"mappings":";;AAoMS,4DAAwB;AAlMjC,+BAA2B;AAE3B,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,WAAI,CAAA;AAE5B,MAAM,KAAK,GAAG,IAAA,WAAI,EAChB,IAAI,CAAC;IACH,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,MAAM;IACd,GAAG,EAAE,MAAM;IACX,KAAK,EAAE,CAAC,MAAM,CAAC;IACf,KAAK,EAAE,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC;CACrB,CAAC,EACF,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAC5B,CAAA;AAED,SAAS,wBAAwB,CAAa,OAAY;IACxD,MAAM,MAAM,GAAG,IAAI,CAAA;IAEnB,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IAEhC,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,CAAA;IAEpC,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAC9B,CAAC,CAAM,EAAE,EAAO,EAAE,EAAE,CAAC,CACnB,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAC9D,EACD,EAAE,CACH,CAAA;IAED,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,MAAM,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;YAC7B,MAAM,CAAC,GAAG,CACR,uCAAuC,GAAG,IAAI,CAAC,IAAI,EACnD,KAAK,UAAU,gBAAgB,CAAa,GAAQ;gBAClD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,EAAE,IAAI,EAAE,GAAG,GAAG,CAAA;gBAElB,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,CAAA;gBAElB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,EAAE,CAAC;oBACjC,MAAM,EAAE,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;oBACjD,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;oBAC9C,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,CAAA;oBACnC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAA;gBAC9B,CAAC;gBAED,OAAO,EAAE,GAAG,GAAG,EAAE,IAAI,EAAE,CAAA;YACzB,CAAC,CACF,CAAA;QACH,CAAC;aAAM,IAAI,MAAM,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;YACpC,MAAM,CAAC,GAAG,CACR,uCAAuC,GAAG,IAAI,CAAC,IAAI,EACnD,KAAK,UAAU,gBAAgB,CAAa,GAAQ;gBAClD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,EAAE,IAAI,EAAE,GAAG,GAAG,CAAA;gBAElB,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,CAAA;gBAElB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,EAAE,CAAC;oBACjC,MAAM,EAAE,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;oBACjD,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;oBAC9C,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,CAAA;oBACnC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAA;gBAC9B,CAAC;gBAED,OAAO,EAAE,GAAG,GAAG,EAAE,IAAI,EAAE,CAAA;YACzB,CAAC,CACF,CAAA;QACH,CAAC;aAAM,IAAI,UAAU,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;YACxC,MAAM,CAAC,GAAG,CACR,uCAAuC,GAAG,IAAI,CAAC,IAAI,EACnD,KAAK,UAAU,oBAAoB,CAAa,GAAQ;gBACtD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,EAAE,IAAI,EAAE,GAAG,GAAG,CAAA;gBAElB,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,CAAA;gBAElB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,EAAE,CAAC;oBACjC,MAAM,EAAE,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;oBACjD,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;oBAC9C,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,CAAA;oBACnC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,GAAG,GAAG,GAAG,EAAE,CAAC,MAAM,CAAA;gBAChD,CAAC;gBAED,OAAO,EAAE,GAAG,GAAG,EAAE,IAAI,EAAE,CAAA;YACzB,CAAC,CACF,CAAA;QACH,CAAC;aAAM,IAAI,QAAQ,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;YACtC,oDAAoD;YACpD,MAAM,CAAC,GAAG,CACR,uCAAuC,GAAG,IAAI,CAAC,IAAI,EACnD,KAAK,UAAU,kBAAkB,CAAa,GAAQ;gBACpD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,EAAE,IAAI,EAAE,GAAG,GAAG,CAAA;gBAElB,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,CAAA;gBAElB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,EAAE,CAAC;oBACjC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;oBAC9C,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,CAAA;gBAClD,CAAC;gBAED,OAAO,EAAE,GAAG,GAAG,EAAE,IAAI,EAAE,CAAA;YACzB,CAAC,CACF,CAAA;QACH,CAAC;IACH,CAAC;IAED,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;IAEvB,OAAO;QACL,OAAO,EAAE;YACP,MAAM,EAAE;gBACN,IAAI;gBACJ,IAAI;gBACJ,MAAM;aACP;YACD,IAAI;SACL;KACF,CAAA;AACH,CAAC;AAED,SAAS,QAAQ,CAAE,IAAY,EAAE,KAAU,EAAE,IAAS;IACpD,KAAK,CAAC,EAAE,GAAG,YAAY,GAAG,IAAI,CAAC,IAAI,GAAG,GAAG,GAAG,IAAI,CAAA;IAChD,KAAK,CAAC,IAAI,GAAG,IAAI,CAAA;IACjB,KAAK,CAAC,EAAE,GAAG,KAAK,CAAC,EAAE,IAAI,EAAE,CAAA;IACzB,KAAK,CAAC,EAAE,CAAC,IAAI,GAAG,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;AACzE,CAAC;AAED,MAAM,IAAI,GAAG;IACX,eAAe,EAAE,CAAC,GAAW,EAAE,EAAW,EAAE,EAAE;QAC5C,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,CAAA;QAC1B,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,EAAE,CAAA;QAC9B,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QAC9B,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QAE5C,uCAAuC;QACvC,MAAM,GAAG,GACP,IAAI,CAAC,WAAW,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI;YACnC,IAAI,CAAC,aAAa,EAAE,GAAG,EAAE,GAAG,IAAI;YAChC,IAAI,CAAC,aAAa,EAAE,GAAG,IAAI;YAC3B,IAAI,CAAC,kBAAkB,EAAE,CAAA;QAE3B,IAAI,GAAG,GAAQ;YACb,GAAG;YACH,IAAI;YACJ,IAAI;YACJ,IAAI;YACJ,GAAG;SACJ,CAAA;QAED,EAAE,GAAG,EAAE,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC,eAAe,EAAE,CAAC,QAAQ,CAAA;QAC3D,MAAM,aAAa,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE;YACrD,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,SAAS;YAChB,GAAG,EAAE,SAAS;SACf,CAAC,CAAA;QAEF,MAAM,aAAa,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE;YACrD,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,SAAS;YACf,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,KAAK;SACd,CAAC,CAAA;QAEF,MAAM,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,GAC3D,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;QACnC,MAAM,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,GAC/D,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;QAEnC,GAAG,CAAC,MAAM,GAAG,GAAG,IAAI,IAAI,KAAK,IAAI,GAAG,EAAE,CAAA;QACtC,GAAG,CAAC,MAAM,GAAG,GAAG,IAAI,IAAI,MAAM,IAAI,MAAM,EAAE,CAAA;QAE1C,OAAO,GAAG,CAAA;IACZ,CAAC;CACF,CAAA;AAED,MAAM,CAAC,MAAM,CAAC,wBAAwB,EAAE;IACtC,QAAQ,EAAE;QACR,IAAI,EAAE,EAAE;QACR,SAAS,EAAE,QAAQ;KACpB;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,cAAc,CAAC,wBAAwB,EAAE,MAAM,EAAE;IACtD,KAAK,EAAE,0BAA0B;CAClC,CAAC,CAAA"} \ No newline at end of file +{"version":3,"file":"VxgBasicEntityEditPlugin.js","sourceRoot":"","sources":["../../src/lib/VxgBasicEntityEditPlugin.ts"],"names":[],"mappings":";;AA6SS,4DAAwB;AA3SjC,+BAA2B;AAE3B,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,WAAI,CAAA;AAE5B,MAAM,KAAK,GAAG,IAAA,WAAI,EAChB,IAAI,CAAC;IACH,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,MAAM;IACd,GAAG,EAAE,MAAM;IACX,KAAK,EAAE,CAAC,MAAM,CAAC;IACf,KAAK,EAAE,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC;CACrB,CAAC,EACF,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAC5B,CAAA;AAED,SAAS,wBAAwB,CAAa,OAAY;IACxD,MAAM,MAAM,GAAG,IAAI,CAAA;IAEnB,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IAEhC,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,CAAA;IAEpC,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAC9B,CAAC,CAAM,EAAE,EAAO,EAAE,EAAE,CAAC,CACnB,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAC9D,EACD,EAAE,CACH,CAAA;IAED,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,MAAM,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;YAC7B,MAAM;iBACH,GAAG,CACF,uCAAuC,GAAG,IAAI,CAAC,IAAI,EACnD,KAAK,UAAU,gBAAgB,CAAa,GAAQ;gBAClD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,IAAI,GAAG,EAAE,GAAG,GAAG,EAAE,CAAA;gBAErB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,EAAE,CAAC;oBACjC,MAAM,EAAE,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;oBACjD,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;oBAC9C,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,CAAA;oBACnC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAA;oBAC5B,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;gBACnD,CAAC;gBAED,OAAO,IAAI,CAAA;YACb,CAAC,CACF;iBAEA,GAAG,CACF,iCAAiC,EACjC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EACnB,KAAK,UAAU,gBAAgB,CAAa,GAAQ;gBAClD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,IAAI,GAAG,EAAE,GAAG,GAAG,EAAE,CAAA;gBAErB,MAAM,EAAE,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;gBACpD,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAA;gBAErB,OAAO,IAAI,CAAA;YACb,CAAC,CACF,CAAA;QACL,CAAC;aAAM,IAAI,MAAM,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;YACpC,MAAM;iBACH,GAAG,CACF,uCAAuC,GAAG,IAAI,CAAC,IAAI,EACnD,KAAK,UAAU,gBAAgB,CAAa,GAAQ;gBAClD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,IAAI,GAAG,EAAE,GAAG,GAAG,EAAE,CAAA;gBAErB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,EAAE,CAAC;oBACjC,MAAM,EAAE,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;oBACjD,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;oBAC9C,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,CAAA;oBACnC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAA;oBAC5B,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;gBACnD,CAAC;gBAED,OAAO,IAAI,CAAA;YACb,CAAC,CACF;iBAEA,GAAG,CACF,iCAAiC,EACjC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EACnB,KAAK,UAAU,gBAAgB,CAAa,GAAQ;gBAClD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,IAAI,GAAG,EAAE,GAAG,GAAG,EAAE,CAAA;gBAErB,MAAM,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;gBAChD,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAA;gBAErB,OAAO,IAAI,CAAA;YACb,CAAC,CACF,CAAA;QACL,CAAC;aAAM,IAAI,UAAU,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;YACxC,MAAM;iBACH,GAAG,CACF,uCAAuC,GAAG,IAAI,CAAC,IAAI,EACnD,KAAK,UAAU,oBAAoB,CAAa,GAAQ;gBACtD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,IAAI,GAAG,EAAE,GAAG,GAAG,EAAE,CAAA;gBAErB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,EAAE,CAAC;oBACjC,MAAM,EAAE,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;oBACjD,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;oBAC9C,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,CAAA;oBACnC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,GAAG,GAAG,GAAG,EAAE,CAAC,MAAM,CAAA;gBAChD,CAAC;gBAED,OAAO,IAAI,CAAA;YACb,CAAC,CACF;iBAEA,GAAG,CACF,iCAAiC,EACjC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EACnB,KAAK,UAAU,oBAAoB,CAAa,GAAQ;gBACtD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,IAAI,GAAG,EAAE,GAAG,GAAG,EAAE,CAAA;gBAErB,MAAM,EAAE,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;gBACpD,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAA;gBAErB,OAAO,IAAI,CAAA;YACb,CAAC,CACF,CAAA;QACL,CAAC;aAAM,IAAI,QAAQ,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;YACtC,oDAAoD;YACpD,MAAM;iBACH,GAAG,CACF,iCAAiC,EACjC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EACnB,KAAK,UAAU,kBAAkB,CAAa,GAAQ;gBACpD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,IAAI,GAAG,EAAE,GAAG,GAAG,EAAE,CAAA;gBAErB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,EAAE,CAAC;oBACjC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;oBAC9C,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,CAAA;gBAClD,CAAC;gBAED,0BAA0B;gBAC1B,OAAO,IAAI,CAAA;YACb,CAAC,CACF;iBAEA,GAAG,CACF,iCAAiC,EACjC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EACnB,KAAK,UAAU,kBAAkB,CAAa,GAAQ;gBACpD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,IAAI,GAAG,EAAE,GAAG,GAAG,EAAE,CAAA;gBAErB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,CAAA;gBAEhD,OAAO,IAAI,CAAA;YACb,CAAC,CACF,CAAA;QACL,CAAC;IACH,CAAC;IAED,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;IAEvB,OAAO;QACL,OAAO,EAAE;YACP,MAAM,EAAE;gBACN,IAAI;gBACJ,IAAI;gBACJ,MAAM;aACP;YACD,IAAI;SACL;KACF,CAAA;AACH,CAAC;AAED,SAAS,QAAQ,CAAE,IAAY,EAAE,KAAU,EAAE,IAAS;IACpD,KAAK,CAAC,EAAE,GAAG,YAAY,GAAG,IAAI,CAAC,IAAI,GAAG,GAAG,GAAG,IAAI,CAAA;IAChD,KAAK,CAAC,IAAI,GAAG,IAAI,CAAA;IACjB,KAAK,CAAC,EAAE,GAAG,KAAK,CAAC,EAAE,IAAI,EAAE,CAAA;IACzB,KAAK,CAAC,EAAE,CAAC,IAAI,GAAG,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;AACzE,CAAC;AAED,MAAM,IAAI,GAAG;IACX,eAAe,EAAE,CAAC,GAAW,EAAE,EAAW,EAAE,EAAE;QAC5C,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,CAAA;QAC1B,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,EAAE,CAAA;QAC9B,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QAC9B,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QAE5C,uCAAuC;QACvC,MAAM,GAAG,GACP,IAAI,CAAC,WAAW,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI;YACnC,IAAI,CAAC,aAAa,EAAE,GAAG,EAAE,GAAG,IAAI;YAChC,IAAI,CAAC,aAAa,EAAE,GAAG,IAAI;YAC3B,IAAI,CAAC,kBAAkB,EAAE,CAAA;QAE3B,IAAI,GAAG,GAAQ;YACb,GAAG;YACH,IAAI;YACJ,IAAI;YACJ,IAAI;YACJ,GAAG;SACJ,CAAA;QAED,EAAE,GAAG,EAAE,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC,eAAe,EAAE,CAAC,QAAQ,CAAA;QAC3D,MAAM,aAAa,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE;YACrD,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,SAAS;YAChB,GAAG,EAAE,SAAS;SACf,CAAC,CAAA;QAEF,MAAM,aAAa,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE;YACrD,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,SAAS;YACf,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,KAAK;SACd,CAAC,CAAA;QAEF,MAAM,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,GAC3D,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;QACnC,MAAM,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,GAC/D,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;QAEnC,GAAG,CAAC,MAAM,GAAG,GAAG,IAAI,IAAI,KAAK,IAAI,GAAG,EAAE,CAAA;QACtC,GAAG,CAAC,MAAM,GAAG,GAAG,IAAI,IAAI,MAAM,IAAI,MAAM,EAAE,CAAA;QAE1C,OAAO,GAAG,CAAA;IACZ,CAAC;IACD,cAAc,EAAE,CAAC,UAAkB,EAAE,EAAW,EAAE,EAAE;QAClD,EAAE,GAAG,EAAE,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC,eAAe,EAAE,CAAC,QAAQ,CAAA;QAC3D,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAA;QAEtB,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;QAEnE,MAAM,SAAS,GAAG,IAAI,IAAI,CACxB,GAAG,CAAC,WAAW,EAAE,EACjB,GAAG,CAAC,QAAQ,EAAE,EACd,GAAG,CAAC,OAAO,EAAE,EACb,KAAK,EACL,OAAO,EACP,OAAO,CACR,CAAA;QAED,MAAM,YAAY,GAAG,IAAI,CAAC,GAAG,CAC3B,SAAS,CAAC,WAAW,EAAE,EACvB,SAAS,CAAC,QAAQ,EAAE,EACpB,SAAS,CAAC,OAAO,EAAE,EACnB,SAAS,CAAC,QAAQ,EAAE,EACpB,SAAS,CAAC,UAAU,EAAE,EACtB,SAAS,CAAC,UAAU,EAAE,CACvB,CAAA;QAED,MAAM,QAAQ,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,iBAAiB,EAAE,GAAG,KAAK,CAAA;QAEnE,OAAO,YAAY,GAAG,QAAQ,CAAA;IAChC,CAAC;IACD,kBAAkB,EAAE,CAAC,oBAA4B,EAAE,EAAW,EAAE,EAAE;QAChE,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,oBAAoB,CAAC,CAAA;QAE3C,6BAA6B;QAC7B,IAAI,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;YAC1B,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAA;QACpD,CAAC;QAED,6CAA6C;QAC7C,IAAI,EAAE,EAAE,CAAC;YACP,MAAM,MAAM,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC,CAAA;YACvE,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,EAAE,GAAG,MAAM,CAAC,OAAO,EAAE,CAAA;YAChD,OAAO,IAAI,CAAC,OAAO,EAAE,GAAG,MAAM,CAAA;QAChC,CAAC;QAED,wEAAwE;QACxE,OAAO,IAAI,CAAC,OAAO,EAAE,CAAA;IACvB,CAAC;CACF,CAAA;AAED,MAAM,CAAC,MAAM,CAAC,wBAAwB,EAAE;IACtC,QAAQ,EAAE;QACR,IAAI,EAAE,EAAE;QACR,SAAS,EAAE,QAAQ;KACpB;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,cAAc,CAAC,wBAAwB,EAAE,MAAM,EAAE;IACtD,KAAK,EAAE,0BAA0B;CAClC,CAAC,CAAA"} \ No newline at end of file diff --git a/dist-plain/lib/VxgBasicLedPlugin.js b/dist-plain/lib/VxgBasicLedPlugin.js index 8f91962..5d25de6 100644 --- a/dist-plain/lib/VxgBasicLedPlugin.js +++ b/dist-plain/lib/VxgBasicLedPlugin.js @@ -67,23 +67,13 @@ function VxgBasicLedPlugin(options) { if (null == item) return item; item = { ...item }; - return { ...msg, item }; + return item; }) .add('aim:app,on:BasicLed,modify:save', function modify_save(msg) { let item = msg.data; - let fields = msg.fields; if (null == item) return item; item = { ...item }; - // This code does not belong here - for (const field of fields) { - if ('Slider' === field.ux.kind) { - console.log('VxgBasicLedPlugin', 'modify:save', 'field', field); - console.log('VxgBasicLedPlugin', 'modify:save', 'item', item); - item[field.name] = Number(item[field.name]) * 60; - } - } - console.log('modify:save', 'item', item); return item; }) .message('aim:app,on:BasicLed,edit:item,redux$:true', { item_id: String }, async function (msg, meta) { @@ -109,9 +99,7 @@ function VxgBasicLedPlugin(options) { .filter((n) => false !== n[1].ux.edit) .reduce((a, n) => ((a[n[0]] = msg.data[n[0]]), a), {}); const item = await seneca.entity(entCanon).save$(data); - // TODO: navigate to edit view - // navigate('/view/' + name + '/edit/' + item.id) - navigate('/view/' + name); + navigate('/view/' + name + '/edit/' + item.id); }); seneca.prepare(async function () { this.act('aim:app,on:view,init:state,direct$:true', { view: name }); diff --git a/dist-plain/lib/VxgBasicLedPlugin.js.map b/dist-plain/lib/VxgBasicLedPlugin.js.map index d6b2a7e..e8cff50 100644 --- a/dist-plain/lib/VxgBasicLedPlugin.js.map +++ b/dist-plain/lib/VxgBasicLedPlugin.js.map @@ -1 +1 @@ -{"version":3,"file":"VxgBasicLedPlugin.js","sourceRoot":"","sources":["../../src/lib/VxgBasicLedPlugin.ts"],"names":[],"mappings":";;AAyNS,8CAAiB;AAvN1B,+BAA2B;AAE3B,MAAM,EAAE,IAAI,EAAE,GAAG,WAAI,CAAA;AAErB,MAAM,KAAK,GAAG,IAAA,WAAI,EAChB;IACE,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,OAAO;IACf,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE;QACH,GAAG,EAAE,MAAM;QACX,IAAI,EAAE,IAAI,CAAC;YACT,MAAM,EAAE,KAAK;SACd,CAAC;QACF,IAAI,EAAE,IAAI,CAAC;YACT,MAAM,EAAE,KAAK;SACd,CAAC;QACF,IAAI,EAAE,IAAI,CAAC;YACT,MAAM,EAAE,KAAK;SACd,CAAC;QACF,IAAI,EAAE,IAAI,CAAC;YACT,MAAM,EAAE,KAAK;SACd,CAAC;KACH;CACF,EACD,EAAE,IAAI,EAAE,UAAU,EAAE,CACrB,CAAA;AAED,SAAS,iBAAiB,CAAa,OAAY;IACjD,MAAM,MAAM,GAAG,IAAI,CAAA;IAEnB,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IAChC,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAA;IAEjC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAA;IACtB,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAA;IAC7B,MAAM,QAAQ,GAAG,WAAW,GAAG,IAAI,CAAA;IAEnC,yDAAyD;IAEzD,MAAM;SACH,GAAG,CAAC,aAAa,CAAC;SAElB,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;SAEnB,GAAG,CACF,wCAAwC,EACxC,UAAqB,IAAS,EAAE,KAAU,EAAE,IAAS;QACnD,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;QACjC,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAE3B,IAAI,CAAC,IAAI,GAAG,MAAM,CAAA;QAClB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA;QAEjB,IAAI,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;QACnD,KAAK,EAAE,CAAA;IACT,CAAC,CACF;SAEA,GAAG,CACF,4CAA4C,EAC5C,UAAqB,GAAQ,EAAE,KAAU,EAAE,IAAS;QAClD,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAA;QAC7B,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAE3C,IAAI,CAAC,IAAI,GAAG,MAAM,CAAA;QAClB,IAAI,CAAC,MAAM,GAAG,WAAW,CAAA;QAEzB,QAAQ,CAAC,IAAI,CAAC,CAAA;QACd,KAAK,EAAE,CAAA;IACT,CAAC,CACF;SAEA,GAAG,CACF,4CAA4C,EAC5C,UAAU,GAAQ,EAAE,KAAU,EAAE,IAAS;QACvC,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAA;QAE7B,wBAAwB;QACxB,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3C,IAAI,CAAC,IAAI,GAAG,MAAM,CAAA;QAClB,IAAI,CAAC,MAAM,GAAG,WAAW,CAAA;QAEzB,QAAQ,CAAC,IAAI,CAAC,CAAA;QACd,KAAK,EAAE,CAAA;IACT,CAAC,CACF;SAEA,GAAG,CAAC,iCAAiC,EAAE,SAAS,WAAW,CAAE,GAAQ;QACpE,IAAI,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;QACnB,0BAA0B;QAE1B,IAAI,IAAI,IAAI,IAAI;YAAE,OAAO,IAAI,CAAA;QAE7B,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,CAAA;QAElB,OAAO,EAAE,GAAG,GAAG,EAAE,IAAI,EAAE,CAAA;IACzB,CAAC,CAAC;SAED,GAAG,CAAC,iCAAiC,EAAE,SAAS,WAAW,CAAE,GAAQ;QACpE,IAAI,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;QACnB,IAAI,MAAM,GAAG,GAAG,CAAC,MAAM,CAAA;QAEvB,IAAI,IAAI,IAAI,IAAI;YAAE,OAAO,IAAI,CAAA;QAE7B,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,CAAA;QAElB,iCAAiC;QACjC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC3B,IAAI,QAAQ,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;gBAC/B,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,aAAa,EAAE,OAAO,EAAE,KAAK,CAAC,CAAA;gBAC/D,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,aAAa,EAAE,MAAM,EAAE,IAAI,CAAC,CAAA;gBAC7D,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,CAAA;YAClD,CAAC;QACH,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,MAAM,EAAE,IAAI,CAAC,CAAA;QAExC,OAAO,IAAI,CAAA;IACb,CAAC,CAAC;SAED,OAAO,CACN,2CAA2C,EAC3C,EAAE,OAAO,EAAE,MAAM,EAAE,EACnB,KAAK,WAAsB,GAAQ,EAAE,IAAS;QAC5C,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;QACjC,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3B,MAAM,EAAE,OAAO,EAAE,GAAG,GAAG,CAAA;QACvB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAA;QAClB,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QAEhD,QAAQ,CAAC,QAAQ,GAAG,IAAI,GAAG,QAAQ,GAAG,OAAO,CAAC,CAAA;QAC9C,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC;YAC7C,EAAE,EAAE,GAAG,CAAC,OAAO;YACf,KAAK,EAAE,QAAQ;YACf,OAAO;SACR,CAAC,CAAA;QAEF,OAAO,IAAI,CAAA;IACb,CAAC,CACF;SAEA,OAAO,CACN,8BAA8B,EAC9B,KAAK,WAAsB,IAAS;QAClC,MAAM,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAA;QACpE,QAAQ,CAAC,QAAQ,GAAG,IAAI,GAAG,MAAM,CAAC,CAAA;IACpC,CAAC,CACF;SAEA,OAAO,CACN,+BAA+B,EAC/B,KAAK,WAAsB,GAAQ;QACjC,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;aAC7C,MAAM,CAAC,CAAC,CAAQ,EAAE,EAAE,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC;aAC5C,MAAM,CAAC,CAAC,CAAM,EAAE,CAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;QAEpE,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QACtD,8BAA8B;QAC9B,iDAAiD;QACjD,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAA;IAC3B,CAAC,CACF,CAAA;IAEH,MAAM,CAAC,OAAO,CAAC,KAAK;QAClB,IAAI,CAAC,GAAG,CAAC,yCAAyC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAA;IACrE,CAAC,CAAC,CAAA;IAEF,MAAM,UAAU,GAAG;QACjB,IAAI;QACJ,GAAG,EAAE,QAAQ;QACb,MAAM,EAAE,WAAW;KACpB,CAAA;IAED,MAAM,QAAQ,GAAG;QACf,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI;QAChB,GAAG,UAAU;KACd,CAAA;IAED,MAAM,QAAQ,GAAG;QACf,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI;QAChB,GAAG,UAAU;KACd,CAAA;IAED,MAAM,QAAQ,GAAG;QACf,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI;QAChB,GAAG,UAAU;KACd,CAAA;IAED,MAAM,QAAQ,GAAG;QACf,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI;QAChB,GAAG,UAAU;KACd,CAAA;IAED,OAAO;QACL,OAAO,EAAE;YACP,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;aACf;SACF;KACF,CAAA;AACH,CAAC;AAED,iBAAiB,CAAC,QAAQ,GAAG;IAC3B,IAAI,EAAE,EAAE;IACR,QAAQ,EAAE,QAAQ;CACnB,CAAA;AAED,MAAM,CAAC,cAAc,CAAC,iBAAiB,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,CAAC,CAAA"} \ No newline at end of file +{"version":3,"file":"VxgBasicLedPlugin.js","sourceRoot":"","sources":["../../src/lib/VxgBasicLedPlugin.ts"],"names":[],"mappings":";;AA2MS,8CAAiB;AAzM1B,+BAA2B;AAE3B,MAAM,EAAE,IAAI,EAAE,GAAG,WAAI,CAAA;AAErB,MAAM,KAAK,GAAG,IAAA,WAAI,EAChB;IACE,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,OAAO;IACf,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE;QACH,GAAG,EAAE,MAAM;QACX,IAAI,EAAE,IAAI,CAAC;YACT,MAAM,EAAE,KAAK;SACd,CAAC;QACF,IAAI,EAAE,IAAI,CAAC;YACT,MAAM,EAAE,KAAK;SACd,CAAC;QACF,IAAI,EAAE,IAAI,CAAC;YACT,MAAM,EAAE,KAAK;SACd,CAAC;QACF,IAAI,EAAE,IAAI,CAAC;YACT,MAAM,EAAE,KAAK;SACd,CAAC;KACH;CACF,EACD,EAAE,IAAI,EAAE,UAAU,EAAE,CACrB,CAAA;AAED,SAAS,iBAAiB,CAAa,OAAY;IACjD,MAAM,MAAM,GAAG,IAAI,CAAA;IAEnB,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IAChC,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAA;IAEjC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAA;IACtB,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAA;IAC7B,MAAM,QAAQ,GAAG,WAAW,GAAG,IAAI,CAAA;IAEnC,yDAAyD;IAEzD,MAAM;SACH,GAAG,CAAC,aAAa,CAAC;SAElB,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;SAEnB,GAAG,CACF,wCAAwC,EACxC,UAAqB,IAAS,EAAE,KAAU,EAAE,IAAS;QACnD,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;QACjC,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAE3B,IAAI,CAAC,IAAI,GAAG,MAAM,CAAA;QAClB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA;QAEjB,IAAI,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;QACnD,KAAK,EAAE,CAAA;IACT,CAAC,CACF;SAEA,GAAG,CACF,4CAA4C,EAC5C,UAAqB,GAAQ,EAAE,KAAU,EAAE,IAAS;QAClD,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAA;QAC7B,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAE3C,IAAI,CAAC,IAAI,GAAG,MAAM,CAAA;QAClB,IAAI,CAAC,MAAM,GAAG,WAAW,CAAA;QAEzB,QAAQ,CAAC,IAAI,CAAC,CAAA;QACd,KAAK,EAAE,CAAA;IACT,CAAC,CACF;SAEA,GAAG,CACF,4CAA4C,EAC5C,UAAU,GAAQ,EAAE,KAAU,EAAE,IAAS;QACvC,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAA;QAE7B,wBAAwB;QACxB,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3C,IAAI,CAAC,IAAI,GAAG,MAAM,CAAA;QAClB,IAAI,CAAC,MAAM,GAAG,WAAW,CAAA;QAEzB,QAAQ,CAAC,IAAI,CAAC,CAAA;QACd,KAAK,EAAE,CAAA;IACT,CAAC,CACF;SAEA,GAAG,CAAC,iCAAiC,EAAE,SAAS,WAAW,CAAE,GAAQ;QACpE,IAAI,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;QACnB,0BAA0B;QAE1B,IAAI,IAAI,IAAI,IAAI;YAAE,OAAO,IAAI,CAAA;QAE7B,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,CAAA;QAElB,OAAO,IAAI,CAAA;IACb,CAAC,CAAC;SAED,GAAG,CAAC,iCAAiC,EAAE,SAAS,WAAW,CAAE,GAAQ;QACpE,IAAI,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;QAEnB,IAAI,IAAI,IAAI,IAAI;YAAE,OAAO,IAAI,CAAA;QAE7B,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,CAAA;QAElB,OAAO,IAAI,CAAA;IACb,CAAC,CAAC;SAED,OAAO,CACN,2CAA2C,EAC3C,EAAE,OAAO,EAAE,MAAM,EAAE,EACnB,KAAK,WAAsB,GAAQ,EAAE,IAAS;QAC5C,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;QACjC,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3B,MAAM,EAAE,OAAO,EAAE,GAAG,GAAG,CAAA;QACvB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAA;QAClB,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QAEhD,QAAQ,CAAC,QAAQ,GAAG,IAAI,GAAG,QAAQ,GAAG,OAAO,CAAC,CAAA;QAC9C,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC;YAC7C,EAAE,EAAE,GAAG,CAAC,OAAO;YACf,KAAK,EAAE,QAAQ;YACf,OAAO;SACR,CAAC,CAAA;QAEF,OAAO,IAAI,CAAA;IACb,CAAC,CACF;SAEA,OAAO,CACN,8BAA8B,EAC9B,KAAK,WAAsB,IAAS;QAClC,MAAM,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAA;QACpE,QAAQ,CAAC,QAAQ,GAAG,IAAI,GAAG,MAAM,CAAC,CAAA;IACpC,CAAC,CACF;SAEA,OAAO,CACN,+BAA+B,EAC/B,KAAK,WAAsB,GAAQ;QACjC,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;aAC7C,MAAM,CAAC,CAAC,CAAQ,EAAE,EAAE,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC;aAC5C,MAAM,CAAC,CAAC,CAAM,EAAE,CAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;QAEpE,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QACtD,QAAQ,CAAC,QAAQ,GAAG,IAAI,GAAG,QAAQ,GAAG,IAAI,CAAC,EAAE,CAAC,CAAA;IAChD,CAAC,CACF,CAAA;IAEH,MAAM,CAAC,OAAO,CAAC,KAAK;QAClB,IAAI,CAAC,GAAG,CAAC,yCAAyC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAA;IACrE,CAAC,CAAC,CAAA;IAEF,MAAM,UAAU,GAAG;QACjB,IAAI;QACJ,GAAG,EAAE,QAAQ;QACb,MAAM,EAAE,WAAW;KACpB,CAAA;IAED,MAAM,QAAQ,GAAG;QACf,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI;QAChB,GAAG,UAAU;KACd,CAAA;IAED,MAAM,QAAQ,GAAG;QACf,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI;QAChB,GAAG,UAAU;KACd,CAAA;IAED,MAAM,QAAQ,GAAG;QACf,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI;QAChB,GAAG,UAAU;KACd,CAAA;IAED,MAAM,QAAQ,GAAG;QACf,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI;QAChB,GAAG,UAAU;KACd,CAAA;IAED,OAAO;QACL,OAAO,EAAE;YACP,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;aACf;SACF;KACF,CAAA;AACH,CAAC;AAED,iBAAiB,CAAC,QAAQ,GAAG;IAC3B,IAAI,EAAE,EAAE;IACR,QAAQ,EAAE,QAAQ;CACnB,CAAA;AAED,MAAM,CAAC,cAAc,CAAC,iBAAiB,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,CAAC,CAAA"} \ No newline at end of file diff --git a/dist/BasicEntityAutocompleteField.d.ts b/dist/BasicEntityAutocompleteField.d.ts index c2b22b3..94e7e62 100644 --- a/dist/BasicEntityAutocompleteField.d.ts +++ b/dist/BasicEntityAutocompleteField.d.ts @@ -1,23 +1,17 @@ declare function BasicEntityAutocompleteField(props: any): import("react/jsx-runtime").JSX.Element; -export declare function resolveCategories(cat: { +export declare const resolveCategories: ({ item, }: { item: Record; -}): { - title: string; +}) => { key: string; + title: string; }[]; export declare function resolveDefault(cat: { multiple: number; item: any; default: string; -}): "" | { - title: any; - key: any; -}[] | { - key: string; - title: any; -}; +}): any; export declare function resolveValue(value: any, cat: { multiple: number; item: Record (_2 = Object.entries(p).reduce((s, m) => cmap.FILTER === s ? s : (s[m[0]] = // transfom(val,key,current,parentkey,parent) - "function" === typeof m[1] ? m[1](n[1][m[0]], { - skey: m[0], - self: n[1], - key: n[0], - parent: o - }) : m[1], cmap.FILTER === s[m[0]] ? cmap.FILTER : s), {}), cmap.FILTER === _2 ? 0 : r2[n[0]] = _2, r2), {}); + return Object.entries(o).reduce( + (r2, n, _2) => (_2 = Object.entries(p).reduce( + (s, m) => cmap.FILTER === s ? s : (s[m[0]] = // transfom(val,key,current,parentkey,parent) + "function" === typeof m[1] ? m[1](n[1][m[0]], { + skey: m[0], + self: n[1], + key: n[0], + parent: o + }) : m[1], cmap.FILTER === s[m[0]] ? cmap.FILTER : s), + {} + ), cmap.FILTER === _2 ? 0 : r2[n[0]] = _2, r2), + {} + ); } cmap.COPY = (x) => x; cmap.FILTER = (x) => "function" === typeof x ? (y, p, _2) => (_2 = x(y, p), Array.isArray(_2) ? !_2[0] ? _2[1] : cmap.FILTER : _2) : x ? x : cmap.FILTER; cmap.KEY = (_2, p) => p.key; function vmap(o, p) { - return Object.entries(o).reduce((r2, n, _2) => (_2 = Object.entries(p).reduce((s, m) => vmap.FILTER === s ? s : (s[m[0]] = // transfom(val,key,current,parentkey,parent) - // 'function' === typeof m[1] ? m[1](n[1][m[0]], m[0], n[1], n[0], o) : m[1] - "function" === typeof m[1] ? m[1](n[1][m[0]], { - skey: m[0], - self: n[1], - key: n[0], - parent: o - }) : m[1], vmap.FILTER === s[m[0]] ? vmap.FILTER : s), {}), vmap.FILTER === _2 ? 0 : r2.push(_2), r2), []); + return Object.entries(o).reduce( + (r2, n, _2) => (_2 = Object.entries(p).reduce( + (s, m) => vmap.FILTER === s ? s : (s[m[0]] = // transfom(val,key,current,parentkey,parent) + // 'function' === typeof m[1] ? m[1](n[1][m[0]], m[0], n[1], n[0], o) : m[1] + "function" === typeof m[1] ? m[1](n[1][m[0]], { + skey: m[0], + self: n[1], + key: n[0], + parent: o + }) : m[1], vmap.FILTER === s[m[0]] ? vmap.FILTER : s), + {} + ), vmap.FILTER === _2 ? 0 : r2.push(_2), r2), + [] + ); } vmap.COPY = (x) => x; vmap.FILTER = (x) => "function" === typeof x ? (y, p, _2) => (_2 = x(y, p), Array.isArray(_2) ? !_2[0] ? _2[1] : vmap.FILTER : _2) : x ? x : vmap.FILTER; @@ -1721,6 +1733,44 @@ function searchParamsToObject(searchParams) { } return params; } +function resvalue(value, cat, mapFn) { + const { item: items, multiple } = cat; + if (Object.keys(items).length === 0) { + return multiple === 1 ? "" : []; + } + if (Array.isArray(value)) { + return multiple === 1 && value[0] ? value[0] : value.slice(0, multiple); + } + if (typeof value === "object") { + return multiple === 1 ? value : [value]; + } + const splitValue = value.split(","); + const mapValue = (val) => items[val] ? mapFn(val, items[val]) : void 0; + switch (multiple) { + case 1: + return mapValue(splitValue[0]) || ""; + case -1: + return splitValue.map(mapValue).filter(Boolean) || []; + default: + return splitValue.slice(0, multiple).map(mapValue).filter(Boolean); + } +} +function resdefault(cat, mapFn) { + const { multiple, item: items, default: defaultValues } = cat; + if (Object.keys(items).length === 0) { + return multiple === 1 ? "" : []; + } + const defaultItems = defaultValues.split(","); + const mapResolvedDefault = (list) => list.map((val) => items[val] ? mapFn(val, items[val]) : void 0); + switch (multiple) { + case 1: + return defaultItems[0] ? mapFn(defaultItems[0], items[defaultItems[0]]) : ""; + case -1: + return mapResolvedDefault(defaultItems).filter(Boolean) || []; + default: + return mapResolvedDefault(defaultItems.slice(0, multiple)).filter(Boolean) || []; + } +} function VxgBasicAdminPlugin() { const seneca = this; const { Exact: Exact2, Default } = seneca.valid; @@ -64791,62 +64841,20 @@ function BasicEntityAutocompleteField(props) { /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, `${field.id}-box`); } -function resolveCategories$2(cat) { - return Object.keys(cat.item).map((key) => { - var _a, _b; - return { - title: (_b = (_a = cat.item) == null ? void 0 : _a[key]) == null ? void 0 : _b.title, - key - }; - }); -} +const resolveCategories$2 = ({ + item +}) => Object.entries(item).map(([key, { title }]) => ({ key, title })); function resolveDefault$2(cat) { - var _a; - const { multiple, item: items, default: defaultValues } = cat; - if (Object.keys(items).length === 0) { - return multiple === 1 ? "" : []; - } - const defaultItems = defaultValues.split(","); - const mapResolvedDefault = (list) => list.map((val) => { - var _a2; - return { - title: (_a2 = items[val]) == null ? void 0 : _a2.title, - key: val - }; - }); - switch (multiple) { - case 1: - return defaultItems[0] ? { - key: defaultItems[0], - title: (_a = items[defaultItems[0]]) == null ? void 0 : _a.title - } : ""; - case -1: - return mapResolvedDefault(defaultItems) || []; - default: - return mapResolvedDefault(defaultItems.slice(0, multiple)) || []; - } + return resdefault(cat, (val, item) => ({ + key: val, + title: item.title + })); } function resolveValue$1(value, cat) { - const { item: items, multiple } = cat; - if (Object.keys(items).length === 0) { - return multiple === 1 ? "" : []; - } - if (Array.isArray(value)) { - return multiple === 1 && value[0] ? value[0] : value.slice(0, multiple); - } - if (typeof value === "object") { - return multiple === 1 ? value : [value]; - } - const mapValue = (val) => items[val] ? { key: val, title: items[val].title } : void 0; - const splitValue = value.split(","); - switch (multiple) { - case 1: - return mapValue(splitValue[0]) || ""; - case -1: - return splitValue.map(mapValue).filter(Boolean) || []; - default: - return splitValue.slice(0, multiple).map(mapValue).filter(Boolean); - } + return resvalue(value, cat, (val, item) => ({ + key: val, + title: item.title + })); } const CMPNAME$l = "BasicEntitySliderField"; const { Open: Open$k } = gubu_minExports.Gubu; @@ -65392,42 +65400,10 @@ function resolveCategories(cat) { }); } function resolveDefault(cat) { - const { multiple, item: items, default: defaultValues } = cat; - if (Object.keys(items).length === 0) { - return multiple === 1 ? "" : []; - } - const defaultItems = defaultValues.split(","); - const mapResolvedDefault = (list) => list.map((val) => items[val] ? val : void 0); - switch (multiple) { - case 1: - return defaultItems[0] ? defaultItems[0] : ""; - case -1: - return mapResolvedDefault(defaultItems).filter(Boolean) || []; - default: - return mapResolvedDefault(defaultItems.slice(0, multiple)).filter(Boolean) || []; - } + return resdefault(cat, (val, item) => val); } function resolveValue(value, cat) { - const { item: items, multiple } = cat; - if (Object.keys(items).length === 0) { - return multiple === 1 ? "" : []; - } - if (Array.isArray(value)) { - return multiple === 1 && value[0] ? value[0] : value.slice(0, multiple); - } - if (typeof value === "object") { - return multiple === 1 ? value : [value]; - } - const mapValue = (val) => items[val] ? val : void 0; - const splitValue = value.split(","); - switch (multiple) { - case 1: - return mapValue(splitValue[0]) || ""; - case -1: - return splitValue.map(mapValue).filter(Boolean) || []; - default: - return splitValue.slice(0, multiple).map(mapValue).filter(Boolean) || []; - } + return resvalue(value, cat, (val, item) => val); } const CMPNAME$a = "BasicEntitySliderField"; const { Open: Open$9 } = gubu_minExports.Gubu; diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index c524b48..1991644 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -1702,26 +1702,38 @@ var __async = (__this, __arguments, generator) => { var gubu_minExports = gubu_min$2.exports; const gubu_min$1 = /* @__PURE__ */ getDefaultExportFromCjs(gubu_minExports); function cmap(o, p) { - return Object.entries(o).reduce((r2, n, _2) => (_2 = Object.entries(p).reduce((s, m) => cmap.FILTER === s ? s : (s[m[0]] = // transfom(val,key,current,parentkey,parent) - "function" === typeof m[1] ? m[1](n[1][m[0]], { - skey: m[0], - self: n[1], - key: n[0], - parent: o - }) : m[1], cmap.FILTER === s[m[0]] ? cmap.FILTER : s), {}), cmap.FILTER === _2 ? 0 : r2[n[0]] = _2, r2), {}); + return Object.entries(o).reduce( + (r2, n, _2) => (_2 = Object.entries(p).reduce( + (s, m) => cmap.FILTER === s ? s : (s[m[0]] = // transfom(val,key,current,parentkey,parent) + "function" === typeof m[1] ? m[1](n[1][m[0]], { + skey: m[0], + self: n[1], + key: n[0], + parent: o + }) : m[1], cmap.FILTER === s[m[0]] ? cmap.FILTER : s), + {} + ), cmap.FILTER === _2 ? 0 : r2[n[0]] = _2, r2), + {} + ); } cmap.COPY = (x) => x; cmap.FILTER = (x) => "function" === typeof x ? (y, p, _2) => (_2 = x(y, p), Array.isArray(_2) ? !_2[0] ? _2[1] : cmap.FILTER : _2) : x ? x : cmap.FILTER; cmap.KEY = (_2, p) => p.key; function vmap(o, p) { - return Object.entries(o).reduce((r2, n, _2) => (_2 = Object.entries(p).reduce((s, m) => vmap.FILTER === s ? s : (s[m[0]] = // transfom(val,key,current,parentkey,parent) - // 'function' === typeof m[1] ? m[1](n[1][m[0]], m[0], n[1], n[0], o) : m[1] - "function" === typeof m[1] ? m[1](n[1][m[0]], { - skey: m[0], - self: n[1], - key: n[0], - parent: o - }) : m[1], vmap.FILTER === s[m[0]] ? vmap.FILTER : s), {}), vmap.FILTER === _2 ? 0 : r2.push(_2), r2), []); + return Object.entries(o).reduce( + (r2, n, _2) => (_2 = Object.entries(p).reduce( + (s, m) => vmap.FILTER === s ? s : (s[m[0]] = // transfom(val,key,current,parentkey,parent) + // 'function' === typeof m[1] ? m[1](n[1][m[0]], m[0], n[1], n[0], o) : m[1] + "function" === typeof m[1] ? m[1](n[1][m[0]], { + skey: m[0], + self: n[1], + key: n[0], + parent: o + }) : m[1], vmap.FILTER === s[m[0]] ? vmap.FILTER : s), + {} + ), vmap.FILTER === _2 ? 0 : r2.push(_2), r2), + [] + ); } vmap.COPY = (x) => x; vmap.FILTER = (x) => "function" === typeof x ? (y, p, _2) => (_2 = x(y, p), Array.isArray(_2) ? !_2[0] ? _2[1] : vmap.FILTER : _2) : x ? x : vmap.FILTER; @@ -1733,6 +1745,44 @@ var __async = (__this, __arguments, generator) => { } return params; } + function resvalue(value, cat, mapFn) { + const { item: items, multiple } = cat; + if (Object.keys(items).length === 0) { + return multiple === 1 ? "" : []; + } + if (Array.isArray(value)) { + return multiple === 1 && value[0] ? value[0] : value.slice(0, multiple); + } + if (typeof value === "object") { + return multiple === 1 ? value : [value]; + } + const splitValue = value.split(","); + const mapValue = (val) => items[val] ? mapFn(val, items[val]) : void 0; + switch (multiple) { + case 1: + return mapValue(splitValue[0]) || ""; + case -1: + return splitValue.map(mapValue).filter(Boolean) || []; + default: + return splitValue.slice(0, multiple).map(mapValue).filter(Boolean); + } + } + function resdefault(cat, mapFn) { + const { multiple, item: items, default: defaultValues } = cat; + if (Object.keys(items).length === 0) { + return multiple === 1 ? "" : []; + } + const defaultItems = defaultValues.split(","); + const mapResolvedDefault = (list) => list.map((val) => items[val] ? mapFn(val, items[val]) : void 0); + switch (multiple) { + case 1: + return defaultItems[0] ? mapFn(defaultItems[0], items[defaultItems[0]]) : ""; + case -1: + return mapResolvedDefault(defaultItems).filter(Boolean) || []; + default: + return mapResolvedDefault(defaultItems.slice(0, multiple)).filter(Boolean) || []; + } + } function VxgBasicAdminPlugin() { const seneca = this; const { Exact: Exact2, Default } = seneca.valid; @@ -64803,62 +64853,20 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, `${field.id}-box`); } - function resolveCategories$2(cat) { - return Object.keys(cat.item).map((key) => { - var _a, _b; - return { - title: (_b = (_a = cat.item) == null ? void 0 : _a[key]) == null ? void 0 : _b.title, - key - }; - }); - } + const resolveCategories$2 = ({ + item + }) => Object.entries(item).map(([key, { title }]) => ({ key, title })); function resolveDefault$2(cat) { - var _a; - const { multiple, item: items, default: defaultValues } = cat; - if (Object.keys(items).length === 0) { - return multiple === 1 ? "" : []; - } - const defaultItems = defaultValues.split(","); - const mapResolvedDefault = (list) => list.map((val) => { - var _a2; - return { - title: (_a2 = items[val]) == null ? void 0 : _a2.title, - key: val - }; - }); - switch (multiple) { - case 1: - return defaultItems[0] ? { - key: defaultItems[0], - title: (_a = items[defaultItems[0]]) == null ? void 0 : _a.title - } : ""; - case -1: - return mapResolvedDefault(defaultItems) || []; - default: - return mapResolvedDefault(defaultItems.slice(0, multiple)) || []; - } + return resdefault(cat, (val, item) => ({ + key: val, + title: item.title + })); } function resolveValue$1(value, cat) { - const { item: items, multiple } = cat; - if (Object.keys(items).length === 0) { - return multiple === 1 ? "" : []; - } - if (Array.isArray(value)) { - return multiple === 1 && value[0] ? value[0] : value.slice(0, multiple); - } - if (typeof value === "object") { - return multiple === 1 ? value : [value]; - } - const mapValue = (val) => items[val] ? { key: val, title: items[val].title } : void 0; - const splitValue = value.split(","); - switch (multiple) { - case 1: - return mapValue(splitValue[0]) || ""; - case -1: - return splitValue.map(mapValue).filter(Boolean) || []; - default: - return splitValue.slice(0, multiple).map(mapValue).filter(Boolean); - } + return resvalue(value, cat, (val, item) => ({ + key: val, + title: item.title + })); } const CMPNAME$l = "BasicEntitySliderField"; const { Open: Open$k } = gubu_minExports.Gubu; @@ -65404,42 +65412,10 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); } function resolveDefault(cat) { - const { multiple, item: items, default: defaultValues } = cat; - if (Object.keys(items).length === 0) { - return multiple === 1 ? "" : []; - } - const defaultItems = defaultValues.split(","); - const mapResolvedDefault = (list) => list.map((val) => items[val] ? val : void 0); - switch (multiple) { - case 1: - return defaultItems[0] ? defaultItems[0] : ""; - case -1: - return mapResolvedDefault(defaultItems).filter(Boolean) || []; - default: - return mapResolvedDefault(defaultItems.slice(0, multiple)).filter(Boolean) || []; - } + return resdefault(cat, (val, item) => val); } function resolveValue(value, cat) { - const { item: items, multiple } = cat; - if (Object.keys(items).length === 0) { - return multiple === 1 ? "" : []; - } - if (Array.isArray(value)) { - return multiple === 1 && value[0] ? value[0] : value.slice(0, multiple); - } - if (typeof value === "object") { - return multiple === 1 ? value : [value]; - } - const mapValue = (val) => items[val] ? val : void 0; - const splitValue = value.split(","); - switch (multiple) { - case 1: - return mapValue(splitValue[0]) || ""; - case -1: - return splitValue.map(mapValue).filter(Boolean) || []; - default: - return splitValue.slice(0, multiple).map(mapValue).filter(Boolean) || []; - } + return resvalue(value, cat, (val, item) => val); } const CMPNAME$a = "BasicEntitySliderField"; const { Open: Open$9 } = gubu_minExports.Gubu; From 7e449a88a4e0db1a9bbb38453cd266b4563ace6b Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Wed, 7 Aug 2024 22:43:47 +0100 Subject: [PATCH 106/122] Add `cid` to BasicEntityEdit and BasicEntityField to make plugins tag unique --- dist/voxgig-model-react.es.js | 801 ++++++++++++++++++--------------- dist/voxgig-model-react.umd.js | 799 +++++++++++++++++--------------- src/lib/BasicEntityEdit.tsx | 55 ++- src/lib/BasicEntityField.tsx | 9 +- 4 files changed, 911 insertions(+), 753 deletions(-) diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index 24394c7..cf1feb7 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -54,7 +54,7 @@ var __async = (__this, __arguments, generator) => { }; import * as React$1 from "react"; import React__default, { isValidElement, Children, cloneElement, useMemo, useState, useReducer, useRef, useEffect, useCallback, memo as memo$2, Fragment, useLayoutEffect } from "react"; -import { Button as Button$1, Avatar, Menu as Menu$1, MenuItem as MenuItem$1, IconButton as IconButton$1, useTheme as useTheme$5, Box as Box$2, FormControlLabel as FormControlLabel$1, Checkbox as Checkbox$1, Autocomplete as Autocomplete$1, TextField as TextField$1, FormLabel as FormLabel$1, Slider as Slider$1, RadioGroup, Radio as Radio$1, Rating, ButtonGroup, FormControl as FormControl$1, InputLabel as InputLabel$1, Select as Select$1, Switch as Switch$1, ToggleButtonGroup, ToggleButton, Grid as Grid$1, Toolbar as Toolbar$1, Container as Container$2, Drawer as Drawer$1, List as List$1, ListItem as ListItem$1, ListItemButton as ListItemButton$1, ListItemIcon as ListItemIcon$1, ListItemText as ListItemText$1, Divider as Divider$1, Typography as Typography$1 } from "@mui/material"; +import { Button as Button$1, Avatar, Menu as Menu$1, MenuItem as MenuItem$1, IconButton as IconButton$1, useTheme as useTheme$5, Box as Box$2, FormControlLabel as FormControlLabel$1, Checkbox as Checkbox$1, Autocomplete as Autocomplete$1, TextField as TextField$1, FormLabel as FormLabel$1, Slider as Slider$1, RadioGroup, Radio as Radio$1, Rating, ButtonGroup, FormControl as FormControl$1, InputLabel as InputLabel$1, Select as Select$1, Switch as Switch$1, ToggleButtonGroup, ToggleButton, Grid as Grid$1, Toolbar as Toolbar$1, Alert as Alert$1, Container as Container$2, Drawer as Drawer$1, List as List$1, ListItem as ListItem$1, ListItemButton as ListItemButton$1, ListItemIcon as ListItemIcon$1, ListItemText as ListItemText$1, Divider as Divider$1, Typography as Typography$1 } from "@mui/material"; import emStyled from "@emotion/styled"; import { CacheProvider, Global, ThemeContext as ThemeContext$1, css, keyframes } from "@emotion/react"; import { useSelector } from "react-redux"; @@ -5546,21 +5546,21 @@ const styleFunctionSx = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def }, Symbol.toStringTag, { value: "Module" })); const require$$8 = /* @__PURE__ */ getAugmentedNamespace(styleFunctionSx); "use strict"; -var _interopRequireDefault$z = interopRequireDefaultExports; +var _interopRequireDefault$A = interopRequireDefaultExports; Object.defineProperty(createStyled$2, "__esModule", { value: true }); -var _default$z = createStyled$2.default = createStyled$1; +var _default$A = createStyled$2.default = createStyled$1; var shouldForwardProp_1 = createStyled$2.shouldForwardProp = shouldForwardProp$1; var systemDefaultTheme_1 = createStyled$2.systemDefaultTheme = void 0; -var _extends2 = _interopRequireDefault$z(require_extends()); -var _objectWithoutPropertiesLoose2 = _interopRequireDefault$z(requireObjectWithoutPropertiesLoose()); +var _extends2 = _interopRequireDefault$A(require_extends()); +var _objectWithoutPropertiesLoose2 = _interopRequireDefault$A(requireObjectWithoutPropertiesLoose()); var _styledEngine$1 = _interopRequireWildcard$1(require$$1$1); var _deepmerge = require$$4; -var _capitalize = _interopRequireDefault$z(require$$5); -var _getDisplayName = _interopRequireDefault$z(require$$6); -var _createTheme = _interopRequireDefault$z(require$$7); -var _styleFunctionSx = _interopRequireDefault$z(require$$8); +var _capitalize = _interopRequireDefault$A(require$$5); +var _getDisplayName = _interopRequireDefault$A(require$$6); +var _createTheme = _interopRequireDefault$A(require$$7); +var _styleFunctionSx = _interopRequireDefault$A(require$$8); const _excluded$2i = ["ownerState"], _excluded2$i = ["variants"], _excluded3$7 = ["name", "slot", "skipVariantsResolver", "skipSx", "overridesResolver"]; function _getRequireWildcardCache$1(e) { if ("function" != typeof WeakMap) return null; @@ -5850,7 +5850,7 @@ const clamp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert }, Symbol.toStringTag, { value: "Module" })); const require$$2 = /* @__PURE__ */ getAugmentedNamespace(clamp); "use strict"; -var _interopRequireDefault$y = interopRequireDefaultExports; +var _interopRequireDefault$z = interopRequireDefaultExports; Object.defineProperty(colorManipulator, "__esModule", { value: true }); @@ -5872,8 +5872,8 @@ var private_safeEmphasize_1 = colorManipulator.private_safeEmphasize = private_s var private_safeLighten_1 = colorManipulator.private_safeLighten = private_safeLighten$1; var recomposeColor_1 = colorManipulator.recomposeColor = recomposeColor$1; var rgbToHex_1 = colorManipulator.rgbToHex = rgbToHex$1; -var _formatMuiErrorMessage2 = _interopRequireDefault$y(require$$1); -var _clamp = _interopRequireDefault$y(require$$2); +var _formatMuiErrorMessage2 = _interopRequireDefault$z(require$$1); +var _clamp = _interopRequireDefault$z(require$$2); function clampWrapper$1(value, min2 = 0, max2 = 1) { if (process.env.NODE_ENV !== "production") { if (value < min2 || value > max2) { @@ -6764,7 +6764,7 @@ function slotShouldForwardProp(prop) { } const rootShouldForwardProp = (prop) => slotShouldForwardProp(prop) && prop !== "classes"; "use client"; -const styled$1 = _default$z({ +const styled$1 = _default$A({ themeId: THEME_ID, defaultTheme: defaultTheme$5, rootShouldForwardProp @@ -10797,12 +10797,12 @@ function BasicHeadTool(props) { return tool; } const CMPNAME$p = "BasicHead"; -const { Child: Child$6, Exact, Open: Open$o, Required: Required$1 } = gubu_minExports.Gubu; +const { Child: Child$6, Exact, Open: Open$p, Required: Required$1 } = gubu_minExports.Gubu; const BasicHeadSpecShape = gubu_minExports.Gubu({ head: { name: String, active: Boolean, - tool: Child$6(Open$o({ + tool: Child$6(Open$p({ align: Exact("left", "right") })) }, @@ -17603,7 +17603,7 @@ var useThemeWithoutDefault = {}; Object.defineProperty(useThemeWithoutDefault, "__esModule", { value: true }); -var default_1$y = useThemeWithoutDefault.default = void 0; +var default_1$z = useThemeWithoutDefault.default = void 0; var React = _interopRequireWildcard(React__default); var _styledEngine = require$$1$1; function _getRequireWildcardCache(e) { @@ -17632,7 +17632,7 @@ function useTheme(defaultTheme2 = null) { const contextTheme = React.useContext(_styledEngine.ThemeContext); return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme2 : contextTheme; } -var _default$y = default_1$y = useThemeWithoutDefault.default = useTheme; +var _default$z = default_1$z = useThemeWithoutDefault.default = useTheme; var top = "top"; var bottom = "bottom"; var right = "right"; @@ -19414,7 +19414,7 @@ const PopperRoot = styled$1(Popper$1, { })({}); const Popper2 = /* @__PURE__ */ React$1.forwardRef(function Popper3(inProps, ref) { var _slots$root; - const theme = default_1$y(); + const theme = default_1$z(); const props = useDefaultProps({ props: inProps, name: "MuiPopper" @@ -25355,450 +25355,450 @@ function requireCreateSvgIcon() { } "use strict"; "use client"; -var _interopRequireDefault$x = interopRequireDefaultExports; +var _interopRequireDefault$y = interopRequireDefaultExports; Object.defineProperty(ArrowDownward, "__esModule", { value: true }); -var default_1$x = ArrowDownward.default = void 0; -var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); -var _jsxRuntime$x = requireJsxRuntime(); -var _default$x = default_1$x = ArrowDownward.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { +var default_1$y = ArrowDownward.default = void 0; +var _createSvgIcon$y = _interopRequireDefault$y(requireCreateSvgIcon()); +var _jsxRuntime$y = requireJsxRuntime(); +var _default$y = default_1$y = ArrowDownward.default = (0, _createSvgIcon$y.default)(/* @__PURE__ */ (0, _jsxRuntime$y.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); var ArrowRight = {}; "use strict"; "use client"; -var _interopRequireDefault$w = interopRequireDefaultExports; +var _interopRequireDefault$x = interopRequireDefaultExports; Object.defineProperty(ArrowRight, "__esModule", { value: true }); -var default_1$w = ArrowRight.default = void 0; -var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); -var _jsxRuntime$w = requireJsxRuntime(); -var _default$w = default_1$w = ArrowRight.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { +var default_1$x = ArrowRight.default = void 0; +var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); +var _jsxRuntime$x = requireJsxRuntime(); +var _default$x = default_1$x = ArrowRight.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); var Cancel = {}; "use strict"; "use client"; -var _interopRequireDefault$v = interopRequireDefaultExports; +var _interopRequireDefault$w = interopRequireDefaultExports; Object.defineProperty(Cancel, "__esModule", { value: true }); -var default_1$v = Cancel.default = void 0; -var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); -var _jsxRuntime$v = requireJsxRuntime(); -var _default$v = default_1$v = Cancel.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { +var default_1$w = Cancel.default = void 0; +var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); +var _jsxRuntime$w = requireJsxRuntime(); +var _default$w = default_1$w = Cancel.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); var ChevronLeft = {}; "use strict"; "use client"; -var _interopRequireDefault$u = interopRequireDefaultExports; +var _interopRequireDefault$v = interopRequireDefaultExports; Object.defineProperty(ChevronLeft, "__esModule", { value: true }); -var default_1$u = ChevronLeft.default = void 0; -var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); -var _jsxRuntime$u = requireJsxRuntime(); -var _default$u = default_1$u = ChevronLeft.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { +var default_1$v = ChevronLeft.default = void 0; +var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); +var _jsxRuntime$v = requireJsxRuntime(); +var _default$v = default_1$v = ChevronLeft.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); var ChevronRight = {}; "use strict"; "use client"; -var _interopRequireDefault$t = interopRequireDefaultExports; +var _interopRequireDefault$u = interopRequireDefaultExports; Object.defineProperty(ChevronRight, "__esModule", { value: true }); -var default_1$t = ChevronRight.default = void 0; -var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); -var _jsxRuntime$t = requireJsxRuntime(); -var _default$t = default_1$t = ChevronRight.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { +var default_1$u = ChevronRight.default = void 0; +var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); +var _jsxRuntime$u = requireJsxRuntime(); +var _default$u = default_1$u = ChevronRight.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); var ClearAll = {}; "use strict"; "use client"; -var _interopRequireDefault$s = interopRequireDefaultExports; +var _interopRequireDefault$t = interopRequireDefaultExports; Object.defineProperty(ClearAll, "__esModule", { value: true }); -var default_1$s = ClearAll.default = void 0; -var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); -var _jsxRuntime$s = requireJsxRuntime(); -var _default$s = default_1$s = ClearAll.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { +var default_1$t = ClearAll.default = void 0; +var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); +var _jsxRuntime$t = requireJsxRuntime(); +var _default$t = default_1$t = ClearAll.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); var Close = {}; "use strict"; "use client"; -var _interopRequireDefault$r = interopRequireDefaultExports; +var _interopRequireDefault$s = interopRequireDefaultExports; Object.defineProperty(Close, "__esModule", { value: true }); -var default_1$r = Close.default = void 0; -var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); -var _jsxRuntime$r = requireJsxRuntime(); -var _default$r = default_1$r = Close.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { +var default_1$s = Close.default = void 0; +var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); +var _jsxRuntime$s = requireJsxRuntime(); +var _default$s = default_1$s = Close.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); var ContentCopy = {}; "use strict"; "use client"; -var _interopRequireDefault$q = interopRequireDefaultExports; +var _interopRequireDefault$r = interopRequireDefaultExports; Object.defineProperty(ContentCopy, "__esModule", { value: true }); -var default_1$q = ContentCopy.default = void 0; -var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); -var _jsxRuntime$q = requireJsxRuntime(); -var _default$q = default_1$q = ContentCopy.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { +var default_1$r = ContentCopy.default = void 0; +var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); +var _jsxRuntime$r = requireJsxRuntime(); +var _default$r = default_1$r = ContentCopy.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); var DensityLarge = {}; "use strict"; "use client"; -var _interopRequireDefault$p = interopRequireDefaultExports; +var _interopRequireDefault$q = interopRequireDefaultExports; Object.defineProperty(DensityLarge, "__esModule", { value: true }); -var default_1$p = DensityLarge.default = void 0; -var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); -var _jsxRuntime$p = requireJsxRuntime(); -var _default$p = default_1$p = DensityLarge.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { +var default_1$q = DensityLarge.default = void 0; +var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); +var _jsxRuntime$q = requireJsxRuntime(); +var _default$q = default_1$q = DensityLarge.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); var DensityMedium = {}; "use strict"; "use client"; -var _interopRequireDefault$o = interopRequireDefaultExports; +var _interopRequireDefault$p = interopRequireDefaultExports; Object.defineProperty(DensityMedium, "__esModule", { value: true }); -var default_1$o = DensityMedium.default = void 0; -var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); -var _jsxRuntime$o = requireJsxRuntime(); -var _default$o = default_1$o = DensityMedium.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { +var default_1$p = DensityMedium.default = void 0; +var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); +var _jsxRuntime$p = requireJsxRuntime(); +var _default$p = default_1$p = DensityMedium.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); var DensitySmall = {}; "use strict"; "use client"; -var _interopRequireDefault$n = interopRequireDefaultExports; +var _interopRequireDefault$o = interopRequireDefaultExports; Object.defineProperty(DensitySmall, "__esModule", { value: true }); -var default_1$n = DensitySmall.default = void 0; -var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); -var _jsxRuntime$n = requireJsxRuntime(); -var _default$n = default_1$n = DensitySmall.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { +var default_1$o = DensitySmall.default = void 0; +var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); +var _jsxRuntime$o = requireJsxRuntime(); +var _default$o = default_1$o = DensitySmall.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); var DragHandle = {}; "use strict"; "use client"; -var _interopRequireDefault$m = interopRequireDefaultExports; +var _interopRequireDefault$n = interopRequireDefaultExports; Object.defineProperty(DragHandle, "__esModule", { value: true }); -var default_1$m = DragHandle.default = void 0; -var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); -var _jsxRuntime$m = requireJsxRuntime(); -var _default$m = default_1$m = DragHandle.default = (0, _createSvgIcon$m.default)(/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { +var default_1$n = DragHandle.default = void 0; +var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); +var _jsxRuntime$n = requireJsxRuntime(); +var _default$n = default_1$n = DragHandle.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); var DynamicFeed = {}; "use strict"; "use client"; -var _interopRequireDefault$l = interopRequireDefaultExports; +var _interopRequireDefault$m = interopRequireDefaultExports; Object.defineProperty(DynamicFeed, "__esModule", { value: true }); -var default_1$l = DynamicFeed.default = void 0; -var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); -var _jsxRuntime$l = requireJsxRuntime(); -var _default$l = default_1$l = DynamicFeed.default = (0, _createSvgIcon$l.default)([/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { +var default_1$m = DynamicFeed.default = void 0; +var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); +var _jsxRuntime$m = requireJsxRuntime(); +var _default$m = default_1$m = DynamicFeed.default = (0, _createSvgIcon$m.default)([/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" -}, "0"), /* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { +}, "0"), /* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M20 3h-8c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 8h-8V7h8zM4 12H2v7c0 1.1.9 2 2 2h9v-2H4z" }, "1")], "DynamicFeed"); var Edit = {}; "use strict"; "use client"; -var _interopRequireDefault$k = interopRequireDefaultExports; +var _interopRequireDefault$l = interopRequireDefaultExports; Object.defineProperty(Edit, "__esModule", { value: true }); -var default_1$k = Edit.default = void 0; -var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); -var _jsxRuntime$k = requireJsxRuntime(); -var _default$k = default_1$k = Edit.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { +var default_1$l = Edit.default = void 0; +var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); +var _jsxRuntime$l = requireJsxRuntime(); +var _default$l = default_1$l = Edit.default = (0, _createSvgIcon$l.default)(/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); var ExpandMore = {}; "use strict"; "use client"; -var _interopRequireDefault$j = interopRequireDefaultExports; +var _interopRequireDefault$k = interopRequireDefaultExports; Object.defineProperty(ExpandMore, "__esModule", { value: true }); -var default_1$j = ExpandMore.default = void 0; -var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); -var _jsxRuntime$j = requireJsxRuntime(); -var _default$j = default_1$j = ExpandMore.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { +var default_1$k = ExpandMore.default = void 0; +var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); +var _jsxRuntime$k = requireJsxRuntime(); +var _default$k = default_1$k = ExpandMore.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); var FilterAlt = {}; "use strict"; "use client"; -var _interopRequireDefault$i = interopRequireDefaultExports; +var _interopRequireDefault$j = interopRequireDefaultExports; Object.defineProperty(FilterAlt, "__esModule", { value: true }); -var default_1$i = FilterAlt.default = void 0; -var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); -var _jsxRuntime$i = requireJsxRuntime(); -var _default$i = default_1$i = FilterAlt.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { +var default_1$j = FilterAlt.default = void 0; +var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); +var _jsxRuntime$j = requireJsxRuntime(); +var _default$j = default_1$j = FilterAlt.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); var FilterList = {}; "use strict"; "use client"; -var _interopRequireDefault$h = interopRequireDefaultExports; +var _interopRequireDefault$i = interopRequireDefaultExports; Object.defineProperty(FilterList, "__esModule", { value: true }); -var default_1$h = FilterList.default = void 0; -var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); -var _jsxRuntime$h = requireJsxRuntime(); -var _default$h = default_1$h = FilterList.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { +var default_1$i = FilterList.default = void 0; +var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); +var _jsxRuntime$i = requireJsxRuntime(); +var _default$i = default_1$i = FilterList.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); var FilterListOff = {}; "use strict"; "use client"; -var _interopRequireDefault$g = interopRequireDefaultExports; +var _interopRequireDefault$h = interopRequireDefaultExports; Object.defineProperty(FilterListOff, "__esModule", { value: true }); -var default_1$g = FilterListOff.default = void 0; -var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); -var _jsxRuntime$g = requireJsxRuntime(); -var _default$g = default_1$g = FilterListOff.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { +var default_1$h = FilterListOff.default = void 0; +var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); +var _jsxRuntime$h = requireJsxRuntime(); +var _default$h = default_1$h = FilterListOff.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); var FirstPage = {}; "use strict"; "use client"; -var _interopRequireDefault$f = interopRequireDefaultExports; +var _interopRequireDefault$g = interopRequireDefaultExports; Object.defineProperty(FirstPage, "__esModule", { value: true }); -var default_1$f = FirstPage.default = void 0; -var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); -var _jsxRuntime$f = requireJsxRuntime(); -var _default$f = default_1$f = FirstPage.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { +var default_1$g = FirstPage.default = void 0; +var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); +var _jsxRuntime$g = requireJsxRuntime(); +var _default$g = default_1$g = FirstPage.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); var Fullscreen = {}; "use strict"; "use client"; -var _interopRequireDefault$e = interopRequireDefaultExports; +var _interopRequireDefault$f = interopRequireDefaultExports; Object.defineProperty(Fullscreen, "__esModule", { value: true }); -var default_1$e = Fullscreen.default = void 0; -var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); -var _jsxRuntime$e = requireJsxRuntime(); -var _default$e = default_1$e = Fullscreen.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { +var default_1$f = Fullscreen.default = void 0; +var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); +var _jsxRuntime$f = requireJsxRuntime(); +var _default$f = default_1$f = Fullscreen.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); var FullscreenExit = {}; "use strict"; "use client"; -var _interopRequireDefault$d = interopRequireDefaultExports; +var _interopRequireDefault$e = interopRequireDefaultExports; Object.defineProperty(FullscreenExit, "__esModule", { value: true }); -var default_1$d = FullscreenExit.default = void 0; -var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); -var _jsxRuntime$d = requireJsxRuntime(); -var _default$d = default_1$d = FullscreenExit.default = (0, _createSvgIcon$d.default)(/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { +var default_1$e = FullscreenExit.default = void 0; +var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); +var _jsxRuntime$e = requireJsxRuntime(); +var _default$e = default_1$e = FullscreenExit.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); var KeyboardDoubleArrowDown = {}; "use strict"; "use client"; -var _interopRequireDefault$c = interopRequireDefaultExports; +var _interopRequireDefault$d = interopRequireDefaultExports; Object.defineProperty(KeyboardDoubleArrowDown, "__esModule", { value: true }); -var default_1$c = KeyboardDoubleArrowDown.default = void 0; -var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); -var _jsxRuntime$c = requireJsxRuntime(); -var _default$c = default_1$c = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$c.default)([/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { +var default_1$d = KeyboardDoubleArrowDown.default = void 0; +var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); +var _jsxRuntime$d = requireJsxRuntime(); +var _default$d = default_1$d = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$d.default)([/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" -}, "0"), /* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { +}, "0"), /* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "m18 13-1.41-1.41L12 16.17l-4.59-4.58L6 13l6 6z" }, "1")], "KeyboardDoubleArrowDown"); var LastPage = {}; "use strict"; "use client"; -var _interopRequireDefault$b = interopRequireDefaultExports; +var _interopRequireDefault$c = interopRequireDefaultExports; Object.defineProperty(LastPage, "__esModule", { value: true }); -var default_1$b = LastPage.default = void 0; -var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); -var _jsxRuntime$b = requireJsxRuntime(); -var _default$b = default_1$b = LastPage.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { +var default_1$c = LastPage.default = void 0; +var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); +var _jsxRuntime$c = requireJsxRuntime(); +var _default$c = default_1$c = LastPage.default = (0, _createSvgIcon$c.default)(/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); var MoreHoriz = {}; "use strict"; "use client"; -var _interopRequireDefault$a = interopRequireDefaultExports; +var _interopRequireDefault$b = interopRequireDefaultExports; Object.defineProperty(MoreHoriz, "__esModule", { value: true }); -var default_1$a = MoreHoriz.default = void 0; -var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); -var _jsxRuntime$a = requireJsxRuntime(); -var _default$a = default_1$a = MoreHoriz.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { +var default_1$b = MoreHoriz.default = void 0; +var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); +var _jsxRuntime$b = requireJsxRuntime(); +var _default$b = default_1$b = MoreHoriz.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); var MoreVert = {}; "use strict"; "use client"; -var _interopRequireDefault$9 = interopRequireDefaultExports; +var _interopRequireDefault$a = interopRequireDefaultExports; Object.defineProperty(MoreVert, "__esModule", { value: true }); -var default_1$9 = MoreVert.default = void 0; -var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); -var _jsxRuntime$9 = requireJsxRuntime(); -var _default$9 = default_1$9 = MoreVert.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { +var default_1$a = MoreVert.default = void 0; +var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); +var _jsxRuntime$a = requireJsxRuntime(); +var _default$a = default_1$a = MoreVert.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); var PushPin = {}; "use strict"; "use client"; -var _interopRequireDefault$8 = interopRequireDefaultExports; +var _interopRequireDefault$9 = interopRequireDefaultExports; Object.defineProperty(PushPin, "__esModule", { value: true }); -var default_1$8 = PushPin.default = void 0; -var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); -var _jsxRuntime$8 = requireJsxRuntime(); -var _default$8 = default_1$8 = PushPin.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { +var default_1$9 = PushPin.default = void 0; +var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); +var _jsxRuntime$9 = requireJsxRuntime(); +var _default$9 = default_1$9 = PushPin.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" }), "PushPin"); var RestartAlt = {}; "use strict"; "use client"; -var _interopRequireDefault$7 = interopRequireDefaultExports; +var _interopRequireDefault$8 = interopRequireDefaultExports; Object.defineProperty(RestartAlt, "__esModule", { value: true }); -var default_1$7 = RestartAlt.default = void 0; -var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); -var _jsxRuntime$7 = requireJsxRuntime(); -var _default$7 = default_1$7 = RestartAlt.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { +var default_1$8 = RestartAlt.default = void 0; +var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); +var _jsxRuntime$8 = requireJsxRuntime(); +var _default$8 = default_1$8 = RestartAlt.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); var Save = {}; "use strict"; "use client"; -var _interopRequireDefault$6 = interopRequireDefaultExports; +var _interopRequireDefault$7 = interopRequireDefaultExports; Object.defineProperty(Save, "__esModule", { value: true }); -var default_1$6 = Save.default = void 0; -var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); -var _jsxRuntime$6 = requireJsxRuntime(); -var _default$6 = default_1$6 = Save.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { +var default_1$7 = Save.default = void 0; +var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); +var _jsxRuntime$7 = requireJsxRuntime(); +var _default$7 = default_1$7 = Save.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); var Search = {}; "use strict"; "use client"; -var _interopRequireDefault$5 = interopRequireDefaultExports; +var _interopRequireDefault$6 = interopRequireDefaultExports; Object.defineProperty(Search, "__esModule", { value: true }); -var default_1$5 = Search.default = void 0; -var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); -var _jsxRuntime$5 = requireJsxRuntime(); -var _default$5 = default_1$5 = Search.default = (0, _createSvgIcon$5.default)(/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { +var default_1$6 = Search.default = void 0; +var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); +var _jsxRuntime$6 = requireJsxRuntime(); +var _default$6 = default_1$6 = Search.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); var SearchOff = {}; "use strict"; "use client"; -var _interopRequireDefault$4 = interopRequireDefaultExports; +var _interopRequireDefault$5 = interopRequireDefaultExports; Object.defineProperty(SearchOff, "__esModule", { value: true }); -var default_1$4 = SearchOff.default = void 0; -var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); -var _jsxRuntime$4 = requireJsxRuntime(); -var _default$4 = default_1$4 = SearchOff.default = (0, _createSvgIcon$4.default)([/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { +var default_1$5 = SearchOff.default = void 0; +var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); +var _jsxRuntime$5 = requireJsxRuntime(); +var _default$5 = default_1$5 = SearchOff.default = (0, _createSvgIcon$5.default)([/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" -}, "0"), /* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { +}, "0"), /* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M6.47 10.82 4 13.29l-2.47-2.47-.71.71L3.29 14 .82 16.47l.71.71L4 14.71l2.47 2.47.71-.71L4.71 14l2.47-2.47z" }, "1")], "SearchOff"); var Sort = {}; "use strict"; "use client"; -var _interopRequireDefault$3 = interopRequireDefaultExports; +var _interopRequireDefault$4 = interopRequireDefaultExports; Object.defineProperty(Sort, "__esModule", { value: true }); -var default_1$3 = Sort.default = void 0; -var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); -var _jsxRuntime$3 = requireJsxRuntime(); -var _default$3 = default_1$3 = Sort.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { +var default_1$4 = Sort.default = void 0; +var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); +var _jsxRuntime$4 = requireJsxRuntime(); +var _default$4 = default_1$4 = Sort.default = (0, _createSvgIcon$4.default)(/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); var SyncAlt = {}; "use strict"; "use client"; -var _interopRequireDefault$2 = interopRequireDefaultExports; +var _interopRequireDefault$3 = interopRequireDefaultExports; Object.defineProperty(SyncAlt, "__esModule", { value: true }); -var default_1$2 = SyncAlt.default = void 0; -var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); -var _jsxRuntime$2 = requireJsxRuntime(); -var _default$2 = default_1$2 = SyncAlt.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { +var default_1$3 = SyncAlt.default = void 0; +var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); +var _jsxRuntime$3 = requireJsxRuntime(); +var _default$3 = default_1$3 = SyncAlt.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); var ViewColumn = {}; "use strict"; "use client"; -var _interopRequireDefault$1 = interopRequireDefaultExports; +var _interopRequireDefault$2 = interopRequireDefaultExports; Object.defineProperty(ViewColumn, "__esModule", { value: true }); -var default_1$1 = ViewColumn.default = void 0; -var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); -var _jsxRuntime$1 = requireJsxRuntime(); -var _default$1 = default_1$1 = ViewColumn.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { +var default_1$2 = ViewColumn.default = void 0; +var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); +var _jsxRuntime$2 = requireJsxRuntime(); +var _default$2 = default_1$2 = ViewColumn.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); var VisibilityOff = {}; "use strict"; "use client"; -var _interopRequireDefault = interopRequireDefaultExports; +var _interopRequireDefault$1 = interopRequireDefaultExports; Object.defineProperty(VisibilityOff, "__esModule", { value: true }); -var default_1 = VisibilityOff.default = void 0; -var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); -var _jsxRuntime = requireJsxRuntime(); -var _default = default_1 = VisibilityOff.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { +var default_1$1 = VisibilityOff.default = void 0; +var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); +var _jsxRuntime$1 = requireJsxRuntime(); +var _default$1 = default_1$1 = VisibilityOff.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); function memo(getDeps, fn2, opts) { @@ -60268,40 +60268,40 @@ const getMRT_RowSelectColumnDef = (tableOptions) => { })); }; const MRT_Default_Icons = { - ArrowDownwardIcon: default_1$x, - ArrowRightIcon: default_1$w, - CancelIcon: default_1$v, - ChevronLeftIcon: default_1$u, - ChevronRightIcon: default_1$t, - ClearAllIcon: default_1$s, - CloseIcon: default_1$r, - ContentCopy: default_1$q, - DensityLargeIcon: default_1$p, - DensityMediumIcon: default_1$o, - DensitySmallIcon: default_1$n, - DragHandleIcon: default_1$m, - DynamicFeedIcon: default_1$l, - EditIcon: default_1$k, - ExpandMoreIcon: default_1$j, - FilterAltIcon: default_1$i, - FilterListIcon: default_1$h, - FilterListOffIcon: default_1$g, - FirstPageIcon: default_1$f, - FullscreenExitIcon: default_1$d, - FullscreenIcon: default_1$e, - KeyboardDoubleArrowDownIcon: default_1$c, - LastPageIcon: default_1$b, - MoreHorizIcon: default_1$a, - MoreVertIcon: default_1$9, - PushPinIcon: default_1$8, - RestartAltIcon: default_1$7, - SaveIcon: default_1$6, - SearchIcon: default_1$5, - SearchOffIcon: default_1$4, - SortIcon: default_1$3, - SyncAltIcon: default_1$2, - ViewColumnIcon: default_1$1, - VisibilityOffIcon: default_1 + ArrowDownwardIcon: default_1$y, + ArrowRightIcon: default_1$x, + CancelIcon: default_1$w, + ChevronLeftIcon: default_1$v, + ChevronRightIcon: default_1$u, + ClearAllIcon: default_1$t, + CloseIcon: default_1$s, + ContentCopy: default_1$r, + DensityLargeIcon: default_1$q, + DensityMediumIcon: default_1$p, + DensitySmallIcon: default_1$o, + DragHandleIcon: default_1$n, + DynamicFeedIcon: default_1$m, + EditIcon: default_1$l, + ExpandMoreIcon: default_1$k, + FilterAltIcon: default_1$j, + FilterListIcon: default_1$i, + FilterListOffIcon: default_1$h, + FirstPageIcon: default_1$g, + FullscreenExitIcon: default_1$e, + FullscreenIcon: default_1$f, + KeyboardDoubleArrowDownIcon: default_1$d, + LastPageIcon: default_1$c, + MoreHorizIcon: default_1$b, + MoreVertIcon: default_1$a, + PushPinIcon: default_1$9, + RestartAltIcon: default_1$8, + SaveIcon: default_1$7, + SearchIcon: default_1$6, + SearchOffIcon: default_1$5, + SortIcon: default_1$4, + SyncAltIcon: default_1$3, + ViewColumnIcon: default_1$2, + VisibilityOffIcon: default_1$1 }; const MRT_Localization_EN = { actions: "Actions", @@ -62756,8 +62756,8 @@ const MaterialReactTable = (props) => { } return jsxRuntimeExports.jsx(MRT_TablePaper, { table }); }; -const { Open: Open$n, Child: Child$5 } = gubu_minExports.Gubu; -const Shape$3 = gubu_minExports.Gubu(Open$n({ +const { Open: Open$o, Child: Child$5 } = gubu_minExports.Gubu; +const Shape$3 = gubu_minExports.Gubu(Open$o({ name: String, prefix: String, ent: String, @@ -64727,18 +64727,18 @@ function BasicEntityFieldError(props) { return err ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-active", children: err.message }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-none" }); } const CMPNAME$n = "BasicEntitySliderField"; -const { Open: Open$m } = gubu_minExports.Gubu; +const { Open: Open$n } = gubu_minExports.Gubu; const BasicEntityCheckboxFieldSpecShape = gubu_minExports.Gubu( - Open$m({ - field: Open$m({ + Open$n({ + field: Open$n({ id: String, name: String, kind: "", label: "", - ux: Open$m({ + ux: Open$n({ kind: gubu_minExports.Exact("Checkbox"), edit: gubu_minExports.Default(true), - props: Open$m({}) + props: Open$n({}) }) }) }), @@ -64778,15 +64778,15 @@ function BasicEntityCheckboxField(props) { ] }, `${field.id}-box`); } const CMPNAME$m = "BasicEntityAutocompleteField"; -const { Open: Open$l } = gubu_minExports.Gubu; +const { Open: Open$m } = gubu_minExports.Gubu; const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu( - Open$l({ - field: Open$l({ + Open$m({ + field: Open$m({ id: String, label: String, kind: String, name: String, - cat: Open$l({ + cat: Open$m({ default: String, title: String, multiple: Number, @@ -64795,9 +64795,9 @@ const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu( exclude: "", include: "" }, - item: Open$l({}) + item: Open$m({}) }), - ux: Open$l({ + ux: Open$m({ kind: gubu_minExports.Exact("Autocomplete"), edit: gubu_minExports.Default(true) }) @@ -64857,21 +64857,21 @@ function resolveValue$1(value, cat) { })); } const CMPNAME$l = "BasicEntitySliderField"; -const { Open: Open$k } = gubu_minExports.Gubu; +const { Open: Open$l } = gubu_minExports.Gubu; const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu( - Open$k({ - field: Open$k({ + Open$l({ + field: Open$l({ id: String, name: String, kind: "", label: "", - ux: Open$k({ + ux: Open$l({ kind: gubu_minExports.Exact("Slider"), edit: gubu_minExports.Default(true), step: gubu_minExports.Default(1), min: gubu_minExports.Default(0), max: gubu_minExports.Default(100), - props: Open$k({ + props: Open$l({ marks: gubu_minExports.Default({}), valueLabelDisplay: gubu_minExports.Exact("on", "auto", "off").Default("auto"), direction: gubu_minExports.Exact("horizontal", "vertical").Default("horizontal"), @@ -64927,20 +64927,20 @@ function resolveMarks(marks) { return marks; } const CMPNAME$k = "BasicEntitySliderField"; -const { Open: Open$j } = gubu_minExports.Gubu; +const { Open: Open$k } = gubu_minExports.Gubu; const BasicEntityRadioGroupFieldSpecShape = gubu_minExports.Gubu( - Open$j({ - field: Open$j({ + Open$k({ + field: Open$k({ id: String, name: String, kind: "", llabel: "", - ux: Open$j({ + ux: Open$k({ kind: gubu_minExports.Exact("RadioGroup"), edit: gubu_minExports.Default(true), direction: gubu_minExports.Exact("row", "column").Default("row") }), - cat: Open$j({ + cat: Open$k({ default: "", title: String, order: { @@ -64948,7 +64948,7 @@ const BasicEntityRadioGroupFieldSpecShape = gubu_minExports.Gubu( exclude: "", include: "" }, - item: Open$j({}) + item: Open$k({}) }) }) }), @@ -65006,18 +65006,18 @@ function resolveDefault$1(cat) { return defaultValues; } const CMPNAME$j = "BasicEntityTextBoxField"; -const { Open: Open$i } = gubu_minExports.Gubu; +const { Open: Open$j } = gubu_minExports.Gubu; const BasicEntityTextBoxFieldSpecShape = gubu_minExports.Gubu( - Open$i({ - field: Open$i({ + Open$j({ + field: Open$j({ id: String, name: String, kind: "", label: "", - ux: Open$i({ + ux: Open$j({ kind: gubu_minExports.Exact("TextBox"), edit: gubu_minExports.Default(true), - props: Open$i({}) + props: Open$j({}) }) }) }), @@ -65048,18 +65048,18 @@ function BasicEntityTextBoxField(props) { ] }, field.name); } const CMPNAME$i = "BasicEntityTextField"; -const { Open: Open$h } = gubu_minExports.Gubu; +const { Open: Open$i } = gubu_minExports.Gubu; const BasicEntityTextFieldSpecShape = gubu_minExports.Gubu( - Open$h({ - field: Open$h({ + Open$i({ + field: Open$i({ id: String, name: String, kind: "", label: "", - ux: Open$h({ + ux: Open$i({ kind: gubu_minExports.Exact("Text"), edit: gubu_minExports.Default(true), - props: Open$h({}) + props: Open$i({}) }) }) }), @@ -65089,18 +65089,18 @@ function BasicEntityTextField(props) { ] }, field.id); } const CMPNAME$h = "BasicEntityDateField"; -const { Open: Open$g } = gubu_minExports.Gubu; +const { Open: Open$h } = gubu_minExports.Gubu; const BasicEntityDateFieldSpecShape = gubu_minExports.Gubu( - Open$g({ - field: Open$g({ + Open$h({ + field: Open$h({ id: String, name: String, kind: "", label: "", - ux: Open$g({ + ux: Open$h({ kind: gubu_minExports.Exact("Date"), edit: gubu_minExports.Default(true), - props: Open$g({}) + props: Open$h({}) }) }) }), @@ -65130,18 +65130,18 @@ function BasicEntityDateField(props) { ] }, field.id); } const CMPNAME$g = "BasicEntityTimeField"; -const { Open: Open$f } = gubu_minExports.Gubu; +const { Open: Open$g } = gubu_minExports.Gubu; const BasicEntityTimeFieldSpecShape = gubu_minExports.Gubu( - Open$f({ - field: Open$f({ + Open$g({ + field: Open$g({ id: String, name: String, kind: "", label: "", - ux: Open$f({ + ux: Open$g({ kind: gubu_minExports.Exact("Time"), edit: gubu_minExports.Default(true), - props: Open$f({}) + props: Open$g({}) }) }) }), @@ -65171,18 +65171,18 @@ function BasicEntityTimeField(props) { ] }, field.id); } const CMPNAME$f = "BasicEntityDateTimeField"; -const { Open: Open$e } = gubu_minExports.Gubu; +const { Open: Open$f } = gubu_minExports.Gubu; const BasicEntityDateTimeFieldSpecShape = gubu_minExports.Gubu( - Open$e({ - field: Open$e({ + Open$f({ + field: Open$f({ id: String, name: String, kind: "", label: "", - ux: Open$e({ + ux: Open$f({ kind: gubu_minExports.Exact("DateTime"), edit: gubu_minExports.Default(true), - props: Open$e({}) + props: Open$f({}) }) }) }), @@ -65212,19 +65212,19 @@ function BasicEntityDateTimeField(props) { ] }, field.id); } const CMPNAME$e = "BasicEntitySliderField"; -const { Open: Open$d } = gubu_minExports.Gubu; +const { Open: Open$e } = gubu_minExports.Gubu; const BasicEntityRatingFieldSpecShape = gubu_minExports.Gubu( - Open$d({ - field: Open$d({ + Open$e({ + field: Open$e({ id: String, name: String, kind: "", label: "", - ux: Open$d({ + ux: Open$e({ kind: gubu_minExports.Exact("Rating"), edit: gubu_minExports.Default(true), precision: 1, - props: Open$d({}) + props: Open$e({}) }) }) }), @@ -65260,19 +65260,19 @@ function BasicEntityRatingField(props) { ] }, `${field.id}-div`); } const CMPNAME$d = "BasicEntitySliderField"; -const { Open: Open$c } = gubu_minExports.Gubu; +const { Open: Open$d } = gubu_minExports.Gubu; const BasicEntityButtonFieldSpecShape = gubu_minExports.Gubu( - Open$c({ - field: Open$c({ + Open$d({ + field: Open$d({ id: String, name: String, kind: "", label: String, - ux: Open$c({ + ux: Open$d({ kind: gubu_minExports.Exact("Button"), edit: true, variant: "contained", - props: Open$c({}) + props: Open$d({}) }) }) }), @@ -65296,23 +65296,23 @@ function BasicEntityButtonField(props) { ) }, `${field.id}-div`); } const CMPNAME$c = "BasicEntitySliderField"; -const { Open: Open$b } = gubu_minExports.Gubu; +const { Open: Open$c } = gubu_minExports.Gubu; const BasicEntityButtonGroupFieldSpecShape = gubu_minExports.Gubu( - Open$b({ - field: Open$b({ + Open$c({ + field: Open$c({ id: String, name: String, kind: "", label: "", - options: Open$b({ + options: Open$c({ label: { field: "label" }, value: { field: "value" }, - ents: Open$b({}) + ents: Open$c({}) }), - ux: Open$b({ + ux: Open$c({ kind: gubu_minExports.Exact("ButtonGroup"), edit: gubu_minExports.Default(true), - props: Open$b({}) + props: Open$c({}) }) }) }), @@ -65326,15 +65326,15 @@ function BasicEntityButtonGroupField(props) { }, children: val == null ? void 0 : val[field.options.label.field] }, `${field.id}-${key}`)) })) }, `${field.id}-div`); } const CMPNAME$b = "BasicEntitySelectField"; -const { Open: Open$a } = gubu_minExports.Gubu; +const { Open: Open$b } = gubu_minExports.Gubu; const BasicEntitySelectFieldSpecShape = gubu_minExports.Gubu( - Open$a({ - field: Open$a({ + Open$b({ + field: Open$b({ id: String, name: String, kind: "", label: "", - cat: Open$a({ + cat: Open$b({ default: "", title: String, multiple: Number, @@ -65343,9 +65343,9 @@ const BasicEntitySelectFieldSpecShape = gubu_minExports.Gubu( exclude: "", include: "" }, - item: Open$a({}) + item: Open$b({}) }), - ux: Open$a({ + ux: Open$b({ kind: gubu_minExports.Exact("Select"), edit: gubu_minExports.Default(true) }) @@ -65406,18 +65406,18 @@ function resolveValue(value, cat) { return resvalue(value, cat, (val, item) => val); } const CMPNAME$a = "BasicEntitySliderField"; -const { Open: Open$9 } = gubu_minExports.Gubu; +const { Open: Open$a } = gubu_minExports.Gubu; const BasicEntitySwitchFieldSpecShape = gubu_minExports.Gubu( - Open$9({ - field: Open$9({ + Open$a({ + field: Open$a({ id: String, name: String, kind: "", label: "", - ux: Open$9({ + ux: Open$a({ kind: gubu_minExports.Exact("Switch"), edit: gubu_minExports.Default(true), - props: Open$9({}) + props: Open$a({}) }) }) }), @@ -65457,15 +65457,15 @@ function BasicEntitySwitchField(props) { ] }, `${field.id}-box`); } const CMPNAME$9 = "BasicEntitySliderField"; -const { Open: Open$8 } = gubu_minExports.Gubu; +const { Open: Open$9 } = gubu_minExports.Gubu; const BasicEntityToggleButtonFieldSpecShape = gubu_minExports.Gubu( - Open$8({ - field: Open$8({ + Open$9({ + field: Open$9({ id: String, name: String, kind: "", label: "", - cat: Open$8({ + cat: Open$9({ default: "", title: String, multiple: Number, @@ -65474,12 +65474,12 @@ const BasicEntityToggleButtonFieldSpecShape = gubu_minExports.Gubu( exclude: "", include: "" }, - item: Open$8({}) + item: Open$9({}) }), - ux: Open$8({ + ux: Open$9({ kind: gubu_minExports.Exact("ToggleButton"), edit: gubu_minExports.Default(true), - props: Open$8({}) + props: Open$9({}) }) }) }), @@ -65515,9 +65515,9 @@ function BasicEntityToggleButtonField(props) { /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, `${field.id}-box`); } -const { Open: Open$7, Child: Child$4 } = gubu_minExports.Gubu; +const { Open: Open$8, Child: Child$4 } = gubu_minExports.Gubu; const Shape$2 = gubu_minExports.Gubu( - Open$7({ + Open$8({ field: {} }), { name: "BasicEntityField" } @@ -65542,15 +65542,16 @@ Object.defineProperty(VxgBasicEntityFieldPlugin, "name", { value: "VxgBasicEntityFieldPlugin" }); const CMPNAME$8 = "BasicEntityField"; -const { Open: Open$6 } = gubu_minExports.Gubu; +const { Open: Open$7 } = gubu_minExports.Gubu; const BasicEntityFieldSpecShape = gubu_minExports.Gubu( - Open$6({ - field: Open$6({ + Open$7({ + cid: String, + field: Open$7({ id: String, name: String, kind: "", label: "", - ux: Open$6({ + ux: Open$7({ kind: gubu_minExports.Exact( "Text", "TextBox", @@ -65570,7 +65571,7 @@ const BasicEntityFieldSpecShape = gubu_minExports.Gubu( ), edit: gubu_minExports.Default(true), rows: gubu_minExports.Default(3), - props: Open$6({}) + props: Open$7({}) }) }) }), @@ -65598,10 +65599,11 @@ function BasicEntityField(props) { const { seneca } = ctx(); const basicEntityField = BasicEntityFieldSpecShape(spec); const [plugin, setPlugin] = useState(false); + const cid = basicEntityField.cid + "-" + basicEntityField.field.name; useEffect(() => { if (!plugin) { seneca.use({ - tag: basicEntityField.field.name, + tag: cid, define: VxgBasicEntityFieldPlugin, options: { spec: { @@ -65616,9 +65618,9 @@ function BasicEntityField(props) { const Field = fieldMap[field.ux.kind]; return Field ? /* @__PURE__ */ jsxRuntimeExports.jsx(Field, { ctx, spec: basicEntityField }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", {}); } -const { Open: Open$5, Child: Child$3 } = gubu_minExports.Gubu; +const { Open: Open$6, Child: Child$3 } = gubu_minExports.Gubu; const Shape$1 = gubu_minExports.Gubu( - Open$5({ + Open$6({ name: String, prefix: String, ent: String, @@ -65852,6 +65854,41 @@ Object.defineProperty(VxgBasicEntityEditPlugin, "name", { value: "VxgBasicEntityEditPlugin" }); const CMPNAME$7 = "BasicEntityEdit"; +const { Open: Open$5 } = gubu_minExports.Gubu; +const BasicEntityEditSpecShape = gubu_minExports.Gubu( + Open$5({ + field: Open$5({ + id: String, + cid: "", + name: String, + kind: "", + label: "", + ux: Open$5({ + kind: gubu_minExports.Exact( + "Text", + "TextBox", + "Date", + "DateTime", + "Time", + "Checkbox", + "Autocomplete", + "Slider", + "RadioGroup", + "Rating", + "Button", + "ButtonGroup", + "Select", + "Switch", + "ToggleButton" + ), + edit: gubu_minExports.Default(true), + rows: gubu_minExports.Default(3), + props: Open$5({}) + }) + }) + }), + { name: CMPNAME$7 } +); const makeResolver = (seneca, spec) => useCallback( (data) => __async(void 0, null, function* () { const { ent, name } = spec; @@ -65886,10 +65923,12 @@ function BasicEntityEdit(props) { const { seneca } = ctx(); const [plugin, setPlugin] = useState(false); const [ready, setReady] = useState(false); + const uniqueIdRef = useRef(seneca.util.Nid()); + const cid = props.spec.name + "-" + uniqueIdRef.current; useEffect(() => { if (!plugin) { seneca.use({ - tag: props.spec.name, + tag: cid, define: VxgBasicEntityEditPlugin, options: { spec: props.spec, @@ -65974,6 +66013,7 @@ function BasicEntityEdit(props) { { ctx, spec: { + cid, field, register, getValues, @@ -65987,18 +66027,37 @@ function BasicEntityEdit(props) { } ) : /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}) }); } +var Check = {}; +"use strict"; +"use client"; +var _interopRequireDefault = interopRequireDefaultExports; +Object.defineProperty(Check, "__esModule", { + value: true +}); +var default_1 = Check.default = void 0; +var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); +var _jsxRuntime = requireJsxRuntime(); +var _default = default_1 = Check.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { + d: "M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" +}), "Check"); const CMPNAME$6 = "BasicLedHead"; const { Open: Open$4, Child: Child$2 } = gubu_minExports.Gubu; -const BasicLedHeadSpecShape = gubu_minExports.Gubu(Open$4({ - tool: Child$2({ - id: String, - kind: String, - custom: "" - }, {}), - mui: Open$4({ - Toolbar: Open$4({}) - }) -}), { name: CMPNAME$6 }); +const BasicLedHeadSpecShape = gubu_minExports.Gubu( + Open$4({ + tool: Child$2( + { + id: String, + kind: String, + custom: "" + }, + {} + ), + mui: Open$4({ + Toolbar: Open$4({}) + }) + }), + { name: CMPNAME$6 } +); function BasicLedHead(props) { const { ctx, spec } = props; const { seneca, custom } = ctx(); @@ -66015,46 +66074,40 @@ function BasicLedHead(props) { const state = { item, view: viewState, navigate }; const subview = "/view/" + viewName === loc.pathname ? "list" : "edit"; const customButtons = Object.values(spec.tool || {}).filter((t) => "button" === t.kind).map((t) => (custom.BasicLedHead || {})[t.custom]).filter((t) => null != t); - return /* @__PURE__ */ jsxRuntimeExports.jsx(Box$2, { className: "bxg-BasicLedHead", children: /* @__PURE__ */ jsxRuntimeExports.jsxs( - Toolbar$1, - { - className: "vxg-BasicLedHead-toolbar", - variant: "dense", - children: [ - /* @__PURE__ */ jsxRuntimeExports.jsx( - Button$1, - { - color: "inherit", - onClick: () => navigate(-1), - disabled: "list" === subview, - children: "Back" - } - ), - /* @__PURE__ */ jsxRuntimeExports.jsx( - Button$1, - { - color: "inherit", - onClick: () => seneca.act("aim:app,on:view,add:item", { view: viewName }), - disabled: "edit" === subview, - children: "Add" - } - ), - customButtons.map( - (cb) => /* @__PURE__ */ jsxRuntimeExports.jsx( - Button$1, - __spreadProps(__spreadValues({ - color: "inherit", - onClick: () => seneca.act(cb.msg(state, spec, ctx)), - disabled: cb.disabled(state, spec, ctx) - }, cb.attr(state, spec, ctx)), { - children: cb.title(state, spec, ctx) - }), - cb.id - ) - ) - ] - } - ) }); + return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx(Box$2, { className: "bxg-BasicLedHead", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Toolbar$1, { className: "vxg-BasicLedHead-toolbar", variant: "dense", children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx( + Button$1, + { + color: "inherit", + onClick: () => navigate(-1), + disabled: "list" === subview, + children: "Back" + } + ), + /* @__PURE__ */ jsxRuntimeExports.jsx( + Button$1, + { + color: "inherit", + onClick: () => seneca.act("aim:app,on:view,add:item", { view: viewName }), + disabled: "edit" === subview, + children: "Add" + } + ), + customButtons.map((cb) => /* @__PURE__ */ jsxRuntimeExports.jsx( + Button$1, + __spreadProps(__spreadValues({ + color: "inherit", + onClick: () => seneca.act(cb.msg(state, spec, ctx)), + disabled: cb.disabled(state, spec, ctx) + }, cb.attr(state, spec, ctx)), { + children: cb.title(state, spec, ctx) + }), + cb.id + )) + ] }) }), + /* @__PURE__ */ jsxRuntimeExports.jsx(Box$2, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Alert$1, { icon: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { fontSize: "inherit" }), severity: "success", children: "Here is a gentle confirmation that your action was successful." }) }) + ] }); } const CMPNAME$5 = "BasicLedFoot"; const { Open: Open$3 } = gubu_minExports.Gubu; @@ -66215,12 +66268,14 @@ function BasicLed(props) { const { ctx } = props; const { seneca } = ctx(); const name = props.spec.name; + const uniqueIdRef = useRef(seneca.util.Nid()); + const cid = name; const navigate = useNavigate(); const led = useSelector((state) => state.main.view[name]); const ready = true === (led == null ? void 0 : led.ready); if (!ready) { seneca.use({ - tag: name, + tag: cid, define: VxgBasicLedPlugin, options: { spec: props.spec, @@ -66228,7 +66283,7 @@ function BasicLed(props) { } }); } - const { head, list, edit, foot } = seneca.export("VxgBasicLedPlugin$" + name + "/spec") || {}; + const { head, list, edit, foot } = seneca.export("VxgBasicLedPlugin$" + cid + "/spec") || {}; return ready ? /* @__PURE__ */ jsxRuntimeExports.jsxs(Box$2, { className: "vxg-BasicLed", children: [ head.active && /* @__PURE__ */ jsxRuntimeExports.jsx(BasicLedHead, { ctx, spec: head }), /* @__PURE__ */ jsxRuntimeExports.jsxs(Routes, { children: [ @@ -66379,7 +66434,7 @@ function BasicSide(props) { { onClick: () => selectView(item.view), children: [ - /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemIcon$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$u, {}) }), + /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemIcon$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$v, {}) }), /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemText$1, { primary: item.title }) ] } diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index 1991644..f0d85c1 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -5558,21 +5558,21 @@ var __async = (__this, __arguments, generator) => { }, Symbol.toStringTag, { value: "Module" })); const require$$8 = /* @__PURE__ */ getAugmentedNamespace(styleFunctionSx); "use strict"; - var _interopRequireDefault$z = interopRequireDefaultExports; + var _interopRequireDefault$A = interopRequireDefaultExports; Object.defineProperty(createStyled$2, "__esModule", { value: true }); - var _default$z = createStyled$2.default = createStyled$1; + var _default$A = createStyled$2.default = createStyled$1; var shouldForwardProp_1 = createStyled$2.shouldForwardProp = shouldForwardProp$1; var systemDefaultTheme_1 = createStyled$2.systemDefaultTheme = void 0; - var _extends2 = _interopRequireDefault$z(require_extends()); - var _objectWithoutPropertiesLoose2 = _interopRequireDefault$z(requireObjectWithoutPropertiesLoose()); + var _extends2 = _interopRequireDefault$A(require_extends()); + var _objectWithoutPropertiesLoose2 = _interopRequireDefault$A(requireObjectWithoutPropertiesLoose()); var _styledEngine$1 = _interopRequireWildcard$1(require$$1$1); var _deepmerge = require$$4; - var _capitalize = _interopRequireDefault$z(require$$5); - var _getDisplayName = _interopRequireDefault$z(require$$6); - var _createTheme = _interopRequireDefault$z(require$$7); - var _styleFunctionSx = _interopRequireDefault$z(require$$8); + var _capitalize = _interopRequireDefault$A(require$$5); + var _getDisplayName = _interopRequireDefault$A(require$$6); + var _createTheme = _interopRequireDefault$A(require$$7); + var _styleFunctionSx = _interopRequireDefault$A(require$$8); const _excluded$2i = ["ownerState"], _excluded2$i = ["variants"], _excluded3$7 = ["name", "slot", "skipVariantsResolver", "skipSx", "overridesResolver"]; function _getRequireWildcardCache$1(e) { if ("function" != typeof WeakMap) return null; @@ -5862,7 +5862,7 @@ var __async = (__this, __arguments, generator) => { }, Symbol.toStringTag, { value: "Module" })); const require$$2 = /* @__PURE__ */ getAugmentedNamespace(clamp); "use strict"; - var _interopRequireDefault$y = interopRequireDefaultExports; + var _interopRequireDefault$z = interopRequireDefaultExports; Object.defineProperty(colorManipulator, "__esModule", { value: true }); @@ -5884,8 +5884,8 @@ var __async = (__this, __arguments, generator) => { var private_safeLighten_1 = colorManipulator.private_safeLighten = private_safeLighten$1; var recomposeColor_1 = colorManipulator.recomposeColor = recomposeColor$1; var rgbToHex_1 = colorManipulator.rgbToHex = rgbToHex$1; - var _formatMuiErrorMessage2 = _interopRequireDefault$y(require$$1); - var _clamp = _interopRequireDefault$y(require$$2); + var _formatMuiErrorMessage2 = _interopRequireDefault$z(require$$1); + var _clamp = _interopRequireDefault$z(require$$2); function clampWrapper$1(value, min2 = 0, max2 = 1) { if (process.env.NODE_ENV !== "production") { if (value < min2 || value > max2) { @@ -6776,7 +6776,7 @@ Please use another name.` : formatMuiErrorMessage$1(18)); } const rootShouldForwardProp = (prop) => slotShouldForwardProp(prop) && prop !== "classes"; "use client"; - const styled$1 = _default$z({ + const styled$1 = _default$A({ themeId: THEME_ID, defaultTheme: defaultTheme$5, rootShouldForwardProp @@ -10809,12 +10809,12 @@ try { return tool; } const CMPNAME$p = "BasicHead"; - const { Child: Child$6, Exact, Open: Open$o, Required: Required$1 } = gubu_minExports.Gubu; + const { Child: Child$6, Exact, Open: Open$p, Required: Required$1 } = gubu_minExports.Gubu; const BasicHeadSpecShape = gubu_minExports.Gubu({ head: { name: String, active: Boolean, - tool: Child$6(Open$o({ + tool: Child$6(Open$p({ align: Exact("left", "right") })) }, @@ -17615,7 +17615,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha Object.defineProperty(useThemeWithoutDefault, "__esModule", { value: true }); - var default_1$y = useThemeWithoutDefault.default = void 0; + var default_1$z = useThemeWithoutDefault.default = void 0; var React = _interopRequireWildcard(React$1); var _styledEngine = require$$1$1; function _getRequireWildcardCache(e) { @@ -17644,7 +17644,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const contextTheme = React.useContext(_styledEngine.ThemeContext); return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme2 : contextTheme; } - var _default$y = default_1$y = useThemeWithoutDefault.default = useTheme; + var _default$z = default_1$z = useThemeWithoutDefault.default = useTheme; var top = "top"; var bottom = "bottom"; var right = "right"; @@ -19426,7 +19426,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha })({}); const Popper = /* @__PURE__ */ React__namespace.forwardRef(function Popper2(inProps, ref) { var _slots$root; - const theme = default_1$y(); + const theme = default_1$z(); const props = useDefaultProps({ props: inProps, name: "MuiPopper" @@ -25367,450 +25367,450 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } "use strict"; "use client"; - var _interopRequireDefault$x = interopRequireDefaultExports; + var _interopRequireDefault$y = interopRequireDefaultExports; Object.defineProperty(ArrowDownward, "__esModule", { value: true }); - var default_1$x = ArrowDownward.default = void 0; - var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); - var _jsxRuntime$x = requireJsxRuntime(); - var _default$x = default_1$x = ArrowDownward.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { + var default_1$y = ArrowDownward.default = void 0; + var _createSvgIcon$y = _interopRequireDefault$y(requireCreateSvgIcon()); + var _jsxRuntime$y = requireJsxRuntime(); + var _default$y = default_1$y = ArrowDownward.default = (0, _createSvgIcon$y.default)(/* @__PURE__ */ (0, _jsxRuntime$y.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); var ArrowRight = {}; "use strict"; "use client"; - var _interopRequireDefault$w = interopRequireDefaultExports; + var _interopRequireDefault$x = interopRequireDefaultExports; Object.defineProperty(ArrowRight, "__esModule", { value: true }); - var default_1$w = ArrowRight.default = void 0; - var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); - var _jsxRuntime$w = requireJsxRuntime(); - var _default$w = default_1$w = ArrowRight.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { + var default_1$x = ArrowRight.default = void 0; + var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); + var _jsxRuntime$x = requireJsxRuntime(); + var _default$x = default_1$x = ArrowRight.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); var Cancel = {}; "use strict"; "use client"; - var _interopRequireDefault$v = interopRequireDefaultExports; + var _interopRequireDefault$w = interopRequireDefaultExports; Object.defineProperty(Cancel, "__esModule", { value: true }); - var default_1$v = Cancel.default = void 0; - var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); - var _jsxRuntime$v = requireJsxRuntime(); - var _default$v = default_1$v = Cancel.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { + var default_1$w = Cancel.default = void 0; + var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); + var _jsxRuntime$w = requireJsxRuntime(); + var _default$w = default_1$w = Cancel.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); var ChevronLeft = {}; "use strict"; "use client"; - var _interopRequireDefault$u = interopRequireDefaultExports; + var _interopRequireDefault$v = interopRequireDefaultExports; Object.defineProperty(ChevronLeft, "__esModule", { value: true }); - var default_1$u = ChevronLeft.default = void 0; - var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); - var _jsxRuntime$u = requireJsxRuntime(); - var _default$u = default_1$u = ChevronLeft.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { + var default_1$v = ChevronLeft.default = void 0; + var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); + var _jsxRuntime$v = requireJsxRuntime(); + var _default$v = default_1$v = ChevronLeft.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); var ChevronRight = {}; "use strict"; "use client"; - var _interopRequireDefault$t = interopRequireDefaultExports; + var _interopRequireDefault$u = interopRequireDefaultExports; Object.defineProperty(ChevronRight, "__esModule", { value: true }); - var default_1$t = ChevronRight.default = void 0; - var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); - var _jsxRuntime$t = requireJsxRuntime(); - var _default$t = default_1$t = ChevronRight.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { + var default_1$u = ChevronRight.default = void 0; + var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); + var _jsxRuntime$u = requireJsxRuntime(); + var _default$u = default_1$u = ChevronRight.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); var ClearAll = {}; "use strict"; "use client"; - var _interopRequireDefault$s = interopRequireDefaultExports; + var _interopRequireDefault$t = interopRequireDefaultExports; Object.defineProperty(ClearAll, "__esModule", { value: true }); - var default_1$s = ClearAll.default = void 0; - var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); - var _jsxRuntime$s = requireJsxRuntime(); - var _default$s = default_1$s = ClearAll.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { + var default_1$t = ClearAll.default = void 0; + var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); + var _jsxRuntime$t = requireJsxRuntime(); + var _default$t = default_1$t = ClearAll.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); var Close = {}; "use strict"; "use client"; - var _interopRequireDefault$r = interopRequireDefaultExports; + var _interopRequireDefault$s = interopRequireDefaultExports; Object.defineProperty(Close, "__esModule", { value: true }); - var default_1$r = Close.default = void 0; - var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); - var _jsxRuntime$r = requireJsxRuntime(); - var _default$r = default_1$r = Close.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { + var default_1$s = Close.default = void 0; + var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); + var _jsxRuntime$s = requireJsxRuntime(); + var _default$s = default_1$s = Close.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); var ContentCopy = {}; "use strict"; "use client"; - var _interopRequireDefault$q = interopRequireDefaultExports; + var _interopRequireDefault$r = interopRequireDefaultExports; Object.defineProperty(ContentCopy, "__esModule", { value: true }); - var default_1$q = ContentCopy.default = void 0; - var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); - var _jsxRuntime$q = requireJsxRuntime(); - var _default$q = default_1$q = ContentCopy.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { + var default_1$r = ContentCopy.default = void 0; + var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); + var _jsxRuntime$r = requireJsxRuntime(); + var _default$r = default_1$r = ContentCopy.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); var DensityLarge = {}; "use strict"; "use client"; - var _interopRequireDefault$p = interopRequireDefaultExports; + var _interopRequireDefault$q = interopRequireDefaultExports; Object.defineProperty(DensityLarge, "__esModule", { value: true }); - var default_1$p = DensityLarge.default = void 0; - var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); - var _jsxRuntime$p = requireJsxRuntime(); - var _default$p = default_1$p = DensityLarge.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { + var default_1$q = DensityLarge.default = void 0; + var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); + var _jsxRuntime$q = requireJsxRuntime(); + var _default$q = default_1$q = DensityLarge.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); var DensityMedium = {}; "use strict"; "use client"; - var _interopRequireDefault$o = interopRequireDefaultExports; + var _interopRequireDefault$p = interopRequireDefaultExports; Object.defineProperty(DensityMedium, "__esModule", { value: true }); - var default_1$o = DensityMedium.default = void 0; - var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); - var _jsxRuntime$o = requireJsxRuntime(); - var _default$o = default_1$o = DensityMedium.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { + var default_1$p = DensityMedium.default = void 0; + var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); + var _jsxRuntime$p = requireJsxRuntime(); + var _default$p = default_1$p = DensityMedium.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); var DensitySmall = {}; "use strict"; "use client"; - var _interopRequireDefault$n = interopRequireDefaultExports; + var _interopRequireDefault$o = interopRequireDefaultExports; Object.defineProperty(DensitySmall, "__esModule", { value: true }); - var default_1$n = DensitySmall.default = void 0; - var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); - var _jsxRuntime$n = requireJsxRuntime(); - var _default$n = default_1$n = DensitySmall.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { + var default_1$o = DensitySmall.default = void 0; + var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); + var _jsxRuntime$o = requireJsxRuntime(); + var _default$o = default_1$o = DensitySmall.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); var DragHandle = {}; "use strict"; "use client"; - var _interopRequireDefault$m = interopRequireDefaultExports; + var _interopRequireDefault$n = interopRequireDefaultExports; Object.defineProperty(DragHandle, "__esModule", { value: true }); - var default_1$m = DragHandle.default = void 0; - var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); - var _jsxRuntime$m = requireJsxRuntime(); - var _default$m = default_1$m = DragHandle.default = (0, _createSvgIcon$m.default)(/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { + var default_1$n = DragHandle.default = void 0; + var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); + var _jsxRuntime$n = requireJsxRuntime(); + var _default$n = default_1$n = DragHandle.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); var DynamicFeed = {}; "use strict"; "use client"; - var _interopRequireDefault$l = interopRequireDefaultExports; + var _interopRequireDefault$m = interopRequireDefaultExports; Object.defineProperty(DynamicFeed, "__esModule", { value: true }); - var default_1$l = DynamicFeed.default = void 0; - var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); - var _jsxRuntime$l = requireJsxRuntime(); - var _default$l = default_1$l = DynamicFeed.default = (0, _createSvgIcon$l.default)([/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { + var default_1$m = DynamicFeed.default = void 0; + var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); + var _jsxRuntime$m = requireJsxRuntime(); + var _default$m = default_1$m = DynamicFeed.default = (0, _createSvgIcon$m.default)([/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" - }, "0"), /* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { + }, "0"), /* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M20 3h-8c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 8h-8V7h8zM4 12H2v7c0 1.1.9 2 2 2h9v-2H4z" }, "1")], "DynamicFeed"); var Edit = {}; "use strict"; "use client"; - var _interopRequireDefault$k = interopRequireDefaultExports; + var _interopRequireDefault$l = interopRequireDefaultExports; Object.defineProperty(Edit, "__esModule", { value: true }); - var default_1$k = Edit.default = void 0; - var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); - var _jsxRuntime$k = requireJsxRuntime(); - var _default$k = default_1$k = Edit.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { + var default_1$l = Edit.default = void 0; + var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); + var _jsxRuntime$l = requireJsxRuntime(); + var _default$l = default_1$l = Edit.default = (0, _createSvgIcon$l.default)(/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); var ExpandMore = {}; "use strict"; "use client"; - var _interopRequireDefault$j = interopRequireDefaultExports; + var _interopRequireDefault$k = interopRequireDefaultExports; Object.defineProperty(ExpandMore, "__esModule", { value: true }); - var default_1$j = ExpandMore.default = void 0; - var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); - var _jsxRuntime$j = requireJsxRuntime(); - var _default$j = default_1$j = ExpandMore.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { + var default_1$k = ExpandMore.default = void 0; + var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); + var _jsxRuntime$k = requireJsxRuntime(); + var _default$k = default_1$k = ExpandMore.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); var FilterAlt = {}; "use strict"; "use client"; - var _interopRequireDefault$i = interopRequireDefaultExports; + var _interopRequireDefault$j = interopRequireDefaultExports; Object.defineProperty(FilterAlt, "__esModule", { value: true }); - var default_1$i = FilterAlt.default = void 0; - var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); - var _jsxRuntime$i = requireJsxRuntime(); - var _default$i = default_1$i = FilterAlt.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { + var default_1$j = FilterAlt.default = void 0; + var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); + var _jsxRuntime$j = requireJsxRuntime(); + var _default$j = default_1$j = FilterAlt.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); var FilterList = {}; "use strict"; "use client"; - var _interopRequireDefault$h = interopRequireDefaultExports; + var _interopRequireDefault$i = interopRequireDefaultExports; Object.defineProperty(FilterList, "__esModule", { value: true }); - var default_1$h = FilterList.default = void 0; - var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); - var _jsxRuntime$h = requireJsxRuntime(); - var _default$h = default_1$h = FilterList.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { + var default_1$i = FilterList.default = void 0; + var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); + var _jsxRuntime$i = requireJsxRuntime(); + var _default$i = default_1$i = FilterList.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); var FilterListOff = {}; "use strict"; "use client"; - var _interopRequireDefault$g = interopRequireDefaultExports; + var _interopRequireDefault$h = interopRequireDefaultExports; Object.defineProperty(FilterListOff, "__esModule", { value: true }); - var default_1$g = FilterListOff.default = void 0; - var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); - var _jsxRuntime$g = requireJsxRuntime(); - var _default$g = default_1$g = FilterListOff.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { + var default_1$h = FilterListOff.default = void 0; + var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); + var _jsxRuntime$h = requireJsxRuntime(); + var _default$h = default_1$h = FilterListOff.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); var FirstPage = {}; "use strict"; "use client"; - var _interopRequireDefault$f = interopRequireDefaultExports; + var _interopRequireDefault$g = interopRequireDefaultExports; Object.defineProperty(FirstPage, "__esModule", { value: true }); - var default_1$f = FirstPage.default = void 0; - var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); - var _jsxRuntime$f = requireJsxRuntime(); - var _default$f = default_1$f = FirstPage.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { + var default_1$g = FirstPage.default = void 0; + var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); + var _jsxRuntime$g = requireJsxRuntime(); + var _default$g = default_1$g = FirstPage.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); var Fullscreen = {}; "use strict"; "use client"; - var _interopRequireDefault$e = interopRequireDefaultExports; + var _interopRequireDefault$f = interopRequireDefaultExports; Object.defineProperty(Fullscreen, "__esModule", { value: true }); - var default_1$e = Fullscreen.default = void 0; - var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); - var _jsxRuntime$e = requireJsxRuntime(); - var _default$e = default_1$e = Fullscreen.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { + var default_1$f = Fullscreen.default = void 0; + var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); + var _jsxRuntime$f = requireJsxRuntime(); + var _default$f = default_1$f = Fullscreen.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); var FullscreenExit = {}; "use strict"; "use client"; - var _interopRequireDefault$d = interopRequireDefaultExports; + var _interopRequireDefault$e = interopRequireDefaultExports; Object.defineProperty(FullscreenExit, "__esModule", { value: true }); - var default_1$d = FullscreenExit.default = void 0; - var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); - var _jsxRuntime$d = requireJsxRuntime(); - var _default$d = default_1$d = FullscreenExit.default = (0, _createSvgIcon$d.default)(/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { + var default_1$e = FullscreenExit.default = void 0; + var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); + var _jsxRuntime$e = requireJsxRuntime(); + var _default$e = default_1$e = FullscreenExit.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); var KeyboardDoubleArrowDown = {}; "use strict"; "use client"; - var _interopRequireDefault$c = interopRequireDefaultExports; + var _interopRequireDefault$d = interopRequireDefaultExports; Object.defineProperty(KeyboardDoubleArrowDown, "__esModule", { value: true }); - var default_1$c = KeyboardDoubleArrowDown.default = void 0; - var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); - var _jsxRuntime$c = requireJsxRuntime(); - var _default$c = default_1$c = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$c.default)([/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { + var default_1$d = KeyboardDoubleArrowDown.default = void 0; + var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); + var _jsxRuntime$d = requireJsxRuntime(); + var _default$d = default_1$d = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$d.default)([/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" - }, "0"), /* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { + }, "0"), /* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "m18 13-1.41-1.41L12 16.17l-4.59-4.58L6 13l6 6z" }, "1")], "KeyboardDoubleArrowDown"); var LastPage = {}; "use strict"; "use client"; - var _interopRequireDefault$b = interopRequireDefaultExports; + var _interopRequireDefault$c = interopRequireDefaultExports; Object.defineProperty(LastPage, "__esModule", { value: true }); - var default_1$b = LastPage.default = void 0; - var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); - var _jsxRuntime$b = requireJsxRuntime(); - var _default$b = default_1$b = LastPage.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { + var default_1$c = LastPage.default = void 0; + var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); + var _jsxRuntime$c = requireJsxRuntime(); + var _default$c = default_1$c = LastPage.default = (0, _createSvgIcon$c.default)(/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); var MoreHoriz = {}; "use strict"; "use client"; - var _interopRequireDefault$a = interopRequireDefaultExports; + var _interopRequireDefault$b = interopRequireDefaultExports; Object.defineProperty(MoreHoriz, "__esModule", { value: true }); - var default_1$a = MoreHoriz.default = void 0; - var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); - var _jsxRuntime$a = requireJsxRuntime(); - var _default$a = default_1$a = MoreHoriz.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { + var default_1$b = MoreHoriz.default = void 0; + var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); + var _jsxRuntime$b = requireJsxRuntime(); + var _default$b = default_1$b = MoreHoriz.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); var MoreVert = {}; "use strict"; "use client"; - var _interopRequireDefault$9 = interopRequireDefaultExports; + var _interopRequireDefault$a = interopRequireDefaultExports; Object.defineProperty(MoreVert, "__esModule", { value: true }); - var default_1$9 = MoreVert.default = void 0; - var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); - var _jsxRuntime$9 = requireJsxRuntime(); - var _default$9 = default_1$9 = MoreVert.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { + var default_1$a = MoreVert.default = void 0; + var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); + var _jsxRuntime$a = requireJsxRuntime(); + var _default$a = default_1$a = MoreVert.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); var PushPin = {}; "use strict"; "use client"; - var _interopRequireDefault$8 = interopRequireDefaultExports; + var _interopRequireDefault$9 = interopRequireDefaultExports; Object.defineProperty(PushPin, "__esModule", { value: true }); - var default_1$8 = PushPin.default = void 0; - var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); - var _jsxRuntime$8 = requireJsxRuntime(); - var _default$8 = default_1$8 = PushPin.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { + var default_1$9 = PushPin.default = void 0; + var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); + var _jsxRuntime$9 = requireJsxRuntime(); + var _default$9 = default_1$9 = PushPin.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" }), "PushPin"); var RestartAlt = {}; "use strict"; "use client"; - var _interopRequireDefault$7 = interopRequireDefaultExports; + var _interopRequireDefault$8 = interopRequireDefaultExports; Object.defineProperty(RestartAlt, "__esModule", { value: true }); - var default_1$7 = RestartAlt.default = void 0; - var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); - var _jsxRuntime$7 = requireJsxRuntime(); - var _default$7 = default_1$7 = RestartAlt.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { + var default_1$8 = RestartAlt.default = void 0; + var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); + var _jsxRuntime$8 = requireJsxRuntime(); + var _default$8 = default_1$8 = RestartAlt.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); var Save = {}; "use strict"; "use client"; - var _interopRequireDefault$6 = interopRequireDefaultExports; + var _interopRequireDefault$7 = interopRequireDefaultExports; Object.defineProperty(Save, "__esModule", { value: true }); - var default_1$6 = Save.default = void 0; - var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); - var _jsxRuntime$6 = requireJsxRuntime(); - var _default$6 = default_1$6 = Save.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { + var default_1$7 = Save.default = void 0; + var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); + var _jsxRuntime$7 = requireJsxRuntime(); + var _default$7 = default_1$7 = Save.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); var Search = {}; "use strict"; "use client"; - var _interopRequireDefault$5 = interopRequireDefaultExports; + var _interopRequireDefault$6 = interopRequireDefaultExports; Object.defineProperty(Search, "__esModule", { value: true }); - var default_1$5 = Search.default = void 0; - var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); - var _jsxRuntime$5 = requireJsxRuntime(); - var _default$5 = default_1$5 = Search.default = (0, _createSvgIcon$5.default)(/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { + var default_1$6 = Search.default = void 0; + var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); + var _jsxRuntime$6 = requireJsxRuntime(); + var _default$6 = default_1$6 = Search.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); var SearchOff = {}; "use strict"; "use client"; - var _interopRequireDefault$4 = interopRequireDefaultExports; + var _interopRequireDefault$5 = interopRequireDefaultExports; Object.defineProperty(SearchOff, "__esModule", { value: true }); - var default_1$4 = SearchOff.default = void 0; - var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); - var _jsxRuntime$4 = requireJsxRuntime(); - var _default$4 = default_1$4 = SearchOff.default = (0, _createSvgIcon$4.default)([/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { + var default_1$5 = SearchOff.default = void 0; + var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); + var _jsxRuntime$5 = requireJsxRuntime(); + var _default$5 = default_1$5 = SearchOff.default = (0, _createSvgIcon$5.default)([/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" - }, "0"), /* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { + }, "0"), /* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M6.47 10.82 4 13.29l-2.47-2.47-.71.71L3.29 14 .82 16.47l.71.71L4 14.71l2.47 2.47.71-.71L4.71 14l2.47-2.47z" }, "1")], "SearchOff"); var Sort = {}; "use strict"; "use client"; - var _interopRequireDefault$3 = interopRequireDefaultExports; + var _interopRequireDefault$4 = interopRequireDefaultExports; Object.defineProperty(Sort, "__esModule", { value: true }); - var default_1$3 = Sort.default = void 0; - var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); - var _jsxRuntime$3 = requireJsxRuntime(); - var _default$3 = default_1$3 = Sort.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { + var default_1$4 = Sort.default = void 0; + var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); + var _jsxRuntime$4 = requireJsxRuntime(); + var _default$4 = default_1$4 = Sort.default = (0, _createSvgIcon$4.default)(/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); var SyncAlt = {}; "use strict"; "use client"; - var _interopRequireDefault$2 = interopRequireDefaultExports; + var _interopRequireDefault$3 = interopRequireDefaultExports; Object.defineProperty(SyncAlt, "__esModule", { value: true }); - var default_1$2 = SyncAlt.default = void 0; - var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); - var _jsxRuntime$2 = requireJsxRuntime(); - var _default$2 = default_1$2 = SyncAlt.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { + var default_1$3 = SyncAlt.default = void 0; + var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); + var _jsxRuntime$3 = requireJsxRuntime(); + var _default$3 = default_1$3 = SyncAlt.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); var ViewColumn = {}; "use strict"; "use client"; - var _interopRequireDefault$1 = interopRequireDefaultExports; + var _interopRequireDefault$2 = interopRequireDefaultExports; Object.defineProperty(ViewColumn, "__esModule", { value: true }); - var default_1$1 = ViewColumn.default = void 0; - var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); - var _jsxRuntime$1 = requireJsxRuntime(); - var _default$1 = default_1$1 = ViewColumn.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { + var default_1$2 = ViewColumn.default = void 0; + var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); + var _jsxRuntime$2 = requireJsxRuntime(); + var _default$2 = default_1$2 = ViewColumn.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); var VisibilityOff = {}; "use strict"; "use client"; - var _interopRequireDefault = interopRequireDefaultExports; + var _interopRequireDefault$1 = interopRequireDefaultExports; Object.defineProperty(VisibilityOff, "__esModule", { value: true }); - var default_1 = VisibilityOff.default = void 0; - var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); - var _jsxRuntime = requireJsxRuntime(); - var _default = default_1 = VisibilityOff.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { + var default_1$1 = VisibilityOff.default = void 0; + var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); + var _jsxRuntime$1 = requireJsxRuntime(); + var _default$1 = default_1$1 = VisibilityOff.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); function memo(getDeps, fn, opts) { @@ -60280,40 +60280,40 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha })); }; const MRT_Default_Icons = { - ArrowDownwardIcon: default_1$x, - ArrowRightIcon: default_1$w, - CancelIcon: default_1$v, - ChevronLeftIcon: default_1$u, - ChevronRightIcon: default_1$t, - ClearAllIcon: default_1$s, - CloseIcon: default_1$r, - ContentCopy: default_1$q, - DensityLargeIcon: default_1$p, - DensityMediumIcon: default_1$o, - DensitySmallIcon: default_1$n, - DragHandleIcon: default_1$m, - DynamicFeedIcon: default_1$l, - EditIcon: default_1$k, - ExpandMoreIcon: default_1$j, - FilterAltIcon: default_1$i, - FilterListIcon: default_1$h, - FilterListOffIcon: default_1$g, - FirstPageIcon: default_1$f, - FullscreenExitIcon: default_1$d, - FullscreenIcon: default_1$e, - KeyboardDoubleArrowDownIcon: default_1$c, - LastPageIcon: default_1$b, - MoreHorizIcon: default_1$a, - MoreVertIcon: default_1$9, - PushPinIcon: default_1$8, - RestartAltIcon: default_1$7, - SaveIcon: default_1$6, - SearchIcon: default_1$5, - SearchOffIcon: default_1$4, - SortIcon: default_1$3, - SyncAltIcon: default_1$2, - ViewColumnIcon: default_1$1, - VisibilityOffIcon: default_1 + ArrowDownwardIcon: default_1$y, + ArrowRightIcon: default_1$x, + CancelIcon: default_1$w, + ChevronLeftIcon: default_1$v, + ChevronRightIcon: default_1$u, + ClearAllIcon: default_1$t, + CloseIcon: default_1$s, + ContentCopy: default_1$r, + DensityLargeIcon: default_1$q, + DensityMediumIcon: default_1$p, + DensitySmallIcon: default_1$o, + DragHandleIcon: default_1$n, + DynamicFeedIcon: default_1$m, + EditIcon: default_1$l, + ExpandMoreIcon: default_1$k, + FilterAltIcon: default_1$j, + FilterListIcon: default_1$i, + FilterListOffIcon: default_1$h, + FirstPageIcon: default_1$g, + FullscreenExitIcon: default_1$e, + FullscreenIcon: default_1$f, + KeyboardDoubleArrowDownIcon: default_1$d, + LastPageIcon: default_1$c, + MoreHorizIcon: default_1$b, + MoreVertIcon: default_1$a, + PushPinIcon: default_1$9, + RestartAltIcon: default_1$8, + SaveIcon: default_1$7, + SearchIcon: default_1$6, + SearchOffIcon: default_1$5, + SortIcon: default_1$4, + SyncAltIcon: default_1$3, + ViewColumnIcon: default_1$2, + VisibilityOffIcon: default_1$1 }; const MRT_Localization_EN = { actions: "Actions", @@ -62768,8 +62768,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } return jsxRuntimeExports.jsx(MRT_TablePaper, { table }); }; - const { Open: Open$n, Child: Child$5 } = gubu_minExports.Gubu; - const Shape$3 = gubu_minExports.Gubu(Open$n({ + const { Open: Open$o, Child: Child$5 } = gubu_minExports.Gubu; + const Shape$3 = gubu_minExports.Gubu(Open$o({ name: String, prefix: String, ent: String, @@ -64739,18 +64739,18 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha return err ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-active", children: err.message }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-none" }); } const CMPNAME$n = "BasicEntitySliderField"; - const { Open: Open$m } = gubu_minExports.Gubu; + const { Open: Open$n } = gubu_minExports.Gubu; const BasicEntityCheckboxFieldSpecShape = gubu_minExports.Gubu( - Open$m({ - field: Open$m({ + Open$n({ + field: Open$n({ id: String, name: String, kind: "", label: "", - ux: Open$m({ + ux: Open$n({ kind: gubu_minExports.Exact("Checkbox"), edit: gubu_minExports.Default(true), - props: Open$m({}) + props: Open$n({}) }) }) }), @@ -64790,15 +64790,15 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ] }, `${field.id}-box`); } const CMPNAME$m = "BasicEntityAutocompleteField"; - const { Open: Open$l } = gubu_minExports.Gubu; + const { Open: Open$m } = gubu_minExports.Gubu; const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu( - Open$l({ - field: Open$l({ + Open$m({ + field: Open$m({ id: String, label: String, kind: String, name: String, - cat: Open$l({ + cat: Open$m({ default: String, title: String, multiple: Number, @@ -64807,9 +64807,9 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha exclude: "", include: "" }, - item: Open$l({}) + item: Open$m({}) }), - ux: Open$l({ + ux: Open$m({ kind: gubu_minExports.Exact("Autocomplete"), edit: gubu_minExports.Default(true) }) @@ -64869,21 +64869,21 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha })); } const CMPNAME$l = "BasicEntitySliderField"; - const { Open: Open$k } = gubu_minExports.Gubu; + const { Open: Open$l } = gubu_minExports.Gubu; const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu( - Open$k({ - field: Open$k({ + Open$l({ + field: Open$l({ id: String, name: String, kind: "", label: "", - ux: Open$k({ + ux: Open$l({ kind: gubu_minExports.Exact("Slider"), edit: gubu_minExports.Default(true), step: gubu_minExports.Default(1), min: gubu_minExports.Default(0), max: gubu_minExports.Default(100), - props: Open$k({ + props: Open$l({ marks: gubu_minExports.Default({}), valueLabelDisplay: gubu_minExports.Exact("on", "auto", "off").Default("auto"), direction: gubu_minExports.Exact("horizontal", "vertical").Default("horizontal"), @@ -64939,20 +64939,20 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha return marks; } const CMPNAME$k = "BasicEntitySliderField"; - const { Open: Open$j } = gubu_minExports.Gubu; + const { Open: Open$k } = gubu_minExports.Gubu; const BasicEntityRadioGroupFieldSpecShape = gubu_minExports.Gubu( - Open$j({ - field: Open$j({ + Open$k({ + field: Open$k({ id: String, name: String, kind: "", llabel: "", - ux: Open$j({ + ux: Open$k({ kind: gubu_minExports.Exact("RadioGroup"), edit: gubu_minExports.Default(true), direction: gubu_minExports.Exact("row", "column").Default("row") }), - cat: Open$j({ + cat: Open$k({ default: "", title: String, order: { @@ -64960,7 +64960,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha exclude: "", include: "" }, - item: Open$j({}) + item: Open$k({}) }) }) }), @@ -65018,18 +65018,18 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha return defaultValues; } const CMPNAME$j = "BasicEntityTextBoxField"; - const { Open: Open$i } = gubu_minExports.Gubu; + const { Open: Open$j } = gubu_minExports.Gubu; const BasicEntityTextBoxFieldSpecShape = gubu_minExports.Gubu( - Open$i({ - field: Open$i({ + Open$j({ + field: Open$j({ id: String, name: String, kind: "", label: "", - ux: Open$i({ + ux: Open$j({ kind: gubu_minExports.Exact("TextBox"), edit: gubu_minExports.Default(true), - props: Open$i({}) + props: Open$j({}) }) }) }), @@ -65060,18 +65060,18 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ] }, field.name); } const CMPNAME$i = "BasicEntityTextField"; - const { Open: Open$h } = gubu_minExports.Gubu; + const { Open: Open$i } = gubu_minExports.Gubu; const BasicEntityTextFieldSpecShape = gubu_minExports.Gubu( - Open$h({ - field: Open$h({ + Open$i({ + field: Open$i({ id: String, name: String, kind: "", label: "", - ux: Open$h({ + ux: Open$i({ kind: gubu_minExports.Exact("Text"), edit: gubu_minExports.Default(true), - props: Open$h({}) + props: Open$i({}) }) }) }), @@ -65101,18 +65101,18 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ] }, field.id); } const CMPNAME$h = "BasicEntityDateField"; - const { Open: Open$g } = gubu_minExports.Gubu; + const { Open: Open$h } = gubu_minExports.Gubu; const BasicEntityDateFieldSpecShape = gubu_minExports.Gubu( - Open$g({ - field: Open$g({ + Open$h({ + field: Open$h({ id: String, name: String, kind: "", label: "", - ux: Open$g({ + ux: Open$h({ kind: gubu_minExports.Exact("Date"), edit: gubu_minExports.Default(true), - props: Open$g({}) + props: Open$h({}) }) }) }), @@ -65142,18 +65142,18 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ] }, field.id); } const CMPNAME$g = "BasicEntityTimeField"; - const { Open: Open$f } = gubu_minExports.Gubu; + const { Open: Open$g } = gubu_minExports.Gubu; const BasicEntityTimeFieldSpecShape = gubu_minExports.Gubu( - Open$f({ - field: Open$f({ + Open$g({ + field: Open$g({ id: String, name: String, kind: "", label: "", - ux: Open$f({ + ux: Open$g({ kind: gubu_minExports.Exact("Time"), edit: gubu_minExports.Default(true), - props: Open$f({}) + props: Open$g({}) }) }) }), @@ -65183,18 +65183,18 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ] }, field.id); } const CMPNAME$f = "BasicEntityDateTimeField"; - const { Open: Open$e } = gubu_minExports.Gubu; + const { Open: Open$f } = gubu_minExports.Gubu; const BasicEntityDateTimeFieldSpecShape = gubu_minExports.Gubu( - Open$e({ - field: Open$e({ + Open$f({ + field: Open$f({ id: String, name: String, kind: "", label: "", - ux: Open$e({ + ux: Open$f({ kind: gubu_minExports.Exact("DateTime"), edit: gubu_minExports.Default(true), - props: Open$e({}) + props: Open$f({}) }) }) }), @@ -65224,19 +65224,19 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ] }, field.id); } const CMPNAME$e = "BasicEntitySliderField"; - const { Open: Open$d } = gubu_minExports.Gubu; + const { Open: Open$e } = gubu_minExports.Gubu; const BasicEntityRatingFieldSpecShape = gubu_minExports.Gubu( - Open$d({ - field: Open$d({ + Open$e({ + field: Open$e({ id: String, name: String, kind: "", label: "", - ux: Open$d({ + ux: Open$e({ kind: gubu_minExports.Exact("Rating"), edit: gubu_minExports.Default(true), precision: 1, - props: Open$d({}) + props: Open$e({}) }) }) }), @@ -65272,19 +65272,19 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ] }, `${field.id}-div`); } const CMPNAME$d = "BasicEntitySliderField"; - const { Open: Open$c } = gubu_minExports.Gubu; + const { Open: Open$d } = gubu_minExports.Gubu; const BasicEntityButtonFieldSpecShape = gubu_minExports.Gubu( - Open$c({ - field: Open$c({ + Open$d({ + field: Open$d({ id: String, name: String, kind: "", label: String, - ux: Open$c({ + ux: Open$d({ kind: gubu_minExports.Exact("Button"), edit: true, variant: "contained", - props: Open$c({}) + props: Open$d({}) }) }) }), @@ -65308,23 +65308,23 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ) }, `${field.id}-div`); } const CMPNAME$c = "BasicEntitySliderField"; - const { Open: Open$b } = gubu_minExports.Gubu; + const { Open: Open$c } = gubu_minExports.Gubu; const BasicEntityButtonGroupFieldSpecShape = gubu_minExports.Gubu( - Open$b({ - field: Open$b({ + Open$c({ + field: Open$c({ id: String, name: String, kind: "", label: "", - options: Open$b({ + options: Open$c({ label: { field: "label" }, value: { field: "value" }, - ents: Open$b({}) + ents: Open$c({}) }), - ux: Open$b({ + ux: Open$c({ kind: gubu_minExports.Exact("ButtonGroup"), edit: gubu_minExports.Default(true), - props: Open$b({}) + props: Open$c({}) }) }) }), @@ -65338,15 +65338,15 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }, children: val == null ? void 0 : val[field.options.label.field] }, `${field.id}-${key}`)) })) }, `${field.id}-div`); } const CMPNAME$b = "BasicEntitySelectField"; - const { Open: Open$a } = gubu_minExports.Gubu; + const { Open: Open$b } = gubu_minExports.Gubu; const BasicEntitySelectFieldSpecShape = gubu_minExports.Gubu( - Open$a({ - field: Open$a({ + Open$b({ + field: Open$b({ id: String, name: String, kind: "", label: "", - cat: Open$a({ + cat: Open$b({ default: "", title: String, multiple: Number, @@ -65355,9 +65355,9 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha exclude: "", include: "" }, - item: Open$a({}) + item: Open$b({}) }), - ux: Open$a({ + ux: Open$b({ kind: gubu_minExports.Exact("Select"), edit: gubu_minExports.Default(true) }) @@ -65418,18 +65418,18 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha return resvalue(value, cat, (val, item) => val); } const CMPNAME$a = "BasicEntitySliderField"; - const { Open: Open$9 } = gubu_minExports.Gubu; + const { Open: Open$a } = gubu_minExports.Gubu; const BasicEntitySwitchFieldSpecShape = gubu_minExports.Gubu( - Open$9({ - field: Open$9({ + Open$a({ + field: Open$a({ id: String, name: String, kind: "", label: "", - ux: Open$9({ + ux: Open$a({ kind: gubu_minExports.Exact("Switch"), edit: gubu_minExports.Default(true), - props: Open$9({}) + props: Open$a({}) }) }) }), @@ -65469,15 +65469,15 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ] }, `${field.id}-box`); } const CMPNAME$9 = "BasicEntitySliderField"; - const { Open: Open$8 } = gubu_minExports.Gubu; + const { Open: Open$9 } = gubu_minExports.Gubu; const BasicEntityToggleButtonFieldSpecShape = gubu_minExports.Gubu( - Open$8({ - field: Open$8({ + Open$9({ + field: Open$9({ id: String, name: String, kind: "", label: "", - cat: Open$8({ + cat: Open$9({ default: "", title: String, multiple: Number, @@ -65486,12 +65486,12 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha exclude: "", include: "" }, - item: Open$8({}) + item: Open$9({}) }), - ux: Open$8({ + ux: Open$9({ kind: gubu_minExports.Exact("ToggleButton"), edit: gubu_minExports.Default(true), - props: Open$8({}) + props: Open$9({}) }) }) }), @@ -65527,9 +65527,9 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, `${field.id}-box`); } - const { Open: Open$7, Child: Child$4 } = gubu_minExports.Gubu; + const { Open: Open$8, Child: Child$4 } = gubu_minExports.Gubu; const Shape$2 = gubu_minExports.Gubu( - Open$7({ + Open$8({ field: {} }), { name: "BasicEntityField" } @@ -65554,15 +65554,16 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha value: "VxgBasicEntityFieldPlugin" }); const CMPNAME$8 = "BasicEntityField"; - const { Open: Open$6 } = gubu_minExports.Gubu; + const { Open: Open$7 } = gubu_minExports.Gubu; const BasicEntityFieldSpecShape = gubu_minExports.Gubu( - Open$6({ - field: Open$6({ + Open$7({ + cid: String, + field: Open$7({ id: String, name: String, kind: "", label: "", - ux: Open$6({ + ux: Open$7({ kind: gubu_minExports.Exact( "Text", "TextBox", @@ -65582,7 +65583,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ), edit: gubu_minExports.Default(true), rows: gubu_minExports.Default(3), - props: Open$6({}) + props: Open$7({}) }) }) }), @@ -65610,10 +65611,11 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const { seneca } = ctx(); const basicEntityField = BasicEntityFieldSpecShape(spec); const [plugin, setPlugin] = React$1.useState(false); + const cid = basicEntityField.cid + "-" + basicEntityField.field.name; React$1.useEffect(() => { if (!plugin) { seneca.use({ - tag: basicEntityField.field.name, + tag: cid, define: VxgBasicEntityFieldPlugin, options: { spec: { @@ -65628,9 +65630,9 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const Field = fieldMap[field.ux.kind]; return Field ? /* @__PURE__ */ jsxRuntimeExports.jsx(Field, { ctx, spec: basicEntityField }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", {}); } - const { Open: Open$5, Child: Child$3 } = gubu_minExports.Gubu; + const { Open: Open$6, Child: Child$3 } = gubu_minExports.Gubu; const Shape$1 = gubu_minExports.Gubu( - Open$5({ + Open$6({ name: String, prefix: String, ent: String, @@ -65864,6 +65866,41 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha value: "VxgBasicEntityEditPlugin" }); const CMPNAME$7 = "BasicEntityEdit"; + const { Open: Open$5 } = gubu_minExports.Gubu; + const BasicEntityEditSpecShape = gubu_minExports.Gubu( + Open$5({ + field: Open$5({ + id: String, + cid: "", + name: String, + kind: "", + label: "", + ux: Open$5({ + kind: gubu_minExports.Exact( + "Text", + "TextBox", + "Date", + "DateTime", + "Time", + "Checkbox", + "Autocomplete", + "Slider", + "RadioGroup", + "Rating", + "Button", + "ButtonGroup", + "Select", + "Switch", + "ToggleButton" + ), + edit: gubu_minExports.Default(true), + rows: gubu_minExports.Default(3), + props: Open$5({}) + }) + }) + }), + { name: CMPNAME$7 } + ); const makeResolver = (seneca, spec) => React$1.useCallback( (data) => __async(this, null, function* () { const { ent, name } = spec; @@ -65898,10 +65935,12 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const { seneca } = ctx(); const [plugin, setPlugin] = React$1.useState(false); const [ready, setReady] = React$1.useState(false); + const uniqueIdRef = React$1.useRef(seneca.util.Nid()); + const cid = props.spec.name + "-" + uniqueIdRef.current; React$1.useEffect(() => { if (!plugin) { seneca.use({ - tag: props.spec.name, + tag: cid, define: VxgBasicEntityEditPlugin, options: { spec: props.spec, @@ -65986,6 +66025,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha { ctx, spec: { + cid, field, register, getValues, @@ -65999,18 +66039,37 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } ) : /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}) }); } + var Check = {}; + "use strict"; + "use client"; + var _interopRequireDefault = interopRequireDefaultExports; + Object.defineProperty(Check, "__esModule", { + value: true + }); + var default_1 = Check.default = void 0; + var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); + var _jsxRuntime = requireJsxRuntime(); + var _default = default_1 = Check.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { + d: "M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" + }), "Check"); const CMPNAME$6 = "BasicLedHead"; const { Open: Open$4, Child: Child$2 } = gubu_minExports.Gubu; - const BasicLedHeadSpecShape = gubu_minExports.Gubu(Open$4({ - tool: Child$2({ - id: String, - kind: String, - custom: "" - }, {}), - mui: Open$4({ - Toolbar: Open$4({}) - }) - }), { name: CMPNAME$6 }); + const BasicLedHeadSpecShape = gubu_minExports.Gubu( + Open$4({ + tool: Child$2( + { + id: String, + kind: String, + custom: "" + }, + {} + ), + mui: Open$4({ + Toolbar: Open$4({}) + }) + }), + { name: CMPNAME$6 } + ); function BasicLedHead(props) { const { ctx, spec } = props; const { seneca, custom } = ctx(); @@ -66027,46 +66086,40 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const state = { item, view: viewState, navigate }; const subview = "/view/" + viewName === loc.pathname ? "list" : "edit"; const customButtons = Object.values(spec.tool || {}).filter((t) => "button" === t.kind).map((t) => (custom.BasicLedHead || {})[t.custom]).filter((t) => null != t); - return /* @__PURE__ */ jsxRuntimeExports.jsx(material.Box, { className: "bxg-BasicLedHead", children: /* @__PURE__ */ jsxRuntimeExports.jsxs( - material.Toolbar, - { - className: "vxg-BasicLedHead-toolbar", - variant: "dense", - children: [ - /* @__PURE__ */ jsxRuntimeExports.jsx( - material.Button, - { - color: "inherit", - onClick: () => navigate(-1), - disabled: "list" === subview, - children: "Back" - } - ), - /* @__PURE__ */ jsxRuntimeExports.jsx( - material.Button, - { - color: "inherit", - onClick: () => seneca.act("aim:app,on:view,add:item", { view: viewName }), - disabled: "edit" === subview, - children: "Add" - } - ), - customButtons.map( - (cb) => /* @__PURE__ */ jsxRuntimeExports.jsx( - material.Button, - __spreadProps(__spreadValues({ - color: "inherit", - onClick: () => seneca.act(cb.msg(state, spec, ctx)), - disabled: cb.disabled(state, spec, ctx) - }, cb.attr(state, spec, ctx)), { - children: cb.title(state, spec, ctx) - }), - cb.id - ) - ) - ] - } - ) }); + return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx(material.Box, { className: "bxg-BasicLedHead", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(material.Toolbar, { className: "vxg-BasicLedHead-toolbar", variant: "dense", children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx( + material.Button, + { + color: "inherit", + onClick: () => navigate(-1), + disabled: "list" === subview, + children: "Back" + } + ), + /* @__PURE__ */ jsxRuntimeExports.jsx( + material.Button, + { + color: "inherit", + onClick: () => seneca.act("aim:app,on:view,add:item", { view: viewName }), + disabled: "edit" === subview, + children: "Add" + } + ), + customButtons.map((cb) => /* @__PURE__ */ jsxRuntimeExports.jsx( + material.Button, + __spreadProps(__spreadValues({ + color: "inherit", + onClick: () => seneca.act(cb.msg(state, spec, ctx)), + disabled: cb.disabled(state, spec, ctx) + }, cb.attr(state, spec, ctx)), { + children: cb.title(state, spec, ctx) + }), + cb.id + )) + ] }) }), + /* @__PURE__ */ jsxRuntimeExports.jsx(material.Box, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(material.Alert, { icon: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { fontSize: "inherit" }), severity: "success", children: "Here is a gentle confirmation that your action was successful." }) }) + ] }); } const CMPNAME$5 = "BasicLedFoot"; const { Open: Open$3 } = gubu_minExports.Gubu; @@ -66227,12 +66280,14 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const { ctx } = props; const { seneca } = ctx(); const name = props.spec.name; + const uniqueIdRef = React$1.useRef(seneca.util.Nid()); + const cid = name; const navigate = reactRouterDom.useNavigate(); const led = reactRedux.useSelector((state) => state.main.view[name]); const ready = true === (led == null ? void 0 : led.ready); if (!ready) { seneca.use({ - tag: name, + tag: cid, define: VxgBasicLedPlugin, options: { spec: props.spec, @@ -66240,7 +66295,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } }); } - const { head, list, edit, foot } = seneca.export("VxgBasicLedPlugin$" + name + "/spec") || {}; + const { head, list, edit, foot } = seneca.export("VxgBasicLedPlugin$" + cid + "/spec") || {}; return ready ? /* @__PURE__ */ jsxRuntimeExports.jsxs(material.Box, { className: "vxg-BasicLed", children: [ head.active && /* @__PURE__ */ jsxRuntimeExports.jsx(BasicLedHead, { ctx, spec: head }), /* @__PURE__ */ jsxRuntimeExports.jsxs(reactRouterDom.Routes, { children: [ @@ -66391,7 +66446,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha { onClick: () => selectView(item.view), children: [ - /* @__PURE__ */ jsxRuntimeExports.jsx(material.ListItemIcon, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$u, {}) }), + /* @__PURE__ */ jsxRuntimeExports.jsx(material.ListItemIcon, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$v, {}) }), /* @__PURE__ */ jsxRuntimeExports.jsx(material.ListItemText, { primary: item.title }) ] } diff --git a/src/lib/BasicEntityEdit.tsx b/src/lib/BasicEntityEdit.tsx index a435d15..8e80076 100644 --- a/src/lib/BasicEntityEdit.tsx +++ b/src/lib/BasicEntityEdit.tsx @@ -1,10 +1,9 @@ -import React, { useEffect, useState, useCallback } from 'react' - +import React, { useEffect, useState, useCallback, useRef } from 'react' import { useSelector } from 'react-redux' - import { useParams } from 'react-router-dom' -import { Box, Grid, Button, Toolbar } from '@mui/material' +import { Box, Grid, Button, Toolbar, Alert } from '@mui/material' +import CheckIcon from '@mui/icons-material/Check' import { useForm } from 'react-hook-form' @@ -12,8 +11,49 @@ import { BasicEntityField } from './BasicEntityField' import { VxgBasicEntityEditPlugin } from './VxgBasicEntityEditPlugin' +import type { Spec } from './basic-types' + +import { Default, Exact, Gubu, Skip } from 'gubu' +import { VxgBasicEntityFieldPlugin } from './VxgBasicEntityFieldPlugin' + const CMPNAME = 'BasicEntityEdit' +const { Open } = Gubu +const BasicEntityEditSpecShape = Gubu( + Open({ + field: Open({ + id: String, + cid: '', + name: String, + kind: '', + label: '', + ux: Open({ + kind: Exact( + 'Text', + 'TextBox', + 'Date', + 'DateTime', + 'Time', + 'Checkbox', + 'Autocomplete', + 'Slider', + 'RadioGroup', + 'Rating', + 'Button', + 'ButtonGroup', + 'Select', + 'Switch', + 'ToggleButton' + ), + edit: Default(true), + rows: Default(3), + props: Open({}), + }), + }), + }), + { name: CMPNAME } +) + // TODO: make this debuggable // Resolver for react-hook-form const makeResolver = (seneca: any, spec: any) => @@ -75,11 +115,15 @@ function BasicEntityEdit (props: any) { const [plugin, setPlugin] = useState(false) const [ready, setReady] = useState(false) + const uniqueIdRef = useRef(seneca.util.Nid()) + const cid = props.spec.name + '-' + uniqueIdRef.current + + // console.log('BasicEntityEdit', 'cid', cid) useEffect(() => { if (!plugin) { seneca.use({ - tag: props.spec.name, + tag: cid, define: VxgBasicEntityEditPlugin, options: { spec: props.spec, @@ -193,6 +237,7 @@ function BasicEntityEdit (props: any) { { if (!plugin) { - // TODO: plugin name needs to be unique across system (use field.name, view ...) seneca.use({ - tag: basicEntityField.field.name, + tag: cid, define: VxgBasicEntityFieldPlugin, options: { spec: { From a0cf67ef8dd78374a871288d25b3ce880bb8c7b8 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Wed, 7 Aug 2024 22:44:14 +0100 Subject: [PATCH 107/122] chore: Add unique identifier to BasicLed component --- dist/voxgig-model-react.es.js | 561 ++++++++++++++++----------------- dist/voxgig-model-react.umd.js | 559 ++++++++++++++++---------------- src/lib/BasicLed.tsx | 13 +- 3 files changed, 554 insertions(+), 579 deletions(-) diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index cf1feb7..c804df1 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -54,7 +54,7 @@ var __async = (__this, __arguments, generator) => { }; import * as React$1 from "react"; import React__default, { isValidElement, Children, cloneElement, useMemo, useState, useReducer, useRef, useEffect, useCallback, memo as memo$2, Fragment, useLayoutEffect } from "react"; -import { Button as Button$1, Avatar, Menu as Menu$1, MenuItem as MenuItem$1, IconButton as IconButton$1, useTheme as useTheme$5, Box as Box$2, FormControlLabel as FormControlLabel$1, Checkbox as Checkbox$1, Autocomplete as Autocomplete$1, TextField as TextField$1, FormLabel as FormLabel$1, Slider as Slider$1, RadioGroup, Radio as Radio$1, Rating, ButtonGroup, FormControl as FormControl$1, InputLabel as InputLabel$1, Select as Select$1, Switch as Switch$1, ToggleButtonGroup, ToggleButton, Grid as Grid$1, Toolbar as Toolbar$1, Alert as Alert$1, Container as Container$2, Drawer as Drawer$1, List as List$1, ListItem as ListItem$1, ListItemButton as ListItemButton$1, ListItemIcon as ListItemIcon$1, ListItemText as ListItemText$1, Divider as Divider$1, Typography as Typography$1 } from "@mui/material"; +import { Button as Button$1, Avatar, Menu as Menu$1, MenuItem as MenuItem$1, IconButton as IconButton$1, useTheme as useTheme$5, Box as Box$2, FormControlLabel as FormControlLabel$1, Checkbox as Checkbox$1, Autocomplete as Autocomplete$1, TextField as TextField$1, FormLabel as FormLabel$1, Slider as Slider$1, RadioGroup, Radio as Radio$1, Rating, ButtonGroup, FormControl as FormControl$1, InputLabel as InputLabel$1, Select as Select$1, Switch as Switch$1, ToggleButtonGroup, ToggleButton, Grid as Grid$1, Toolbar as Toolbar$1, Container as Container$2, Drawer as Drawer$1, List as List$1, ListItem as ListItem$1, ListItemButton as ListItemButton$1, ListItemIcon as ListItemIcon$1, ListItemText as ListItemText$1, Divider as Divider$1, Typography as Typography$1 } from "@mui/material"; import emStyled from "@emotion/styled"; import { CacheProvider, Global, ThemeContext as ThemeContext$1, css, keyframes } from "@emotion/react"; import { useSelector } from "react-redux"; @@ -5546,21 +5546,21 @@ const styleFunctionSx = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def }, Symbol.toStringTag, { value: "Module" })); const require$$8 = /* @__PURE__ */ getAugmentedNamespace(styleFunctionSx); "use strict"; -var _interopRequireDefault$A = interopRequireDefaultExports; +var _interopRequireDefault$z = interopRequireDefaultExports; Object.defineProperty(createStyled$2, "__esModule", { value: true }); -var _default$A = createStyled$2.default = createStyled$1; +var _default$z = createStyled$2.default = createStyled$1; var shouldForwardProp_1 = createStyled$2.shouldForwardProp = shouldForwardProp$1; var systemDefaultTheme_1 = createStyled$2.systemDefaultTheme = void 0; -var _extends2 = _interopRequireDefault$A(require_extends()); -var _objectWithoutPropertiesLoose2 = _interopRequireDefault$A(requireObjectWithoutPropertiesLoose()); +var _extends2 = _interopRequireDefault$z(require_extends()); +var _objectWithoutPropertiesLoose2 = _interopRequireDefault$z(requireObjectWithoutPropertiesLoose()); var _styledEngine$1 = _interopRequireWildcard$1(require$$1$1); var _deepmerge = require$$4; -var _capitalize = _interopRequireDefault$A(require$$5); -var _getDisplayName = _interopRequireDefault$A(require$$6); -var _createTheme = _interopRequireDefault$A(require$$7); -var _styleFunctionSx = _interopRequireDefault$A(require$$8); +var _capitalize = _interopRequireDefault$z(require$$5); +var _getDisplayName = _interopRequireDefault$z(require$$6); +var _createTheme = _interopRequireDefault$z(require$$7); +var _styleFunctionSx = _interopRequireDefault$z(require$$8); const _excluded$2i = ["ownerState"], _excluded2$i = ["variants"], _excluded3$7 = ["name", "slot", "skipVariantsResolver", "skipSx", "overridesResolver"]; function _getRequireWildcardCache$1(e) { if ("function" != typeof WeakMap) return null; @@ -5850,7 +5850,7 @@ const clamp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert }, Symbol.toStringTag, { value: "Module" })); const require$$2 = /* @__PURE__ */ getAugmentedNamespace(clamp); "use strict"; -var _interopRequireDefault$z = interopRequireDefaultExports; +var _interopRequireDefault$y = interopRequireDefaultExports; Object.defineProperty(colorManipulator, "__esModule", { value: true }); @@ -5872,8 +5872,8 @@ var private_safeEmphasize_1 = colorManipulator.private_safeEmphasize = private_s var private_safeLighten_1 = colorManipulator.private_safeLighten = private_safeLighten$1; var recomposeColor_1 = colorManipulator.recomposeColor = recomposeColor$1; var rgbToHex_1 = colorManipulator.rgbToHex = rgbToHex$1; -var _formatMuiErrorMessage2 = _interopRequireDefault$z(require$$1); -var _clamp = _interopRequireDefault$z(require$$2); +var _formatMuiErrorMessage2 = _interopRequireDefault$y(require$$1); +var _clamp = _interopRequireDefault$y(require$$2); function clampWrapper$1(value, min2 = 0, max2 = 1) { if (process.env.NODE_ENV !== "production") { if (value < min2 || value > max2) { @@ -6764,7 +6764,7 @@ function slotShouldForwardProp(prop) { } const rootShouldForwardProp = (prop) => slotShouldForwardProp(prop) && prop !== "classes"; "use client"; -const styled$1 = _default$A({ +const styled$1 = _default$z({ themeId: THEME_ID, defaultTheme: defaultTheme$5, rootShouldForwardProp @@ -17603,7 +17603,7 @@ var useThemeWithoutDefault = {}; Object.defineProperty(useThemeWithoutDefault, "__esModule", { value: true }); -var default_1$z = useThemeWithoutDefault.default = void 0; +var default_1$y = useThemeWithoutDefault.default = void 0; var React = _interopRequireWildcard(React__default); var _styledEngine = require$$1$1; function _getRequireWildcardCache(e) { @@ -17632,7 +17632,7 @@ function useTheme(defaultTheme2 = null) { const contextTheme = React.useContext(_styledEngine.ThemeContext); return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme2 : contextTheme; } -var _default$z = default_1$z = useThemeWithoutDefault.default = useTheme; +var _default$y = default_1$y = useThemeWithoutDefault.default = useTheme; var top = "top"; var bottom = "bottom"; var right = "right"; @@ -19414,7 +19414,7 @@ const PopperRoot = styled$1(Popper$1, { })({}); const Popper2 = /* @__PURE__ */ React$1.forwardRef(function Popper3(inProps, ref) { var _slots$root; - const theme = default_1$z(); + const theme = default_1$y(); const props = useDefaultProps({ props: inProps, name: "MuiPopper" @@ -25355,450 +25355,450 @@ function requireCreateSvgIcon() { } "use strict"; "use client"; -var _interopRequireDefault$y = interopRequireDefaultExports; +var _interopRequireDefault$x = interopRequireDefaultExports; Object.defineProperty(ArrowDownward, "__esModule", { value: true }); -var default_1$y = ArrowDownward.default = void 0; -var _createSvgIcon$y = _interopRequireDefault$y(requireCreateSvgIcon()); -var _jsxRuntime$y = requireJsxRuntime(); -var _default$y = default_1$y = ArrowDownward.default = (0, _createSvgIcon$y.default)(/* @__PURE__ */ (0, _jsxRuntime$y.jsx)("path", { +var default_1$x = ArrowDownward.default = void 0; +var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); +var _jsxRuntime$x = requireJsxRuntime(); +var _default$x = default_1$x = ArrowDownward.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); var ArrowRight = {}; "use strict"; "use client"; -var _interopRequireDefault$x = interopRequireDefaultExports; +var _interopRequireDefault$w = interopRequireDefaultExports; Object.defineProperty(ArrowRight, "__esModule", { value: true }); -var default_1$x = ArrowRight.default = void 0; -var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); -var _jsxRuntime$x = requireJsxRuntime(); -var _default$x = default_1$x = ArrowRight.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { +var default_1$w = ArrowRight.default = void 0; +var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); +var _jsxRuntime$w = requireJsxRuntime(); +var _default$w = default_1$w = ArrowRight.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); var Cancel = {}; "use strict"; "use client"; -var _interopRequireDefault$w = interopRequireDefaultExports; +var _interopRequireDefault$v = interopRequireDefaultExports; Object.defineProperty(Cancel, "__esModule", { value: true }); -var default_1$w = Cancel.default = void 0; -var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); -var _jsxRuntime$w = requireJsxRuntime(); -var _default$w = default_1$w = Cancel.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { +var default_1$v = Cancel.default = void 0; +var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); +var _jsxRuntime$v = requireJsxRuntime(); +var _default$v = default_1$v = Cancel.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); var ChevronLeft = {}; "use strict"; "use client"; -var _interopRequireDefault$v = interopRequireDefaultExports; +var _interopRequireDefault$u = interopRequireDefaultExports; Object.defineProperty(ChevronLeft, "__esModule", { value: true }); -var default_1$v = ChevronLeft.default = void 0; -var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); -var _jsxRuntime$v = requireJsxRuntime(); -var _default$v = default_1$v = ChevronLeft.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { +var default_1$u = ChevronLeft.default = void 0; +var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); +var _jsxRuntime$u = requireJsxRuntime(); +var _default$u = default_1$u = ChevronLeft.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); var ChevronRight = {}; "use strict"; "use client"; -var _interopRequireDefault$u = interopRequireDefaultExports; +var _interopRequireDefault$t = interopRequireDefaultExports; Object.defineProperty(ChevronRight, "__esModule", { value: true }); -var default_1$u = ChevronRight.default = void 0; -var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); -var _jsxRuntime$u = requireJsxRuntime(); -var _default$u = default_1$u = ChevronRight.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { +var default_1$t = ChevronRight.default = void 0; +var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); +var _jsxRuntime$t = requireJsxRuntime(); +var _default$t = default_1$t = ChevronRight.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); var ClearAll = {}; "use strict"; "use client"; -var _interopRequireDefault$t = interopRequireDefaultExports; +var _interopRequireDefault$s = interopRequireDefaultExports; Object.defineProperty(ClearAll, "__esModule", { value: true }); -var default_1$t = ClearAll.default = void 0; -var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); -var _jsxRuntime$t = requireJsxRuntime(); -var _default$t = default_1$t = ClearAll.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { +var default_1$s = ClearAll.default = void 0; +var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); +var _jsxRuntime$s = requireJsxRuntime(); +var _default$s = default_1$s = ClearAll.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); var Close = {}; "use strict"; "use client"; -var _interopRequireDefault$s = interopRequireDefaultExports; +var _interopRequireDefault$r = interopRequireDefaultExports; Object.defineProperty(Close, "__esModule", { value: true }); -var default_1$s = Close.default = void 0; -var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); -var _jsxRuntime$s = requireJsxRuntime(); -var _default$s = default_1$s = Close.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { +var default_1$r = Close.default = void 0; +var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); +var _jsxRuntime$r = requireJsxRuntime(); +var _default$r = default_1$r = Close.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); var ContentCopy = {}; "use strict"; "use client"; -var _interopRequireDefault$r = interopRequireDefaultExports; +var _interopRequireDefault$q = interopRequireDefaultExports; Object.defineProperty(ContentCopy, "__esModule", { value: true }); -var default_1$r = ContentCopy.default = void 0; -var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); -var _jsxRuntime$r = requireJsxRuntime(); -var _default$r = default_1$r = ContentCopy.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { +var default_1$q = ContentCopy.default = void 0; +var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); +var _jsxRuntime$q = requireJsxRuntime(); +var _default$q = default_1$q = ContentCopy.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); var DensityLarge = {}; "use strict"; "use client"; -var _interopRequireDefault$q = interopRequireDefaultExports; +var _interopRequireDefault$p = interopRequireDefaultExports; Object.defineProperty(DensityLarge, "__esModule", { value: true }); -var default_1$q = DensityLarge.default = void 0; -var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); -var _jsxRuntime$q = requireJsxRuntime(); -var _default$q = default_1$q = DensityLarge.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { +var default_1$p = DensityLarge.default = void 0; +var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); +var _jsxRuntime$p = requireJsxRuntime(); +var _default$p = default_1$p = DensityLarge.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); var DensityMedium = {}; "use strict"; "use client"; -var _interopRequireDefault$p = interopRequireDefaultExports; +var _interopRequireDefault$o = interopRequireDefaultExports; Object.defineProperty(DensityMedium, "__esModule", { value: true }); -var default_1$p = DensityMedium.default = void 0; -var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); -var _jsxRuntime$p = requireJsxRuntime(); -var _default$p = default_1$p = DensityMedium.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { +var default_1$o = DensityMedium.default = void 0; +var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); +var _jsxRuntime$o = requireJsxRuntime(); +var _default$o = default_1$o = DensityMedium.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); var DensitySmall = {}; "use strict"; "use client"; -var _interopRequireDefault$o = interopRequireDefaultExports; +var _interopRequireDefault$n = interopRequireDefaultExports; Object.defineProperty(DensitySmall, "__esModule", { value: true }); -var default_1$o = DensitySmall.default = void 0; -var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); -var _jsxRuntime$o = requireJsxRuntime(); -var _default$o = default_1$o = DensitySmall.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { +var default_1$n = DensitySmall.default = void 0; +var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); +var _jsxRuntime$n = requireJsxRuntime(); +var _default$n = default_1$n = DensitySmall.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); var DragHandle = {}; "use strict"; "use client"; -var _interopRequireDefault$n = interopRequireDefaultExports; +var _interopRequireDefault$m = interopRequireDefaultExports; Object.defineProperty(DragHandle, "__esModule", { value: true }); -var default_1$n = DragHandle.default = void 0; -var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); -var _jsxRuntime$n = requireJsxRuntime(); -var _default$n = default_1$n = DragHandle.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { +var default_1$m = DragHandle.default = void 0; +var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); +var _jsxRuntime$m = requireJsxRuntime(); +var _default$m = default_1$m = DragHandle.default = (0, _createSvgIcon$m.default)(/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); var DynamicFeed = {}; "use strict"; "use client"; -var _interopRequireDefault$m = interopRequireDefaultExports; +var _interopRequireDefault$l = interopRequireDefaultExports; Object.defineProperty(DynamicFeed, "__esModule", { value: true }); -var default_1$m = DynamicFeed.default = void 0; -var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); -var _jsxRuntime$m = requireJsxRuntime(); -var _default$m = default_1$m = DynamicFeed.default = (0, _createSvgIcon$m.default)([/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { +var default_1$l = DynamicFeed.default = void 0; +var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); +var _jsxRuntime$l = requireJsxRuntime(); +var _default$l = default_1$l = DynamicFeed.default = (0, _createSvgIcon$l.default)([/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" -}, "0"), /* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { +}, "0"), /* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M20 3h-8c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 8h-8V7h8zM4 12H2v7c0 1.1.9 2 2 2h9v-2H4z" }, "1")], "DynamicFeed"); var Edit = {}; "use strict"; "use client"; -var _interopRequireDefault$l = interopRequireDefaultExports; +var _interopRequireDefault$k = interopRequireDefaultExports; Object.defineProperty(Edit, "__esModule", { value: true }); -var default_1$l = Edit.default = void 0; -var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); -var _jsxRuntime$l = requireJsxRuntime(); -var _default$l = default_1$l = Edit.default = (0, _createSvgIcon$l.default)(/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { +var default_1$k = Edit.default = void 0; +var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); +var _jsxRuntime$k = requireJsxRuntime(); +var _default$k = default_1$k = Edit.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); var ExpandMore = {}; "use strict"; "use client"; -var _interopRequireDefault$k = interopRequireDefaultExports; +var _interopRequireDefault$j = interopRequireDefaultExports; Object.defineProperty(ExpandMore, "__esModule", { value: true }); -var default_1$k = ExpandMore.default = void 0; -var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); -var _jsxRuntime$k = requireJsxRuntime(); -var _default$k = default_1$k = ExpandMore.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { +var default_1$j = ExpandMore.default = void 0; +var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); +var _jsxRuntime$j = requireJsxRuntime(); +var _default$j = default_1$j = ExpandMore.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); var FilterAlt = {}; "use strict"; "use client"; -var _interopRequireDefault$j = interopRequireDefaultExports; +var _interopRequireDefault$i = interopRequireDefaultExports; Object.defineProperty(FilterAlt, "__esModule", { value: true }); -var default_1$j = FilterAlt.default = void 0; -var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); -var _jsxRuntime$j = requireJsxRuntime(); -var _default$j = default_1$j = FilterAlt.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { +var default_1$i = FilterAlt.default = void 0; +var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); +var _jsxRuntime$i = requireJsxRuntime(); +var _default$i = default_1$i = FilterAlt.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); var FilterList = {}; "use strict"; "use client"; -var _interopRequireDefault$i = interopRequireDefaultExports; +var _interopRequireDefault$h = interopRequireDefaultExports; Object.defineProperty(FilterList, "__esModule", { value: true }); -var default_1$i = FilterList.default = void 0; -var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); -var _jsxRuntime$i = requireJsxRuntime(); -var _default$i = default_1$i = FilterList.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { +var default_1$h = FilterList.default = void 0; +var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); +var _jsxRuntime$h = requireJsxRuntime(); +var _default$h = default_1$h = FilterList.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); var FilterListOff = {}; "use strict"; "use client"; -var _interopRequireDefault$h = interopRequireDefaultExports; +var _interopRequireDefault$g = interopRequireDefaultExports; Object.defineProperty(FilterListOff, "__esModule", { value: true }); -var default_1$h = FilterListOff.default = void 0; -var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); -var _jsxRuntime$h = requireJsxRuntime(); -var _default$h = default_1$h = FilterListOff.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { +var default_1$g = FilterListOff.default = void 0; +var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); +var _jsxRuntime$g = requireJsxRuntime(); +var _default$g = default_1$g = FilterListOff.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); var FirstPage = {}; "use strict"; "use client"; -var _interopRequireDefault$g = interopRequireDefaultExports; +var _interopRequireDefault$f = interopRequireDefaultExports; Object.defineProperty(FirstPage, "__esModule", { value: true }); -var default_1$g = FirstPage.default = void 0; -var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); -var _jsxRuntime$g = requireJsxRuntime(); -var _default$g = default_1$g = FirstPage.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { +var default_1$f = FirstPage.default = void 0; +var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); +var _jsxRuntime$f = requireJsxRuntime(); +var _default$f = default_1$f = FirstPage.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); var Fullscreen = {}; "use strict"; "use client"; -var _interopRequireDefault$f = interopRequireDefaultExports; +var _interopRequireDefault$e = interopRequireDefaultExports; Object.defineProperty(Fullscreen, "__esModule", { value: true }); -var default_1$f = Fullscreen.default = void 0; -var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); -var _jsxRuntime$f = requireJsxRuntime(); -var _default$f = default_1$f = Fullscreen.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { +var default_1$e = Fullscreen.default = void 0; +var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); +var _jsxRuntime$e = requireJsxRuntime(); +var _default$e = default_1$e = Fullscreen.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); var FullscreenExit = {}; "use strict"; "use client"; -var _interopRequireDefault$e = interopRequireDefaultExports; +var _interopRequireDefault$d = interopRequireDefaultExports; Object.defineProperty(FullscreenExit, "__esModule", { value: true }); -var default_1$e = FullscreenExit.default = void 0; -var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); -var _jsxRuntime$e = requireJsxRuntime(); -var _default$e = default_1$e = FullscreenExit.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { +var default_1$d = FullscreenExit.default = void 0; +var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); +var _jsxRuntime$d = requireJsxRuntime(); +var _default$d = default_1$d = FullscreenExit.default = (0, _createSvgIcon$d.default)(/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); var KeyboardDoubleArrowDown = {}; "use strict"; "use client"; -var _interopRequireDefault$d = interopRequireDefaultExports; +var _interopRequireDefault$c = interopRequireDefaultExports; Object.defineProperty(KeyboardDoubleArrowDown, "__esModule", { value: true }); -var default_1$d = KeyboardDoubleArrowDown.default = void 0; -var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); -var _jsxRuntime$d = requireJsxRuntime(); -var _default$d = default_1$d = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$d.default)([/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { +var default_1$c = KeyboardDoubleArrowDown.default = void 0; +var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); +var _jsxRuntime$c = requireJsxRuntime(); +var _default$c = default_1$c = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$c.default)([/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" -}, "0"), /* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { +}, "0"), /* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "m18 13-1.41-1.41L12 16.17l-4.59-4.58L6 13l6 6z" }, "1")], "KeyboardDoubleArrowDown"); var LastPage = {}; "use strict"; "use client"; -var _interopRequireDefault$c = interopRequireDefaultExports; +var _interopRequireDefault$b = interopRequireDefaultExports; Object.defineProperty(LastPage, "__esModule", { value: true }); -var default_1$c = LastPage.default = void 0; -var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); -var _jsxRuntime$c = requireJsxRuntime(); -var _default$c = default_1$c = LastPage.default = (0, _createSvgIcon$c.default)(/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { +var default_1$b = LastPage.default = void 0; +var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); +var _jsxRuntime$b = requireJsxRuntime(); +var _default$b = default_1$b = LastPage.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); var MoreHoriz = {}; "use strict"; "use client"; -var _interopRequireDefault$b = interopRequireDefaultExports; +var _interopRequireDefault$a = interopRequireDefaultExports; Object.defineProperty(MoreHoriz, "__esModule", { value: true }); -var default_1$b = MoreHoriz.default = void 0; -var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); -var _jsxRuntime$b = requireJsxRuntime(); -var _default$b = default_1$b = MoreHoriz.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { +var default_1$a = MoreHoriz.default = void 0; +var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); +var _jsxRuntime$a = requireJsxRuntime(); +var _default$a = default_1$a = MoreHoriz.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); var MoreVert = {}; "use strict"; "use client"; -var _interopRequireDefault$a = interopRequireDefaultExports; +var _interopRequireDefault$9 = interopRequireDefaultExports; Object.defineProperty(MoreVert, "__esModule", { value: true }); -var default_1$a = MoreVert.default = void 0; -var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); -var _jsxRuntime$a = requireJsxRuntime(); -var _default$a = default_1$a = MoreVert.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { +var default_1$9 = MoreVert.default = void 0; +var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); +var _jsxRuntime$9 = requireJsxRuntime(); +var _default$9 = default_1$9 = MoreVert.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); var PushPin = {}; "use strict"; "use client"; -var _interopRequireDefault$9 = interopRequireDefaultExports; +var _interopRequireDefault$8 = interopRequireDefaultExports; Object.defineProperty(PushPin, "__esModule", { value: true }); -var default_1$9 = PushPin.default = void 0; -var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); -var _jsxRuntime$9 = requireJsxRuntime(); -var _default$9 = default_1$9 = PushPin.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { +var default_1$8 = PushPin.default = void 0; +var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); +var _jsxRuntime$8 = requireJsxRuntime(); +var _default$8 = default_1$8 = PushPin.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" }), "PushPin"); var RestartAlt = {}; "use strict"; "use client"; -var _interopRequireDefault$8 = interopRequireDefaultExports; +var _interopRequireDefault$7 = interopRequireDefaultExports; Object.defineProperty(RestartAlt, "__esModule", { value: true }); -var default_1$8 = RestartAlt.default = void 0; -var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); -var _jsxRuntime$8 = requireJsxRuntime(); -var _default$8 = default_1$8 = RestartAlt.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { +var default_1$7 = RestartAlt.default = void 0; +var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); +var _jsxRuntime$7 = requireJsxRuntime(); +var _default$7 = default_1$7 = RestartAlt.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); var Save = {}; "use strict"; "use client"; -var _interopRequireDefault$7 = interopRequireDefaultExports; +var _interopRequireDefault$6 = interopRequireDefaultExports; Object.defineProperty(Save, "__esModule", { value: true }); -var default_1$7 = Save.default = void 0; -var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); -var _jsxRuntime$7 = requireJsxRuntime(); -var _default$7 = default_1$7 = Save.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { +var default_1$6 = Save.default = void 0; +var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); +var _jsxRuntime$6 = requireJsxRuntime(); +var _default$6 = default_1$6 = Save.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); var Search = {}; "use strict"; "use client"; -var _interopRequireDefault$6 = interopRequireDefaultExports; +var _interopRequireDefault$5 = interopRequireDefaultExports; Object.defineProperty(Search, "__esModule", { value: true }); -var default_1$6 = Search.default = void 0; -var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); -var _jsxRuntime$6 = requireJsxRuntime(); -var _default$6 = default_1$6 = Search.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { +var default_1$5 = Search.default = void 0; +var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); +var _jsxRuntime$5 = requireJsxRuntime(); +var _default$5 = default_1$5 = Search.default = (0, _createSvgIcon$5.default)(/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); var SearchOff = {}; "use strict"; "use client"; -var _interopRequireDefault$5 = interopRequireDefaultExports; +var _interopRequireDefault$4 = interopRequireDefaultExports; Object.defineProperty(SearchOff, "__esModule", { value: true }); -var default_1$5 = SearchOff.default = void 0; -var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); -var _jsxRuntime$5 = requireJsxRuntime(); -var _default$5 = default_1$5 = SearchOff.default = (0, _createSvgIcon$5.default)([/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { +var default_1$4 = SearchOff.default = void 0; +var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); +var _jsxRuntime$4 = requireJsxRuntime(); +var _default$4 = default_1$4 = SearchOff.default = (0, _createSvgIcon$4.default)([/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" -}, "0"), /* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { +}, "0"), /* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M6.47 10.82 4 13.29l-2.47-2.47-.71.71L3.29 14 .82 16.47l.71.71L4 14.71l2.47 2.47.71-.71L4.71 14l2.47-2.47z" }, "1")], "SearchOff"); var Sort = {}; "use strict"; "use client"; -var _interopRequireDefault$4 = interopRequireDefaultExports; +var _interopRequireDefault$3 = interopRequireDefaultExports; Object.defineProperty(Sort, "__esModule", { value: true }); -var default_1$4 = Sort.default = void 0; -var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); -var _jsxRuntime$4 = requireJsxRuntime(); -var _default$4 = default_1$4 = Sort.default = (0, _createSvgIcon$4.default)(/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { +var default_1$3 = Sort.default = void 0; +var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); +var _jsxRuntime$3 = requireJsxRuntime(); +var _default$3 = default_1$3 = Sort.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); var SyncAlt = {}; "use strict"; "use client"; -var _interopRequireDefault$3 = interopRequireDefaultExports; +var _interopRequireDefault$2 = interopRequireDefaultExports; Object.defineProperty(SyncAlt, "__esModule", { value: true }); -var default_1$3 = SyncAlt.default = void 0; -var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); -var _jsxRuntime$3 = requireJsxRuntime(); -var _default$3 = default_1$3 = SyncAlt.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { +var default_1$2 = SyncAlt.default = void 0; +var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); +var _jsxRuntime$2 = requireJsxRuntime(); +var _default$2 = default_1$2 = SyncAlt.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); var ViewColumn = {}; "use strict"; "use client"; -var _interopRequireDefault$2 = interopRequireDefaultExports; +var _interopRequireDefault$1 = interopRequireDefaultExports; Object.defineProperty(ViewColumn, "__esModule", { value: true }); -var default_1$2 = ViewColumn.default = void 0; -var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); -var _jsxRuntime$2 = requireJsxRuntime(); -var _default$2 = default_1$2 = ViewColumn.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { +var default_1$1 = ViewColumn.default = void 0; +var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); +var _jsxRuntime$1 = requireJsxRuntime(); +var _default$1 = default_1$1 = ViewColumn.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); var VisibilityOff = {}; "use strict"; "use client"; -var _interopRequireDefault$1 = interopRequireDefaultExports; +var _interopRequireDefault = interopRequireDefaultExports; Object.defineProperty(VisibilityOff, "__esModule", { value: true }); -var default_1$1 = VisibilityOff.default = void 0; -var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); -var _jsxRuntime$1 = requireJsxRuntime(); -var _default$1 = default_1$1 = VisibilityOff.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { +var default_1 = VisibilityOff.default = void 0; +var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); +var _jsxRuntime = requireJsxRuntime(); +var _default = default_1 = VisibilityOff.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); function memo(getDeps, fn2, opts) { @@ -60268,40 +60268,40 @@ const getMRT_RowSelectColumnDef = (tableOptions) => { })); }; const MRT_Default_Icons = { - ArrowDownwardIcon: default_1$y, - ArrowRightIcon: default_1$x, - CancelIcon: default_1$w, - ChevronLeftIcon: default_1$v, - ChevronRightIcon: default_1$u, - ClearAllIcon: default_1$t, - CloseIcon: default_1$s, - ContentCopy: default_1$r, - DensityLargeIcon: default_1$q, - DensityMediumIcon: default_1$p, - DensitySmallIcon: default_1$o, - DragHandleIcon: default_1$n, - DynamicFeedIcon: default_1$m, - EditIcon: default_1$l, - ExpandMoreIcon: default_1$k, - FilterAltIcon: default_1$j, - FilterListIcon: default_1$i, - FilterListOffIcon: default_1$h, - FirstPageIcon: default_1$g, - FullscreenExitIcon: default_1$e, - FullscreenIcon: default_1$f, - KeyboardDoubleArrowDownIcon: default_1$d, - LastPageIcon: default_1$c, - MoreHorizIcon: default_1$b, - MoreVertIcon: default_1$a, - PushPinIcon: default_1$9, - RestartAltIcon: default_1$8, - SaveIcon: default_1$7, - SearchIcon: default_1$6, - SearchOffIcon: default_1$5, - SortIcon: default_1$4, - SyncAltIcon: default_1$3, - ViewColumnIcon: default_1$2, - VisibilityOffIcon: default_1$1 + ArrowDownwardIcon: default_1$x, + ArrowRightIcon: default_1$w, + CancelIcon: default_1$v, + ChevronLeftIcon: default_1$u, + ChevronRightIcon: default_1$t, + ClearAllIcon: default_1$s, + CloseIcon: default_1$r, + ContentCopy: default_1$q, + DensityLargeIcon: default_1$p, + DensityMediumIcon: default_1$o, + DensitySmallIcon: default_1$n, + DragHandleIcon: default_1$m, + DynamicFeedIcon: default_1$l, + EditIcon: default_1$k, + ExpandMoreIcon: default_1$j, + FilterAltIcon: default_1$i, + FilterListIcon: default_1$h, + FilterListOffIcon: default_1$g, + FirstPageIcon: default_1$f, + FullscreenExitIcon: default_1$d, + FullscreenIcon: default_1$e, + KeyboardDoubleArrowDownIcon: default_1$c, + LastPageIcon: default_1$b, + MoreHorizIcon: default_1$a, + MoreVertIcon: default_1$9, + PushPinIcon: default_1$8, + RestartAltIcon: default_1$7, + SaveIcon: default_1$6, + SearchIcon: default_1$5, + SearchOffIcon: default_1$4, + SortIcon: default_1$3, + SyncAltIcon: default_1$2, + ViewColumnIcon: default_1$1, + VisibilityOffIcon: default_1 }; const MRT_Localization_EN = { actions: "Actions", @@ -66027,37 +66027,18 @@ function BasicEntityEdit(props) { } ) : /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}) }); } -var Check = {}; -"use strict"; -"use client"; -var _interopRequireDefault = interopRequireDefaultExports; -Object.defineProperty(Check, "__esModule", { - value: true -}); -var default_1 = Check.default = void 0; -var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); -var _jsxRuntime = requireJsxRuntime(); -var _default = default_1 = Check.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { - d: "M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" -}), "Check"); const CMPNAME$6 = "BasicLedHead"; const { Open: Open$4, Child: Child$2 } = gubu_minExports.Gubu; -const BasicLedHeadSpecShape = gubu_minExports.Gubu( - Open$4({ - tool: Child$2( - { - id: String, - kind: String, - custom: "" - }, - {} - ), - mui: Open$4({ - Toolbar: Open$4({}) - }) - }), - { name: CMPNAME$6 } -); +const BasicLedHeadSpecShape = gubu_minExports.Gubu(Open$4({ + tool: Child$2({ + id: String, + kind: String, + custom: "" + }, {}), + mui: Open$4({ + Toolbar: Open$4({}) + }) +}), { name: CMPNAME$6 }); function BasicLedHead(props) { const { ctx, spec } = props; const { seneca, custom } = ctx(); @@ -66074,40 +66055,46 @@ function BasicLedHead(props) { const state = { item, view: viewState, navigate }; const subview = "/view/" + viewName === loc.pathname ? "list" : "edit"; const customButtons = Object.values(spec.tool || {}).filter((t) => "button" === t.kind).map((t) => (custom.BasicLedHead || {})[t.custom]).filter((t) => null != t); - return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [ - /* @__PURE__ */ jsxRuntimeExports.jsx(Box$2, { className: "bxg-BasicLedHead", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Toolbar$1, { className: "vxg-BasicLedHead-toolbar", variant: "dense", children: [ - /* @__PURE__ */ jsxRuntimeExports.jsx( - Button$1, - { - color: "inherit", - onClick: () => navigate(-1), - disabled: "list" === subview, - children: "Back" - } - ), - /* @__PURE__ */ jsxRuntimeExports.jsx( - Button$1, - { - color: "inherit", - onClick: () => seneca.act("aim:app,on:view,add:item", { view: viewName }), - disabled: "edit" === subview, - children: "Add" - } - ), - customButtons.map((cb) => /* @__PURE__ */ jsxRuntimeExports.jsx( - Button$1, - __spreadProps(__spreadValues({ - color: "inherit", - onClick: () => seneca.act(cb.msg(state, spec, ctx)), - disabled: cb.disabled(state, spec, ctx) - }, cb.attr(state, spec, ctx)), { - children: cb.title(state, spec, ctx) - }), - cb.id - )) - ] }) }), - /* @__PURE__ */ jsxRuntimeExports.jsx(Box$2, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Alert$1, { icon: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { fontSize: "inherit" }), severity: "success", children: "Here is a gentle confirmation that your action was successful." }) }) - ] }); + return /* @__PURE__ */ jsxRuntimeExports.jsx(Box$2, { className: "bxg-BasicLedHead", children: /* @__PURE__ */ jsxRuntimeExports.jsxs( + Toolbar$1, + { + className: "vxg-BasicLedHead-toolbar", + variant: "dense", + children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx( + Button$1, + { + color: "inherit", + onClick: () => navigate(-1), + disabled: "list" === subview, + children: "Back" + } + ), + /* @__PURE__ */ jsxRuntimeExports.jsx( + Button$1, + { + color: "inherit", + onClick: () => seneca.act("aim:app,on:view,add:item", { view: viewName }), + disabled: "edit" === subview, + children: "Add" + } + ), + customButtons.map( + (cb) => /* @__PURE__ */ jsxRuntimeExports.jsx( + Button$1, + __spreadProps(__spreadValues({ + color: "inherit", + onClick: () => seneca.act(cb.msg(state, spec, ctx)), + disabled: cb.disabled(state, spec, ctx) + }, cb.attr(state, spec, ctx)), { + children: cb.title(state, spec, ctx) + }), + cb.id + ) + ) + ] + } + ) }); } const CMPNAME$5 = "BasicLedFoot"; const { Open: Open$3 } = gubu_minExports.Gubu; @@ -66434,7 +66421,7 @@ function BasicSide(props) { { onClick: () => selectView(item.view), children: [ - /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemIcon$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$v, {}) }), + /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemIcon$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$u, {}) }), /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemText$1, { primary: item.title }) ] } diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index f0d85c1..93b19f6 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -5558,21 +5558,21 @@ var __async = (__this, __arguments, generator) => { }, Symbol.toStringTag, { value: "Module" })); const require$$8 = /* @__PURE__ */ getAugmentedNamespace(styleFunctionSx); "use strict"; - var _interopRequireDefault$A = interopRequireDefaultExports; + var _interopRequireDefault$z = interopRequireDefaultExports; Object.defineProperty(createStyled$2, "__esModule", { value: true }); - var _default$A = createStyled$2.default = createStyled$1; + var _default$z = createStyled$2.default = createStyled$1; var shouldForwardProp_1 = createStyled$2.shouldForwardProp = shouldForwardProp$1; var systemDefaultTheme_1 = createStyled$2.systemDefaultTheme = void 0; - var _extends2 = _interopRequireDefault$A(require_extends()); - var _objectWithoutPropertiesLoose2 = _interopRequireDefault$A(requireObjectWithoutPropertiesLoose()); + var _extends2 = _interopRequireDefault$z(require_extends()); + var _objectWithoutPropertiesLoose2 = _interopRequireDefault$z(requireObjectWithoutPropertiesLoose()); var _styledEngine$1 = _interopRequireWildcard$1(require$$1$1); var _deepmerge = require$$4; - var _capitalize = _interopRequireDefault$A(require$$5); - var _getDisplayName = _interopRequireDefault$A(require$$6); - var _createTheme = _interopRequireDefault$A(require$$7); - var _styleFunctionSx = _interopRequireDefault$A(require$$8); + var _capitalize = _interopRequireDefault$z(require$$5); + var _getDisplayName = _interopRequireDefault$z(require$$6); + var _createTheme = _interopRequireDefault$z(require$$7); + var _styleFunctionSx = _interopRequireDefault$z(require$$8); const _excluded$2i = ["ownerState"], _excluded2$i = ["variants"], _excluded3$7 = ["name", "slot", "skipVariantsResolver", "skipSx", "overridesResolver"]; function _getRequireWildcardCache$1(e) { if ("function" != typeof WeakMap) return null; @@ -5862,7 +5862,7 @@ var __async = (__this, __arguments, generator) => { }, Symbol.toStringTag, { value: "Module" })); const require$$2 = /* @__PURE__ */ getAugmentedNamespace(clamp); "use strict"; - var _interopRequireDefault$z = interopRequireDefaultExports; + var _interopRequireDefault$y = interopRequireDefaultExports; Object.defineProperty(colorManipulator, "__esModule", { value: true }); @@ -5884,8 +5884,8 @@ var __async = (__this, __arguments, generator) => { var private_safeLighten_1 = colorManipulator.private_safeLighten = private_safeLighten$1; var recomposeColor_1 = colorManipulator.recomposeColor = recomposeColor$1; var rgbToHex_1 = colorManipulator.rgbToHex = rgbToHex$1; - var _formatMuiErrorMessage2 = _interopRequireDefault$z(require$$1); - var _clamp = _interopRequireDefault$z(require$$2); + var _formatMuiErrorMessage2 = _interopRequireDefault$y(require$$1); + var _clamp = _interopRequireDefault$y(require$$2); function clampWrapper$1(value, min2 = 0, max2 = 1) { if (process.env.NODE_ENV !== "production") { if (value < min2 || value > max2) { @@ -6776,7 +6776,7 @@ Please use another name.` : formatMuiErrorMessage$1(18)); } const rootShouldForwardProp = (prop) => slotShouldForwardProp(prop) && prop !== "classes"; "use client"; - const styled$1 = _default$A({ + const styled$1 = _default$z({ themeId: THEME_ID, defaultTheme: defaultTheme$5, rootShouldForwardProp @@ -17615,7 +17615,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha Object.defineProperty(useThemeWithoutDefault, "__esModule", { value: true }); - var default_1$z = useThemeWithoutDefault.default = void 0; + var default_1$y = useThemeWithoutDefault.default = void 0; var React = _interopRequireWildcard(React$1); var _styledEngine = require$$1$1; function _getRequireWildcardCache(e) { @@ -17644,7 +17644,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const contextTheme = React.useContext(_styledEngine.ThemeContext); return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme2 : contextTheme; } - var _default$z = default_1$z = useThemeWithoutDefault.default = useTheme; + var _default$y = default_1$y = useThemeWithoutDefault.default = useTheme; var top = "top"; var bottom = "bottom"; var right = "right"; @@ -19426,7 +19426,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha })({}); const Popper = /* @__PURE__ */ React__namespace.forwardRef(function Popper2(inProps, ref) { var _slots$root; - const theme = default_1$z(); + const theme = default_1$y(); const props = useDefaultProps({ props: inProps, name: "MuiPopper" @@ -25367,450 +25367,450 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } "use strict"; "use client"; - var _interopRequireDefault$y = interopRequireDefaultExports; + var _interopRequireDefault$x = interopRequireDefaultExports; Object.defineProperty(ArrowDownward, "__esModule", { value: true }); - var default_1$y = ArrowDownward.default = void 0; - var _createSvgIcon$y = _interopRequireDefault$y(requireCreateSvgIcon()); - var _jsxRuntime$y = requireJsxRuntime(); - var _default$y = default_1$y = ArrowDownward.default = (0, _createSvgIcon$y.default)(/* @__PURE__ */ (0, _jsxRuntime$y.jsx)("path", { + var default_1$x = ArrowDownward.default = void 0; + var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); + var _jsxRuntime$x = requireJsxRuntime(); + var _default$x = default_1$x = ArrowDownward.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); var ArrowRight = {}; "use strict"; "use client"; - var _interopRequireDefault$x = interopRequireDefaultExports; + var _interopRequireDefault$w = interopRequireDefaultExports; Object.defineProperty(ArrowRight, "__esModule", { value: true }); - var default_1$x = ArrowRight.default = void 0; - var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); - var _jsxRuntime$x = requireJsxRuntime(); - var _default$x = default_1$x = ArrowRight.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { + var default_1$w = ArrowRight.default = void 0; + var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); + var _jsxRuntime$w = requireJsxRuntime(); + var _default$w = default_1$w = ArrowRight.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); var Cancel = {}; "use strict"; "use client"; - var _interopRequireDefault$w = interopRequireDefaultExports; + var _interopRequireDefault$v = interopRequireDefaultExports; Object.defineProperty(Cancel, "__esModule", { value: true }); - var default_1$w = Cancel.default = void 0; - var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); - var _jsxRuntime$w = requireJsxRuntime(); - var _default$w = default_1$w = Cancel.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { + var default_1$v = Cancel.default = void 0; + var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); + var _jsxRuntime$v = requireJsxRuntime(); + var _default$v = default_1$v = Cancel.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); var ChevronLeft = {}; "use strict"; "use client"; - var _interopRequireDefault$v = interopRequireDefaultExports; + var _interopRequireDefault$u = interopRequireDefaultExports; Object.defineProperty(ChevronLeft, "__esModule", { value: true }); - var default_1$v = ChevronLeft.default = void 0; - var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); - var _jsxRuntime$v = requireJsxRuntime(); - var _default$v = default_1$v = ChevronLeft.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { + var default_1$u = ChevronLeft.default = void 0; + var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); + var _jsxRuntime$u = requireJsxRuntime(); + var _default$u = default_1$u = ChevronLeft.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); var ChevronRight = {}; "use strict"; "use client"; - var _interopRequireDefault$u = interopRequireDefaultExports; + var _interopRequireDefault$t = interopRequireDefaultExports; Object.defineProperty(ChevronRight, "__esModule", { value: true }); - var default_1$u = ChevronRight.default = void 0; - var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); - var _jsxRuntime$u = requireJsxRuntime(); - var _default$u = default_1$u = ChevronRight.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { + var default_1$t = ChevronRight.default = void 0; + var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); + var _jsxRuntime$t = requireJsxRuntime(); + var _default$t = default_1$t = ChevronRight.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); var ClearAll = {}; "use strict"; "use client"; - var _interopRequireDefault$t = interopRequireDefaultExports; + var _interopRequireDefault$s = interopRequireDefaultExports; Object.defineProperty(ClearAll, "__esModule", { value: true }); - var default_1$t = ClearAll.default = void 0; - var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); - var _jsxRuntime$t = requireJsxRuntime(); - var _default$t = default_1$t = ClearAll.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { + var default_1$s = ClearAll.default = void 0; + var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); + var _jsxRuntime$s = requireJsxRuntime(); + var _default$s = default_1$s = ClearAll.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); var Close = {}; "use strict"; "use client"; - var _interopRequireDefault$s = interopRequireDefaultExports; + var _interopRequireDefault$r = interopRequireDefaultExports; Object.defineProperty(Close, "__esModule", { value: true }); - var default_1$s = Close.default = void 0; - var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); - var _jsxRuntime$s = requireJsxRuntime(); - var _default$s = default_1$s = Close.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { + var default_1$r = Close.default = void 0; + var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); + var _jsxRuntime$r = requireJsxRuntime(); + var _default$r = default_1$r = Close.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); var ContentCopy = {}; "use strict"; "use client"; - var _interopRequireDefault$r = interopRequireDefaultExports; + var _interopRequireDefault$q = interopRequireDefaultExports; Object.defineProperty(ContentCopy, "__esModule", { value: true }); - var default_1$r = ContentCopy.default = void 0; - var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); - var _jsxRuntime$r = requireJsxRuntime(); - var _default$r = default_1$r = ContentCopy.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { + var default_1$q = ContentCopy.default = void 0; + var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); + var _jsxRuntime$q = requireJsxRuntime(); + var _default$q = default_1$q = ContentCopy.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); var DensityLarge = {}; "use strict"; "use client"; - var _interopRequireDefault$q = interopRequireDefaultExports; + var _interopRequireDefault$p = interopRequireDefaultExports; Object.defineProperty(DensityLarge, "__esModule", { value: true }); - var default_1$q = DensityLarge.default = void 0; - var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); - var _jsxRuntime$q = requireJsxRuntime(); - var _default$q = default_1$q = DensityLarge.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { + var default_1$p = DensityLarge.default = void 0; + var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); + var _jsxRuntime$p = requireJsxRuntime(); + var _default$p = default_1$p = DensityLarge.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); var DensityMedium = {}; "use strict"; "use client"; - var _interopRequireDefault$p = interopRequireDefaultExports; + var _interopRequireDefault$o = interopRequireDefaultExports; Object.defineProperty(DensityMedium, "__esModule", { value: true }); - var default_1$p = DensityMedium.default = void 0; - var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); - var _jsxRuntime$p = requireJsxRuntime(); - var _default$p = default_1$p = DensityMedium.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { + var default_1$o = DensityMedium.default = void 0; + var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); + var _jsxRuntime$o = requireJsxRuntime(); + var _default$o = default_1$o = DensityMedium.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); var DensitySmall = {}; "use strict"; "use client"; - var _interopRequireDefault$o = interopRequireDefaultExports; + var _interopRequireDefault$n = interopRequireDefaultExports; Object.defineProperty(DensitySmall, "__esModule", { value: true }); - var default_1$o = DensitySmall.default = void 0; - var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); - var _jsxRuntime$o = requireJsxRuntime(); - var _default$o = default_1$o = DensitySmall.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { + var default_1$n = DensitySmall.default = void 0; + var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); + var _jsxRuntime$n = requireJsxRuntime(); + var _default$n = default_1$n = DensitySmall.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); var DragHandle = {}; "use strict"; "use client"; - var _interopRequireDefault$n = interopRequireDefaultExports; + var _interopRequireDefault$m = interopRequireDefaultExports; Object.defineProperty(DragHandle, "__esModule", { value: true }); - var default_1$n = DragHandle.default = void 0; - var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); - var _jsxRuntime$n = requireJsxRuntime(); - var _default$n = default_1$n = DragHandle.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { + var default_1$m = DragHandle.default = void 0; + var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); + var _jsxRuntime$m = requireJsxRuntime(); + var _default$m = default_1$m = DragHandle.default = (0, _createSvgIcon$m.default)(/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); var DynamicFeed = {}; "use strict"; "use client"; - var _interopRequireDefault$m = interopRequireDefaultExports; + var _interopRequireDefault$l = interopRequireDefaultExports; Object.defineProperty(DynamicFeed, "__esModule", { value: true }); - var default_1$m = DynamicFeed.default = void 0; - var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); - var _jsxRuntime$m = requireJsxRuntime(); - var _default$m = default_1$m = DynamicFeed.default = (0, _createSvgIcon$m.default)([/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { + var default_1$l = DynamicFeed.default = void 0; + var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); + var _jsxRuntime$l = requireJsxRuntime(); + var _default$l = default_1$l = DynamicFeed.default = (0, _createSvgIcon$l.default)([/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" - }, "0"), /* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { + }, "0"), /* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M20 3h-8c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 8h-8V7h8zM4 12H2v7c0 1.1.9 2 2 2h9v-2H4z" }, "1")], "DynamicFeed"); var Edit = {}; "use strict"; "use client"; - var _interopRequireDefault$l = interopRequireDefaultExports; + var _interopRequireDefault$k = interopRequireDefaultExports; Object.defineProperty(Edit, "__esModule", { value: true }); - var default_1$l = Edit.default = void 0; - var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); - var _jsxRuntime$l = requireJsxRuntime(); - var _default$l = default_1$l = Edit.default = (0, _createSvgIcon$l.default)(/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { + var default_1$k = Edit.default = void 0; + var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); + var _jsxRuntime$k = requireJsxRuntime(); + var _default$k = default_1$k = Edit.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); var ExpandMore = {}; "use strict"; "use client"; - var _interopRequireDefault$k = interopRequireDefaultExports; + var _interopRequireDefault$j = interopRequireDefaultExports; Object.defineProperty(ExpandMore, "__esModule", { value: true }); - var default_1$k = ExpandMore.default = void 0; - var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); - var _jsxRuntime$k = requireJsxRuntime(); - var _default$k = default_1$k = ExpandMore.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { + var default_1$j = ExpandMore.default = void 0; + var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); + var _jsxRuntime$j = requireJsxRuntime(); + var _default$j = default_1$j = ExpandMore.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); var FilterAlt = {}; "use strict"; "use client"; - var _interopRequireDefault$j = interopRequireDefaultExports; + var _interopRequireDefault$i = interopRequireDefaultExports; Object.defineProperty(FilterAlt, "__esModule", { value: true }); - var default_1$j = FilterAlt.default = void 0; - var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); - var _jsxRuntime$j = requireJsxRuntime(); - var _default$j = default_1$j = FilterAlt.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { + var default_1$i = FilterAlt.default = void 0; + var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); + var _jsxRuntime$i = requireJsxRuntime(); + var _default$i = default_1$i = FilterAlt.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); var FilterList = {}; "use strict"; "use client"; - var _interopRequireDefault$i = interopRequireDefaultExports; + var _interopRequireDefault$h = interopRequireDefaultExports; Object.defineProperty(FilterList, "__esModule", { value: true }); - var default_1$i = FilterList.default = void 0; - var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); - var _jsxRuntime$i = requireJsxRuntime(); - var _default$i = default_1$i = FilterList.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { + var default_1$h = FilterList.default = void 0; + var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); + var _jsxRuntime$h = requireJsxRuntime(); + var _default$h = default_1$h = FilterList.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); var FilterListOff = {}; "use strict"; "use client"; - var _interopRequireDefault$h = interopRequireDefaultExports; + var _interopRequireDefault$g = interopRequireDefaultExports; Object.defineProperty(FilterListOff, "__esModule", { value: true }); - var default_1$h = FilterListOff.default = void 0; - var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); - var _jsxRuntime$h = requireJsxRuntime(); - var _default$h = default_1$h = FilterListOff.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { + var default_1$g = FilterListOff.default = void 0; + var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); + var _jsxRuntime$g = requireJsxRuntime(); + var _default$g = default_1$g = FilterListOff.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); var FirstPage = {}; "use strict"; "use client"; - var _interopRequireDefault$g = interopRequireDefaultExports; + var _interopRequireDefault$f = interopRequireDefaultExports; Object.defineProperty(FirstPage, "__esModule", { value: true }); - var default_1$g = FirstPage.default = void 0; - var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); - var _jsxRuntime$g = requireJsxRuntime(); - var _default$g = default_1$g = FirstPage.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { + var default_1$f = FirstPage.default = void 0; + var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); + var _jsxRuntime$f = requireJsxRuntime(); + var _default$f = default_1$f = FirstPage.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); var Fullscreen = {}; "use strict"; "use client"; - var _interopRequireDefault$f = interopRequireDefaultExports; + var _interopRequireDefault$e = interopRequireDefaultExports; Object.defineProperty(Fullscreen, "__esModule", { value: true }); - var default_1$f = Fullscreen.default = void 0; - var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); - var _jsxRuntime$f = requireJsxRuntime(); - var _default$f = default_1$f = Fullscreen.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { + var default_1$e = Fullscreen.default = void 0; + var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); + var _jsxRuntime$e = requireJsxRuntime(); + var _default$e = default_1$e = Fullscreen.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); var FullscreenExit = {}; "use strict"; "use client"; - var _interopRequireDefault$e = interopRequireDefaultExports; + var _interopRequireDefault$d = interopRequireDefaultExports; Object.defineProperty(FullscreenExit, "__esModule", { value: true }); - var default_1$e = FullscreenExit.default = void 0; - var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); - var _jsxRuntime$e = requireJsxRuntime(); - var _default$e = default_1$e = FullscreenExit.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { + var default_1$d = FullscreenExit.default = void 0; + var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); + var _jsxRuntime$d = requireJsxRuntime(); + var _default$d = default_1$d = FullscreenExit.default = (0, _createSvgIcon$d.default)(/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); var KeyboardDoubleArrowDown = {}; "use strict"; "use client"; - var _interopRequireDefault$d = interopRequireDefaultExports; + var _interopRequireDefault$c = interopRequireDefaultExports; Object.defineProperty(KeyboardDoubleArrowDown, "__esModule", { value: true }); - var default_1$d = KeyboardDoubleArrowDown.default = void 0; - var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); - var _jsxRuntime$d = requireJsxRuntime(); - var _default$d = default_1$d = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$d.default)([/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { + var default_1$c = KeyboardDoubleArrowDown.default = void 0; + var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); + var _jsxRuntime$c = requireJsxRuntime(); + var _default$c = default_1$c = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$c.default)([/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" - }, "0"), /* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { + }, "0"), /* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "m18 13-1.41-1.41L12 16.17l-4.59-4.58L6 13l6 6z" }, "1")], "KeyboardDoubleArrowDown"); var LastPage = {}; "use strict"; "use client"; - var _interopRequireDefault$c = interopRequireDefaultExports; + var _interopRequireDefault$b = interopRequireDefaultExports; Object.defineProperty(LastPage, "__esModule", { value: true }); - var default_1$c = LastPage.default = void 0; - var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); - var _jsxRuntime$c = requireJsxRuntime(); - var _default$c = default_1$c = LastPage.default = (0, _createSvgIcon$c.default)(/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { + var default_1$b = LastPage.default = void 0; + var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); + var _jsxRuntime$b = requireJsxRuntime(); + var _default$b = default_1$b = LastPage.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); var MoreHoriz = {}; "use strict"; "use client"; - var _interopRequireDefault$b = interopRequireDefaultExports; + var _interopRequireDefault$a = interopRequireDefaultExports; Object.defineProperty(MoreHoriz, "__esModule", { value: true }); - var default_1$b = MoreHoriz.default = void 0; - var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); - var _jsxRuntime$b = requireJsxRuntime(); - var _default$b = default_1$b = MoreHoriz.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { + var default_1$a = MoreHoriz.default = void 0; + var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); + var _jsxRuntime$a = requireJsxRuntime(); + var _default$a = default_1$a = MoreHoriz.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); var MoreVert = {}; "use strict"; "use client"; - var _interopRequireDefault$a = interopRequireDefaultExports; + var _interopRequireDefault$9 = interopRequireDefaultExports; Object.defineProperty(MoreVert, "__esModule", { value: true }); - var default_1$a = MoreVert.default = void 0; - var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); - var _jsxRuntime$a = requireJsxRuntime(); - var _default$a = default_1$a = MoreVert.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { + var default_1$9 = MoreVert.default = void 0; + var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); + var _jsxRuntime$9 = requireJsxRuntime(); + var _default$9 = default_1$9 = MoreVert.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); var PushPin = {}; "use strict"; "use client"; - var _interopRequireDefault$9 = interopRequireDefaultExports; + var _interopRequireDefault$8 = interopRequireDefaultExports; Object.defineProperty(PushPin, "__esModule", { value: true }); - var default_1$9 = PushPin.default = void 0; - var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); - var _jsxRuntime$9 = requireJsxRuntime(); - var _default$9 = default_1$9 = PushPin.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { + var default_1$8 = PushPin.default = void 0; + var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); + var _jsxRuntime$8 = requireJsxRuntime(); + var _default$8 = default_1$8 = PushPin.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" }), "PushPin"); var RestartAlt = {}; "use strict"; "use client"; - var _interopRequireDefault$8 = interopRequireDefaultExports; + var _interopRequireDefault$7 = interopRequireDefaultExports; Object.defineProperty(RestartAlt, "__esModule", { value: true }); - var default_1$8 = RestartAlt.default = void 0; - var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); - var _jsxRuntime$8 = requireJsxRuntime(); - var _default$8 = default_1$8 = RestartAlt.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { + var default_1$7 = RestartAlt.default = void 0; + var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); + var _jsxRuntime$7 = requireJsxRuntime(); + var _default$7 = default_1$7 = RestartAlt.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); var Save = {}; "use strict"; "use client"; - var _interopRequireDefault$7 = interopRequireDefaultExports; + var _interopRequireDefault$6 = interopRequireDefaultExports; Object.defineProperty(Save, "__esModule", { value: true }); - var default_1$7 = Save.default = void 0; - var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); - var _jsxRuntime$7 = requireJsxRuntime(); - var _default$7 = default_1$7 = Save.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { + var default_1$6 = Save.default = void 0; + var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); + var _jsxRuntime$6 = requireJsxRuntime(); + var _default$6 = default_1$6 = Save.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); var Search = {}; "use strict"; "use client"; - var _interopRequireDefault$6 = interopRequireDefaultExports; + var _interopRequireDefault$5 = interopRequireDefaultExports; Object.defineProperty(Search, "__esModule", { value: true }); - var default_1$6 = Search.default = void 0; - var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); - var _jsxRuntime$6 = requireJsxRuntime(); - var _default$6 = default_1$6 = Search.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { + var default_1$5 = Search.default = void 0; + var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); + var _jsxRuntime$5 = requireJsxRuntime(); + var _default$5 = default_1$5 = Search.default = (0, _createSvgIcon$5.default)(/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); var SearchOff = {}; "use strict"; "use client"; - var _interopRequireDefault$5 = interopRequireDefaultExports; + var _interopRequireDefault$4 = interopRequireDefaultExports; Object.defineProperty(SearchOff, "__esModule", { value: true }); - var default_1$5 = SearchOff.default = void 0; - var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); - var _jsxRuntime$5 = requireJsxRuntime(); - var _default$5 = default_1$5 = SearchOff.default = (0, _createSvgIcon$5.default)([/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { + var default_1$4 = SearchOff.default = void 0; + var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); + var _jsxRuntime$4 = requireJsxRuntime(); + var _default$4 = default_1$4 = SearchOff.default = (0, _createSvgIcon$4.default)([/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" - }, "0"), /* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { + }, "0"), /* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M6.47 10.82 4 13.29l-2.47-2.47-.71.71L3.29 14 .82 16.47l.71.71L4 14.71l2.47 2.47.71-.71L4.71 14l2.47-2.47z" }, "1")], "SearchOff"); var Sort = {}; "use strict"; "use client"; - var _interopRequireDefault$4 = interopRequireDefaultExports; + var _interopRequireDefault$3 = interopRequireDefaultExports; Object.defineProperty(Sort, "__esModule", { value: true }); - var default_1$4 = Sort.default = void 0; - var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); - var _jsxRuntime$4 = requireJsxRuntime(); - var _default$4 = default_1$4 = Sort.default = (0, _createSvgIcon$4.default)(/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { + var default_1$3 = Sort.default = void 0; + var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); + var _jsxRuntime$3 = requireJsxRuntime(); + var _default$3 = default_1$3 = Sort.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); var SyncAlt = {}; "use strict"; "use client"; - var _interopRequireDefault$3 = interopRequireDefaultExports; + var _interopRequireDefault$2 = interopRequireDefaultExports; Object.defineProperty(SyncAlt, "__esModule", { value: true }); - var default_1$3 = SyncAlt.default = void 0; - var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); - var _jsxRuntime$3 = requireJsxRuntime(); - var _default$3 = default_1$3 = SyncAlt.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { + var default_1$2 = SyncAlt.default = void 0; + var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); + var _jsxRuntime$2 = requireJsxRuntime(); + var _default$2 = default_1$2 = SyncAlt.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); var ViewColumn = {}; "use strict"; "use client"; - var _interopRequireDefault$2 = interopRequireDefaultExports; + var _interopRequireDefault$1 = interopRequireDefaultExports; Object.defineProperty(ViewColumn, "__esModule", { value: true }); - var default_1$2 = ViewColumn.default = void 0; - var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); - var _jsxRuntime$2 = requireJsxRuntime(); - var _default$2 = default_1$2 = ViewColumn.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { + var default_1$1 = ViewColumn.default = void 0; + var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); + var _jsxRuntime$1 = requireJsxRuntime(); + var _default$1 = default_1$1 = ViewColumn.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); var VisibilityOff = {}; "use strict"; "use client"; - var _interopRequireDefault$1 = interopRequireDefaultExports; + var _interopRequireDefault = interopRequireDefaultExports; Object.defineProperty(VisibilityOff, "__esModule", { value: true }); - var default_1$1 = VisibilityOff.default = void 0; - var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); - var _jsxRuntime$1 = requireJsxRuntime(); - var _default$1 = default_1$1 = VisibilityOff.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { + var default_1 = VisibilityOff.default = void 0; + var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); + var _jsxRuntime = requireJsxRuntime(); + var _default = default_1 = VisibilityOff.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); function memo(getDeps, fn, opts) { @@ -60280,40 +60280,40 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha })); }; const MRT_Default_Icons = { - ArrowDownwardIcon: default_1$y, - ArrowRightIcon: default_1$x, - CancelIcon: default_1$w, - ChevronLeftIcon: default_1$v, - ChevronRightIcon: default_1$u, - ClearAllIcon: default_1$t, - CloseIcon: default_1$s, - ContentCopy: default_1$r, - DensityLargeIcon: default_1$q, - DensityMediumIcon: default_1$p, - DensitySmallIcon: default_1$o, - DragHandleIcon: default_1$n, - DynamicFeedIcon: default_1$m, - EditIcon: default_1$l, - ExpandMoreIcon: default_1$k, - FilterAltIcon: default_1$j, - FilterListIcon: default_1$i, - FilterListOffIcon: default_1$h, - FirstPageIcon: default_1$g, - FullscreenExitIcon: default_1$e, - FullscreenIcon: default_1$f, - KeyboardDoubleArrowDownIcon: default_1$d, - LastPageIcon: default_1$c, - MoreHorizIcon: default_1$b, - MoreVertIcon: default_1$a, - PushPinIcon: default_1$9, - RestartAltIcon: default_1$8, - SaveIcon: default_1$7, - SearchIcon: default_1$6, - SearchOffIcon: default_1$5, - SortIcon: default_1$4, - SyncAltIcon: default_1$3, - ViewColumnIcon: default_1$2, - VisibilityOffIcon: default_1$1 + ArrowDownwardIcon: default_1$x, + ArrowRightIcon: default_1$w, + CancelIcon: default_1$v, + ChevronLeftIcon: default_1$u, + ChevronRightIcon: default_1$t, + ClearAllIcon: default_1$s, + CloseIcon: default_1$r, + ContentCopy: default_1$q, + DensityLargeIcon: default_1$p, + DensityMediumIcon: default_1$o, + DensitySmallIcon: default_1$n, + DragHandleIcon: default_1$m, + DynamicFeedIcon: default_1$l, + EditIcon: default_1$k, + ExpandMoreIcon: default_1$j, + FilterAltIcon: default_1$i, + FilterListIcon: default_1$h, + FilterListOffIcon: default_1$g, + FirstPageIcon: default_1$f, + FullscreenExitIcon: default_1$d, + FullscreenIcon: default_1$e, + KeyboardDoubleArrowDownIcon: default_1$c, + LastPageIcon: default_1$b, + MoreHorizIcon: default_1$a, + MoreVertIcon: default_1$9, + PushPinIcon: default_1$8, + RestartAltIcon: default_1$7, + SaveIcon: default_1$6, + SearchIcon: default_1$5, + SearchOffIcon: default_1$4, + SortIcon: default_1$3, + SyncAltIcon: default_1$2, + ViewColumnIcon: default_1$1, + VisibilityOffIcon: default_1 }; const MRT_Localization_EN = { actions: "Actions", @@ -66039,37 +66039,18 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } ) : /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}) }); } - var Check = {}; - "use strict"; - "use client"; - var _interopRequireDefault = interopRequireDefaultExports; - Object.defineProperty(Check, "__esModule", { - value: true - }); - var default_1 = Check.default = void 0; - var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); - var _jsxRuntime = requireJsxRuntime(); - var _default = default_1 = Check.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { - d: "M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" - }), "Check"); const CMPNAME$6 = "BasicLedHead"; const { Open: Open$4, Child: Child$2 } = gubu_minExports.Gubu; - const BasicLedHeadSpecShape = gubu_minExports.Gubu( - Open$4({ - tool: Child$2( - { - id: String, - kind: String, - custom: "" - }, - {} - ), - mui: Open$4({ - Toolbar: Open$4({}) - }) - }), - { name: CMPNAME$6 } - ); + const BasicLedHeadSpecShape = gubu_minExports.Gubu(Open$4({ + tool: Child$2({ + id: String, + kind: String, + custom: "" + }, {}), + mui: Open$4({ + Toolbar: Open$4({}) + }) + }), { name: CMPNAME$6 }); function BasicLedHead(props) { const { ctx, spec } = props; const { seneca, custom } = ctx(); @@ -66086,40 +66067,46 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const state = { item, view: viewState, navigate }; const subview = "/view/" + viewName === loc.pathname ? "list" : "edit"; const customButtons = Object.values(spec.tool || {}).filter((t) => "button" === t.kind).map((t) => (custom.BasicLedHead || {})[t.custom]).filter((t) => null != t); - return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [ - /* @__PURE__ */ jsxRuntimeExports.jsx(material.Box, { className: "bxg-BasicLedHead", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(material.Toolbar, { className: "vxg-BasicLedHead-toolbar", variant: "dense", children: [ - /* @__PURE__ */ jsxRuntimeExports.jsx( - material.Button, - { - color: "inherit", - onClick: () => navigate(-1), - disabled: "list" === subview, - children: "Back" - } - ), - /* @__PURE__ */ jsxRuntimeExports.jsx( - material.Button, - { - color: "inherit", - onClick: () => seneca.act("aim:app,on:view,add:item", { view: viewName }), - disabled: "edit" === subview, - children: "Add" - } - ), - customButtons.map((cb) => /* @__PURE__ */ jsxRuntimeExports.jsx( - material.Button, - __spreadProps(__spreadValues({ - color: "inherit", - onClick: () => seneca.act(cb.msg(state, spec, ctx)), - disabled: cb.disabled(state, spec, ctx) - }, cb.attr(state, spec, ctx)), { - children: cb.title(state, spec, ctx) - }), - cb.id - )) - ] }) }), - /* @__PURE__ */ jsxRuntimeExports.jsx(material.Box, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(material.Alert, { icon: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { fontSize: "inherit" }), severity: "success", children: "Here is a gentle confirmation that your action was successful." }) }) - ] }); + return /* @__PURE__ */ jsxRuntimeExports.jsx(material.Box, { className: "bxg-BasicLedHead", children: /* @__PURE__ */ jsxRuntimeExports.jsxs( + material.Toolbar, + { + className: "vxg-BasicLedHead-toolbar", + variant: "dense", + children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx( + material.Button, + { + color: "inherit", + onClick: () => navigate(-1), + disabled: "list" === subview, + children: "Back" + } + ), + /* @__PURE__ */ jsxRuntimeExports.jsx( + material.Button, + { + color: "inherit", + onClick: () => seneca.act("aim:app,on:view,add:item", { view: viewName }), + disabled: "edit" === subview, + children: "Add" + } + ), + customButtons.map( + (cb) => /* @__PURE__ */ jsxRuntimeExports.jsx( + material.Button, + __spreadProps(__spreadValues({ + color: "inherit", + onClick: () => seneca.act(cb.msg(state, spec, ctx)), + disabled: cb.disabled(state, spec, ctx) + }, cb.attr(state, spec, ctx)), { + children: cb.title(state, spec, ctx) + }), + cb.id + ) + ) + ] + } + ) }); } const CMPNAME$5 = "BasicLedFoot"; const { Open: Open$3 } = gubu_minExports.Gubu; @@ -66446,7 +66433,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha { onClick: () => selectView(item.view), children: [ - /* @__PURE__ */ jsxRuntimeExports.jsx(material.ListItemIcon, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$v, {}) }), + /* @__PURE__ */ jsxRuntimeExports.jsx(material.ListItemIcon, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$u, {}) }), /* @__PURE__ */ jsxRuntimeExports.jsx(material.ListItemText, { primary: item.title }) ] } diff --git a/src/lib/BasicLed.tsx b/src/lib/BasicLed.tsx index d6eaeac..a23e81f 100644 --- a/src/lib/BasicLed.tsx +++ b/src/lib/BasicLed.tsx @@ -1,7 +1,8 @@ -import React, { useState, useEffect } from 'react' +import React, { useState, useEffect, useRef } from 'react' import { useSelector } from 'react-redux' import { useNavigate, useParams, Routes, Route } from 'react-router-dom' -import { Box } from '@mui/material' +import { Alert, Box } from '@mui/material' +import CheckIcon from '@mui/icons-material/Check' import { Gubu } from 'gubu' @@ -22,8 +23,8 @@ function BasicLed (props: any) { const { ctx } = props const { seneca } = ctx() const name = props.spec.name - // TODO: const cid = seneca.util.nid() - - // tag = props.spec.name + + const uniqueIdRef = useRef(seneca.util.Nid()) + const cid = name // + '-' + uniqueIdRef.current const navigate = useNavigate() @@ -32,7 +33,7 @@ function BasicLed (props: any) { if (!ready) { seneca.use({ - tag: name, + tag: cid, define: VxgBasicLedPlugin, options: { spec: props.spec, @@ -42,7 +43,7 @@ function BasicLed (props: any) { } const { head, list, edit, foot } = - seneca.export('VxgBasicLedPlugin$' + name + '/spec') || {} + seneca.export('VxgBasicLedPlugin$' + cid + '/spec') || {} return ready ? ( From 2b4e135fb6aa6c3b7db860b6eaa1887446eb2d9a Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Wed, 7 Aug 2024 23:10:47 +0100 Subject: [PATCH 108/122] chore: Use uniqueIdRef.current to avoid name clashes in BasicLed component --- src/lib/BasicLed.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/BasicLed.tsx b/src/lib/BasicLed.tsx index a23e81f..fb7b61d 100644 --- a/src/lib/BasicLed.tsx +++ b/src/lib/BasicLed.tsx @@ -24,6 +24,7 @@ function BasicLed (props: any) { const { seneca } = ctx() const name = props.spec.name const uniqueIdRef = useRef(seneca.util.Nid()) + // TODO: use uniqueIdRef.current to avoid name clashes but sort out store issues const cid = name // + '-' + uniqueIdRef.current const navigate = useNavigate() From 0aad8cf93260662dbc7ac23b4ec74d5a148d009d Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 8 Aug 2024 19:36:44 +0100 Subject: [PATCH 109/122] chore: Refactor BasicEntityEdit to use useSanitizedId for generating unique component IDs --- dist/voxgig-model-react.es.js | 854 +++++++++++++++++---------------- dist/voxgig-model-react.umd.js | 852 ++++++++++++++++---------------- dist/vxg-util.d.ts | 3 +- src/lib/BasicEntityEdit.tsx | 2 + src/lib/vxg-util.ts | 17 +- 5 files changed, 893 insertions(+), 835 deletions(-) diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index c804df1..c3e6117 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -53,7 +53,7 @@ var __async = (__this, __arguments, generator) => { }); }; import * as React$1 from "react"; -import React__default, { isValidElement, Children, cloneElement, useMemo, useState, useReducer, useRef, useEffect, useCallback, memo as memo$2, Fragment, useLayoutEffect } from "react"; +import React__default, { useId as useId$1, isValidElement, Children, cloneElement, useMemo, useState, useReducer, useRef, useEffect, useCallback, memo as memo$2, Fragment, useLayoutEffect } from "react"; import { Button as Button$1, Avatar, Menu as Menu$1, MenuItem as MenuItem$1, IconButton as IconButton$1, useTheme as useTheme$5, Box as Box$2, FormControlLabel as FormControlLabel$1, Checkbox as Checkbox$1, Autocomplete as Autocomplete$1, TextField as TextField$1, FormLabel as FormLabel$1, Slider as Slider$1, RadioGroup, Radio as Radio$1, Rating, ButtonGroup, FormControl as FormControl$1, InputLabel as InputLabel$1, Select as Select$1, Switch as Switch$1, ToggleButtonGroup, ToggleButton, Grid as Grid$1, Toolbar as Toolbar$1, Container as Container$2, Drawer as Drawer$1, List as List$1, ListItem as ListItem$1, ListItemButton as ListItemButton$1, ListItemIcon as ListItemIcon$1, ListItemText as ListItemText$1, Divider as Divider$1, Typography as Typography$1 } from "@mui/material"; import emStyled from "@emotion/styled"; import { CacheProvider, Global, ThemeContext as ThemeContext$1, css, keyframes } from "@emotion/react"; @@ -1771,6 +1771,11 @@ function resdefault(cat, mapFn) { return mapResolvedDefault(defaultItems.slice(0, multiple)).filter(Boolean) || []; } } +function useSanitizedId() { + const id = useId$1(); + const sanitizedId = id.replace(/[^a-zA-Z0-9_]/g, "x"); + return sanitizedId; +} function VxgBasicAdminPlugin() { const seneca = this; const { Exact: Exact2, Default } = seneca.valid; @@ -1795,7 +1800,10 @@ function VxgBasicAdminPlugin() { }); function setPath(msg, meta) { return __async(this, null, function* () { - const q = Object.entries(msg.query).reduce((s, n) => s + ("" === s ? "?" : "") + (encodeURIComponent(n[0]) + "=" + encodeURIComponent(n[1])), ""); + const q = Object.entries(msg.query).reduce( + (s, n) => s + ("" === s ? "?" : "") + (encodeURIComponent(n[0]) + "=" + encodeURIComponent(n[1])), + "" + ); const path = "/view/" + msg.view + q; msg.navigate(path); }); @@ -1828,7 +1836,12 @@ function VxgBasicAdminPlugin() { }; const viewState = cmap(viewMap, { name: cmap.COPY, - active: cmap.FILTER + active: cmap.FILTER, + alert: { + active: false, + message: "", + level: "info" + } }); state.view = viewState; state.nav = { @@ -5546,21 +5559,21 @@ const styleFunctionSx = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def }, Symbol.toStringTag, { value: "Module" })); const require$$8 = /* @__PURE__ */ getAugmentedNamespace(styleFunctionSx); "use strict"; -var _interopRequireDefault$z = interopRequireDefaultExports; +var _interopRequireDefault$A = interopRequireDefaultExports; Object.defineProperty(createStyled$2, "__esModule", { value: true }); -var _default$z = createStyled$2.default = createStyled$1; +var _default$A = createStyled$2.default = createStyled$1; var shouldForwardProp_1 = createStyled$2.shouldForwardProp = shouldForwardProp$1; var systemDefaultTheme_1 = createStyled$2.systemDefaultTheme = void 0; -var _extends2 = _interopRequireDefault$z(require_extends()); -var _objectWithoutPropertiesLoose2 = _interopRequireDefault$z(requireObjectWithoutPropertiesLoose()); +var _extends2 = _interopRequireDefault$A(require_extends()); +var _objectWithoutPropertiesLoose2 = _interopRequireDefault$A(requireObjectWithoutPropertiesLoose()); var _styledEngine$1 = _interopRequireWildcard$1(require$$1$1); var _deepmerge = require$$4; -var _capitalize = _interopRequireDefault$z(require$$5); -var _getDisplayName = _interopRequireDefault$z(require$$6); -var _createTheme = _interopRequireDefault$z(require$$7); -var _styleFunctionSx = _interopRequireDefault$z(require$$8); +var _capitalize = _interopRequireDefault$A(require$$5); +var _getDisplayName = _interopRequireDefault$A(require$$6); +var _createTheme = _interopRequireDefault$A(require$$7); +var _styleFunctionSx = _interopRequireDefault$A(require$$8); const _excluded$2i = ["ownerState"], _excluded2$i = ["variants"], _excluded3$7 = ["name", "slot", "skipVariantsResolver", "skipSx", "overridesResolver"]; function _getRequireWildcardCache$1(e) { if ("function" != typeof WeakMap) return null; @@ -5850,7 +5863,7 @@ const clamp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert }, Symbol.toStringTag, { value: "Module" })); const require$$2 = /* @__PURE__ */ getAugmentedNamespace(clamp); "use strict"; -var _interopRequireDefault$y = interopRequireDefaultExports; +var _interopRequireDefault$z = interopRequireDefaultExports; Object.defineProperty(colorManipulator, "__esModule", { value: true }); @@ -5872,8 +5885,8 @@ var private_safeEmphasize_1 = colorManipulator.private_safeEmphasize = private_s var private_safeLighten_1 = colorManipulator.private_safeLighten = private_safeLighten$1; var recomposeColor_1 = colorManipulator.recomposeColor = recomposeColor$1; var rgbToHex_1 = colorManipulator.rgbToHex = rgbToHex$1; -var _formatMuiErrorMessage2 = _interopRequireDefault$y(require$$1); -var _clamp = _interopRequireDefault$y(require$$2); +var _formatMuiErrorMessage2 = _interopRequireDefault$z(require$$1); +var _clamp = _interopRequireDefault$z(require$$2); function clampWrapper$1(value, min2 = 0, max2 = 1) { if (process.env.NODE_ENV !== "production") { if (value < min2 || value > max2) { @@ -6764,7 +6777,7 @@ function slotShouldForwardProp(prop) { } const rootShouldForwardProp = (prop) => slotShouldForwardProp(prop) && prop !== "classes"; "use client"; -const styled$1 = _default$z({ +const styled$1 = _default$A({ themeId: THEME_ID, defaultTheme: defaultTheme$5, rootShouldForwardProp @@ -10798,21 +10811,28 @@ function BasicHeadTool(props) { } const CMPNAME$p = "BasicHead"; const { Child: Child$6, Exact, Open: Open$p, Required: Required$1 } = gubu_minExports.Gubu; -const BasicHeadSpecShape = gubu_minExports.Gubu({ - head: { - name: String, - active: Boolean, - tool: Child$6(Open$p({ - align: Exact("left", "right") - })) +const BasicHeadSpecShape = gubu_minExports.Gubu( + { + head: { + name: String, + active: Boolean, + tool: Child$6( + Open$p({ + align: Exact("left", "right") + }) + ) + }, + tool: Required$1({}), + // Set MUI component props directly + ux: { + props: { + AppBar: {}, + ToolBar: {} + } + } }, - tool: Required$1({}), - // Set MUI component props directly - mui: { - AppBar: {}, - ToolBar: {} - } -}, { name: CMPNAME$p }); + { name: CMPNAME$p } +); function BasicHead(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -10823,36 +10843,26 @@ function BasicHead(props) { active: vmap2.FILTER, name: vmap2.FILTER((_2, p) => { var _a; - return [(_a = basicHeadSpec.tool[p.key]) == null ? void 0 : _a.active, p.key]; + return [ + (_a = basicHeadSpec.tool[p.key]) == null ? void 0 : _a.active, + p.key + ]; }), align: vmap2.COPY }).map((t) => __spreadValues(__spreadValues({}, basicHeadSpec.tool[t.name]), t)); const leftTools = tools.filter((t) => "left" === t.align); const rightTools = tools.filter((t) => "right" === t.align); - return /* @__PURE__ */ jsxRuntimeExports.jsx( - AppBar, - __spreadProps(__spreadValues({ - className: "vxg-BasicHead" - }, spec.mui.AppBar), { - children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Toolbar, __spreadProps(__spreadValues({ className: "vxg-BasicHead-toolbar" }, spec.mui.ToolBar), { children: [ - /* @__PURE__ */ jsxRuntimeExports.jsx( - "div", - { - className: "vxg-BasicHead-toolbar vxg-BasicHead-toolbar-left", - children: leftTools.map((t) => /* @__PURE__ */ jsxRuntimeExports.jsx(BasicHeadTool, { ctx, spec: t }, t.name)) - } - ), - /* @__PURE__ */ jsxRuntimeExports.jsx( - "div", - { - className: "vxg-BasicHead-toolbar vxg-BasicHead-toolbar-right", - style: { marginLeft: "auto" }, - children: rightTools.map((t) => /* @__PURE__ */ jsxRuntimeExports.jsx(BasicHeadTool, { ctx, spec: t }, t.name)) - } - ) - ] })) - }) - ); + return /* @__PURE__ */ jsxRuntimeExports.jsx(AppBar, __spreadProps(__spreadValues({ className: "vxg-BasicHead" }, spec.ux.props.AppBar), { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Toolbar, __spreadProps(__spreadValues({ className: "vxg-BasicHead-toolbar" }, spec.ux.props.ToolBar), { children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicHead-toolbar vxg-BasicHead-toolbar-left", children: leftTools.map((t) => /* @__PURE__ */ jsxRuntimeExports.jsx(BasicHeadTool, { ctx, spec: t }, t.name)) }), + /* @__PURE__ */ jsxRuntimeExports.jsx( + "div", + { + className: "vxg-BasicHead-toolbar vxg-BasicHead-toolbar-right", + style: { marginLeft: "auto" }, + children: rightTools.map((t) => /* @__PURE__ */ jsxRuntimeExports.jsx(BasicHeadTool, { ctx, spec: t }, t.name)) + } + ) + ] })) })); } /** * table-core @@ -17603,7 +17613,7 @@ var useThemeWithoutDefault = {}; Object.defineProperty(useThemeWithoutDefault, "__esModule", { value: true }); -var default_1$y = useThemeWithoutDefault.default = void 0; +var default_1$z = useThemeWithoutDefault.default = void 0; var React = _interopRequireWildcard(React__default); var _styledEngine = require$$1$1; function _getRequireWildcardCache(e) { @@ -17632,7 +17642,7 @@ function useTheme(defaultTheme2 = null) { const contextTheme = React.useContext(_styledEngine.ThemeContext); return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme2 : contextTheme; } -var _default$y = default_1$y = useThemeWithoutDefault.default = useTheme; +var _default$z = default_1$z = useThemeWithoutDefault.default = useTheme; var top = "top"; var bottom = "bottom"; var right = "right"; @@ -19414,7 +19424,7 @@ const PopperRoot = styled$1(Popper$1, { })({}); const Popper2 = /* @__PURE__ */ React$1.forwardRef(function Popper3(inProps, ref) { var _slots$root; - const theme = default_1$y(); + const theme = default_1$z(); const props = useDefaultProps({ props: inProps, name: "MuiPopper" @@ -25355,450 +25365,450 @@ function requireCreateSvgIcon() { } "use strict"; "use client"; -var _interopRequireDefault$x = interopRequireDefaultExports; +var _interopRequireDefault$y = interopRequireDefaultExports; Object.defineProperty(ArrowDownward, "__esModule", { value: true }); -var default_1$x = ArrowDownward.default = void 0; -var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); -var _jsxRuntime$x = requireJsxRuntime(); -var _default$x = default_1$x = ArrowDownward.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { +var default_1$y = ArrowDownward.default = void 0; +var _createSvgIcon$y = _interopRequireDefault$y(requireCreateSvgIcon()); +var _jsxRuntime$y = requireJsxRuntime(); +var _default$y = default_1$y = ArrowDownward.default = (0, _createSvgIcon$y.default)(/* @__PURE__ */ (0, _jsxRuntime$y.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); var ArrowRight = {}; "use strict"; "use client"; -var _interopRequireDefault$w = interopRequireDefaultExports; +var _interopRequireDefault$x = interopRequireDefaultExports; Object.defineProperty(ArrowRight, "__esModule", { value: true }); -var default_1$w = ArrowRight.default = void 0; -var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); -var _jsxRuntime$w = requireJsxRuntime(); -var _default$w = default_1$w = ArrowRight.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { +var default_1$x = ArrowRight.default = void 0; +var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); +var _jsxRuntime$x = requireJsxRuntime(); +var _default$x = default_1$x = ArrowRight.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); var Cancel = {}; "use strict"; "use client"; -var _interopRequireDefault$v = interopRequireDefaultExports; +var _interopRequireDefault$w = interopRequireDefaultExports; Object.defineProperty(Cancel, "__esModule", { value: true }); -var default_1$v = Cancel.default = void 0; -var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); -var _jsxRuntime$v = requireJsxRuntime(); -var _default$v = default_1$v = Cancel.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { +var default_1$w = Cancel.default = void 0; +var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); +var _jsxRuntime$w = requireJsxRuntime(); +var _default$w = default_1$w = Cancel.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); var ChevronLeft = {}; "use strict"; "use client"; -var _interopRequireDefault$u = interopRequireDefaultExports; +var _interopRequireDefault$v = interopRequireDefaultExports; Object.defineProperty(ChevronLeft, "__esModule", { value: true }); -var default_1$u = ChevronLeft.default = void 0; -var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); -var _jsxRuntime$u = requireJsxRuntime(); -var _default$u = default_1$u = ChevronLeft.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { +var default_1$v = ChevronLeft.default = void 0; +var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); +var _jsxRuntime$v = requireJsxRuntime(); +var _default$v = default_1$v = ChevronLeft.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); var ChevronRight = {}; "use strict"; "use client"; -var _interopRequireDefault$t = interopRequireDefaultExports; +var _interopRequireDefault$u = interopRequireDefaultExports; Object.defineProperty(ChevronRight, "__esModule", { value: true }); -var default_1$t = ChevronRight.default = void 0; -var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); -var _jsxRuntime$t = requireJsxRuntime(); -var _default$t = default_1$t = ChevronRight.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { +var default_1$u = ChevronRight.default = void 0; +var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); +var _jsxRuntime$u = requireJsxRuntime(); +var _default$u = default_1$u = ChevronRight.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); var ClearAll = {}; "use strict"; "use client"; -var _interopRequireDefault$s = interopRequireDefaultExports; +var _interopRequireDefault$t = interopRequireDefaultExports; Object.defineProperty(ClearAll, "__esModule", { value: true }); -var default_1$s = ClearAll.default = void 0; -var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); -var _jsxRuntime$s = requireJsxRuntime(); -var _default$s = default_1$s = ClearAll.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { +var default_1$t = ClearAll.default = void 0; +var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); +var _jsxRuntime$t = requireJsxRuntime(); +var _default$t = default_1$t = ClearAll.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); var Close = {}; "use strict"; "use client"; -var _interopRequireDefault$r = interopRequireDefaultExports; +var _interopRequireDefault$s = interopRequireDefaultExports; Object.defineProperty(Close, "__esModule", { value: true }); -var default_1$r = Close.default = void 0; -var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); -var _jsxRuntime$r = requireJsxRuntime(); -var _default$r = default_1$r = Close.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { +var default_1$s = Close.default = void 0; +var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); +var _jsxRuntime$s = requireJsxRuntime(); +var _default$s = default_1$s = Close.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); var ContentCopy = {}; "use strict"; "use client"; -var _interopRequireDefault$q = interopRequireDefaultExports; +var _interopRequireDefault$r = interopRequireDefaultExports; Object.defineProperty(ContentCopy, "__esModule", { value: true }); -var default_1$q = ContentCopy.default = void 0; -var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); -var _jsxRuntime$q = requireJsxRuntime(); -var _default$q = default_1$q = ContentCopy.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { +var default_1$r = ContentCopy.default = void 0; +var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); +var _jsxRuntime$r = requireJsxRuntime(); +var _default$r = default_1$r = ContentCopy.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); var DensityLarge = {}; "use strict"; "use client"; -var _interopRequireDefault$p = interopRequireDefaultExports; +var _interopRequireDefault$q = interopRequireDefaultExports; Object.defineProperty(DensityLarge, "__esModule", { value: true }); -var default_1$p = DensityLarge.default = void 0; -var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); -var _jsxRuntime$p = requireJsxRuntime(); -var _default$p = default_1$p = DensityLarge.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { +var default_1$q = DensityLarge.default = void 0; +var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); +var _jsxRuntime$q = requireJsxRuntime(); +var _default$q = default_1$q = DensityLarge.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); var DensityMedium = {}; "use strict"; "use client"; -var _interopRequireDefault$o = interopRequireDefaultExports; +var _interopRequireDefault$p = interopRequireDefaultExports; Object.defineProperty(DensityMedium, "__esModule", { value: true }); -var default_1$o = DensityMedium.default = void 0; -var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); -var _jsxRuntime$o = requireJsxRuntime(); -var _default$o = default_1$o = DensityMedium.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { +var default_1$p = DensityMedium.default = void 0; +var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); +var _jsxRuntime$p = requireJsxRuntime(); +var _default$p = default_1$p = DensityMedium.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); var DensitySmall = {}; "use strict"; "use client"; -var _interopRequireDefault$n = interopRequireDefaultExports; +var _interopRequireDefault$o = interopRequireDefaultExports; Object.defineProperty(DensitySmall, "__esModule", { value: true }); -var default_1$n = DensitySmall.default = void 0; -var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); -var _jsxRuntime$n = requireJsxRuntime(); -var _default$n = default_1$n = DensitySmall.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { +var default_1$o = DensitySmall.default = void 0; +var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); +var _jsxRuntime$o = requireJsxRuntime(); +var _default$o = default_1$o = DensitySmall.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); var DragHandle = {}; "use strict"; "use client"; -var _interopRequireDefault$m = interopRequireDefaultExports; +var _interopRequireDefault$n = interopRequireDefaultExports; Object.defineProperty(DragHandle, "__esModule", { value: true }); -var default_1$m = DragHandle.default = void 0; -var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); -var _jsxRuntime$m = requireJsxRuntime(); -var _default$m = default_1$m = DragHandle.default = (0, _createSvgIcon$m.default)(/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { +var default_1$n = DragHandle.default = void 0; +var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); +var _jsxRuntime$n = requireJsxRuntime(); +var _default$n = default_1$n = DragHandle.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); var DynamicFeed = {}; "use strict"; "use client"; -var _interopRequireDefault$l = interopRequireDefaultExports; +var _interopRequireDefault$m = interopRequireDefaultExports; Object.defineProperty(DynamicFeed, "__esModule", { value: true }); -var default_1$l = DynamicFeed.default = void 0; -var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); -var _jsxRuntime$l = requireJsxRuntime(); -var _default$l = default_1$l = DynamicFeed.default = (0, _createSvgIcon$l.default)([/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { +var default_1$m = DynamicFeed.default = void 0; +var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); +var _jsxRuntime$m = requireJsxRuntime(); +var _default$m = default_1$m = DynamicFeed.default = (0, _createSvgIcon$m.default)([/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" -}, "0"), /* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { +}, "0"), /* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M20 3h-8c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 8h-8V7h8zM4 12H2v7c0 1.1.9 2 2 2h9v-2H4z" }, "1")], "DynamicFeed"); var Edit = {}; "use strict"; "use client"; -var _interopRequireDefault$k = interopRequireDefaultExports; +var _interopRequireDefault$l = interopRequireDefaultExports; Object.defineProperty(Edit, "__esModule", { value: true }); -var default_1$k = Edit.default = void 0; -var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); -var _jsxRuntime$k = requireJsxRuntime(); -var _default$k = default_1$k = Edit.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { +var default_1$l = Edit.default = void 0; +var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); +var _jsxRuntime$l = requireJsxRuntime(); +var _default$l = default_1$l = Edit.default = (0, _createSvgIcon$l.default)(/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); var ExpandMore = {}; "use strict"; "use client"; -var _interopRequireDefault$j = interopRequireDefaultExports; +var _interopRequireDefault$k = interopRequireDefaultExports; Object.defineProperty(ExpandMore, "__esModule", { value: true }); -var default_1$j = ExpandMore.default = void 0; -var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); -var _jsxRuntime$j = requireJsxRuntime(); -var _default$j = default_1$j = ExpandMore.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { +var default_1$k = ExpandMore.default = void 0; +var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); +var _jsxRuntime$k = requireJsxRuntime(); +var _default$k = default_1$k = ExpandMore.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); var FilterAlt = {}; "use strict"; "use client"; -var _interopRequireDefault$i = interopRequireDefaultExports; +var _interopRequireDefault$j = interopRequireDefaultExports; Object.defineProperty(FilterAlt, "__esModule", { value: true }); -var default_1$i = FilterAlt.default = void 0; -var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); -var _jsxRuntime$i = requireJsxRuntime(); -var _default$i = default_1$i = FilterAlt.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { +var default_1$j = FilterAlt.default = void 0; +var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); +var _jsxRuntime$j = requireJsxRuntime(); +var _default$j = default_1$j = FilterAlt.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); var FilterList = {}; "use strict"; "use client"; -var _interopRequireDefault$h = interopRequireDefaultExports; +var _interopRequireDefault$i = interopRequireDefaultExports; Object.defineProperty(FilterList, "__esModule", { value: true }); -var default_1$h = FilterList.default = void 0; -var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); -var _jsxRuntime$h = requireJsxRuntime(); -var _default$h = default_1$h = FilterList.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { +var default_1$i = FilterList.default = void 0; +var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); +var _jsxRuntime$i = requireJsxRuntime(); +var _default$i = default_1$i = FilterList.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); var FilterListOff = {}; "use strict"; "use client"; -var _interopRequireDefault$g = interopRequireDefaultExports; +var _interopRequireDefault$h = interopRequireDefaultExports; Object.defineProperty(FilterListOff, "__esModule", { value: true }); -var default_1$g = FilterListOff.default = void 0; -var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); -var _jsxRuntime$g = requireJsxRuntime(); -var _default$g = default_1$g = FilterListOff.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { +var default_1$h = FilterListOff.default = void 0; +var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); +var _jsxRuntime$h = requireJsxRuntime(); +var _default$h = default_1$h = FilterListOff.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); var FirstPage = {}; "use strict"; "use client"; -var _interopRequireDefault$f = interopRequireDefaultExports; +var _interopRequireDefault$g = interopRequireDefaultExports; Object.defineProperty(FirstPage, "__esModule", { value: true }); -var default_1$f = FirstPage.default = void 0; -var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); -var _jsxRuntime$f = requireJsxRuntime(); -var _default$f = default_1$f = FirstPage.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { +var default_1$g = FirstPage.default = void 0; +var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); +var _jsxRuntime$g = requireJsxRuntime(); +var _default$g = default_1$g = FirstPage.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); var Fullscreen = {}; "use strict"; "use client"; -var _interopRequireDefault$e = interopRequireDefaultExports; +var _interopRequireDefault$f = interopRequireDefaultExports; Object.defineProperty(Fullscreen, "__esModule", { value: true }); -var default_1$e = Fullscreen.default = void 0; -var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); -var _jsxRuntime$e = requireJsxRuntime(); -var _default$e = default_1$e = Fullscreen.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { +var default_1$f = Fullscreen.default = void 0; +var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); +var _jsxRuntime$f = requireJsxRuntime(); +var _default$f = default_1$f = Fullscreen.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); var FullscreenExit = {}; "use strict"; "use client"; -var _interopRequireDefault$d = interopRequireDefaultExports; +var _interopRequireDefault$e = interopRequireDefaultExports; Object.defineProperty(FullscreenExit, "__esModule", { value: true }); -var default_1$d = FullscreenExit.default = void 0; -var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); -var _jsxRuntime$d = requireJsxRuntime(); -var _default$d = default_1$d = FullscreenExit.default = (0, _createSvgIcon$d.default)(/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { +var default_1$e = FullscreenExit.default = void 0; +var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); +var _jsxRuntime$e = requireJsxRuntime(); +var _default$e = default_1$e = FullscreenExit.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); var KeyboardDoubleArrowDown = {}; "use strict"; "use client"; -var _interopRequireDefault$c = interopRequireDefaultExports; +var _interopRequireDefault$d = interopRequireDefaultExports; Object.defineProperty(KeyboardDoubleArrowDown, "__esModule", { value: true }); -var default_1$c = KeyboardDoubleArrowDown.default = void 0; -var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); -var _jsxRuntime$c = requireJsxRuntime(); -var _default$c = default_1$c = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$c.default)([/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { +var default_1$d = KeyboardDoubleArrowDown.default = void 0; +var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); +var _jsxRuntime$d = requireJsxRuntime(); +var _default$d = default_1$d = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$d.default)([/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" -}, "0"), /* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { +}, "0"), /* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "m18 13-1.41-1.41L12 16.17l-4.59-4.58L6 13l6 6z" }, "1")], "KeyboardDoubleArrowDown"); var LastPage = {}; "use strict"; "use client"; -var _interopRequireDefault$b = interopRequireDefaultExports; +var _interopRequireDefault$c = interopRequireDefaultExports; Object.defineProperty(LastPage, "__esModule", { value: true }); -var default_1$b = LastPage.default = void 0; -var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); -var _jsxRuntime$b = requireJsxRuntime(); -var _default$b = default_1$b = LastPage.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { +var default_1$c = LastPage.default = void 0; +var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); +var _jsxRuntime$c = requireJsxRuntime(); +var _default$c = default_1$c = LastPage.default = (0, _createSvgIcon$c.default)(/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); var MoreHoriz = {}; "use strict"; "use client"; -var _interopRequireDefault$a = interopRequireDefaultExports; +var _interopRequireDefault$b = interopRequireDefaultExports; Object.defineProperty(MoreHoriz, "__esModule", { value: true }); -var default_1$a = MoreHoriz.default = void 0; -var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); -var _jsxRuntime$a = requireJsxRuntime(); -var _default$a = default_1$a = MoreHoriz.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { +var default_1$b = MoreHoriz.default = void 0; +var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); +var _jsxRuntime$b = requireJsxRuntime(); +var _default$b = default_1$b = MoreHoriz.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); var MoreVert = {}; "use strict"; "use client"; -var _interopRequireDefault$9 = interopRequireDefaultExports; +var _interopRequireDefault$a = interopRequireDefaultExports; Object.defineProperty(MoreVert, "__esModule", { value: true }); -var default_1$9 = MoreVert.default = void 0; -var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); -var _jsxRuntime$9 = requireJsxRuntime(); -var _default$9 = default_1$9 = MoreVert.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { +var default_1$a = MoreVert.default = void 0; +var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); +var _jsxRuntime$a = requireJsxRuntime(); +var _default$a = default_1$a = MoreVert.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); var PushPin = {}; "use strict"; "use client"; -var _interopRequireDefault$8 = interopRequireDefaultExports; +var _interopRequireDefault$9 = interopRequireDefaultExports; Object.defineProperty(PushPin, "__esModule", { value: true }); -var default_1$8 = PushPin.default = void 0; -var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); -var _jsxRuntime$8 = requireJsxRuntime(); -var _default$8 = default_1$8 = PushPin.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { +var default_1$9 = PushPin.default = void 0; +var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); +var _jsxRuntime$9 = requireJsxRuntime(); +var _default$9 = default_1$9 = PushPin.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" }), "PushPin"); var RestartAlt = {}; "use strict"; "use client"; -var _interopRequireDefault$7 = interopRequireDefaultExports; +var _interopRequireDefault$8 = interopRequireDefaultExports; Object.defineProperty(RestartAlt, "__esModule", { value: true }); -var default_1$7 = RestartAlt.default = void 0; -var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); -var _jsxRuntime$7 = requireJsxRuntime(); -var _default$7 = default_1$7 = RestartAlt.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { +var default_1$8 = RestartAlt.default = void 0; +var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); +var _jsxRuntime$8 = requireJsxRuntime(); +var _default$8 = default_1$8 = RestartAlt.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); var Save = {}; "use strict"; "use client"; -var _interopRequireDefault$6 = interopRequireDefaultExports; +var _interopRequireDefault$7 = interopRequireDefaultExports; Object.defineProperty(Save, "__esModule", { value: true }); -var default_1$6 = Save.default = void 0; -var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); -var _jsxRuntime$6 = requireJsxRuntime(); -var _default$6 = default_1$6 = Save.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { +var default_1$7 = Save.default = void 0; +var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); +var _jsxRuntime$7 = requireJsxRuntime(); +var _default$7 = default_1$7 = Save.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); var Search = {}; "use strict"; "use client"; -var _interopRequireDefault$5 = interopRequireDefaultExports; +var _interopRequireDefault$6 = interopRequireDefaultExports; Object.defineProperty(Search, "__esModule", { value: true }); -var default_1$5 = Search.default = void 0; -var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); -var _jsxRuntime$5 = requireJsxRuntime(); -var _default$5 = default_1$5 = Search.default = (0, _createSvgIcon$5.default)(/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { +var default_1$6 = Search.default = void 0; +var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); +var _jsxRuntime$6 = requireJsxRuntime(); +var _default$6 = default_1$6 = Search.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); var SearchOff = {}; "use strict"; "use client"; -var _interopRequireDefault$4 = interopRequireDefaultExports; +var _interopRequireDefault$5 = interopRequireDefaultExports; Object.defineProperty(SearchOff, "__esModule", { value: true }); -var default_1$4 = SearchOff.default = void 0; -var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); -var _jsxRuntime$4 = requireJsxRuntime(); -var _default$4 = default_1$4 = SearchOff.default = (0, _createSvgIcon$4.default)([/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { +var default_1$5 = SearchOff.default = void 0; +var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); +var _jsxRuntime$5 = requireJsxRuntime(); +var _default$5 = default_1$5 = SearchOff.default = (0, _createSvgIcon$5.default)([/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" -}, "0"), /* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { +}, "0"), /* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M6.47 10.82 4 13.29l-2.47-2.47-.71.71L3.29 14 .82 16.47l.71.71L4 14.71l2.47 2.47.71-.71L4.71 14l2.47-2.47z" }, "1")], "SearchOff"); var Sort = {}; "use strict"; "use client"; -var _interopRequireDefault$3 = interopRequireDefaultExports; +var _interopRequireDefault$4 = interopRequireDefaultExports; Object.defineProperty(Sort, "__esModule", { value: true }); -var default_1$3 = Sort.default = void 0; -var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); -var _jsxRuntime$3 = requireJsxRuntime(); -var _default$3 = default_1$3 = Sort.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { +var default_1$4 = Sort.default = void 0; +var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); +var _jsxRuntime$4 = requireJsxRuntime(); +var _default$4 = default_1$4 = Sort.default = (0, _createSvgIcon$4.default)(/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); var SyncAlt = {}; "use strict"; "use client"; -var _interopRequireDefault$2 = interopRequireDefaultExports; +var _interopRequireDefault$3 = interopRequireDefaultExports; Object.defineProperty(SyncAlt, "__esModule", { value: true }); -var default_1$2 = SyncAlt.default = void 0; -var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); -var _jsxRuntime$2 = requireJsxRuntime(); -var _default$2 = default_1$2 = SyncAlt.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { +var default_1$3 = SyncAlt.default = void 0; +var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); +var _jsxRuntime$3 = requireJsxRuntime(); +var _default$3 = default_1$3 = SyncAlt.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); var ViewColumn = {}; "use strict"; "use client"; -var _interopRequireDefault$1 = interopRequireDefaultExports; +var _interopRequireDefault$2 = interopRequireDefaultExports; Object.defineProperty(ViewColumn, "__esModule", { value: true }); -var default_1$1 = ViewColumn.default = void 0; -var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); -var _jsxRuntime$1 = requireJsxRuntime(); -var _default$1 = default_1$1 = ViewColumn.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { +var default_1$2 = ViewColumn.default = void 0; +var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); +var _jsxRuntime$2 = requireJsxRuntime(); +var _default$2 = default_1$2 = ViewColumn.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); var VisibilityOff = {}; "use strict"; "use client"; -var _interopRequireDefault = interopRequireDefaultExports; +var _interopRequireDefault$1 = interopRequireDefaultExports; Object.defineProperty(VisibilityOff, "__esModule", { value: true }); -var default_1 = VisibilityOff.default = void 0; -var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); -var _jsxRuntime = requireJsxRuntime(); -var _default = default_1 = VisibilityOff.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { +var default_1$1 = VisibilityOff.default = void 0; +var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); +var _jsxRuntime$1 = requireJsxRuntime(); +var _default$1 = default_1$1 = VisibilityOff.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); function memo(getDeps, fn2, opts) { @@ -60268,40 +60278,40 @@ const getMRT_RowSelectColumnDef = (tableOptions) => { })); }; const MRT_Default_Icons = { - ArrowDownwardIcon: default_1$x, - ArrowRightIcon: default_1$w, - CancelIcon: default_1$v, - ChevronLeftIcon: default_1$u, - ChevronRightIcon: default_1$t, - ClearAllIcon: default_1$s, - CloseIcon: default_1$r, - ContentCopy: default_1$q, - DensityLargeIcon: default_1$p, - DensityMediumIcon: default_1$o, - DensitySmallIcon: default_1$n, - DragHandleIcon: default_1$m, - DynamicFeedIcon: default_1$l, - EditIcon: default_1$k, - ExpandMoreIcon: default_1$j, - FilterAltIcon: default_1$i, - FilterListIcon: default_1$h, - FilterListOffIcon: default_1$g, - FirstPageIcon: default_1$f, - FullscreenExitIcon: default_1$d, - FullscreenIcon: default_1$e, - KeyboardDoubleArrowDownIcon: default_1$c, - LastPageIcon: default_1$b, - MoreHorizIcon: default_1$a, - MoreVertIcon: default_1$9, - PushPinIcon: default_1$8, - RestartAltIcon: default_1$7, - SaveIcon: default_1$6, - SearchIcon: default_1$5, - SearchOffIcon: default_1$4, - SortIcon: default_1$3, - SyncAltIcon: default_1$2, - ViewColumnIcon: default_1$1, - VisibilityOffIcon: default_1 + ArrowDownwardIcon: default_1$y, + ArrowRightIcon: default_1$x, + CancelIcon: default_1$w, + ChevronLeftIcon: default_1$v, + ChevronRightIcon: default_1$u, + ClearAllIcon: default_1$t, + CloseIcon: default_1$s, + ContentCopy: default_1$r, + DensityLargeIcon: default_1$q, + DensityMediumIcon: default_1$p, + DensitySmallIcon: default_1$o, + DragHandleIcon: default_1$n, + DynamicFeedIcon: default_1$m, + EditIcon: default_1$l, + ExpandMoreIcon: default_1$k, + FilterAltIcon: default_1$j, + FilterListIcon: default_1$i, + FilterListOffIcon: default_1$h, + FirstPageIcon: default_1$g, + FullscreenExitIcon: default_1$e, + FullscreenIcon: default_1$f, + KeyboardDoubleArrowDownIcon: default_1$d, + LastPageIcon: default_1$c, + MoreHorizIcon: default_1$b, + MoreVertIcon: default_1$a, + PushPinIcon: default_1$9, + RestartAltIcon: default_1$8, + SaveIcon: default_1$7, + SearchIcon: default_1$6, + SearchOffIcon: default_1$5, + SortIcon: default_1$4, + SyncAltIcon: default_1$3, + ViewColumnIcon: default_1$2, + VisibilityOffIcon: default_1$1 }; const MRT_Localization_EN = { actions: "Actions", @@ -65863,28 +65873,7 @@ const BasicEntityEditSpecShape = gubu_minExports.Gubu( name: String, kind: "", label: "", - ux: Open$5({ - kind: gubu_minExports.Exact( - "Text", - "TextBox", - "Date", - "DateTime", - "Time", - "Checkbox", - "Autocomplete", - "Slider", - "RadioGroup", - "Rating", - "Button", - "ButtonGroup", - "Select", - "Switch", - "ToggleButton" - ), - edit: gubu_minExports.Default(true), - rows: gubu_minExports.Default(3), - props: Open$5({}) - }) + ux: Open$5({}) }) }), { name: CMPNAME$7 } @@ -65923,8 +65912,8 @@ function BasicEntityEdit(props) { const { seneca } = ctx(); const [plugin, setPlugin] = useState(false); const [ready, setReady] = useState(false); - const uniqueIdRef = useRef(seneca.util.Nid()); - const cid = props.spec.name + "-" + uniqueIdRef.current; + const cmpId = useSanitizedId(); + const cid = props.spec.name + "-" + cmpId; useEffect(() => { if (!plugin) { seneca.use({ @@ -66027,18 +66016,43 @@ function BasicEntityEdit(props) { } ) : /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}) }); } +var Check = {}; +"use strict"; +"use client"; +var _interopRequireDefault = interopRequireDefaultExports; +Object.defineProperty(Check, "__esModule", { + value: true +}); +var default_1 = Check.default = void 0; +var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); +var _jsxRuntime = requireJsxRuntime(); +var _default = default_1 = Check.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { + d: "M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" +}), "Check"); +function BasicAlert({ + children: children2, + severity +}) { + return /* @__PURE__ */ jsxRuntimeExports.jsx(Alert, { icon: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { fontSize: "inherit" }), severity, children: children2 }); +} const CMPNAME$6 = "BasicLedHead"; const { Open: Open$4, Child: Child$2 } = gubu_minExports.Gubu; -const BasicLedHeadSpecShape = gubu_minExports.Gubu(Open$4({ - tool: Child$2({ - id: String, - kind: String, - custom: "" - }, {}), - mui: Open$4({ - Toolbar: Open$4({}) - }) -}), { name: CMPNAME$6 }); +const BasicLedHeadSpecShape = gubu_minExports.Gubu( + Open$4({ + tool: Child$2( + { + id: String, + kind: String, + custom: "" + }, + {} + ), + mui: Open$4({ + Toolbar: Open$4({}) + }) + }), + { name: CMPNAME$6 } +); function BasicLedHead(props) { const { ctx, spec } = props; const { seneca, custom } = ctx(); @@ -66055,46 +66069,40 @@ function BasicLedHead(props) { const state = { item, view: viewState, navigate }; const subview = "/view/" + viewName === loc.pathname ? "list" : "edit"; const customButtons = Object.values(spec.tool || {}).filter((t) => "button" === t.kind).map((t) => (custom.BasicLedHead || {})[t.custom]).filter((t) => null != t); - return /* @__PURE__ */ jsxRuntimeExports.jsx(Box$2, { className: "bxg-BasicLedHead", children: /* @__PURE__ */ jsxRuntimeExports.jsxs( - Toolbar$1, - { - className: "vxg-BasicLedHead-toolbar", - variant: "dense", - children: [ - /* @__PURE__ */ jsxRuntimeExports.jsx( - Button$1, - { - color: "inherit", - onClick: () => navigate(-1), - disabled: "list" === subview, - children: "Back" - } - ), - /* @__PURE__ */ jsxRuntimeExports.jsx( - Button$1, - { - color: "inherit", - onClick: () => seneca.act("aim:app,on:view,add:item", { view: viewName }), - disabled: "edit" === subview, - children: "Add" - } - ), - customButtons.map( - (cb) => /* @__PURE__ */ jsxRuntimeExports.jsx( - Button$1, - __spreadProps(__spreadValues({ - color: "inherit", - onClick: () => seneca.act(cb.msg(state, spec, ctx)), - disabled: cb.disabled(state, spec, ctx) - }, cb.attr(state, spec, ctx)), { - children: cb.title(state, spec, ctx) - }), - cb.id - ) - ) - ] - } - ) }); + return /* @__PURE__ */ jsxRuntimeExports.jsxs(Box$2, { className: "bxg-BasicLedHead", children: [ + /* @__PURE__ */ jsxRuntimeExports.jsxs(Toolbar$1, { className: "vxg-BasicLedHead-toolbar", variant: "dense", children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx( + Button$1, + { + color: "inherit", + onClick: () => navigate(-1), + disabled: "list" === subview, + children: "Back" + } + ), + /* @__PURE__ */ jsxRuntimeExports.jsx( + Button$1, + { + color: "inherit", + onClick: () => seneca.act("aim:app,on:view,add:item", { view: viewName }), + disabled: "edit" === subview, + children: "Add" + } + ), + customButtons.map((cb) => /* @__PURE__ */ jsxRuntimeExports.jsx( + Button$1, + __spreadProps(__spreadValues({ + color: "inherit", + onClick: () => seneca.act(cb.msg(state, spec, ctx)), + disabled: cb.disabled(state, spec, ctx) + }, cb.attr(state, spec, ctx)), { + children: cb.title(state, spec, ctx) + }), + cb.id + )) + ] }), + viewState.alert.active ? /* @__PURE__ */ jsxRuntimeExports.jsx(BasicAlert, { severity: viewState.alert.level, children: viewState.alert.message }) : null + ] }); } const CMPNAME$5 = "BasicLedFoot"; const { Open: Open$3 } = gubu_minExports.Gubu; @@ -66211,10 +66219,13 @@ function VxgBasicLedPlugin(options) { }); } ).message( - "aim:app,on:BasicLed,save:item", - function(msg) { + "aim:app,on:BasicLed,save:item,redux$:true", + function(msg, meta) { return __async(this, null, function* () { const data = Object.entries(spec.def.edit.field).filter((n) => false !== n[1].ux.edit).reduce((a, n) => (a[n[0]] = msg.data[n[0]], a), {}); + const state = meta.custom.state(); + let view = state.view[name]; + view.alert = { active: true, message: "Saved", level: "success" }; const item = yield seneca.entity(entCanon).save$(data); navigate("/view/" + name + "/edit/" + item.id); }); @@ -66303,12 +66314,16 @@ const BasicMainSpecShape = gubu_minExports.Gubu({ default: String } }, - view: Child$1(Open$1({ - kind: String - })), - mui: { - Box: {}, - Container: {} + view: Child$1( + Open$1({ + kind: String + }) + ), + ux: { + props: { + Box: {}, + Container: {} + } } }); function BasicMain(props) { @@ -66334,7 +66349,7 @@ function BasicMain(props) { Box$2, __spreadProps(__spreadValues({ className: "vxg-BasicMain" - }, basicMainSpec.mui.Box), { + }, basicMainSpec.ux.props.Box), { sx: (theme) => ({ // TODO: should use actual toolbar height; 16 should be from standard spacing marginTop: theme.mixins.toolbar.minHeight + 38 + "px", @@ -66342,30 +66357,33 @@ function BasicMain(props) { marginBottom: 0, marginRight: 0 }), - children: /* @__PURE__ */ jsxRuntimeExports.jsx( - Container$2, - __spreadProps(__spreadValues({}, basicMainSpec.mui.Container), { - children: View && /* @__PURE__ */ jsxRuntimeExports.jsx(View, { ctx, spec: viewSpec }) - }) - ) + children: /* @__PURE__ */ jsxRuntimeExports.jsx(Container$2, __spreadProps(__spreadValues({}, basicMainSpec.ux.props.Container), { children: View && /* @__PURE__ */ jsxRuntimeExports.jsx(View, { ctx, spec: viewSpec }) })) }) ); } const CMPNAME$1 = "BasicSide"; const { Child, Open, Required } = gubu_minExports.Gubu; -const BasicSideSpecShape = gubu_minExports.Gubu({ - side: { - name: String, - active: Boolean +const BasicSideSpecShape = gubu_minExports.Gubu( + { + side: { + name: String, + active: Boolean + }, + view: Child( + Open({ + title: String + }), + Required({}) + ), + // Set MUI component props directly + ux: { + props: { + Drawer: {} + } + } }, - view: Child(Open({ - title: String - }), Required({})), - // Set MUI component props directly - mui: { - Drawer: {} - } -}, { name: CMPNAME$1 }); + { name: CMPNAME$1 } +); function BasicSide(props) { const { spec, ctx } = props; const basicSideSpec = BasicSideSpecShape(spec); @@ -66386,7 +66404,10 @@ function BasicSide(props) { }) }) }); - const selectView = useCallback((view) => navigate("/view/" + view), []); + const selectView = useCallback( + (view) => navigate("/view/" + view), + [] + ); return /* @__PURE__ */ jsxRuntimeExports.jsx( Drawer$1, __spreadProps(__spreadValues({ @@ -66401,54 +66422,47 @@ function BasicSide(props) { width: "var(--vxg-side-width)" } }) - }, spec.mui.Drawer), { - children: sections.map( - (section) => /* @__PURE__ */ jsxRuntimeExports.jsxs(Fragment, { children: [ - /* @__PURE__ */ jsxRuntimeExports.jsx( - List$1, - { - className: "vxg-BasicSide-section", - "data-vxg-basicside-section": section.name, - children: section.items.map( - (item) => /* @__PURE__ */ jsxRuntimeExports.jsx( - ListItem$1, - { - disablePadding: true, - className: "vxg-BasicSide-section-item", - "data-vxg-basicside-section-item": item.name, - children: /* @__PURE__ */ jsxRuntimeExports.jsxs( - ListItemButton$1, - { - onClick: () => selectView(item.view), - children: [ - /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemIcon$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$u, {}) }), - /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemText$1, { primary: item.title }) - ] - } - ) - }, - item.name - ) - ) - } - ), - /* @__PURE__ */ jsxRuntimeExports.jsx(Divider$1, {}) - ] }, section.name) - ) + }, spec.ux.props.Drawer), { + children: sections.map((section) => /* @__PURE__ */ jsxRuntimeExports.jsxs(Fragment, { children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx( + List$1, + { + className: "vxg-BasicSide-section", + "data-vxg-basicside-section": section.name, + children: section.items.map((item) => /* @__PURE__ */ jsxRuntimeExports.jsx( + ListItem$1, + { + disablePadding: true, + className: "vxg-BasicSide-section-item", + "data-vxg-basicside-section-item": item.name, + children: /* @__PURE__ */ jsxRuntimeExports.jsxs(ListItemButton$1, { onClick: () => selectView(item.view), children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemIcon$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$v, {}) }), + /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemText$1, { primary: item.title }) + ] }) + }, + item.name + )) + } + ), + /* @__PURE__ */ jsxRuntimeExports.jsx(Divider$1, {}) + ] }, section.name)) }) ); } const CMPNAME = "BasicAdmin"; -const BasicAdminSpecShape = gubu_minExports.Gubu({ - frame: { - name: String, - kind: String, - part: {}, - view: {}, - nav: {}, - tool: {} - } -}, { name: CMPNAME }); +const BasicAdminSpecShape = gubu_minExports.Gubu( + { + frame: { + name: String, + kind: String, + part: {}, + view: {}, + nav: {}, + tool: {} + } + }, + { name: CMPNAME } +); function Loading() { return /* @__PURE__ */ jsxRuntimeExports.jsx(Container$2, { children: "LOADING" }); } @@ -66470,23 +66484,29 @@ function BasicAdmin(props) { const headSpec = { head, tool: model.app.web.frame.private.tool, - mui: { - // TODO: set in theme: https://mui.com/material-ui/customization/z-index/ - AppBar: { style: { zIndex: 4e3 } } + ux: { + props: { + // TODO: set in theme: https://mui.com/material-ui/customization/z-index/ + AppBar: { style: { zIndex: 4e3 } } + } } }; const sideSpec = { side, view: model.app.web.frame.private.view, - mui: { - Drawer: { style: { zIndex: 3e3 } } + ux: { + props: { + Drawer: { style: { zIndex: 3e3 } } + } } }; const mainSpec = { main: main2, view: model.app.web.frame.private.view, - mui: { - Container: { style: { zIndex: 1e3 } } + ux: { + props: { + Container: { style: { zIndex: 1e3 } } + } } }; return "done" === ready ? /* @__PURE__ */ jsxRuntimeExports.jsxs(Box$2, { className: "vxg-BasicAdmin", children: [ diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index 93b19f6..9af2c3c 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -1783,6 +1783,11 @@ var __async = (__this, __arguments, generator) => { return mapResolvedDefault(defaultItems.slice(0, multiple)).filter(Boolean) || []; } } + function useSanitizedId() { + const id = React$1.useId(); + const sanitizedId = id.replace(/[^a-zA-Z0-9_]/g, "x"); + return sanitizedId; + } function VxgBasicAdminPlugin() { const seneca = this; const { Exact: Exact2, Default } = seneca.valid; @@ -1807,7 +1812,10 @@ var __async = (__this, __arguments, generator) => { }); function setPath(msg, meta) { return __async(this, null, function* () { - const q = Object.entries(msg.query).reduce((s, n) => s + ("" === s ? "?" : "") + (encodeURIComponent(n[0]) + "=" + encodeURIComponent(n[1])), ""); + const q = Object.entries(msg.query).reduce( + (s, n) => s + ("" === s ? "?" : "") + (encodeURIComponent(n[0]) + "=" + encodeURIComponent(n[1])), + "" + ); const path = "/view/" + msg.view + q; msg.navigate(path); }); @@ -1840,7 +1848,12 @@ var __async = (__this, __arguments, generator) => { }; const viewState = cmap(viewMap, { name: cmap.COPY, - active: cmap.FILTER + active: cmap.FILTER, + alert: { + active: false, + message: "", + level: "info" + } }); state.view = viewState; state.nav = { @@ -5558,21 +5571,21 @@ var __async = (__this, __arguments, generator) => { }, Symbol.toStringTag, { value: "Module" })); const require$$8 = /* @__PURE__ */ getAugmentedNamespace(styleFunctionSx); "use strict"; - var _interopRequireDefault$z = interopRequireDefaultExports; + var _interopRequireDefault$A = interopRequireDefaultExports; Object.defineProperty(createStyled$2, "__esModule", { value: true }); - var _default$z = createStyled$2.default = createStyled$1; + var _default$A = createStyled$2.default = createStyled$1; var shouldForwardProp_1 = createStyled$2.shouldForwardProp = shouldForwardProp$1; var systemDefaultTheme_1 = createStyled$2.systemDefaultTheme = void 0; - var _extends2 = _interopRequireDefault$z(require_extends()); - var _objectWithoutPropertiesLoose2 = _interopRequireDefault$z(requireObjectWithoutPropertiesLoose()); + var _extends2 = _interopRequireDefault$A(require_extends()); + var _objectWithoutPropertiesLoose2 = _interopRequireDefault$A(requireObjectWithoutPropertiesLoose()); var _styledEngine$1 = _interopRequireWildcard$1(require$$1$1); var _deepmerge = require$$4; - var _capitalize = _interopRequireDefault$z(require$$5); - var _getDisplayName = _interopRequireDefault$z(require$$6); - var _createTheme = _interopRequireDefault$z(require$$7); - var _styleFunctionSx = _interopRequireDefault$z(require$$8); + var _capitalize = _interopRequireDefault$A(require$$5); + var _getDisplayName = _interopRequireDefault$A(require$$6); + var _createTheme = _interopRequireDefault$A(require$$7); + var _styleFunctionSx = _interopRequireDefault$A(require$$8); const _excluded$2i = ["ownerState"], _excluded2$i = ["variants"], _excluded3$7 = ["name", "slot", "skipVariantsResolver", "skipSx", "overridesResolver"]; function _getRequireWildcardCache$1(e) { if ("function" != typeof WeakMap) return null; @@ -5862,7 +5875,7 @@ var __async = (__this, __arguments, generator) => { }, Symbol.toStringTag, { value: "Module" })); const require$$2 = /* @__PURE__ */ getAugmentedNamespace(clamp); "use strict"; - var _interopRequireDefault$y = interopRequireDefaultExports; + var _interopRequireDefault$z = interopRequireDefaultExports; Object.defineProperty(colorManipulator, "__esModule", { value: true }); @@ -5884,8 +5897,8 @@ var __async = (__this, __arguments, generator) => { var private_safeLighten_1 = colorManipulator.private_safeLighten = private_safeLighten$1; var recomposeColor_1 = colorManipulator.recomposeColor = recomposeColor$1; var rgbToHex_1 = colorManipulator.rgbToHex = rgbToHex$1; - var _formatMuiErrorMessage2 = _interopRequireDefault$y(require$$1); - var _clamp = _interopRequireDefault$y(require$$2); + var _formatMuiErrorMessage2 = _interopRequireDefault$z(require$$1); + var _clamp = _interopRequireDefault$z(require$$2); function clampWrapper$1(value, min2 = 0, max2 = 1) { if (process.env.NODE_ENV !== "production") { if (value < min2 || value > max2) { @@ -6776,7 +6789,7 @@ Please use another name.` : formatMuiErrorMessage$1(18)); } const rootShouldForwardProp = (prop) => slotShouldForwardProp(prop) && prop !== "classes"; "use client"; - const styled$1 = _default$z({ + const styled$1 = _default$A({ themeId: THEME_ID, defaultTheme: defaultTheme$5, rootShouldForwardProp @@ -10810,21 +10823,28 @@ try { } const CMPNAME$p = "BasicHead"; const { Child: Child$6, Exact, Open: Open$p, Required: Required$1 } = gubu_minExports.Gubu; - const BasicHeadSpecShape = gubu_minExports.Gubu({ - head: { - name: String, - active: Boolean, - tool: Child$6(Open$p({ - align: Exact("left", "right") - })) + const BasicHeadSpecShape = gubu_minExports.Gubu( + { + head: { + name: String, + active: Boolean, + tool: Child$6( + Open$p({ + align: Exact("left", "right") + }) + ) + }, + tool: Required$1({}), + // Set MUI component props directly + ux: { + props: { + AppBar: {}, + ToolBar: {} + } + } }, - tool: Required$1({}), - // Set MUI component props directly - mui: { - AppBar: {}, - ToolBar: {} - } - }, { name: CMPNAME$p }); + { name: CMPNAME$p } + ); function BasicHead(props) { const { ctx, spec } = props; const { seneca } = ctx(); @@ -10835,36 +10855,26 @@ try { active: vmap2.FILTER, name: vmap2.FILTER((_2, p) => { var _a; - return [(_a = basicHeadSpec.tool[p.key]) == null ? void 0 : _a.active, p.key]; + return [ + (_a = basicHeadSpec.tool[p.key]) == null ? void 0 : _a.active, + p.key + ]; }), align: vmap2.COPY }).map((t) => __spreadValues(__spreadValues({}, basicHeadSpec.tool[t.name]), t)); const leftTools = tools.filter((t) => "left" === t.align); const rightTools = tools.filter((t) => "right" === t.align); - return /* @__PURE__ */ jsxRuntimeExports.jsx( - AppBar, - __spreadProps(__spreadValues({ - className: "vxg-BasicHead" - }, spec.mui.AppBar), { - children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Toolbar, __spreadProps(__spreadValues({ className: "vxg-BasicHead-toolbar" }, spec.mui.ToolBar), { children: [ - /* @__PURE__ */ jsxRuntimeExports.jsx( - "div", - { - className: "vxg-BasicHead-toolbar vxg-BasicHead-toolbar-left", - children: leftTools.map((t) => /* @__PURE__ */ jsxRuntimeExports.jsx(BasicHeadTool, { ctx, spec: t }, t.name)) - } - ), - /* @__PURE__ */ jsxRuntimeExports.jsx( - "div", - { - className: "vxg-BasicHead-toolbar vxg-BasicHead-toolbar-right", - style: { marginLeft: "auto" }, - children: rightTools.map((t) => /* @__PURE__ */ jsxRuntimeExports.jsx(BasicHeadTool, { ctx, spec: t }, t.name)) - } - ) - ] })) - }) - ); + return /* @__PURE__ */ jsxRuntimeExports.jsx(AppBar, __spreadProps(__spreadValues({ className: "vxg-BasicHead" }, spec.ux.props.AppBar), { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Toolbar, __spreadProps(__spreadValues({ className: "vxg-BasicHead-toolbar" }, spec.ux.props.ToolBar), { children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicHead-toolbar vxg-BasicHead-toolbar-left", children: leftTools.map((t) => /* @__PURE__ */ jsxRuntimeExports.jsx(BasicHeadTool, { ctx, spec: t }, t.name)) }), + /* @__PURE__ */ jsxRuntimeExports.jsx( + "div", + { + className: "vxg-BasicHead-toolbar vxg-BasicHead-toolbar-right", + style: { marginLeft: "auto" }, + children: rightTools.map((t) => /* @__PURE__ */ jsxRuntimeExports.jsx(BasicHeadTool, { ctx, spec: t }, t.name)) + } + ) + ] })) })); } /** * table-core @@ -17615,7 +17625,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha Object.defineProperty(useThemeWithoutDefault, "__esModule", { value: true }); - var default_1$y = useThemeWithoutDefault.default = void 0; + var default_1$z = useThemeWithoutDefault.default = void 0; var React = _interopRequireWildcard(React$1); var _styledEngine = require$$1$1; function _getRequireWildcardCache(e) { @@ -17644,7 +17654,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const contextTheme = React.useContext(_styledEngine.ThemeContext); return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme2 : contextTheme; } - var _default$y = default_1$y = useThemeWithoutDefault.default = useTheme; + var _default$z = default_1$z = useThemeWithoutDefault.default = useTheme; var top = "top"; var bottom = "bottom"; var right = "right"; @@ -19426,7 +19436,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha })({}); const Popper = /* @__PURE__ */ React__namespace.forwardRef(function Popper2(inProps, ref) { var _slots$root; - const theme = default_1$y(); + const theme = default_1$z(); const props = useDefaultProps({ props: inProps, name: "MuiPopper" @@ -25367,450 +25377,450 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } "use strict"; "use client"; - var _interopRequireDefault$x = interopRequireDefaultExports; + var _interopRequireDefault$y = interopRequireDefaultExports; Object.defineProperty(ArrowDownward, "__esModule", { value: true }); - var default_1$x = ArrowDownward.default = void 0; - var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); - var _jsxRuntime$x = requireJsxRuntime(); - var _default$x = default_1$x = ArrowDownward.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { + var default_1$y = ArrowDownward.default = void 0; + var _createSvgIcon$y = _interopRequireDefault$y(requireCreateSvgIcon()); + var _jsxRuntime$y = requireJsxRuntime(); + var _default$y = default_1$y = ArrowDownward.default = (0, _createSvgIcon$y.default)(/* @__PURE__ */ (0, _jsxRuntime$y.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); var ArrowRight = {}; "use strict"; "use client"; - var _interopRequireDefault$w = interopRequireDefaultExports; + var _interopRequireDefault$x = interopRequireDefaultExports; Object.defineProperty(ArrowRight, "__esModule", { value: true }); - var default_1$w = ArrowRight.default = void 0; - var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); - var _jsxRuntime$w = requireJsxRuntime(); - var _default$w = default_1$w = ArrowRight.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { + var default_1$x = ArrowRight.default = void 0; + var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); + var _jsxRuntime$x = requireJsxRuntime(); + var _default$x = default_1$x = ArrowRight.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); var Cancel = {}; "use strict"; "use client"; - var _interopRequireDefault$v = interopRequireDefaultExports; + var _interopRequireDefault$w = interopRequireDefaultExports; Object.defineProperty(Cancel, "__esModule", { value: true }); - var default_1$v = Cancel.default = void 0; - var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); - var _jsxRuntime$v = requireJsxRuntime(); - var _default$v = default_1$v = Cancel.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { + var default_1$w = Cancel.default = void 0; + var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); + var _jsxRuntime$w = requireJsxRuntime(); + var _default$w = default_1$w = Cancel.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); var ChevronLeft = {}; "use strict"; "use client"; - var _interopRequireDefault$u = interopRequireDefaultExports; + var _interopRequireDefault$v = interopRequireDefaultExports; Object.defineProperty(ChevronLeft, "__esModule", { value: true }); - var default_1$u = ChevronLeft.default = void 0; - var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); - var _jsxRuntime$u = requireJsxRuntime(); - var _default$u = default_1$u = ChevronLeft.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { + var default_1$v = ChevronLeft.default = void 0; + var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); + var _jsxRuntime$v = requireJsxRuntime(); + var _default$v = default_1$v = ChevronLeft.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); var ChevronRight = {}; "use strict"; "use client"; - var _interopRequireDefault$t = interopRequireDefaultExports; + var _interopRequireDefault$u = interopRequireDefaultExports; Object.defineProperty(ChevronRight, "__esModule", { value: true }); - var default_1$t = ChevronRight.default = void 0; - var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); - var _jsxRuntime$t = requireJsxRuntime(); - var _default$t = default_1$t = ChevronRight.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { + var default_1$u = ChevronRight.default = void 0; + var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); + var _jsxRuntime$u = requireJsxRuntime(); + var _default$u = default_1$u = ChevronRight.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); var ClearAll = {}; "use strict"; "use client"; - var _interopRequireDefault$s = interopRequireDefaultExports; + var _interopRequireDefault$t = interopRequireDefaultExports; Object.defineProperty(ClearAll, "__esModule", { value: true }); - var default_1$s = ClearAll.default = void 0; - var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); - var _jsxRuntime$s = requireJsxRuntime(); - var _default$s = default_1$s = ClearAll.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { + var default_1$t = ClearAll.default = void 0; + var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); + var _jsxRuntime$t = requireJsxRuntime(); + var _default$t = default_1$t = ClearAll.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); var Close = {}; "use strict"; "use client"; - var _interopRequireDefault$r = interopRequireDefaultExports; + var _interopRequireDefault$s = interopRequireDefaultExports; Object.defineProperty(Close, "__esModule", { value: true }); - var default_1$r = Close.default = void 0; - var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); - var _jsxRuntime$r = requireJsxRuntime(); - var _default$r = default_1$r = Close.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { + var default_1$s = Close.default = void 0; + var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); + var _jsxRuntime$s = requireJsxRuntime(); + var _default$s = default_1$s = Close.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); var ContentCopy = {}; "use strict"; "use client"; - var _interopRequireDefault$q = interopRequireDefaultExports; + var _interopRequireDefault$r = interopRequireDefaultExports; Object.defineProperty(ContentCopy, "__esModule", { value: true }); - var default_1$q = ContentCopy.default = void 0; - var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); - var _jsxRuntime$q = requireJsxRuntime(); - var _default$q = default_1$q = ContentCopy.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { + var default_1$r = ContentCopy.default = void 0; + var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); + var _jsxRuntime$r = requireJsxRuntime(); + var _default$r = default_1$r = ContentCopy.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); var DensityLarge = {}; "use strict"; "use client"; - var _interopRequireDefault$p = interopRequireDefaultExports; + var _interopRequireDefault$q = interopRequireDefaultExports; Object.defineProperty(DensityLarge, "__esModule", { value: true }); - var default_1$p = DensityLarge.default = void 0; - var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); - var _jsxRuntime$p = requireJsxRuntime(); - var _default$p = default_1$p = DensityLarge.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { + var default_1$q = DensityLarge.default = void 0; + var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); + var _jsxRuntime$q = requireJsxRuntime(); + var _default$q = default_1$q = DensityLarge.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); var DensityMedium = {}; "use strict"; "use client"; - var _interopRequireDefault$o = interopRequireDefaultExports; + var _interopRequireDefault$p = interopRequireDefaultExports; Object.defineProperty(DensityMedium, "__esModule", { value: true }); - var default_1$o = DensityMedium.default = void 0; - var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); - var _jsxRuntime$o = requireJsxRuntime(); - var _default$o = default_1$o = DensityMedium.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { + var default_1$p = DensityMedium.default = void 0; + var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); + var _jsxRuntime$p = requireJsxRuntime(); + var _default$p = default_1$p = DensityMedium.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); var DensitySmall = {}; "use strict"; "use client"; - var _interopRequireDefault$n = interopRequireDefaultExports; + var _interopRequireDefault$o = interopRequireDefaultExports; Object.defineProperty(DensitySmall, "__esModule", { value: true }); - var default_1$n = DensitySmall.default = void 0; - var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); - var _jsxRuntime$n = requireJsxRuntime(); - var _default$n = default_1$n = DensitySmall.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { + var default_1$o = DensitySmall.default = void 0; + var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); + var _jsxRuntime$o = requireJsxRuntime(); + var _default$o = default_1$o = DensitySmall.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); var DragHandle = {}; "use strict"; "use client"; - var _interopRequireDefault$m = interopRequireDefaultExports; + var _interopRequireDefault$n = interopRequireDefaultExports; Object.defineProperty(DragHandle, "__esModule", { value: true }); - var default_1$m = DragHandle.default = void 0; - var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); - var _jsxRuntime$m = requireJsxRuntime(); - var _default$m = default_1$m = DragHandle.default = (0, _createSvgIcon$m.default)(/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { + var default_1$n = DragHandle.default = void 0; + var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); + var _jsxRuntime$n = requireJsxRuntime(); + var _default$n = default_1$n = DragHandle.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); var DynamicFeed = {}; "use strict"; "use client"; - var _interopRequireDefault$l = interopRequireDefaultExports; + var _interopRequireDefault$m = interopRequireDefaultExports; Object.defineProperty(DynamicFeed, "__esModule", { value: true }); - var default_1$l = DynamicFeed.default = void 0; - var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); - var _jsxRuntime$l = requireJsxRuntime(); - var _default$l = default_1$l = DynamicFeed.default = (0, _createSvgIcon$l.default)([/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { + var default_1$m = DynamicFeed.default = void 0; + var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); + var _jsxRuntime$m = requireJsxRuntime(); + var _default$m = default_1$m = DynamicFeed.default = (0, _createSvgIcon$m.default)([/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" - }, "0"), /* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { + }, "0"), /* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M20 3h-8c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 8h-8V7h8zM4 12H2v7c0 1.1.9 2 2 2h9v-2H4z" }, "1")], "DynamicFeed"); var Edit = {}; "use strict"; "use client"; - var _interopRequireDefault$k = interopRequireDefaultExports; + var _interopRequireDefault$l = interopRequireDefaultExports; Object.defineProperty(Edit, "__esModule", { value: true }); - var default_1$k = Edit.default = void 0; - var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); - var _jsxRuntime$k = requireJsxRuntime(); - var _default$k = default_1$k = Edit.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { + var default_1$l = Edit.default = void 0; + var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); + var _jsxRuntime$l = requireJsxRuntime(); + var _default$l = default_1$l = Edit.default = (0, _createSvgIcon$l.default)(/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); var ExpandMore = {}; "use strict"; "use client"; - var _interopRequireDefault$j = interopRequireDefaultExports; + var _interopRequireDefault$k = interopRequireDefaultExports; Object.defineProperty(ExpandMore, "__esModule", { value: true }); - var default_1$j = ExpandMore.default = void 0; - var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); - var _jsxRuntime$j = requireJsxRuntime(); - var _default$j = default_1$j = ExpandMore.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { + var default_1$k = ExpandMore.default = void 0; + var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); + var _jsxRuntime$k = requireJsxRuntime(); + var _default$k = default_1$k = ExpandMore.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); var FilterAlt = {}; "use strict"; "use client"; - var _interopRequireDefault$i = interopRequireDefaultExports; + var _interopRequireDefault$j = interopRequireDefaultExports; Object.defineProperty(FilterAlt, "__esModule", { value: true }); - var default_1$i = FilterAlt.default = void 0; - var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); - var _jsxRuntime$i = requireJsxRuntime(); - var _default$i = default_1$i = FilterAlt.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { + var default_1$j = FilterAlt.default = void 0; + var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); + var _jsxRuntime$j = requireJsxRuntime(); + var _default$j = default_1$j = FilterAlt.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); var FilterList = {}; "use strict"; "use client"; - var _interopRequireDefault$h = interopRequireDefaultExports; + var _interopRequireDefault$i = interopRequireDefaultExports; Object.defineProperty(FilterList, "__esModule", { value: true }); - var default_1$h = FilterList.default = void 0; - var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); - var _jsxRuntime$h = requireJsxRuntime(); - var _default$h = default_1$h = FilterList.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { + var default_1$i = FilterList.default = void 0; + var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); + var _jsxRuntime$i = requireJsxRuntime(); + var _default$i = default_1$i = FilterList.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); var FilterListOff = {}; "use strict"; "use client"; - var _interopRequireDefault$g = interopRequireDefaultExports; + var _interopRequireDefault$h = interopRequireDefaultExports; Object.defineProperty(FilterListOff, "__esModule", { value: true }); - var default_1$g = FilterListOff.default = void 0; - var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); - var _jsxRuntime$g = requireJsxRuntime(); - var _default$g = default_1$g = FilterListOff.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { + var default_1$h = FilterListOff.default = void 0; + var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); + var _jsxRuntime$h = requireJsxRuntime(); + var _default$h = default_1$h = FilterListOff.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); var FirstPage = {}; "use strict"; "use client"; - var _interopRequireDefault$f = interopRequireDefaultExports; + var _interopRequireDefault$g = interopRequireDefaultExports; Object.defineProperty(FirstPage, "__esModule", { value: true }); - var default_1$f = FirstPage.default = void 0; - var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); - var _jsxRuntime$f = requireJsxRuntime(); - var _default$f = default_1$f = FirstPage.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { + var default_1$g = FirstPage.default = void 0; + var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); + var _jsxRuntime$g = requireJsxRuntime(); + var _default$g = default_1$g = FirstPage.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); var Fullscreen = {}; "use strict"; "use client"; - var _interopRequireDefault$e = interopRequireDefaultExports; + var _interopRequireDefault$f = interopRequireDefaultExports; Object.defineProperty(Fullscreen, "__esModule", { value: true }); - var default_1$e = Fullscreen.default = void 0; - var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); - var _jsxRuntime$e = requireJsxRuntime(); - var _default$e = default_1$e = Fullscreen.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { + var default_1$f = Fullscreen.default = void 0; + var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); + var _jsxRuntime$f = requireJsxRuntime(); + var _default$f = default_1$f = Fullscreen.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); var FullscreenExit = {}; "use strict"; "use client"; - var _interopRequireDefault$d = interopRequireDefaultExports; + var _interopRequireDefault$e = interopRequireDefaultExports; Object.defineProperty(FullscreenExit, "__esModule", { value: true }); - var default_1$d = FullscreenExit.default = void 0; - var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); - var _jsxRuntime$d = requireJsxRuntime(); - var _default$d = default_1$d = FullscreenExit.default = (0, _createSvgIcon$d.default)(/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { + var default_1$e = FullscreenExit.default = void 0; + var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); + var _jsxRuntime$e = requireJsxRuntime(); + var _default$e = default_1$e = FullscreenExit.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); var KeyboardDoubleArrowDown = {}; "use strict"; "use client"; - var _interopRequireDefault$c = interopRequireDefaultExports; + var _interopRequireDefault$d = interopRequireDefaultExports; Object.defineProperty(KeyboardDoubleArrowDown, "__esModule", { value: true }); - var default_1$c = KeyboardDoubleArrowDown.default = void 0; - var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); - var _jsxRuntime$c = requireJsxRuntime(); - var _default$c = default_1$c = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$c.default)([/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { + var default_1$d = KeyboardDoubleArrowDown.default = void 0; + var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); + var _jsxRuntime$d = requireJsxRuntime(); + var _default$d = default_1$d = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$d.default)([/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" - }, "0"), /* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { + }, "0"), /* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "m18 13-1.41-1.41L12 16.17l-4.59-4.58L6 13l6 6z" }, "1")], "KeyboardDoubleArrowDown"); var LastPage = {}; "use strict"; "use client"; - var _interopRequireDefault$b = interopRequireDefaultExports; + var _interopRequireDefault$c = interopRequireDefaultExports; Object.defineProperty(LastPage, "__esModule", { value: true }); - var default_1$b = LastPage.default = void 0; - var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); - var _jsxRuntime$b = requireJsxRuntime(); - var _default$b = default_1$b = LastPage.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { + var default_1$c = LastPage.default = void 0; + var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); + var _jsxRuntime$c = requireJsxRuntime(); + var _default$c = default_1$c = LastPage.default = (0, _createSvgIcon$c.default)(/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); var MoreHoriz = {}; "use strict"; "use client"; - var _interopRequireDefault$a = interopRequireDefaultExports; + var _interopRequireDefault$b = interopRequireDefaultExports; Object.defineProperty(MoreHoriz, "__esModule", { value: true }); - var default_1$a = MoreHoriz.default = void 0; - var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); - var _jsxRuntime$a = requireJsxRuntime(); - var _default$a = default_1$a = MoreHoriz.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { + var default_1$b = MoreHoriz.default = void 0; + var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); + var _jsxRuntime$b = requireJsxRuntime(); + var _default$b = default_1$b = MoreHoriz.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); var MoreVert = {}; "use strict"; "use client"; - var _interopRequireDefault$9 = interopRequireDefaultExports; + var _interopRequireDefault$a = interopRequireDefaultExports; Object.defineProperty(MoreVert, "__esModule", { value: true }); - var default_1$9 = MoreVert.default = void 0; - var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); - var _jsxRuntime$9 = requireJsxRuntime(); - var _default$9 = default_1$9 = MoreVert.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { + var default_1$a = MoreVert.default = void 0; + var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); + var _jsxRuntime$a = requireJsxRuntime(); + var _default$a = default_1$a = MoreVert.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); var PushPin = {}; "use strict"; "use client"; - var _interopRequireDefault$8 = interopRequireDefaultExports; + var _interopRequireDefault$9 = interopRequireDefaultExports; Object.defineProperty(PushPin, "__esModule", { value: true }); - var default_1$8 = PushPin.default = void 0; - var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); - var _jsxRuntime$8 = requireJsxRuntime(); - var _default$8 = default_1$8 = PushPin.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { + var default_1$9 = PushPin.default = void 0; + var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); + var _jsxRuntime$9 = requireJsxRuntime(); + var _default$9 = default_1$9 = PushPin.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" }), "PushPin"); var RestartAlt = {}; "use strict"; "use client"; - var _interopRequireDefault$7 = interopRequireDefaultExports; + var _interopRequireDefault$8 = interopRequireDefaultExports; Object.defineProperty(RestartAlt, "__esModule", { value: true }); - var default_1$7 = RestartAlt.default = void 0; - var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); - var _jsxRuntime$7 = requireJsxRuntime(); - var _default$7 = default_1$7 = RestartAlt.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { + var default_1$8 = RestartAlt.default = void 0; + var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); + var _jsxRuntime$8 = requireJsxRuntime(); + var _default$8 = default_1$8 = RestartAlt.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); var Save = {}; "use strict"; "use client"; - var _interopRequireDefault$6 = interopRequireDefaultExports; + var _interopRequireDefault$7 = interopRequireDefaultExports; Object.defineProperty(Save, "__esModule", { value: true }); - var default_1$6 = Save.default = void 0; - var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); - var _jsxRuntime$6 = requireJsxRuntime(); - var _default$6 = default_1$6 = Save.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { + var default_1$7 = Save.default = void 0; + var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); + var _jsxRuntime$7 = requireJsxRuntime(); + var _default$7 = default_1$7 = Save.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); var Search = {}; "use strict"; "use client"; - var _interopRequireDefault$5 = interopRequireDefaultExports; + var _interopRequireDefault$6 = interopRequireDefaultExports; Object.defineProperty(Search, "__esModule", { value: true }); - var default_1$5 = Search.default = void 0; - var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); - var _jsxRuntime$5 = requireJsxRuntime(); - var _default$5 = default_1$5 = Search.default = (0, _createSvgIcon$5.default)(/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { + var default_1$6 = Search.default = void 0; + var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); + var _jsxRuntime$6 = requireJsxRuntime(); + var _default$6 = default_1$6 = Search.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); var SearchOff = {}; "use strict"; "use client"; - var _interopRequireDefault$4 = interopRequireDefaultExports; + var _interopRequireDefault$5 = interopRequireDefaultExports; Object.defineProperty(SearchOff, "__esModule", { value: true }); - var default_1$4 = SearchOff.default = void 0; - var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); - var _jsxRuntime$4 = requireJsxRuntime(); - var _default$4 = default_1$4 = SearchOff.default = (0, _createSvgIcon$4.default)([/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { + var default_1$5 = SearchOff.default = void 0; + var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); + var _jsxRuntime$5 = requireJsxRuntime(); + var _default$5 = default_1$5 = SearchOff.default = (0, _createSvgIcon$5.default)([/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" - }, "0"), /* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { + }, "0"), /* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M6.47 10.82 4 13.29l-2.47-2.47-.71.71L3.29 14 .82 16.47l.71.71L4 14.71l2.47 2.47.71-.71L4.71 14l2.47-2.47z" }, "1")], "SearchOff"); var Sort = {}; "use strict"; "use client"; - var _interopRequireDefault$3 = interopRequireDefaultExports; + var _interopRequireDefault$4 = interopRequireDefaultExports; Object.defineProperty(Sort, "__esModule", { value: true }); - var default_1$3 = Sort.default = void 0; - var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); - var _jsxRuntime$3 = requireJsxRuntime(); - var _default$3 = default_1$3 = Sort.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { + var default_1$4 = Sort.default = void 0; + var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); + var _jsxRuntime$4 = requireJsxRuntime(); + var _default$4 = default_1$4 = Sort.default = (0, _createSvgIcon$4.default)(/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); var SyncAlt = {}; "use strict"; "use client"; - var _interopRequireDefault$2 = interopRequireDefaultExports; + var _interopRequireDefault$3 = interopRequireDefaultExports; Object.defineProperty(SyncAlt, "__esModule", { value: true }); - var default_1$2 = SyncAlt.default = void 0; - var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); - var _jsxRuntime$2 = requireJsxRuntime(); - var _default$2 = default_1$2 = SyncAlt.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { + var default_1$3 = SyncAlt.default = void 0; + var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); + var _jsxRuntime$3 = requireJsxRuntime(); + var _default$3 = default_1$3 = SyncAlt.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); var ViewColumn = {}; "use strict"; "use client"; - var _interopRequireDefault$1 = interopRequireDefaultExports; + var _interopRequireDefault$2 = interopRequireDefaultExports; Object.defineProperty(ViewColumn, "__esModule", { value: true }); - var default_1$1 = ViewColumn.default = void 0; - var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); - var _jsxRuntime$1 = requireJsxRuntime(); - var _default$1 = default_1$1 = ViewColumn.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { + var default_1$2 = ViewColumn.default = void 0; + var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); + var _jsxRuntime$2 = requireJsxRuntime(); + var _default$2 = default_1$2 = ViewColumn.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); var VisibilityOff = {}; "use strict"; "use client"; - var _interopRequireDefault = interopRequireDefaultExports; + var _interopRequireDefault$1 = interopRequireDefaultExports; Object.defineProperty(VisibilityOff, "__esModule", { value: true }); - var default_1 = VisibilityOff.default = void 0; - var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); - var _jsxRuntime = requireJsxRuntime(); - var _default = default_1 = VisibilityOff.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { + var default_1$1 = VisibilityOff.default = void 0; + var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); + var _jsxRuntime$1 = requireJsxRuntime(); + var _default$1 = default_1$1 = VisibilityOff.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); function memo(getDeps, fn, opts) { @@ -60280,40 +60290,40 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha })); }; const MRT_Default_Icons = { - ArrowDownwardIcon: default_1$x, - ArrowRightIcon: default_1$w, - CancelIcon: default_1$v, - ChevronLeftIcon: default_1$u, - ChevronRightIcon: default_1$t, - ClearAllIcon: default_1$s, - CloseIcon: default_1$r, - ContentCopy: default_1$q, - DensityLargeIcon: default_1$p, - DensityMediumIcon: default_1$o, - DensitySmallIcon: default_1$n, - DragHandleIcon: default_1$m, - DynamicFeedIcon: default_1$l, - EditIcon: default_1$k, - ExpandMoreIcon: default_1$j, - FilterAltIcon: default_1$i, - FilterListIcon: default_1$h, - FilterListOffIcon: default_1$g, - FirstPageIcon: default_1$f, - FullscreenExitIcon: default_1$d, - FullscreenIcon: default_1$e, - KeyboardDoubleArrowDownIcon: default_1$c, - LastPageIcon: default_1$b, - MoreHorizIcon: default_1$a, - MoreVertIcon: default_1$9, - PushPinIcon: default_1$8, - RestartAltIcon: default_1$7, - SaveIcon: default_1$6, - SearchIcon: default_1$5, - SearchOffIcon: default_1$4, - SortIcon: default_1$3, - SyncAltIcon: default_1$2, - ViewColumnIcon: default_1$1, - VisibilityOffIcon: default_1 + ArrowDownwardIcon: default_1$y, + ArrowRightIcon: default_1$x, + CancelIcon: default_1$w, + ChevronLeftIcon: default_1$v, + ChevronRightIcon: default_1$u, + ClearAllIcon: default_1$t, + CloseIcon: default_1$s, + ContentCopy: default_1$r, + DensityLargeIcon: default_1$q, + DensityMediumIcon: default_1$p, + DensitySmallIcon: default_1$o, + DragHandleIcon: default_1$n, + DynamicFeedIcon: default_1$m, + EditIcon: default_1$l, + ExpandMoreIcon: default_1$k, + FilterAltIcon: default_1$j, + FilterListIcon: default_1$i, + FilterListOffIcon: default_1$h, + FirstPageIcon: default_1$g, + FullscreenExitIcon: default_1$e, + FullscreenIcon: default_1$f, + KeyboardDoubleArrowDownIcon: default_1$d, + LastPageIcon: default_1$c, + MoreHorizIcon: default_1$b, + MoreVertIcon: default_1$a, + PushPinIcon: default_1$9, + RestartAltIcon: default_1$8, + SaveIcon: default_1$7, + SearchIcon: default_1$6, + SearchOffIcon: default_1$5, + SortIcon: default_1$4, + SyncAltIcon: default_1$3, + ViewColumnIcon: default_1$2, + VisibilityOffIcon: default_1$1 }; const MRT_Localization_EN = { actions: "Actions", @@ -65875,28 +65885,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha name: String, kind: "", label: "", - ux: Open$5({ - kind: gubu_minExports.Exact( - "Text", - "TextBox", - "Date", - "DateTime", - "Time", - "Checkbox", - "Autocomplete", - "Slider", - "RadioGroup", - "Rating", - "Button", - "ButtonGroup", - "Select", - "Switch", - "ToggleButton" - ), - edit: gubu_minExports.Default(true), - rows: gubu_minExports.Default(3), - props: Open$5({}) - }) + ux: Open$5({}) }) }), { name: CMPNAME$7 } @@ -65935,8 +65924,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const { seneca } = ctx(); const [plugin, setPlugin] = React$1.useState(false); const [ready, setReady] = React$1.useState(false); - const uniqueIdRef = React$1.useRef(seneca.util.Nid()); - const cid = props.spec.name + "-" + uniqueIdRef.current; + const cmpId = useSanitizedId(); + const cid = props.spec.name + "-" + cmpId; React$1.useEffect(() => { if (!plugin) { seneca.use({ @@ -66039,18 +66028,43 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } ) : /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}) }); } + var Check = {}; + "use strict"; + "use client"; + var _interopRequireDefault = interopRequireDefaultExports; + Object.defineProperty(Check, "__esModule", { + value: true + }); + var default_1 = Check.default = void 0; + var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); + var _jsxRuntime = requireJsxRuntime(); + var _default = default_1 = Check.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { + d: "M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" + }), "Check"); + function BasicAlert({ + children, + severity + }) { + return /* @__PURE__ */ jsxRuntimeExports.jsx(Alert, { icon: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1, { fontSize: "inherit" }), severity, children }); + } const CMPNAME$6 = "BasicLedHead"; const { Open: Open$4, Child: Child$2 } = gubu_minExports.Gubu; - const BasicLedHeadSpecShape = gubu_minExports.Gubu(Open$4({ - tool: Child$2({ - id: String, - kind: String, - custom: "" - }, {}), - mui: Open$4({ - Toolbar: Open$4({}) - }) - }), { name: CMPNAME$6 }); + const BasicLedHeadSpecShape = gubu_minExports.Gubu( + Open$4({ + tool: Child$2( + { + id: String, + kind: String, + custom: "" + }, + {} + ), + mui: Open$4({ + Toolbar: Open$4({}) + }) + }), + { name: CMPNAME$6 } + ); function BasicLedHead(props) { const { ctx, spec } = props; const { seneca, custom } = ctx(); @@ -66067,46 +66081,40 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const state = { item, view: viewState, navigate }; const subview = "/view/" + viewName === loc.pathname ? "list" : "edit"; const customButtons = Object.values(spec.tool || {}).filter((t) => "button" === t.kind).map((t) => (custom.BasicLedHead || {})[t.custom]).filter((t) => null != t); - return /* @__PURE__ */ jsxRuntimeExports.jsx(material.Box, { className: "bxg-BasicLedHead", children: /* @__PURE__ */ jsxRuntimeExports.jsxs( - material.Toolbar, - { - className: "vxg-BasicLedHead-toolbar", - variant: "dense", - children: [ - /* @__PURE__ */ jsxRuntimeExports.jsx( - material.Button, - { - color: "inherit", - onClick: () => navigate(-1), - disabled: "list" === subview, - children: "Back" - } - ), - /* @__PURE__ */ jsxRuntimeExports.jsx( - material.Button, - { - color: "inherit", - onClick: () => seneca.act("aim:app,on:view,add:item", { view: viewName }), - disabled: "edit" === subview, - children: "Add" - } - ), - customButtons.map( - (cb) => /* @__PURE__ */ jsxRuntimeExports.jsx( - material.Button, - __spreadProps(__spreadValues({ - color: "inherit", - onClick: () => seneca.act(cb.msg(state, spec, ctx)), - disabled: cb.disabled(state, spec, ctx) - }, cb.attr(state, spec, ctx)), { - children: cb.title(state, spec, ctx) - }), - cb.id - ) - ) - ] - } - ) }); + return /* @__PURE__ */ jsxRuntimeExports.jsxs(material.Box, { className: "bxg-BasicLedHead", children: [ + /* @__PURE__ */ jsxRuntimeExports.jsxs(material.Toolbar, { className: "vxg-BasicLedHead-toolbar", variant: "dense", children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx( + material.Button, + { + color: "inherit", + onClick: () => navigate(-1), + disabled: "list" === subview, + children: "Back" + } + ), + /* @__PURE__ */ jsxRuntimeExports.jsx( + material.Button, + { + color: "inherit", + onClick: () => seneca.act("aim:app,on:view,add:item", { view: viewName }), + disabled: "edit" === subview, + children: "Add" + } + ), + customButtons.map((cb) => /* @__PURE__ */ jsxRuntimeExports.jsx( + material.Button, + __spreadProps(__spreadValues({ + color: "inherit", + onClick: () => seneca.act(cb.msg(state, spec, ctx)), + disabled: cb.disabled(state, spec, ctx) + }, cb.attr(state, spec, ctx)), { + children: cb.title(state, spec, ctx) + }), + cb.id + )) + ] }), + viewState.alert.active ? /* @__PURE__ */ jsxRuntimeExports.jsx(BasicAlert, { severity: viewState.alert.level, children: viewState.alert.message }) : null + ] }); } const CMPNAME$5 = "BasicLedFoot"; const { Open: Open$3 } = gubu_minExports.Gubu; @@ -66223,10 +66231,13 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); } ).message( - "aim:app,on:BasicLed,save:item", - function(msg) { + "aim:app,on:BasicLed,save:item,redux$:true", + function(msg, meta) { return __async(this, null, function* () { const data = Object.entries(spec.def.edit.field).filter((n) => false !== n[1].ux.edit).reduce((a, n) => (a[n[0]] = msg.data[n[0]], a), {}); + const state = meta.custom.state(); + let view = state.view[name]; + view.alert = { active: true, message: "Saved", level: "success" }; const item = yield seneca.entity(entCanon).save$(data); navigate("/view/" + name + "/edit/" + item.id); }); @@ -66315,12 +66326,16 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha default: String } }, - view: Child$1(Open$1({ - kind: String - })), - mui: { - Box: {}, - Container: {} + view: Child$1( + Open$1({ + kind: String + }) + ), + ux: { + props: { + Box: {}, + Container: {} + } } }); function BasicMain(props) { @@ -66346,7 +66361,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha material.Box, __spreadProps(__spreadValues({ className: "vxg-BasicMain" - }, basicMainSpec.mui.Box), { + }, basicMainSpec.ux.props.Box), { sx: (theme) => ({ // TODO: should use actual toolbar height; 16 should be from standard spacing marginTop: theme.mixins.toolbar.minHeight + 38 + "px", @@ -66354,30 +66369,33 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha marginBottom: 0, marginRight: 0 }), - children: /* @__PURE__ */ jsxRuntimeExports.jsx( - material.Container, - __spreadProps(__spreadValues({}, basicMainSpec.mui.Container), { - children: View && /* @__PURE__ */ jsxRuntimeExports.jsx(View, { ctx, spec: viewSpec }) - }) - ) + children: /* @__PURE__ */ jsxRuntimeExports.jsx(material.Container, __spreadProps(__spreadValues({}, basicMainSpec.ux.props.Container), { children: View && /* @__PURE__ */ jsxRuntimeExports.jsx(View, { ctx, spec: viewSpec }) })) }) ); } const CMPNAME$1 = "BasicSide"; const { Child, Open, Required } = gubu_minExports.Gubu; - const BasicSideSpecShape = gubu_minExports.Gubu({ - side: { - name: String, - active: Boolean + const BasicSideSpecShape = gubu_minExports.Gubu( + { + side: { + name: String, + active: Boolean + }, + view: Child( + Open({ + title: String + }), + Required({}) + ), + // Set MUI component props directly + ux: { + props: { + Drawer: {} + } + } }, - view: Child(Open({ - title: String - }), Required({})), - // Set MUI component props directly - mui: { - Drawer: {} - } - }, { name: CMPNAME$1 }); + { name: CMPNAME$1 } + ); function BasicSide(props) { const { spec, ctx } = props; const basicSideSpec = BasicSideSpecShape(spec); @@ -66398,7 +66416,10 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }) }) }); - const selectView = React$1.useCallback((view) => navigate("/view/" + view), []); + const selectView = React$1.useCallback( + (view) => navigate("/view/" + view), + [] + ); return /* @__PURE__ */ jsxRuntimeExports.jsx( material.Drawer, __spreadProps(__spreadValues({ @@ -66413,54 +66434,47 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha width: "var(--vxg-side-width)" } }) - }, spec.mui.Drawer), { - children: sections.map( - (section) => /* @__PURE__ */ jsxRuntimeExports.jsxs(React$1.Fragment, { children: [ - /* @__PURE__ */ jsxRuntimeExports.jsx( - material.List, - { - className: "vxg-BasicSide-section", - "data-vxg-basicside-section": section.name, - children: section.items.map( - (item) => /* @__PURE__ */ jsxRuntimeExports.jsx( - material.ListItem, - { - disablePadding: true, - className: "vxg-BasicSide-section-item", - "data-vxg-basicside-section-item": item.name, - children: /* @__PURE__ */ jsxRuntimeExports.jsxs( - material.ListItemButton, - { - onClick: () => selectView(item.view), - children: [ - /* @__PURE__ */ jsxRuntimeExports.jsx(material.ListItemIcon, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$u, {}) }), - /* @__PURE__ */ jsxRuntimeExports.jsx(material.ListItemText, { primary: item.title }) - ] - } - ) - }, - item.name - ) - ) - } - ), - /* @__PURE__ */ jsxRuntimeExports.jsx(material.Divider, {}) - ] }, section.name) - ) + }, spec.ux.props.Drawer), { + children: sections.map((section) => /* @__PURE__ */ jsxRuntimeExports.jsxs(React$1.Fragment, { children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx( + material.List, + { + className: "vxg-BasicSide-section", + "data-vxg-basicside-section": section.name, + children: section.items.map((item) => /* @__PURE__ */ jsxRuntimeExports.jsx( + material.ListItem, + { + disablePadding: true, + className: "vxg-BasicSide-section-item", + "data-vxg-basicside-section-item": item.name, + children: /* @__PURE__ */ jsxRuntimeExports.jsxs(material.ListItemButton, { onClick: () => selectView(item.view), children: [ + /* @__PURE__ */ jsxRuntimeExports.jsx(material.ListItemIcon, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(default_1$v, {}) }), + /* @__PURE__ */ jsxRuntimeExports.jsx(material.ListItemText, { primary: item.title }) + ] }) + }, + item.name + )) + } + ), + /* @__PURE__ */ jsxRuntimeExports.jsx(material.Divider, {}) + ] }, section.name)) }) ); } const CMPNAME = "BasicAdmin"; - const BasicAdminSpecShape = gubu_minExports.Gubu({ - frame: { - name: String, - kind: String, - part: {}, - view: {}, - nav: {}, - tool: {} - } - }, { name: CMPNAME }); + const BasicAdminSpecShape = gubu_minExports.Gubu( + { + frame: { + name: String, + kind: String, + part: {}, + view: {}, + nav: {}, + tool: {} + } + }, + { name: CMPNAME } + ); function Loading() { return /* @__PURE__ */ jsxRuntimeExports.jsx(material.Container, { children: "LOADING" }); } @@ -66482,23 +66496,29 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const headSpec = { head, tool: model.app.web.frame.private.tool, - mui: { - // TODO: set in theme: https://mui.com/material-ui/customization/z-index/ - AppBar: { style: { zIndex: 4e3 } } + ux: { + props: { + // TODO: set in theme: https://mui.com/material-ui/customization/z-index/ + AppBar: { style: { zIndex: 4e3 } } + } } }; const sideSpec = { side, view: model.app.web.frame.private.view, - mui: { - Drawer: { style: { zIndex: 3e3 } } + ux: { + props: { + Drawer: { style: { zIndex: 3e3 } } + } } }; const mainSpec = { main: main2, view: model.app.web.frame.private.view, - mui: { - Container: { style: { zIndex: 1e3 } } + ux: { + props: { + Container: { style: { zIndex: 1e3 } } + } } }; return "done" === ready ? /* @__PURE__ */ jsxRuntimeExports.jsxs(material.Box, { className: "vxg-BasicAdmin", children: [ diff --git a/dist/vxg-util.d.ts b/dist/vxg-util.d.ts index 0d64223..591a2c5 100644 --- a/dist/vxg-util.d.ts +++ b/dist/vxg-util.d.ts @@ -28,4 +28,5 @@ declare function resdefault(cat: { }, mapFn: (val: string, item: { title: string; }) => any): any; -export { cmap, vmap, searchParamsToObject, resvalue, resdefault }; +declare function useSanitizedId(): string; +export { cmap, vmap, searchParamsToObject, resvalue, resdefault, useSanitizedId, }; diff --git a/src/lib/BasicEntityEdit.tsx b/src/lib/BasicEntityEdit.tsx index 8e80076..d35960c 100644 --- a/src/lib/BasicEntityEdit.tsx +++ b/src/lib/BasicEntityEdit.tsx @@ -118,6 +118,8 @@ function BasicEntityEdit (props: any) { const uniqueIdRef = useRef(seneca.util.Nid()) const cid = props.spec.name + '-' + uniqueIdRef.current + const cmpId = useSanitizedId() + const cid = props.spec.name + '-' + cmpId // console.log('BasicEntityEdit', 'cid', cid) useEffect(() => { diff --git a/src/lib/vxg-util.ts b/src/lib/vxg-util.ts index 601ed9f..7cdf74b 100644 --- a/src/lib/vxg-util.ts +++ b/src/lib/vxg-util.ts @@ -1,5 +1,7 @@ // TODO: cmap,vmap probably belong in @voxgig/model utils +import { useId } from 'react' + // Map child objects to new child objects function cmap (o: any, p: any) { return Object.entries(o).reduce( @@ -159,4 +161,17 @@ function resdefault ( } } -export { cmap, vmap, searchParamsToObject, resvalue, resdefault } +function useSanitizedId () { + const id = useId() + const sanitizedId = id.replace(/[^a-zA-Z0-9_]/g, 'x') + return sanitizedId +} + +export { + cmap, + vmap, + searchParamsToObject, + resvalue, + resdefault, + useSanitizedId, +} From d9027b5a896c65614b4cf9f14f1666aab8c79968 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 8 Aug 2024 19:53:52 +0100 Subject: [PATCH 110/122] Change model spec from mui.X to ux.props.X --- dist/VxgBasicAdminPlugin.d.ts | 2 +- dist/VxgBasicEntityFieldPlugin.d.ts | 4 +- dist/voxgig-model-react.es.js | 219 +++++++++++++--------------- dist/voxgig-model-react.umd.js | 219 +++++++++++++--------------- src/lib/BasicAdmin.tsx | 108 +++++++------- src/lib/BasicEntityEdit.tsx | 2 +- src/lib/BasicHead.tsx | 97 ++++++------ src/lib/BasicLed.tsx | 1 + src/lib/BasicMain.tsx | 70 ++++----- src/lib/BasicSide.tsx | 99 +++++++------ 10 files changed, 400 insertions(+), 421 deletions(-) diff --git a/dist/VxgBasicAdminPlugin.d.ts b/dist/VxgBasicAdminPlugin.d.ts index a8f5b61..c3d7958 100644 --- a/dist/VxgBasicAdminPlugin.d.ts +++ b/dist/VxgBasicAdminPlugin.d.ts @@ -1,2 +1,2 @@ declare function VxgBasicAdminPlugin(this: any): void; -export { VxgBasicAdminPlugin, }; +export { VxgBasicAdminPlugin }; diff --git a/dist/VxgBasicEntityFieldPlugin.d.ts b/dist/VxgBasicEntityFieldPlugin.d.ts index 3725ec0..06ffdfc 100644 --- a/dist/VxgBasicEntityFieldPlugin.d.ts +++ b/dist/VxgBasicEntityFieldPlugin.d.ts @@ -1,6 +1,8 @@ declare function VxgBasicEntityFieldPlugin(this: any, options: any): { exports: { - handle: {}; + handle: { + spec: any; + }; }; }; export { VxgBasicEntityFieldPlugin }; diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index c3e6117..32684af 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -10810,14 +10810,14 @@ function BasicHeadTool(props) { return tool; } const CMPNAME$p = "BasicHead"; -const { Child: Child$6, Exact, Open: Open$p, Required: Required$1 } = gubu_minExports.Gubu; +const { Child: Child$5, Exact, Open: Open$o, Required: Required$1 } = gubu_minExports.Gubu; const BasicHeadSpecShape = gubu_minExports.Gubu( { head: { name: String, active: Boolean, - tool: Child$6( - Open$p({ + tool: Child$5( + Open$o({ align: Exact("left", "right") }) ) @@ -62766,13 +62766,13 @@ const MaterialReactTable = (props) => { } return jsxRuntimeExports.jsx(MRT_TablePaper, { table }); }; -const { Open: Open$o, Child: Child$5 } = gubu_minExports.Gubu; -const Shape$3 = gubu_minExports.Gubu(Open$o({ +const { Open: Open$n, Child: Child$4 } = gubu_minExports.Gubu; +const Shape$3 = gubu_minExports.Gubu(Open$n({ name: String, prefix: String, ent: String, order: [String], - field: Child$5({}, {}) + field: Child$4({}, {}) }), { name: "BasicEntityList" }); function VxgBasicEntityListPlugin(options) { const seneca = this; @@ -64737,18 +64737,18 @@ function BasicEntityFieldError(props) { return err ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-active", children: err.message }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-none" }); } const CMPNAME$n = "BasicEntitySliderField"; -const { Open: Open$n } = gubu_minExports.Gubu; +const { Open: Open$m } = gubu_minExports.Gubu; const BasicEntityCheckboxFieldSpecShape = gubu_minExports.Gubu( - Open$n({ - field: Open$n({ + Open$m({ + field: Open$m({ id: String, name: String, kind: "", label: "", - ux: Open$n({ + ux: Open$m({ kind: gubu_minExports.Exact("Checkbox"), edit: gubu_minExports.Default(true), - props: Open$n({}) + props: Open$m({}) }) }) }), @@ -64788,15 +64788,15 @@ function BasicEntityCheckboxField(props) { ] }, `${field.id}-box`); } const CMPNAME$m = "BasicEntityAutocompleteField"; -const { Open: Open$m } = gubu_minExports.Gubu; +const { Open: Open$l } = gubu_minExports.Gubu; const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu( - Open$m({ - field: Open$m({ + Open$l({ + field: Open$l({ id: String, label: String, kind: String, name: String, - cat: Open$m({ + cat: Open$l({ default: String, title: String, multiple: Number, @@ -64805,9 +64805,9 @@ const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu( exclude: "", include: "" }, - item: Open$m({}) + item: Open$l({}) }), - ux: Open$m({ + ux: Open$l({ kind: gubu_minExports.Exact("Autocomplete"), edit: gubu_minExports.Default(true) }) @@ -64867,21 +64867,21 @@ function resolveValue$1(value, cat) { })); } const CMPNAME$l = "BasicEntitySliderField"; -const { Open: Open$l } = gubu_minExports.Gubu; +const { Open: Open$k } = gubu_minExports.Gubu; const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu( - Open$l({ - field: Open$l({ + Open$k({ + field: Open$k({ id: String, name: String, kind: "", label: "", - ux: Open$l({ + ux: Open$k({ kind: gubu_minExports.Exact("Slider"), edit: gubu_minExports.Default(true), step: gubu_minExports.Default(1), min: gubu_minExports.Default(0), max: gubu_minExports.Default(100), - props: Open$l({ + props: Open$k({ marks: gubu_minExports.Default({}), valueLabelDisplay: gubu_minExports.Exact("on", "auto", "off").Default("auto"), direction: gubu_minExports.Exact("horizontal", "vertical").Default("horizontal"), @@ -64937,20 +64937,20 @@ function resolveMarks(marks) { return marks; } const CMPNAME$k = "BasicEntitySliderField"; -const { Open: Open$k } = gubu_minExports.Gubu; +const { Open: Open$j } = gubu_minExports.Gubu; const BasicEntityRadioGroupFieldSpecShape = gubu_minExports.Gubu( - Open$k({ - field: Open$k({ + Open$j({ + field: Open$j({ id: String, name: String, kind: "", llabel: "", - ux: Open$k({ + ux: Open$j({ kind: gubu_minExports.Exact("RadioGroup"), edit: gubu_minExports.Default(true), direction: gubu_minExports.Exact("row", "column").Default("row") }), - cat: Open$k({ + cat: Open$j({ default: "", title: String, order: { @@ -64958,7 +64958,7 @@ const BasicEntityRadioGroupFieldSpecShape = gubu_minExports.Gubu( exclude: "", include: "" }, - item: Open$k({}) + item: Open$j({}) }) }) }), @@ -65016,18 +65016,18 @@ function resolveDefault$1(cat) { return defaultValues; } const CMPNAME$j = "BasicEntityTextBoxField"; -const { Open: Open$j } = gubu_minExports.Gubu; +const { Open: Open$i } = gubu_minExports.Gubu; const BasicEntityTextBoxFieldSpecShape = gubu_minExports.Gubu( - Open$j({ - field: Open$j({ + Open$i({ + field: Open$i({ id: String, name: String, kind: "", label: "", - ux: Open$j({ + ux: Open$i({ kind: gubu_minExports.Exact("TextBox"), edit: gubu_minExports.Default(true), - props: Open$j({}) + props: Open$i({}) }) }) }), @@ -65058,18 +65058,18 @@ function BasicEntityTextBoxField(props) { ] }, field.name); } const CMPNAME$i = "BasicEntityTextField"; -const { Open: Open$i } = gubu_minExports.Gubu; +const { Open: Open$h } = gubu_minExports.Gubu; const BasicEntityTextFieldSpecShape = gubu_minExports.Gubu( - Open$i({ - field: Open$i({ + Open$h({ + field: Open$h({ id: String, name: String, kind: "", label: "", - ux: Open$i({ + ux: Open$h({ kind: gubu_minExports.Exact("Text"), edit: gubu_minExports.Default(true), - props: Open$i({}) + props: Open$h({}) }) }) }), @@ -65079,6 +65079,7 @@ function BasicEntityTextField(props) { const { spec } = props; const basicEntityTextBoxField = BasicEntityTextFieldSpecShape(spec); const { field, getValues, register, errors } = basicEntityTextBoxField; + console.log("BasicEntityTextField", field); const val = getValues(field.name); const err = errors[field.name]; return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [ @@ -65099,18 +65100,18 @@ function BasicEntityTextField(props) { ] }, field.id); } const CMPNAME$h = "BasicEntityDateField"; -const { Open: Open$h } = gubu_minExports.Gubu; +const { Open: Open$g } = gubu_minExports.Gubu; const BasicEntityDateFieldSpecShape = gubu_minExports.Gubu( - Open$h({ - field: Open$h({ + Open$g({ + field: Open$g({ id: String, name: String, kind: "", label: "", - ux: Open$h({ + ux: Open$g({ kind: gubu_minExports.Exact("Date"), edit: gubu_minExports.Default(true), - props: Open$h({}) + props: Open$g({}) }) }) }), @@ -65140,18 +65141,18 @@ function BasicEntityDateField(props) { ] }, field.id); } const CMPNAME$g = "BasicEntityTimeField"; -const { Open: Open$g } = gubu_minExports.Gubu; +const { Open: Open$f } = gubu_minExports.Gubu; const BasicEntityTimeFieldSpecShape = gubu_minExports.Gubu( - Open$g({ - field: Open$g({ + Open$f({ + field: Open$f({ id: String, name: String, kind: "", label: "", - ux: Open$g({ + ux: Open$f({ kind: gubu_minExports.Exact("Time"), edit: gubu_minExports.Default(true), - props: Open$g({}) + props: Open$f({}) }) }) }), @@ -65181,18 +65182,18 @@ function BasicEntityTimeField(props) { ] }, field.id); } const CMPNAME$f = "BasicEntityDateTimeField"; -const { Open: Open$f } = gubu_minExports.Gubu; +const { Open: Open$e } = gubu_minExports.Gubu; const BasicEntityDateTimeFieldSpecShape = gubu_minExports.Gubu( - Open$f({ - field: Open$f({ + Open$e({ + field: Open$e({ id: String, name: String, kind: "", label: "", - ux: Open$f({ + ux: Open$e({ kind: gubu_minExports.Exact("DateTime"), edit: gubu_minExports.Default(true), - props: Open$f({}) + props: Open$e({}) }) }) }), @@ -65222,19 +65223,19 @@ function BasicEntityDateTimeField(props) { ] }, field.id); } const CMPNAME$e = "BasicEntitySliderField"; -const { Open: Open$e } = gubu_minExports.Gubu; +const { Open: Open$d } = gubu_minExports.Gubu; const BasicEntityRatingFieldSpecShape = gubu_minExports.Gubu( - Open$e({ - field: Open$e({ + Open$d({ + field: Open$d({ id: String, name: String, kind: "", label: "", - ux: Open$e({ + ux: Open$d({ kind: gubu_minExports.Exact("Rating"), edit: gubu_minExports.Default(true), precision: 1, - props: Open$e({}) + props: Open$d({}) }) }) }), @@ -65270,19 +65271,19 @@ function BasicEntityRatingField(props) { ] }, `${field.id}-div`); } const CMPNAME$d = "BasicEntitySliderField"; -const { Open: Open$d } = gubu_minExports.Gubu; +const { Open: Open$c } = gubu_minExports.Gubu; const BasicEntityButtonFieldSpecShape = gubu_minExports.Gubu( - Open$d({ - field: Open$d({ + Open$c({ + field: Open$c({ id: String, name: String, kind: "", label: String, - ux: Open$d({ + ux: Open$c({ kind: gubu_minExports.Exact("Button"), edit: true, variant: "contained", - props: Open$d({}) + props: Open$c({}) }) }) }), @@ -65306,23 +65307,23 @@ function BasicEntityButtonField(props) { ) }, `${field.id}-div`); } const CMPNAME$c = "BasicEntitySliderField"; -const { Open: Open$c } = gubu_minExports.Gubu; +const { Open: Open$b } = gubu_minExports.Gubu; const BasicEntityButtonGroupFieldSpecShape = gubu_minExports.Gubu( - Open$c({ - field: Open$c({ + Open$b({ + field: Open$b({ id: String, name: String, kind: "", label: "", - options: Open$c({ + options: Open$b({ label: { field: "label" }, value: { field: "value" }, - ents: Open$c({}) + ents: Open$b({}) }), - ux: Open$c({ + ux: Open$b({ kind: gubu_minExports.Exact("ButtonGroup"), edit: gubu_minExports.Default(true), - props: Open$c({}) + props: Open$b({}) }) }) }), @@ -65336,15 +65337,15 @@ function BasicEntityButtonGroupField(props) { }, children: val == null ? void 0 : val[field.options.label.field] }, `${field.id}-${key}`)) })) }, `${field.id}-div`); } const CMPNAME$b = "BasicEntitySelectField"; -const { Open: Open$b } = gubu_minExports.Gubu; +const { Open: Open$a } = gubu_minExports.Gubu; const BasicEntitySelectFieldSpecShape = gubu_minExports.Gubu( - Open$b({ - field: Open$b({ + Open$a({ + field: Open$a({ id: String, name: String, kind: "", label: "", - cat: Open$b({ + cat: Open$a({ default: "", title: String, multiple: Number, @@ -65353,9 +65354,9 @@ const BasicEntitySelectFieldSpecShape = gubu_minExports.Gubu( exclude: "", include: "" }, - item: Open$b({}) + item: Open$a({}) }), - ux: Open$b({ + ux: Open$a({ kind: gubu_minExports.Exact("Select"), edit: gubu_minExports.Default(true) }) @@ -65416,18 +65417,18 @@ function resolveValue(value, cat) { return resvalue(value, cat, (val, item) => val); } const CMPNAME$a = "BasicEntitySliderField"; -const { Open: Open$a } = gubu_minExports.Gubu; +const { Open: Open$9 } = gubu_minExports.Gubu; const BasicEntitySwitchFieldSpecShape = gubu_minExports.Gubu( - Open$a({ - field: Open$a({ + Open$9({ + field: Open$9({ id: String, name: String, kind: "", label: "", - ux: Open$a({ + ux: Open$9({ kind: gubu_minExports.Exact("Switch"), edit: gubu_minExports.Default(true), - props: Open$a({}) + props: Open$9({}) }) }) }), @@ -65467,15 +65468,15 @@ function BasicEntitySwitchField(props) { ] }, `${field.id}-box`); } const CMPNAME$9 = "BasicEntitySliderField"; -const { Open: Open$9 } = gubu_minExports.Gubu; +const { Open: Open$8 } = gubu_minExports.Gubu; const BasicEntityToggleButtonFieldSpecShape = gubu_minExports.Gubu( - Open$9({ - field: Open$9({ + Open$8({ + field: Open$8({ id: String, name: String, kind: "", label: "", - cat: Open$9({ + cat: Open$8({ default: "", title: String, multiple: Number, @@ -65484,12 +65485,12 @@ const BasicEntityToggleButtonFieldSpecShape = gubu_minExports.Gubu( exclude: "", include: "" }, - item: Open$9({}) + item: Open$8({}) }), - ux: Open$9({ + ux: Open$8({ kind: gubu_minExports.Exact("ToggleButton"), edit: gubu_minExports.Default(true), - props: Open$9({}) + props: Open$8({}) }) }) }), @@ -65525,9 +65526,9 @@ function BasicEntityToggleButtonField(props) { /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, `${field.id}-box`); } -const { Open: Open$8, Child: Child$4 } = gubu_minExports.Gubu; +const { Open: Open$7 } = gubu_minExports.Gubu; const Shape$2 = gubu_minExports.Gubu( - Open$8({ + Open$7({ field: {} }), { name: "BasicEntityField" } @@ -65538,7 +65539,9 @@ function VxgBasicEntityFieldPlugin(options) { options.setPlugin(true); return { exports: { - handle: {} + handle: { + spec + } } }; } @@ -65552,16 +65555,16 @@ Object.defineProperty(VxgBasicEntityFieldPlugin, "name", { value: "VxgBasicEntityFieldPlugin" }); const CMPNAME$8 = "BasicEntityField"; -const { Open: Open$7 } = gubu_minExports.Gubu; +const { Open: Open$6 } = gubu_minExports.Gubu; const BasicEntityFieldSpecShape = gubu_minExports.Gubu( - Open$7({ + Open$6({ cid: String, - field: Open$7({ + field: Open$6({ id: String, name: String, kind: "", label: "", - ux: Open$7({ + ux: Open$6({ kind: gubu_minExports.Exact( "Text", "TextBox", @@ -65581,7 +65584,7 @@ const BasicEntityFieldSpecShape = gubu_minExports.Gubu( ), edit: gubu_minExports.Default(true), rows: gubu_minExports.Default(3), - props: Open$7({}) + props: Open$6({}) }) }) }), @@ -65628,9 +65631,9 @@ function BasicEntityField(props) { const Field = fieldMap[field.ux.kind]; return Field ? /* @__PURE__ */ jsxRuntimeExports.jsx(Field, { ctx, spec: basicEntityField }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", {}); } -const { Open: Open$6, Child: Child$3 } = gubu_minExports.Gubu; +const { Open: Open$5, Child: Child$3 } = gubu_minExports.Gubu; const Shape$1 = gubu_minExports.Gubu( - Open$6({ + Open$5({ name: String, prefix: String, ent: String, @@ -65864,20 +65867,6 @@ Object.defineProperty(VxgBasicEntityEditPlugin, "name", { value: "VxgBasicEntityEditPlugin" }); const CMPNAME$7 = "BasicEntityEdit"; -const { Open: Open$5 } = gubu_minExports.Gubu; -const BasicEntityEditSpecShape = gubu_minExports.Gubu( - Open$5({ - field: Open$5({ - id: String, - cid: "", - name: String, - kind: "", - label: "", - ux: Open$5({}) - }) - }), - { name: CMPNAME$7 } -); const makeResolver = (seneca, spec) => useCallback( (data) => __async(void 0, null, function* () { const { ent, name } = spec; @@ -66047,8 +66036,10 @@ const BasicLedHeadSpecShape = gubu_minExports.Gubu( }, {} ), - mui: Open$4({ - Toolbar: Open$4({}) + ux: Open$4({ + props: { + Toolbar: Open$4({}) + } }) }), { name: CMPNAME$6 } diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index 9af2c3c..2f139f4 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -10822,14 +10822,14 @@ try { return tool; } const CMPNAME$p = "BasicHead"; - const { Child: Child$6, Exact, Open: Open$p, Required: Required$1 } = gubu_minExports.Gubu; + const { Child: Child$5, Exact, Open: Open$o, Required: Required$1 } = gubu_minExports.Gubu; const BasicHeadSpecShape = gubu_minExports.Gubu( { head: { name: String, active: Boolean, - tool: Child$6( - Open$p({ + tool: Child$5( + Open$o({ align: Exact("left", "right") }) ) @@ -62778,13 +62778,13 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } return jsxRuntimeExports.jsx(MRT_TablePaper, { table }); }; - const { Open: Open$o, Child: Child$5 } = gubu_minExports.Gubu; - const Shape$3 = gubu_minExports.Gubu(Open$o({ + const { Open: Open$n, Child: Child$4 } = gubu_minExports.Gubu; + const Shape$3 = gubu_minExports.Gubu(Open$n({ name: String, prefix: String, ent: String, order: [String], - field: Child$5({}, {}) + field: Child$4({}, {}) }), { name: "BasicEntityList" }); function VxgBasicEntityListPlugin(options) { const seneca = this; @@ -64749,18 +64749,18 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha return err ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-active", children: err.message }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vxg-BasicEntityFieldError-none" }); } const CMPNAME$n = "BasicEntitySliderField"; - const { Open: Open$n } = gubu_minExports.Gubu; + const { Open: Open$m } = gubu_minExports.Gubu; const BasicEntityCheckboxFieldSpecShape = gubu_minExports.Gubu( - Open$n({ - field: Open$n({ + Open$m({ + field: Open$m({ id: String, name: String, kind: "", label: "", - ux: Open$n({ + ux: Open$m({ kind: gubu_minExports.Exact("Checkbox"), edit: gubu_minExports.Default(true), - props: Open$n({}) + props: Open$m({}) }) }) }), @@ -64800,15 +64800,15 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ] }, `${field.id}-box`); } const CMPNAME$m = "BasicEntityAutocompleteField"; - const { Open: Open$m } = gubu_minExports.Gubu; + const { Open: Open$l } = gubu_minExports.Gubu; const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu( - Open$m({ - field: Open$m({ + Open$l({ + field: Open$l({ id: String, label: String, kind: String, name: String, - cat: Open$m({ + cat: Open$l({ default: String, title: String, multiple: Number, @@ -64817,9 +64817,9 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha exclude: "", include: "" }, - item: Open$m({}) + item: Open$l({}) }), - ux: Open$m({ + ux: Open$l({ kind: gubu_minExports.Exact("Autocomplete"), edit: gubu_minExports.Default(true) }) @@ -64879,21 +64879,21 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha })); } const CMPNAME$l = "BasicEntitySliderField"; - const { Open: Open$l } = gubu_minExports.Gubu; + const { Open: Open$k } = gubu_minExports.Gubu; const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu( - Open$l({ - field: Open$l({ + Open$k({ + field: Open$k({ id: String, name: String, kind: "", label: "", - ux: Open$l({ + ux: Open$k({ kind: gubu_minExports.Exact("Slider"), edit: gubu_minExports.Default(true), step: gubu_minExports.Default(1), min: gubu_minExports.Default(0), max: gubu_minExports.Default(100), - props: Open$l({ + props: Open$k({ marks: gubu_minExports.Default({}), valueLabelDisplay: gubu_minExports.Exact("on", "auto", "off").Default("auto"), direction: gubu_minExports.Exact("horizontal", "vertical").Default("horizontal"), @@ -64949,20 +64949,20 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha return marks; } const CMPNAME$k = "BasicEntitySliderField"; - const { Open: Open$k } = gubu_minExports.Gubu; + const { Open: Open$j } = gubu_minExports.Gubu; const BasicEntityRadioGroupFieldSpecShape = gubu_minExports.Gubu( - Open$k({ - field: Open$k({ + Open$j({ + field: Open$j({ id: String, name: String, kind: "", llabel: "", - ux: Open$k({ + ux: Open$j({ kind: gubu_minExports.Exact("RadioGroup"), edit: gubu_minExports.Default(true), direction: gubu_minExports.Exact("row", "column").Default("row") }), - cat: Open$k({ + cat: Open$j({ default: "", title: String, order: { @@ -64970,7 +64970,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha exclude: "", include: "" }, - item: Open$k({}) + item: Open$j({}) }) }) }), @@ -65028,18 +65028,18 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha return defaultValues; } const CMPNAME$j = "BasicEntityTextBoxField"; - const { Open: Open$j } = gubu_minExports.Gubu; + const { Open: Open$i } = gubu_minExports.Gubu; const BasicEntityTextBoxFieldSpecShape = gubu_minExports.Gubu( - Open$j({ - field: Open$j({ + Open$i({ + field: Open$i({ id: String, name: String, kind: "", label: "", - ux: Open$j({ + ux: Open$i({ kind: gubu_minExports.Exact("TextBox"), edit: gubu_minExports.Default(true), - props: Open$j({}) + props: Open$i({}) }) }) }), @@ -65070,18 +65070,18 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ] }, field.name); } const CMPNAME$i = "BasicEntityTextField"; - const { Open: Open$i } = gubu_minExports.Gubu; + const { Open: Open$h } = gubu_minExports.Gubu; const BasicEntityTextFieldSpecShape = gubu_minExports.Gubu( - Open$i({ - field: Open$i({ + Open$h({ + field: Open$h({ id: String, name: String, kind: "", label: "", - ux: Open$i({ + ux: Open$h({ kind: gubu_minExports.Exact("Text"), edit: gubu_minExports.Default(true), - props: Open$i({}) + props: Open$h({}) }) }) }), @@ -65091,6 +65091,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const { spec } = props; const basicEntityTextBoxField = BasicEntityTextFieldSpecShape(spec); const { field, getValues, register, errors } = basicEntityTextBoxField; + console.log("BasicEntityTextField", field); const val = getValues(field.name); const err = errors[field.name]; return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [ @@ -65111,18 +65112,18 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ] }, field.id); } const CMPNAME$h = "BasicEntityDateField"; - const { Open: Open$h } = gubu_minExports.Gubu; + const { Open: Open$g } = gubu_minExports.Gubu; const BasicEntityDateFieldSpecShape = gubu_minExports.Gubu( - Open$h({ - field: Open$h({ + Open$g({ + field: Open$g({ id: String, name: String, kind: "", label: "", - ux: Open$h({ + ux: Open$g({ kind: gubu_minExports.Exact("Date"), edit: gubu_minExports.Default(true), - props: Open$h({}) + props: Open$g({}) }) }) }), @@ -65152,18 +65153,18 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ] }, field.id); } const CMPNAME$g = "BasicEntityTimeField"; - const { Open: Open$g } = gubu_minExports.Gubu; + const { Open: Open$f } = gubu_minExports.Gubu; const BasicEntityTimeFieldSpecShape = gubu_minExports.Gubu( - Open$g({ - field: Open$g({ + Open$f({ + field: Open$f({ id: String, name: String, kind: "", label: "", - ux: Open$g({ + ux: Open$f({ kind: gubu_minExports.Exact("Time"), edit: gubu_minExports.Default(true), - props: Open$g({}) + props: Open$f({}) }) }) }), @@ -65193,18 +65194,18 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ] }, field.id); } const CMPNAME$f = "BasicEntityDateTimeField"; - const { Open: Open$f } = gubu_minExports.Gubu; + const { Open: Open$e } = gubu_minExports.Gubu; const BasicEntityDateTimeFieldSpecShape = gubu_minExports.Gubu( - Open$f({ - field: Open$f({ + Open$e({ + field: Open$e({ id: String, name: String, kind: "", label: "", - ux: Open$f({ + ux: Open$e({ kind: gubu_minExports.Exact("DateTime"), edit: gubu_minExports.Default(true), - props: Open$f({}) + props: Open$e({}) }) }) }), @@ -65234,19 +65235,19 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ] }, field.id); } const CMPNAME$e = "BasicEntitySliderField"; - const { Open: Open$e } = gubu_minExports.Gubu; + const { Open: Open$d } = gubu_minExports.Gubu; const BasicEntityRatingFieldSpecShape = gubu_minExports.Gubu( - Open$e({ - field: Open$e({ + Open$d({ + field: Open$d({ id: String, name: String, kind: "", label: "", - ux: Open$e({ + ux: Open$d({ kind: gubu_minExports.Exact("Rating"), edit: gubu_minExports.Default(true), precision: 1, - props: Open$e({}) + props: Open$d({}) }) }) }), @@ -65282,19 +65283,19 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ] }, `${field.id}-div`); } const CMPNAME$d = "BasicEntitySliderField"; - const { Open: Open$d } = gubu_minExports.Gubu; + const { Open: Open$c } = gubu_minExports.Gubu; const BasicEntityButtonFieldSpecShape = gubu_minExports.Gubu( - Open$d({ - field: Open$d({ + Open$c({ + field: Open$c({ id: String, name: String, kind: "", label: String, - ux: Open$d({ + ux: Open$c({ kind: gubu_minExports.Exact("Button"), edit: true, variant: "contained", - props: Open$d({}) + props: Open$c({}) }) }) }), @@ -65318,23 +65319,23 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ) }, `${field.id}-div`); } const CMPNAME$c = "BasicEntitySliderField"; - const { Open: Open$c } = gubu_minExports.Gubu; + const { Open: Open$b } = gubu_minExports.Gubu; const BasicEntityButtonGroupFieldSpecShape = gubu_minExports.Gubu( - Open$c({ - field: Open$c({ + Open$b({ + field: Open$b({ id: String, name: String, kind: "", label: "", - options: Open$c({ + options: Open$b({ label: { field: "label" }, value: { field: "value" }, - ents: Open$c({}) + ents: Open$b({}) }), - ux: Open$c({ + ux: Open$b({ kind: gubu_minExports.Exact("ButtonGroup"), edit: gubu_minExports.Default(true), - props: Open$c({}) + props: Open$b({}) }) }) }), @@ -65348,15 +65349,15 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }, children: val == null ? void 0 : val[field.options.label.field] }, `${field.id}-${key}`)) })) }, `${field.id}-div`); } const CMPNAME$b = "BasicEntitySelectField"; - const { Open: Open$b } = gubu_minExports.Gubu; + const { Open: Open$a } = gubu_minExports.Gubu; const BasicEntitySelectFieldSpecShape = gubu_minExports.Gubu( - Open$b({ - field: Open$b({ + Open$a({ + field: Open$a({ id: String, name: String, kind: "", label: "", - cat: Open$b({ + cat: Open$a({ default: "", title: String, multiple: Number, @@ -65365,9 +65366,9 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha exclude: "", include: "" }, - item: Open$b({}) + item: Open$a({}) }), - ux: Open$b({ + ux: Open$a({ kind: gubu_minExports.Exact("Select"), edit: gubu_minExports.Default(true) }) @@ -65428,18 +65429,18 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha return resvalue(value, cat, (val, item) => val); } const CMPNAME$a = "BasicEntitySliderField"; - const { Open: Open$a } = gubu_minExports.Gubu; + const { Open: Open$9 } = gubu_minExports.Gubu; const BasicEntitySwitchFieldSpecShape = gubu_minExports.Gubu( - Open$a({ - field: Open$a({ + Open$9({ + field: Open$9({ id: String, name: String, kind: "", label: "", - ux: Open$a({ + ux: Open$9({ kind: gubu_minExports.Exact("Switch"), edit: gubu_minExports.Default(true), - props: Open$a({}) + props: Open$9({}) }) }) }), @@ -65479,15 +65480,15 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ] }, `${field.id}-box`); } const CMPNAME$9 = "BasicEntitySliderField"; - const { Open: Open$9 } = gubu_minExports.Gubu; + const { Open: Open$8 } = gubu_minExports.Gubu; const BasicEntityToggleButtonFieldSpecShape = gubu_minExports.Gubu( - Open$9({ - field: Open$9({ + Open$8({ + field: Open$8({ id: String, name: String, kind: "", label: "", - cat: Open$9({ + cat: Open$8({ default: "", title: String, multiple: Number, @@ -65496,12 +65497,12 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha exclude: "", include: "" }, - item: Open$9({}) + item: Open$8({}) }), - ux: Open$9({ + ux: Open$8({ kind: gubu_minExports.Exact("ToggleButton"), edit: gubu_minExports.Default(true), - props: Open$9({}) + props: Open$8({}) }) }) }), @@ -65537,9 +65538,9 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, `${field.id}-box`); } - const { Open: Open$8, Child: Child$4 } = gubu_minExports.Gubu; + const { Open: Open$7 } = gubu_minExports.Gubu; const Shape$2 = gubu_minExports.Gubu( - Open$8({ + Open$7({ field: {} }), { name: "BasicEntityField" } @@ -65550,7 +65551,9 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha options.setPlugin(true); return { exports: { - handle: {} + handle: { + spec + } } }; } @@ -65564,16 +65567,16 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha value: "VxgBasicEntityFieldPlugin" }); const CMPNAME$8 = "BasicEntityField"; - const { Open: Open$7 } = gubu_minExports.Gubu; + const { Open: Open$6 } = gubu_minExports.Gubu; const BasicEntityFieldSpecShape = gubu_minExports.Gubu( - Open$7({ + Open$6({ cid: String, - field: Open$7({ + field: Open$6({ id: String, name: String, kind: "", label: "", - ux: Open$7({ + ux: Open$6({ kind: gubu_minExports.Exact( "Text", "TextBox", @@ -65593,7 +65596,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ), edit: gubu_minExports.Default(true), rows: gubu_minExports.Default(3), - props: Open$7({}) + props: Open$6({}) }) }) }), @@ -65640,9 +65643,9 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const Field = fieldMap[field.ux.kind]; return Field ? /* @__PURE__ */ jsxRuntimeExports.jsx(Field, { ctx, spec: basicEntityField }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", {}); } - const { Open: Open$6, Child: Child$3 } = gubu_minExports.Gubu; + const { Open: Open$5, Child: Child$3 } = gubu_minExports.Gubu; const Shape$1 = gubu_minExports.Gubu( - Open$6({ + Open$5({ name: String, prefix: String, ent: String, @@ -65876,20 +65879,6 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha value: "VxgBasicEntityEditPlugin" }); const CMPNAME$7 = "BasicEntityEdit"; - const { Open: Open$5 } = gubu_minExports.Gubu; - const BasicEntityEditSpecShape = gubu_minExports.Gubu( - Open$5({ - field: Open$5({ - id: String, - cid: "", - name: String, - kind: "", - label: "", - ux: Open$5({}) - }) - }), - { name: CMPNAME$7 } - ); const makeResolver = (seneca, spec) => React$1.useCallback( (data) => __async(this, null, function* () { const { ent, name } = spec; @@ -66059,8 +66048,10 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }, {} ), - mui: Open$4({ - Toolbar: Open$4({}) + ux: Open$4({ + props: { + Toolbar: Open$4({}) + } }) }), { name: CMPNAME$6 } diff --git a/src/lib/BasicAdmin.tsx b/src/lib/BasicAdmin.tsx index 4262e61..179ca04 100644 --- a/src/lib/BasicAdmin.tsx +++ b/src/lib/BasicAdmin.tsx @@ -16,115 +16,109 @@ import { BasicMain } from './BasicMain' import { BasicSide } from './BasicSide' //import { BasicFoot } from './BasicFoot' - - const CMPNAME = 'BasicAdmin' - - -const BasicAdminSpecShape = Gubu({ - frame: { - name: String, - kind: String, - part: {}, - view: {}, - nav: {}, - tool: {}, - } -}, {name: CMPNAME}) - +const BasicAdminSpecShape = Gubu( + { + frame: { + name: String, + kind: String, + part: {}, + view: {}, + nav: {}, + tool: {}, + }, + }, + { name: CMPNAME } +) // TODO: need a BasicLoadingSplash -function Loading() { +function Loading () { return LOADING } - function BasicAdmin (props: BasicProps) { const { ctx, spec } = props const ctxval = ctx() const { model } = ctxval - + const [ready, setReady] = useState('init') - - useEffect(()=>{ - if('init' !== ready) { + + useEffect(() => { + if ('init' !== ready) { return } - init(ctxval, ()=>{ + init(ctxval, () => { setReady('done') }) - },[]) + }, []) - const basicAdminSpec: Spec = BasicAdminSpecShape(spec) const { head, side, main, foot } = basicAdminSpec.frame.part - // TODO: Review source of mui styles // NOTE: keep separate from frontend part definitions as implementation const headSpec = { head, tool: model.app.web.frame.private.tool, - mui: { - // TODO: set in theme: https://mui.com/material-ui/customization/z-index/ - AppBar: { style: { zIndex: 4000 } } - } + ux: { + props: { + // TODO: set in theme: https://mui.com/material-ui/customization/z-index/ + AppBar: { style: { zIndex: 4000 } }, + }, + }, } const sideSpec = { side, view: model.app.web.frame.private.view, - mui: { - Drawer: { style: { zIndex: 3000 } } - } + ux: { + props: { + Drawer: { style: { zIndex: 3000 } }, + }, + }, } - + const mainSpec = { main, view: model.app.web.frame.private.view, - mui: { - Container: { style: { zIndex: 1000 } } - } + ux: { + props: { + Container: { style: { zIndex: 1000 } }, + }, + }, } - return ( - 'done' === ready ? + return 'done' === ready ? ( - { head?.active && } - { side?.active && } - { main?.active && } + {head?.active && } + {side?.active && } + {main?.active && } - : + ) : ( + ) } - - - -async function init(ctx: any, done: any) { +async function init (ctx: any, done: any) { const { seneca, router } = ctx - - seneca.context.vxg = (seneca.context.vxg || {}) - seneca.context.vxg.BasicAdmin = (seneca.context.vxg.BasicAdmin || {}) + + seneca.context.vxg = seneca.context.vxg || {} + seneca.context.vxg.BasicAdmin = seneca.context.vxg.BasicAdmin || {} // Only setup Seneca once - if(!seneca.context.vxg.BasicAdmin.preparing) { + if (!seneca.context.vxg.BasicAdmin.preparing) { seneca.context.vxg.BasicAdmin.preparing = true - - seneca - .use(VxgBasicAdminPlugin) + + seneca.use(VxgBasicAdminPlugin) // await seneca.ready(done) await seneca.ready() return done() } } -export { - BasicAdmin -} - +export { BasicAdmin } /* diff --git a/src/lib/BasicEntityEdit.tsx b/src/lib/BasicEntityEdit.tsx index d35960c..7ef2d73 100644 --- a/src/lib/BasicEntityEdit.tsx +++ b/src/lib/BasicEntityEdit.tsx @@ -14,7 +14,7 @@ import { VxgBasicEntityEditPlugin } from './VxgBasicEntityEditPlugin' import type { Spec } from './basic-types' import { Default, Exact, Gubu, Skip } from 'gubu' -import { VxgBasicEntityFieldPlugin } from './VxgBasicEntityFieldPlugin' +import { useSanitizedId } from './vxg-util' const CMPNAME = 'BasicEntityEdit' diff --git a/src/lib/BasicHead.tsx b/src/lib/BasicHead.tsx index 660653a..66f4387 100644 --- a/src/lib/BasicHead.tsx +++ b/src/lib/BasicHead.tsx @@ -9,74 +9,77 @@ import type { BasicProps, Spec } from './basic-types' import { BasicHeadTool } from './BasicHeadTool' - const CMPNAME = 'BasicHead' const { Child, Exact, Open, Required } = Gubu -const BasicHeadSpecShape = Gubu({ - head: { - name: String, - active: Boolean, - - tool: Child(Open({ - align: Exact('left','right'), - })), - }, +const BasicHeadSpecShape = Gubu( + { + head: { + name: String, + active: Boolean, - tool: Required({}), - - // Set MUI component props directly - mui: { - AppBar: {}, - ToolBar: {}, - } - -}, {name: CMPNAME}) + tool: Child( + Open({ + align: Exact('left', 'right'), + }) + ), + }, + tool: Required({}), + + // Set MUI component props directly + ux: { + props: { + AppBar: {}, + ToolBar: {}, + }, + }, + }, + { name: CMPNAME } +) function BasicHead (props: BasicProps) { const { ctx, spec } = props const { seneca } = ctx() const { vmap } = seneca.context - + const basicHeadSpec: Spec = BasicHeadSpecShape(spec) - const { head } = (basicHeadSpec as any) + const { head } = basicHeadSpec as any - const tools = vmap(head.tool,{ + const tools = vmap(head.tool, { active: vmap.FILTER, - name: vmap.FILTER((_:any,p:any)=>[basicHeadSpec.tool[p.key]?.active, p.key]), + name: vmap.FILTER((_: any, p: any) => [ + basicHeadSpec.tool[p.key]?.active, + p.key, + ]), align: vmap.COPY, - }) - .map((t:any)=>({ - ...basicHeadSpec.tool[t.name], - ...t, - })) + }).map((t: any) => ({ + ...basicHeadSpec.tool[t.name], + ...t, + })) - const leftTools: Spec[] = tools.filter((t:Spec)=>'left'===t.align) - const rightTools: Spec[] = tools.filter((t:Spec)=>'right'===t.align) + const leftTools: Spec[] = tools.filter((t: Spec) => 'left' === t.align) + const rightTools: Spec[] = tools.filter((t: Spec) => 'right' === t.align) return ( - - -
- { leftTools.map(t=>) } + + +
+ {leftTools.map((t) => ( + + ))}
- { rightTools.map(t=>) } + {rightTools.map((t) => ( + + ))}
-
-
+ + ) } -export { - BasicHead -} +export { BasicHead } diff --git a/src/lib/BasicLed.tsx b/src/lib/BasicLed.tsx index fb7b61d..6ebbafb 100644 --- a/src/lib/BasicLed.tsx +++ b/src/lib/BasicLed.tsx @@ -26,6 +26,7 @@ function BasicLed (props: any) { const uniqueIdRef = useRef(seneca.util.Nid()) // TODO: use uniqueIdRef.current to avoid name clashes but sort out store issues const cid = name // + '-' + uniqueIdRef.current + // TODO: look into custom hook implementation useComponentId() const navigate = useNavigate() diff --git a/src/lib/BasicMain.tsx b/src/lib/BasicMain.tsx index 0680931..8a0a839 100644 --- a/src/lib/BasicMain.tsx +++ b/src/lib/BasicMain.tsx @@ -2,10 +2,7 @@ import React, { useState } from 'react' import { useSelector } from 'react-redux' import { useParams, useSearchParams, useLocation } from 'react-router-dom' -import { - Box, - Container -} from '@mui/material' +import { Box, Container } from '@mui/material' import { Gubu } from 'gubu' @@ -13,32 +10,32 @@ import { BasicLed } from './BasicLed' import { searchParamsToObject } from './vxg-util' - const CMPNAME = 'BasicSide' - const { Child, Open } = Gubu const BasicMainSpecShape = Gubu({ main: { name: String, active: Boolean, - + view: { - default: String - } + default: String, + }, }, - view: Child(Open({ - kind: String - })), - - mui: { - Box: {}, - Container: {}, - } -}) - + view: Child( + Open({ + kind: String, + }) + ), + ux: { + props: { + Box: {}, + Container: {}, + }, + }, +}) function BasicMain (props: any) { const { ctx, spec } = props @@ -46,14 +43,14 @@ function BasicMain (props: any) { const basicMainSpec = BasicMainSpecShape(spec) - const mode = useSelector((state:any)=>state.main.nav.mode) - const view = useSelector((state:any)=>state.main.current.view) + const mode = useSelector((state: any) => state.main.nav.mode) + const view = useSelector((state: any) => state.main.current.view) const params: any = useParams() const [searchParams] = useSearchParams() const loc: any = useLocation() - - if(view.name !== params.view) { + + if (view.name !== params.view) { seneca.act('aim:app,sync:view', { name: params.view, query: searchParamsToObject(searchParams), @@ -66,32 +63,29 @@ function BasicMain (props: any) { const kind = viewSpec?.kind const View = - 'custom' === kind ? cmp[viewSpec.cmp] : - 'led' === kind ? BasicLed : - ()=>
LOADING
- - + 'custom' === kind + ? cmp[viewSpec.cmp] + : 'led' === kind + ? BasicLed + : () =>
LOADING
+ return ( ({ + {...basicMainSpec.ux.props.Box} + sx={(theme: any) => ({ // TODO: should use actual toolbar height; 16 should be from standard spacing - marginTop: (theme.mixins.toolbar.minHeight+38)+'px', + marginTop: theme.mixins.toolbar.minHeight + 38 + 'px', marginLeft: 'shown' === mode ? 'var(--vxg-side-width)' : 0, marginBottom: 0, marginRight: 0, })} > - - { View && } + + {View && } ) } -export { - BasicMain -} +export { BasicMain } diff --git a/src/lib/BasicSide.tsx b/src/lib/BasicSide.tsx index 12e46e4..82bd542 100644 --- a/src/lib/BasicSide.tsx +++ b/src/lib/BasicSide.tsx @@ -21,25 +21,30 @@ import { vmap, cmap } from './vxg-util' const CMPNAME = 'BasicSide' - const { Child, Open, Required } = Gubu -const BasicSideSpecShape = Gubu({ - side: { - name: String, - active: Boolean, +const BasicSideSpecShape = Gubu( + { + side: { + name: String, + active: Boolean, + }, + + view: Child( + Open({ + title: String, + }), + Required({}) + ), + + // Set MUI component props directly + ux: { + props: { + Drawer: {}, + }, + }, }, - - view: Child(Open({ - title: String - }), Required({})), - - // Set MUI component props directly - mui: { - Drawer: {}, - } -}, {name: CMPNAME}) - - + { name: CMPNAME } +) function BasicSide (props: any) { const { spec, ctx } = props @@ -49,72 +54,70 @@ function BasicSide (props: any) { // const theme = useTheme() const navigate = useNavigate() - const nav = useSelector((state:any)=>state.main.nav) + const nav = useSelector((state: any) => state.main.nav) const viewMap = basicSideSpec.view const mode = nav.mode - - const sections = vmap(nav.section,{ + + const sections = vmap(nav.section, { active: vmap.FILTER, name: vmap.COPY, - items: (_:any,p:any)=>vmap(p.self.item,{ - active: vmap.FILTER, - name: vmap.COPY, - view: vmap.COPY, - title: vmap.FILTER((_:any,p:any)=>viewMap[p.self.view]?.title) - }) + items: (_: any, p: any) => + vmap(p.self.item, { + active: vmap.FILTER, + name: vmap.COPY, + view: vmap.COPY, + title: vmap.FILTER((_: any, p: any) => viewMap[p.self.view]?.title), + }), }) - const selectView = useCallback((view:string)=>navigate('/view/'+view),[]) + const selectView = useCallback( + (view: string) => navigate('/view/' + view), + [] + ) - return ( ({ + className='vxg-BasicSide' + sx={(theme: any) => ({ '& .MuiDrawer-paper': { // TODO: should use actual toolbar height; 16 should be from standard spacing - paddingTop: (theme.mixins.toolbar.minHeight+16)+'px', - width: 'var(--vxg-side-width)' + paddingTop: theme.mixins.toolbar.minHeight + 16 + 'px', + width: 'var(--vxg-side-width)', }, })} - {...spec.mui.Drawer} + {...spec.ux.props.Drawer} > - - { sections.map((section:any) => + {sections.map((section: any) => ( - { section.items.map((item:any) => + {section.items.map((item: any) => ( - selectView(item.view)} - > + selectView(item.view)}> - )} + ))} - )} + ))} ) } -export { - BasicSide -} +export { BasicSide } From 19e62f6ce89936f8d326332093c0ff3dbb0ff741 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 8 Aug 2024 19:54:06 +0100 Subject: [PATCH 111/122] Refactor BasicLedHead component to use BasicAlert for displaying alerts --- dist/BasicAlert.d.ts | 5 ++ dist/voxgig-model-react.es.js | 1 - dist/voxgig-model-react.umd.js | 1 - src/lib/BasicAlert.tsx | 19 ++++++ src/lib/BasicLedHead.tsx | 116 ++++++++++++++++++--------------- 5 files changed, 87 insertions(+), 55 deletions(-) create mode 100644 dist/BasicAlert.d.ts create mode 100644 src/lib/BasicAlert.tsx diff --git a/dist/BasicAlert.d.ts b/dist/BasicAlert.d.ts new file mode 100644 index 0000000..171711e --- /dev/null +++ b/dist/BasicAlert.d.ts @@ -0,0 +1,5 @@ +export default function BasicAlert({ children, severity, }: { + children: any; + severity: 'success' | 'error' | 'warning' | 'info'; +}): import("react/jsx-runtime").JSX.Element; +export { BasicAlert }; diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index 32684af..1355168 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -65079,7 +65079,6 @@ function BasicEntityTextField(props) { const { spec } = props; const basicEntityTextBoxField = BasicEntityTextFieldSpecShape(spec); const { field, getValues, register, errors } = basicEntityTextBoxField; - console.log("BasicEntityTextField", field); const val = getValues(field.name); const err = errors[field.name]; return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [ diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index 2f139f4..ce73c9b 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -65091,7 +65091,6 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const { spec } = props; const basicEntityTextBoxField = BasicEntityTextFieldSpecShape(spec); const { field, getValues, register, errors } = basicEntityTextBoxField; - console.log("BasicEntityTextField", field); const val = getValues(field.name); const err = errors[field.name]; return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [ diff --git a/src/lib/BasicAlert.tsx b/src/lib/BasicAlert.tsx new file mode 100644 index 0000000..bacc773 --- /dev/null +++ b/src/lib/BasicAlert.tsx @@ -0,0 +1,19 @@ +import React from 'react' +import Alert from '@mui/material/Alert' +import CheckIcon from '@mui/icons-material/Check' + +export default function BasicAlert ({ + children, + severity, +}: { + children: any + severity: 'success' | 'error' | 'warning' | 'info' +}) { + return ( + } severity={severity}> + {children} + + ) +} + +export { BasicAlert } diff --git a/src/lib/BasicLedHead.tsx b/src/lib/BasicLedHead.tsx index f185dd6..c529fdb 100644 --- a/src/lib/BasicLedHead.tsx +++ b/src/lib/BasicLedHead.tsx @@ -4,31 +4,34 @@ import { useSelector } from 'react-redux' import { useNavigate, useLocation } from 'react-router-dom' - -import { - Box, - Toolbar, - Button, -} from '@mui/material' +import { Box, Toolbar, Button, Alert } from '@mui/material' import type { Spec } from './basic-types' import { Gubu } from 'gubu' +import BasicAlert from './BasicAlert' const CMPNAME = 'BasicLedHead' const { Open, Child } = Gubu -const BasicLedHeadSpecShape = Gubu(Open({ - tool: Child({ - id: String, - kind: String, - custom: '', - },{}), - mui: Open({ - Toolbar: Open({}) - }) -}), {name: CMPNAME}) - +const BasicLedHeadSpecShape = Gubu( + Open({ + tool: Child( + { + id: String, + kind: String, + custom: '', + }, + {} + ), + ux: Open({ + props: { + Toolbar: Open({}), + }, + }), + }), + { name: CMPNAME } +) function BasicLedHead (props: any) { const { ctx, spec } = props @@ -39,57 +42,64 @@ function BasicLedHead (props: any) { const BasicEntityHeadSpec: Spec = BasicLedHeadSpecShape(spec) const viewName = BasicEntityHeadSpec.name - + const name = spec.name - const slotName = spec.prefix+spec.name + const slotName = spec.prefix + spec.name const slotSelectors = seneca.export('Redux/slotSelectors') const { selectItem, selectMeta } = slotSelectors(slotName) - const item = useSelector((state:any)=>selectItem(state)) - const viewState = useSelector((state:any)=>state.main.view[viewName]) + const item = useSelector((state: any) => selectItem(state)) + const viewState = useSelector((state: any) => state.main.view[viewName]) + + const state = { item, view: viewState, navigate } - const state = { item, view:viewState, navigate } - - const subview = '/view/'+viewName === loc.pathname ? 'list' : 'edit' + const subview = '/view/' + viewName === loc.pathname ? 'list' : 'edit' const customButtons = Object.values(spec.tool || {}) - .filter((t:any)=>'button'===t.kind) - .map((t:any)=>(custom.BasicLedHead||{})[t.custom]) - .filter((t:any)=>null!=t) - + .filter((t: any) => 'button' === t.kind) + .map((t: any) => (custom.BasicLedHead || {})[t.custom]) + .filter((t: any) => null != t) + return ( - - + + + color='inherit' + onClick={() => navigate(-1)} + disabled={'list' === subview} + > + Back + - - { customButtons.map(cb=> + color='inherit' + onClick={() => + seneca.act('aim:app,on:view,add:item', { view: viewName }) + } + disabled={'edit' === subview} + > + Add + + + {customButtons.map((cb) => ( - ) } - + color='inherit' + onClick={() => seneca.act(cb.msg(state, spec, ctx))} + disabled={cb.disabled(state, spec, ctx)} + {...cb.attr(state, spec, ctx)} + > + {cb.title(state, spec, ctx)} + + ))} + {viewState.alert.active ? ( + + {viewState.alert.message} + + ) : null} ) } -export { - BasicLedHead -} +export { BasicLedHead } From a9481c1b70babf2d3c878b1ff7a24df79a79a2ff Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 8 Aug 2024 19:54:59 +0100 Subject: [PATCH 112/122] Cosmetic and minor changes --- dist/VxgBasicEntityFieldPlugin.d.ts | 4 +--- dist/voxgig-model-react.es.js | 14 ++++++-------- dist/voxgig-model-react.umd.js | 14 ++++++-------- src/lib/BasicEntityTextField.tsx | 4 ++-- src/lib/VxgBasicEntityFieldPlugin.ts | 2 -- 5 files changed, 15 insertions(+), 23 deletions(-) diff --git a/dist/VxgBasicEntityFieldPlugin.d.ts b/dist/VxgBasicEntityFieldPlugin.d.ts index 06ffdfc..3725ec0 100644 --- a/dist/VxgBasicEntityFieldPlugin.d.ts +++ b/dist/VxgBasicEntityFieldPlugin.d.ts @@ -1,8 +1,6 @@ declare function VxgBasicEntityFieldPlugin(this: any, options: any): { exports: { - handle: { - spec: any; - }; + handle: {}; }; }; export { VxgBasicEntityFieldPlugin }; diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index 1355168..b1f364a 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -10810,13 +10810,13 @@ function BasicHeadTool(props) { return tool; } const CMPNAME$p = "BasicHead"; -const { Child: Child$5, Exact, Open: Open$o, Required: Required$1 } = gubu_minExports.Gubu; +const { Child: Child$6, Exact, Open: Open$o, Required: Required$1 } = gubu_minExports.Gubu; const BasicHeadSpecShape = gubu_minExports.Gubu( { head: { name: String, active: Boolean, - tool: Child$5( + tool: Child$6( Open$o({ align: Exact("left", "right") }) @@ -62766,13 +62766,13 @@ const MaterialReactTable = (props) => { } return jsxRuntimeExports.jsx(MRT_TablePaper, { table }); }; -const { Open: Open$n, Child: Child$4 } = gubu_minExports.Gubu; +const { Open: Open$n, Child: Child$5 } = gubu_minExports.Gubu; const Shape$3 = gubu_minExports.Gubu(Open$n({ name: String, prefix: String, ent: String, order: [String], - field: Child$4({}, {}) + field: Child$5({}, {}) }), { name: "BasicEntityList" }); function VxgBasicEntityListPlugin(options) { const seneca = this; @@ -65525,7 +65525,7 @@ function BasicEntityToggleButtonField(props) { /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, `${field.id}-box`); } -const { Open: Open$7 } = gubu_minExports.Gubu; +const { Open: Open$7, Child: Child$4 } = gubu_minExports.Gubu; const Shape$2 = gubu_minExports.Gubu( Open$7({ field: {} @@ -65538,9 +65538,7 @@ function VxgBasicEntityFieldPlugin(options) { options.setPlugin(true); return { exports: { - handle: { - spec - } + handle: {} } }; } diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index ce73c9b..5defbe8 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -10822,13 +10822,13 @@ try { return tool; } const CMPNAME$p = "BasicHead"; - const { Child: Child$5, Exact, Open: Open$o, Required: Required$1 } = gubu_minExports.Gubu; + const { Child: Child$6, Exact, Open: Open$o, Required: Required$1 } = gubu_minExports.Gubu; const BasicHeadSpecShape = gubu_minExports.Gubu( { head: { name: String, active: Boolean, - tool: Child$5( + tool: Child$6( Open$o({ align: Exact("left", "right") }) @@ -62778,13 +62778,13 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } return jsxRuntimeExports.jsx(MRT_TablePaper, { table }); }; - const { Open: Open$n, Child: Child$4 } = gubu_minExports.Gubu; + const { Open: Open$n, Child: Child$5 } = gubu_minExports.Gubu; const Shape$3 = gubu_minExports.Gubu(Open$n({ name: String, prefix: String, ent: String, order: [String], - field: Child$4({}, {}) + field: Child$5({}, {}) }), { name: "BasicEntityList" }); function VxgBasicEntityListPlugin(options) { const seneca = this; @@ -65537,7 +65537,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, `${field.id}-box`); } - const { Open: Open$7 } = gubu_minExports.Gubu; + const { Open: Open$7, Child: Child$4 } = gubu_minExports.Gubu; const Shape$2 = gubu_minExports.Gubu( Open$7({ field: {} @@ -65550,9 +65550,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha options.setPlugin(true); return { exports: { - handle: { - spec - } + handle: {} } }; } diff --git a/src/lib/BasicEntityTextField.tsx b/src/lib/BasicEntityTextField.tsx index a5dc5f2..5b19773 100644 --- a/src/lib/BasicEntityTextField.tsx +++ b/src/lib/BasicEntityTextField.tsx @@ -25,7 +25,7 @@ const BasicEntityTextFieldSpecShape = Gubu( { name: CMPNAME } ) -function BasicEntityTextField(props: any) { +function BasicEntityTextField (props: any) { const { spec } = props const basicEntityTextBoxField: Spec = BasicEntityTextFieldSpecShape(spec) @@ -42,7 +42,7 @@ function BasicEntityTextField(props: any) { name={field.name} label={field.label} fullWidth - variant="outlined" + variant='outlined' InputLabelProps={{ shrink: val?.length > 0 }} {...register(field.name)} disabled={!field.ux.edit} diff --git a/src/lib/VxgBasicEntityFieldPlugin.ts b/src/lib/VxgBasicEntityFieldPlugin.ts index da3677e..305cdf5 100644 --- a/src/lib/VxgBasicEntityFieldPlugin.ts +++ b/src/lib/VxgBasicEntityFieldPlugin.ts @@ -1,5 +1,3 @@ -import type { Spec } from './basic-types' - import { Gubu } from 'gubu' const { Open, Child } = Gubu From 164102dfc4c608aceecbb2eaf24ce2bfaa72b0ba Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 8 Aug 2024 19:56:30 +0100 Subject: [PATCH 113/122] Add alert object to prepareApp viewState --- src/lib/VxgBasicAdminPlugin.ts | 61 ++++++++++++++++------------------ 1 file changed, 28 insertions(+), 33 deletions(-) diff --git a/src/lib/VxgBasicAdminPlugin.ts b/src/lib/VxgBasicAdminPlugin.ts index 22d5595..3cca34f 100644 --- a/src/lib/VxgBasicAdminPlugin.ts +++ b/src/lib/VxgBasicAdminPlugin.ts @@ -1,8 +1,6 @@ - import { vmap, cmap } from './vxg-util' - -function VxgBasicAdminPlugin(this: any) { +function VxgBasicAdminPlugin (this: any) { const seneca = this const { Exact, Default } = seneca.valid @@ -24,42 +22,39 @@ function VxgBasicAdminPlugin(this: any) { setMode ) - .message( 'aim:app,on:nav,set:path', { navigate: Function, view: String }, setPath ) - - .prepare(async function(this: any) { + .prepare(async function (this: any) { await this.post('aim:app,prepare:app') }) - - async function setPath(msg: any, meta: any) { - const q = Object.entries(msg.query) - .reduce((s: any, n: any) => - (s + ('' === s ? '?' : '') + - (encodeURIComponent(n[0]) + '=' + encodeURIComponent(n[1]))), '') + async function setPath (msg: any, meta: any) { + const q = Object.entries(msg.query).reduce( + (s: any, n: any) => + s + + ('' === s ? '?' : '') + + (encodeURIComponent(n[0]) + '=' + encodeURIComponent(n[1])), + '' + ) const path = '/view/' + msg.view + q msg.navigate(path) } - - async function setMode(msg: any, meta: any) { + async function setMode (msg: any, meta: any) { meta.custom.state().nav.mode = msg.mode } - - async function syncView(msg: any, meta: any) { + async function syncView (msg: any, meta: any) { meta.custom.state().current.view.name = msg.name meta.custom.state().current.view.query = msg.query meta.custom.state().current.view.hash = msg.hash } - - async function prepareApp(_msg: any, meta: any) { + async function prepareApp (_msg: any, meta: any) { let state = meta.custom.state() let model = seneca.context.model @@ -72,13 +67,18 @@ function VxgBasicAdminPlugin(this: any) { view: { name: '', query: {}, - hash: '' - } + hash: '', + }, } const viewState = cmap(viewMap, { name: cmap.COPY, active: cmap.FILTER, + alert: { + active: false, + message: '', + level: 'info', + }, }) state.view = viewState @@ -87,20 +87,15 @@ function VxgBasicAdminPlugin(this: any) { section: cmap(sectionMap, { name: cmap.COPY, active: cmap.FILTER, - item: (x: any) => cmap(x, { - active: cmap.FILTER, - view: cmap.COPY, - name: cmap.COPY, - }) - }) + item: (x: any) => + cmap(x, { + active: cmap.FILTER, + view: cmap.COPY, + name: cmap.COPY, + }), + }), } } - } - - - -export { - VxgBasicAdminPlugin, -} +export { VxgBasicAdminPlugin } From 5592699f9555b99771381a053e416b1123039824 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 8 Aug 2024 19:56:50 +0100 Subject: [PATCH 114/122] Set viewState alert object on save:item --- src/lib/VxgBasicLedPlugin.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lib/VxgBasicLedPlugin.ts b/src/lib/VxgBasicLedPlugin.ts index 6c84201..8958bfd 100644 --- a/src/lib/VxgBasicLedPlugin.ts +++ b/src/lib/VxgBasicLedPlugin.ts @@ -141,12 +141,16 @@ function VxgBasicLedPlugin (this: any, options: any) { ) .message( - 'aim:app,on:BasicLed,save:item', - async function (this: any, msg: any) { + 'aim:app,on:BasicLed,save:item,redux$:true', + async function (this: any, msg: any, meta: any) { const data = Object.entries(spec.def.edit.field) .filter((n: any[]) => false !== n[1].ux.edit) .reduce((a: any, n: any[]) => ((a[n[0]] = msg.data[n[0]]), a), {}) + const state = meta.custom.state() + let view = state.view[name] + view.alert = { active: true, message: 'Saved', level: 'success' } + const item = await seneca.entity(entCanon).save$(data) navigate('/view/' + name + '/edit/' + item.id) } From bb44f428673b0091d5507eafb87d4d923a0c280c Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Thu, 8 Aug 2024 19:57:04 +0100 Subject: [PATCH 115/122] Clean up unnecessary code --- src/lib/BasicEntityEdit.tsx | 46 ++----------------------------------- 1 file changed, 2 insertions(+), 44 deletions(-) diff --git a/src/lib/BasicEntityEdit.tsx b/src/lib/BasicEntityEdit.tsx index 7ef2d73..1121ea9 100644 --- a/src/lib/BasicEntityEdit.tsx +++ b/src/lib/BasicEntityEdit.tsx @@ -1,9 +1,8 @@ -import React, { useEffect, useState, useCallback, useRef } from 'react' +import React, { useEffect, useState, useCallback } from 'react' import { useSelector } from 'react-redux' import { useParams } from 'react-router-dom' -import { Box, Grid, Button, Toolbar, Alert } from '@mui/material' -import CheckIcon from '@mui/icons-material/Check' +import { Box, Grid, Button, Toolbar } from '@mui/material' import { useForm } from 'react-hook-form' @@ -11,49 +10,10 @@ import { BasicEntityField } from './BasicEntityField' import { VxgBasicEntityEditPlugin } from './VxgBasicEntityEditPlugin' -import type { Spec } from './basic-types' - -import { Default, Exact, Gubu, Skip } from 'gubu' import { useSanitizedId } from './vxg-util' const CMPNAME = 'BasicEntityEdit' -const { Open } = Gubu -const BasicEntityEditSpecShape = Gubu( - Open({ - field: Open({ - id: String, - cid: '', - name: String, - kind: '', - label: '', - ux: Open({ - kind: Exact( - 'Text', - 'TextBox', - 'Date', - 'DateTime', - 'Time', - 'Checkbox', - 'Autocomplete', - 'Slider', - 'RadioGroup', - 'Rating', - 'Button', - 'ButtonGroup', - 'Select', - 'Switch', - 'ToggleButton' - ), - edit: Default(true), - rows: Default(3), - props: Open({}), - }), - }), - }), - { name: CMPNAME } -) - // TODO: make this debuggable // Resolver for react-hook-form const makeResolver = (seneca: any, spec: any) => @@ -115,8 +75,6 @@ function BasicEntityEdit (props: any) { const [plugin, setPlugin] = useState(false) const [ready, setReady] = useState(false) - const uniqueIdRef = useRef(seneca.util.Nid()) - const cid = props.spec.name + '-' + uniqueIdRef.current const cmpId = useSanitizedId() const cid = props.spec.name + '-' + cmpId From e2ebd775f34e616bd9364a48eca72b4b42d05ca0 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Mon, 12 Aug 2024 18:09:57 +0100 Subject: [PATCH 116/122] Add unit tests for all plugins --- test-plain/VxgBasicAdminPlugin.test.js | 144 ++++++++++++++++++ test-plain/VxgBasicAuthPlugin.test.js | 148 +++++++++++++++++++ test-plain/VxgBasicEntityFieldPlugin.test.js | 69 +++++++++ test-plain/VxgBasicEntityListPlugin.test.js | 69 +++++++++ 4 files changed, 430 insertions(+) create mode 100644 test-plain/VxgBasicAdminPlugin.test.js create mode 100644 test-plain/VxgBasicAuthPlugin.test.js create mode 100644 test-plain/VxgBasicEntityFieldPlugin.test.js create mode 100644 test-plain/VxgBasicEntityListPlugin.test.js diff --git a/test-plain/VxgBasicAdminPlugin.test.js b/test-plain/VxgBasicAdminPlugin.test.js new file mode 100644 index 0000000..d269653 --- /dev/null +++ b/test-plain/VxgBasicAdminPlugin.test.js @@ -0,0 +1,144 @@ +require('ts-node') + +const { test, describe } = require('node:test') + +const { expect } = require('@hapi/code') + +const Seneca = require('seneca') + +const { VxgBasicAdminPlugin } = require('../dist-plain/lib/VxgBasicAdminPlugin') + +describe('VxgBasicAdminPlugin', () => { + test('load-plugin', async () => { + const seneca = await makeSeneca() + console.log('seneca.context', seneca.context.model) + expect(seneca.find_plugin('VxgBasicAdminPlugin$foo')).exist() + await seneca.close() + }) +}) + +async function makeSeneca (opts) { + const { deep } = Seneca.util + const seneca = Seneca({ legacy: false }) + .test() + .use('promisify') + .use('entity') + .use('redux', { + name: 'main', + state: { + view: { + foo: {}, + }, + }, + }) + + // TODO: move to json + seneca.context.model = { + app: { + web: { + frame: { + public: { + kind: 'basic', + part: { + main: { + view: { + default: 'dash', + }, + }, + }, + page: { + auth: { + title: 'Sign In', + img: { + logo: '/logo.png', + }, + signin: { + debug: false, + view: 'dash', + }, + }, + }, + name: 'public', + nav: { + section: {}, + }, + }, + private: { + kind: 'basic', + nav: { + section: { + one: { + name: 'one', + item: { + dash: { + name: 'dash', + view: 'dash', + active: true, + }, + }, + active: true, + }, + }, + }, + tool: { + logo: { + name: 'logo', + kind: 'logo', + attr: { + img: '/logo.png', + }, + }, + }, + part: { + head: { + tool: { + logo: { + active: true, + align: 'left', + }, + }, + name: 'head', + active: true, + }, + side: { + name: 'side', + active: true, + }, + main: { + view: { + default: 'dash', + }, + name: 'main', + active: true, + }, + foot: { + name: 'foot', + active: true, + }, + }, + view: { + dash: { + title: 'Dashboard', + active: true, + kind: 'custom', + cmp: 'Dash', + def: {}, + name: 'dash', + }, + }, + name: 'private', + }, + }, + }, + }, + } + + seneca + .use({ + name: 'VxgBasicAdminPlugin$foo', + define: VxgBasicAdminPlugin, + }) + .ready() + + return seneca +} diff --git a/test-plain/VxgBasicAuthPlugin.test.js b/test-plain/VxgBasicAuthPlugin.test.js new file mode 100644 index 0000000..0594e9a --- /dev/null +++ b/test-plain/VxgBasicAuthPlugin.test.js @@ -0,0 +1,148 @@ +require('ts-node') + +const { test, describe } = require('node:test') + +const { expect } = require('@hapi/code') + +const Seneca = require('seneca') + +const { VxgBasicAuthPlugin } = require('../dist-plain/lib/VxgBasicAuthPlugin') + +describe('VxgBasicAuthPlugin', () => { + test('load-plugin', async () => { + const seneca = await makeSeneca() + expect(seneca.find_plugin('VxgBasicAuthPlugin$foo')).exist() + await seneca.close() + }) +}) + +async function makeSeneca (opts) { + const { deep } = Seneca.util + const seneca = Seneca({ legacy: false }) + .test() + .use('promisify') + .use('entity') + .use('redux', { + name: 'main', + state: { + view: { + foo: {}, + }, + }, + }) + + seneca.context.model = { + app: { + web: { + frame: { + public: { + kind: 'basic', + part: { + main: { + view: { + default: 'dash', + }, + }, + }, + page: { + auth: { + title: 'Sign In', + img: { + logo: '/logo.png', + }, + signin: { + debug: false, + view: 'dash', + }, + }, + }, + name: 'public', + nav: { + section: {}, + }, + }, + private: { + kind: 'basic', + nav: { + section: { + one: { + name: 'one', + item: { + dash: { + name: 'dash', + view: 'dash', + active: true, + }, + }, + active: true, + }, + }, + }, + tool: { + logo: { + name: 'logo', + kind: 'logo', + attr: { + img: '/logo.png', + }, + }, + }, + part: { + head: { + tool: { + logo: { + active: true, + align: 'left', + }, + }, + name: 'head', + active: true, + }, + side: { + name: 'side', + active: true, + }, + main: { + view: { + default: 'dash', + }, + name: 'main', + active: true, + }, + foot: { + name: 'foot', + active: true, + }, + }, + view: { + dash: { + title: 'Dashboard', + active: true, + kind: 'custom', + cmp: 'Dash', + def: {}, + name: 'dash', + }, + }, + name: 'private', + }, + }, + }, + }, + } + + seneca + .use({ + name: 'VxgBasicAuthPlugin$foo', + define: VxgBasicAuthPlugin, + options: deep( + { + setReady: () => null, + }, + opts + ), + }) + .ready() + + return seneca +} diff --git a/test-plain/VxgBasicEntityFieldPlugin.test.js b/test-plain/VxgBasicEntityFieldPlugin.test.js new file mode 100644 index 0000000..a1211aa --- /dev/null +++ b/test-plain/VxgBasicEntityFieldPlugin.test.js @@ -0,0 +1,69 @@ +require('ts-node') + +const { test, describe } = require('node:test') + +const { expect } = require('@hapi/code') + +const Seneca = require('seneca') + +const { + VxgBasicEntityFieldPlugin, +} = require('../dist-plain/lib/VxgBasicEntityFieldPlugin') + +describe('VxgBasicEntityFieldPlugin', () => { + test('load-plugin', async () => { + const seneca = await makeSeneca() + expect(seneca.find_plugin('VxgBasicEntityFieldPlugin$foo')).exist() + await seneca.close() + }) +}) + +async function makeSeneca (opts) { + const { deep } = Seneca.util + return Seneca({ legacy: false }) + .test() + .use('promisify') + .use('entity') + .use('redux', { + name: 'main', + state: { + view: { + foo: {}, + }, + }, + }) + .use({ + name: 'VxgBasicEntityFieldPlugin$foo', + define: VxgBasicEntityFieldPlugin, + options: deep( + { + setPlugin: () => null, + spec: { + active: false, + name: 'foo', + prefix: 'BasicLed_', + ent: 'foo/bar', + order: ['title'], + field: { + title: { + label: 'Title', + kind: 'String', + valid: 'Min(2).Max(1111)', + ux: { + kind: 'Text', + edit: true, + rows: 3, + size: 4, + props: {}, + }, + id: 'vxg-field-podcast-title', + name: 'title', + }, + }, + }, + }, + opts + ), + }) + .ready() +} diff --git a/test-plain/VxgBasicEntityListPlugin.test.js b/test-plain/VxgBasicEntityListPlugin.test.js new file mode 100644 index 0000000..9c566d5 --- /dev/null +++ b/test-plain/VxgBasicEntityListPlugin.test.js @@ -0,0 +1,69 @@ +require('ts-node') + +const { test, describe } = require('node:test') + +const { expect } = require('@hapi/code') + +const Seneca = require('seneca') + +const { + VxgBasicEntityListPlugin, +} = require('../dist-plain/lib/VxgBasicEntityListPlugin') + +describe('VxgBasicEntityListPlugin', () => { + test('load-plugin', async () => { + const seneca = await makeSeneca() + expect(seneca.find_plugin('VxgBasicEntityListPlugin$foo')).exist() + await seneca.close() + }) +}) + +async function makeSeneca (opts) { + const { deep } = Seneca.util + return Seneca({ legacy: false }) + .test() + .use('promisify') + .use('entity') + .use('redux', { + name: 'main', + state: { + view: { + foo: {}, + }, + }, + }) + .use({ + name: 'VxgBasicEntityListPlugin$foo', + define: VxgBasicEntityListPlugin, + options: deep( + { + setPlugin: () => null, + spec: { + active: false, + name: 'foo', + prefix: 'BasicLed_', + ent: 'foo/bar', + order: ['title'], + field: { + title: { + label: 'Title', + kind: 'String', + valid: 'Min(2).Max(1111)', + ux: { + kind: 'Text', + edit: true, + rows: 3, + size: 4, + props: {}, + }, + id: 'vxg-field-podcast-title', + name: 'title', + }, + }, + }, + }, + opts + ), + }) + .ready() +} From 1fa8f5a30b195c6892c634a9d92d302da65a9d48 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Mon, 12 Aug 2024 18:11:53 +0100 Subject: [PATCH 117/122] Use cid as unique way to tag plugins in BasicEntityEdit --- src/lib/BasicEntityEdit.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/lib/BasicEntityEdit.tsx b/src/lib/BasicEntityEdit.tsx index 1121ea9..7911635 100644 --- a/src/lib/BasicEntityEdit.tsx +++ b/src/lib/BasicEntityEdit.tsx @@ -94,7 +94,7 @@ function BasicEntityEdit (props: any) { }, []) const { spec, slot, fields } = seneca.export( - 'VxgBasicEntityEditPlugin/handle' + 'VxgBasicEntityEditPlugin$' + cid + '/handle' ) || { spec: {}, slot: null, fields: [] } const { ent, name } = spec @@ -119,11 +119,11 @@ function BasicEntityEdit (props: any) { // } useEffect(() => { - const fetchData = async () => { - console.log('BEE', 'effect', 'mod:edit', 'init', 'view', name) - console.log('BEE', 'effect', 'mod:edit', 'init', 'item', item?.title) + const modifyEdit = async () => { + console.log('BEE', 'effect', 'modify:edit', 'init', 'view', name) + console.log('BEE', 'effect', 'modify:edit', 'init', 'item', item) if (item && name) { - // console.log('BEE', 'effect', 'modify:edit', 'init') + console.log('BEE', 'effect', 'modify:edit', 'seneca.direct') item = await seneca.direct('aim:app,on:BasicLed,modify:edit', { view: name, item, @@ -134,7 +134,7 @@ function BasicEntityEdit (props: any) { } } - fetchData() + modifyEdit() }, [item, name]) const params: any = useParams() @@ -159,6 +159,7 @@ function BasicEntityEdit (props: any) { register, handleSubmit, getValues, + setValue, reset, control, formState: { errors }, @@ -201,6 +202,7 @@ function BasicEntityEdit (props: any) { field, register, getValues, + setValue, control, errors, }} From b798bb1b5ca9f222c5b91f78d1a2d66df1ab2cfa Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Mon, 12 Aug 2024 18:13:30 +0100 Subject: [PATCH 118/122] Refactor input field resolve functions --- src/lib/BasicEntityAutocompleteField.tsx | 154 +++----------------- src/lib/BasicEntityRadioGroupField.tsx | 14 +- src/lib/BasicEntitySelectField.tsx | 145 ++----------------- src/lib/BasicEntitySliderField.tsx | 38 ++--- src/lib/VxgBasicEntityEditPlugin.ts | 170 +++++++++++++++++++---- src/lib/VxgBasicLedPlugin.ts | 8 +- src/lib/vxg-util.ts | 4 + 7 files changed, 204 insertions(+), 329 deletions(-) diff --git a/src/lib/BasicEntityAutocompleteField.tsx b/src/lib/BasicEntityAutocompleteField.tsx index de5863b..c93a501 100644 --- a/src/lib/BasicEntityAutocompleteField.tsx +++ b/src/lib/BasicEntityAutocompleteField.tsx @@ -7,7 +7,6 @@ import type { Spec } from './basic-types' import { Default, Exact, Gubu } from 'gubu' import { BasicEntityFieldError } from './BasicEntityFieldError' -import { resvalue, resdefault } from './vxg-util' const CMPNAME = 'BasicEntityAutocompleteField' const { Open } = Gubu @@ -43,16 +42,25 @@ function BasicEntityAutocompleteField (props: any) { const basicEntityAutocompleteField: Spec = BasicEntityAutocompleteFieldSpecShape(spec) - const { control, field, errors } = basicEntityAutocompleteField + const { control, field, errors, getValues, setValue } = + basicEntityAutocompleteField + + console.log('BERF', 'multiple', field.cat.multiple) + + const defaultAlternative = field.cat.multiple === 1 ? {} : [] + const defaultValues = + getValues(`${field.name}_default$`) || defaultAlternative + const categories = getValues(`${field.name}_cat$`) || [] + const err = errors[field.name] const { field: controllerField, fieldState: { error }, } = useController({ - name: field.name, + name: field.name + '_uival$', control, - defaultValue: resolveDefault(field.cat), + defaultValue: defaultValues, }) return ( @@ -61,19 +69,22 @@ function BasicEntityAutocompleteField (props: any) { freeSolo forcePopupIcon multiple={field.cat.multiple !== 1} - options={resolveCategories(field.cat)} + options={categories} isOptionEqualToValue={(opt: any, val: any) => opt === val || (opt?.id != null && val?.id != null && opt.id === val.id) || (opt?.key != null && val?.key != null && opt.key === val.key) } - getOptionLabel={(option: any) => option.title} - value={resolveValue(controllerField.value, field.cat)} + getOptionLabel={(option: any) => option?.title || ''} + value={controllerField.value} disabled={!field.ux.edit} onChange={(_, v: any) => { - controllerField.onChange( + console.log('v', v) + setValue( + field.name, Array.isArray(v) ? v.map((val) => val.key).join(',') : v?.key ) + controllerField.onChange(v) }} renderInput={(params: any) => ( @@ -85,131 +96,4 @@ function BasicEntityAutocompleteField (props: any) { ) } -export const resolveCategories = ({ - item, -}: { - item: Record -}) => Object.entries(item).map(([key, { title }]) => ({ key, title })) - -export function resolveDefault (cat: { - multiple: number - item: any - default: string -}) { - return resdefault(cat, (val: string, item: { title: string }) => ({ - key: val, - title: item.title, - })) -} - -export function resolveValue ( - value: any, - cat: { multiple: number; item: Record } -) { - return resvalue(value, cat, (val: string, item: { title: string }) => ({ - key: val, - title: item.title, - })) -} - -// export function resolveDefault (cat: { -// multiple: number -// item: any -// default: string -// }) { -// const { multiple, item: items, default: defaultValues } = cat - -// if (Object.keys(items).length === 0) { -// return multiple === 1 ? '' : [] -// } - -// const defaultItems = defaultValues.split(',') - -// const mapResolvedDefault = (list: string[]) => -// list.map((val: any) => ({ -// title: items[val]?.title, -// key: val, -// })) - -// switch (multiple) { -// case 1: -// return defaultItems[0] -// ? { -// key: defaultItems[0], -// title: items[defaultItems[0]]?.title, -// } -// : '' -// case -1: -// return mapResolvedDefault(defaultItems) || [] -// default: -// return mapResolvedDefault(defaultItems.slice(0, multiple)) || [] -// } -// } - -// export function resolveValueUtil ( -// value: any, -// cat: { multiple: number; item: Record }, -// mapFn: (val: string, item: { title: string }) => any -// ) { -// const { item: items, multiple } = cat - -// if (Object.keys(items).length === 0) { -// return multiple === 1 ? '' : [] -// } - -// if (Array.isArray(value)) { -// return multiple === 1 && value[0] ? value[0] : value.slice(0, multiple) -// } - -// if (typeof value === 'object') { -// return multiple === 1 ? value : [value] -// } - -// const splitValue = value.split(',') - -// const mapValue = (val: string) => -// items[val] ? mapFn(val, items[val]) : undefined - -// switch (multiple) { -// case 1: -// return mapValue(splitValue[0]) || '' -// case -1: -// return splitValue.map(mapValue).filter(Boolean) || [] -// default: -// return splitValue.slice(0, multiple).map(mapValue).filter(Boolean) -// } -// } - -// function resolveValueToObject ( -// value: any, -// cat: { multiple: number; item: Record } -// ) { -// const { item: items, multiple } = cat - -// if (Object.keys(items).length === 0) { -// return multiple === 1 ? '' : [] -// } - -// if (Array.isArray(value)) { -// return multiple === 1 && value[0] ? value[0] : value.slice(0, multiple) -// } - -// if (typeof value === 'object') { -// return multiple === 1 ? value : [value] -// } - -// const mapValue = (val: string) => -// items[val] ? { key: val, title: items[val].title } : undefined -// const splitValue = value.split(',') - -// switch (multiple) { -// case 1: -// return mapValue(splitValue[0]) || '' -// case -1: -// return splitValue.map(mapValue).filter(Boolean) || [] -// default: -// return splitValue.slice(0, multiple).map(mapValue).filter(Boolean) -// } -// } - export { BasicEntityAutocompleteField } diff --git a/src/lib/BasicEntityRadioGroupField.tsx b/src/lib/BasicEntityRadioGroupField.tsx index 96a2e84..6fe9bcd 100644 --- a/src/lib/BasicEntityRadioGroupField.tsx +++ b/src/lib/BasicEntityRadioGroupField.tsx @@ -42,7 +42,13 @@ function BasicEntityRadioGroupField (props: any) { const basicEntityRadioGroupField: Spec = BasicEntityRadioGroupFieldSpecShape(spec) - const { control, field, errors } = basicEntityRadioGroupField + const { control, field, errors, getValues, setValue } = + basicEntityRadioGroupField + + const defaultValues = getValues(`${field.name}_default$`) || '' + const categories = getValues(`${field.name}_cat$`) || [] + + console.log('BERF', 'default', defaultValues) const err = errors[field.name] @@ -50,9 +56,9 @@ function BasicEntityRadioGroupField (props: any) { field: controllerField, fieldState: { error }, } = useController({ - name: field.name, + name: field.name + '_uival$', control, - defaultValue: field.cat.default, + defaultValue: defaultValues, }) return ( @@ -66,7 +72,7 @@ function BasicEntityRadioGroupField (props: any) { disabled={!field.ux.edit} {...field.ux.props} > - {resolveCategories(field.cat).map((option: any) => ( + {categories.map((option: any) => ( { - const v = event.target.value - controllerField.onChange(Array.isArray(v) ? v.join(',') : v) + // TODO: consider moving it to a msg + const { value } = event.target + setValue(field.name, Array.isArray(value) ? value.join(',') : value) + controllerField.onChange(value) }} disabled={!field.ux.edit} {...field.ux.props} > - {resolveCategories(field.cat).map((opt: any) => ( + {categories.map((opt: any) => ( {opt.title} @@ -83,128 +88,4 @@ function BasicEntitySelectField (props: any) { ) } -// Returns array of options based on field.cat object -export function resolveCategories (cat: any) { - return Object.keys(cat.item).map((key) => ({ - title: cat.item?.[key]?.title, - key: key, - })) -} - -export function resolveDefault (cat: { - multiple: number - item: any - default: string -}) { - return resdefault(cat, (val: string, item: { title: string }) => val) -} - -export function resolveValue ( - value: any, - cat: { multiple: number; item: Record } -) { - return resvalue(value, cat, (val: string, item: { title: string }) => val) -} - -// export function resolveDefault (cat: { -// multiple: number -// item: any -// default: string -// }) { -// const { multiple, item: items, default: defaultValues } = cat - -// if (Object.keys(items).length === 0) { -// return multiple === 1 ? '' : [] -// } - -// const defaultItems = defaultValues.split(',') - -// const mapResolvedDefault = (list: string[]) => -// list.map((val: any) => (items[val] ? val : undefined)) - -// switch (multiple) { -// case 1: -// return defaultItems[0] ? defaultItems[0] : '' -// case -1: -// return mapResolvedDefault(defaultItems).filter(Boolean) || [] -// default: -// return ( -// mapResolvedDefault(defaultItems.slice(0, multiple)).filter(Boolean) || -// [] -// ) -// } -// } - -// export function resolveValueUtil ( -// value: any, -// cat: { multiple: number; item: Record }, -// mapFn: (val: string, item: { title: string }) => any -// ) { -// const { item: items, multiple } = cat - -// if (Object.keys(items).length === 0) { -// return multiple === 1 ? '' : [] -// } - -// if (Array.isArray(value)) { -// return multiple === 1 && value[0] ? value[0] : value.slice(0, multiple) -// } - -// if (typeof value === 'object') { -// return multiple === 1 ? value : [value] -// } - -// const splitValue = value.split(',') - -// const mapValue = (val: string) => -// items[val] ? mapFn(val, items[val]) : undefined - -// switch (multiple) { -// case 1: -// return mapValue(splitValue[0]) || '' -// case -1: -// console.log('splitValue', splitValue) -// console.log('items', items[splitValue[0]]) -// console.log( -// 'splitValue.map(mapValue)', -// splitValue.map(mapValue).filter(Boolean) -// ) -// return splitValue.map(mapValue).filter(Boolean) || [] -// default: -// console.log('splitValue', splitValue) -// return splitValue.slice(0, multiple).map(mapValue).filter(Boolean) -// } -// } - -// function resolveValueToKey ( -// value: any, -// cat: { multiple: number; item: Record } -// ) { -// const { item: items, multiple } = cat - -// if (Object.keys(items).length === 0) { -// return multiple === 1 ? '' : [] -// } - -// if (Array.isArray(value)) { -// return multiple === 1 && value[0] ? value[0] : value.slice(0, multiple) -// } - -// if (typeof value === 'object') { -// return multiple === 1 ? value : [value] -// } - -// const mapValue = (val: string) => (items[val] ? val : undefined) -// const splitValue = value.split(',') - -// switch (multiple) { -// case 1: -// return mapValue(splitValue[0]) || '' -// case -1: -// return splitValue.map(mapValue).filter(Boolean) || [] -// default: -// return splitValue.slice(0, multiple).map(mapValue).filter(Boolean) || [] -// } -// } - export { BasicEntitySelectField } diff --git a/src/lib/BasicEntitySliderField.tsx b/src/lib/BasicEntitySliderField.tsx index 7f294fd..8e66463 100644 --- a/src/lib/BasicEntitySliderField.tsx +++ b/src/lib/BasicEntitySliderField.tsx @@ -40,15 +40,16 @@ function BasicEntitySliderField (props: any) { const basicEntityAutocompleteField: Spec = BasicEntitySliderFieldSpecShape(spec) - const { control, field, getValues, errors } = basicEntityAutocompleteField + const { control, field, getValues, setValue, errors } = + basicEntityAutocompleteField - // if cmp not ready, call seneca.add('modify:edit') and seneca.add('modify:save') - // const val = getValues(field.name + '_uival$') - const val = getValues(field.name) - const err = errors[field.name] + const fieldName = field.name + const val = getValues(`${fieldName}_uival$`) + const marks = getValues(`${fieldName}_marks$`) + const err = errors[fieldName] const { field: controllerField } = useController({ - name: field.name, + name: `${fieldName}_uival$`, control, defaultValue: val || field.ux.min, }) @@ -59,11 +60,15 @@ function BasicEntitySliderField (props: any) { controllerField.onChange(newVal)} + onChange={(_, newVal: any) => { + // FIXME: this should be elsewhere, and flexible + setValue(field.name, newVal * 60) + controllerField.onChange(newVal) + }} disabled={!field.ux.edit} orientation={field.ux.direction} track={field.ux.track} @@ -74,21 +79,4 @@ function BasicEntitySliderField (props: any) { ) } -function resolveMarks (marks: any) { - if ( - !marks || - (typeof marks === 'object' && Object.keys(marks).length === 0) - ) { - return false - } - if (typeof marks === 'object') { - return Object.entries(marks).map(([key, value]) => ({ - label: value, - value: +key, - })) - } - - return marks -} - export { BasicEntitySliderField } diff --git a/src/lib/VxgBasicEntityEditPlugin.ts b/src/lib/VxgBasicEntityEditPlugin.ts index 200d64f..00ca302 100644 --- a/src/lib/VxgBasicEntityEditPlugin.ts +++ b/src/lib/VxgBasicEntityEditPlugin.ts @@ -1,6 +1,7 @@ import type { Spec } from './basic-types' import { Gubu } from 'gubu' +import { resdefault, resvalue } from './vxg-util' const { Open, Child } = Gubu @@ -22,6 +23,8 @@ function VxgBasicEntityEditPlugin (this: any, options: any) { const slot = spec.prefix + spec.name + console.log('VxgBasicEntityEditPlugin', 'slot', slot, 'spec.name', spec.name) + const fields = spec.order.reduce( (a: any, fn: any) => ( fixField(fn, spec.field[fn], spec), a.push(spec.field[fn]), a @@ -33,7 +36,8 @@ function VxgBasicEntityEditPlugin (this: any, options: any) { if ('Date' === field.ux.kind) { seneca .add( - 'aim:app,on:BasicLed,modify:edit,view:' + spec.name, + 'aim:app,on:BasicLed,modify:edit', + { view: spec.name }, async function modify_edit_Date (this: any, msg: any) { const out = await this.prior(msg) @@ -68,7 +72,8 @@ function VxgBasicEntityEditPlugin (this: any, options: any) { } else if ('Time' === field.ux.kind) { seneca .add( - 'aim:app,on:BasicLed,modify:edit,view:' + spec.name, + 'aim:app,on:BasicLed,modify:edit', + { view: spec.name }, async function modify_edit_Time (this: any, msg: any) { const out = await this.prior(msg) @@ -103,7 +108,8 @@ function VxgBasicEntityEditPlugin (this: any, options: any) { } else if ('DateTime' === field.ux.kind) { seneca .add( - 'aim:app,on:BasicLed,modify:edit,view:' + spec.name, + 'aim:app,on:BasicLed,modify:edit', + { view: spec.name }, async function modify_edit_Datetime (this: any, msg: any) { const out = await this.prior(msg) @@ -136,38 +142,134 @@ function VxgBasicEntityEditPlugin (this: any, options: any) { ) } else if ('Slider' === field.ux.kind) { // console.log('VxgBasicEntityEditPlugin', 'Slider') - seneca - .add( - 'aim:app,on:BasicLed,modify:edit', - { view: spec.name }, - async function modify_edit_Slider (this: any, msg: any) { - const out = await this.prior(msg) - - let item = { ...out } - - if (!item[field.name + '_orig$']) { - item[field.name + '_orig$'] = item[field.name] - item[field.name] = Number(item[field.name]) / 60 - } + seneca.add( + 'aim:app,on:BasicLed,modify:edit', + { view: spec.name }, + async function modify_edit_Slider (this: any, msg: any) { + const out = await this.prior(msg) + + let item = { ...out } + + if (!item[field.name + '_orig$']) { + item[field.name + '_orig$'] = item[field.name] + item[field.name + '_uival$'] = Number(item[field.name]) / 60 + item[field.name + '_marks$'] = util.resolveMarks( + field.ux.props.marks + ) + } - // return { ...msg, item } - return item + return item + } + ) + } else if ('Select' === field.ux.kind) { + console.log('VxgBasicEntityEditPlugin', 'Select', field.name) + seneca.add( + 'aim:app,on:BasicLed,modify:edit', + { view: spec.name }, + async function modify_edit_Select (this: any, msg: any) { + const out = await this.prior(msg) + + let item = { ...out } + + if (!item[field.name + '_orig$']) { + item[field.name + '_orig$'] = item[field.name] + item[field.name + '_default$'] = resdefault( + field.cat, + (val: string) => val + ) + item[field.name + '_cat$'] = Object.keys(field.cat.item).map( + (key) => ({ + title: field.cat.item?.[key]?.title, + key: key, + }) + ) + item[field.name + '_uival$'] = resvalue( + item[field.name], + field.cat, + (val: string) => val + ) } - ) - .add( - 'aim:app,on:BasicLed,modify:save', - { view: spec.name }, - async function modify_save_Slider (this: any, msg: any) { - const out = await this.prior(msg) + return item + } + ) + } else if ('Autocomplete' === field.ux.kind) { + console.log('VxgBasicEntityEditPlugin', 'Autocomplete', field.name) + seneca.add( + 'aim:app,on:BasicLed,modify:edit', + { view: spec.name }, + async function modify_edit_Autocomplete (this: any, msg: any) { + const out = await this.prior(msg) + + let item = { ...out } + + if (!item[field.name + '_orig$']) { + item[field.name + '_orig$'] = item[field.name] + item[field.name + '_default$'] = resdefault( + field.cat, + (val: string, item: { title: string }) => ({ + key: val, + title: item.title, + }) + ) + item[field.name + '_cat$'] = Object.keys(field.cat.item).map( + (key) => ({ + title: field.cat.item?.[key]?.title, + key: key, + }) + ) + item[field.name + '_uival$'] = resvalue( + item[field.name], + field.cat, + (val: string, item: { title: string }) => ({ + key: val, + title: item.title, + }) + ) + } - let item = { ...out } + // console.log('modify_edit_Autocomplete', item) + + return item + } + ) + } else if ('RadioGroup' === field.ux.kind) { + console.log('VxgBasicEntityEditPlugin', 'RadioGroup', field.name) + seneca.add( + 'aim:app,on:BasicLed,modify:edit', + { view: spec.name }, + async function modify_edit_RadioGroup (this: any, msg: any) { + const out = await this.prior(msg) + + let item = { ...out } + + if (!item[field.name + '_orig$']) { + item[field.name + '_orig$'] = item[field.name] + + item[field.name + '_default$'] = field.cat.default + + item[field.name + '_cat$'] = Object.keys(field.cat.item).map( + (key) => ({ + title: field.cat.item?.[key]?.title, + key: key, + }) + ) + + item[field.name + '_uival$'] = resvalue( + item[field.name], + field.cat, + (val: string, item: { title: string }) => ({ + key: val, + title: item.title, + }) + ) + } - item[field.name] = Number(item[field.name]) * 60 + // console.log('modify_edit_Autocomplete', item) - return item - } - ) + return item + } + ) } } @@ -193,6 +295,16 @@ function fixField (name: string, field: any, spec: any) { } const util = { + resolveMarks: (marks: any) => { + if (!marks || (typeof marks === 'object' && !Object.keys(marks).length)) + return false + return typeof marks === 'object' + ? Object.entries(marks).map(([key, value]) => ({ + label: value, + value: +key, + })) + : marks + }, dateTimeFromUTC: (utc: number, tz?: string) => { const date = new Date(utc) const iso = date.toISOString() diff --git a/src/lib/VxgBasicLedPlugin.ts b/src/lib/VxgBasicLedPlugin.ts index 8958bfd..9af9b46 100644 --- a/src/lib/VxgBasicLedPlugin.ts +++ b/src/lib/VxgBasicLedPlugin.ts @@ -141,15 +141,15 @@ function VxgBasicLedPlugin (this: any, options: any) { ) .message( - 'aim:app,on:BasicLed,save:item,redux$:true', + 'aim:app,on:BasicLed,save:item', async function (this: any, msg: any, meta: any) { const data = Object.entries(spec.def.edit.field) .filter((n: any[]) => false !== n[1].ux.edit) .reduce((a: any, n: any[]) => ((a[n[0]] = msg.data[n[0]]), a), {}) - const state = meta.custom.state() - let view = state.view[name] - view.alert = { active: true, message: 'Saved', level: 'success' } + // const state = meta.custom.state() + // let view = state.view[name] + // view.alert = { active: true, message: 'Saved', level: 'success' } const item = await seneca.entity(entCanon).save$(data) navigate('/view/' + name + '/edit/' + item.id) diff --git a/src/lib/vxg-util.ts b/src/lib/vxg-util.ts index 7cdf74b..a7b9d39 100644 --- a/src/lib/vxg-util.ts +++ b/src/lib/vxg-util.ts @@ -98,6 +98,10 @@ function resvalue ( ) { const { item: items, multiple } = cat + if (!value) { + return multiple === 1 ? '' : [] + } + if (Object.keys(items).length === 0) { return multiple === 1 ? '' : [] } From 2c2738f6ecdc2beef8deccca85cd932cd93e35d1 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Mon, 12 Aug 2024 18:13:38 +0100 Subject: [PATCH 119/122] Update dist files --- dist-plain/lib/VxgBasicAdminPlugin.d.ts | 2 +- dist-plain/lib/VxgBasicAdminPlugin.js | 20 +- dist-plain/lib/VxgBasicAdminPlugin.js.map | 2 +- dist-plain/lib/VxgBasicEntityEditPlugin.d.ts | 1 + dist-plain/lib/VxgBasicEntityEditPlugin.js | 96 ++++- .../lib/VxgBasicEntityEditPlugin.js.map | 2 +- .../lib/VxgBasicEntityFieldPlugin.js.map | 2 +- dist-plain/lib/VxgBasicLedPlugin.js | 5 +- dist-plain/lib/VxgBasicLedPlugin.js.map | 2 +- dist-plain/lib/vxg-util.d.ts | 20 +- dist-plain/lib/vxg-util.js | 121 ++++-- dist-plain/lib/vxg-util.js.map | 2 +- dist/BasicEntityAutocompleteField.d.ts | 19 - dist/BasicEntitySelectField.d.ts | 15 - dist/VxgBasicEntityEditPlugin.d.ts | 1 + dist/voxgig-model-react.es.js | 360 +++++++++++------- dist/voxgig-model-react.umd.js | 360 +++++++++++------- 17 files changed, 674 insertions(+), 356 deletions(-) diff --git a/dist-plain/lib/VxgBasicAdminPlugin.d.ts b/dist-plain/lib/VxgBasicAdminPlugin.d.ts index a8f5b61..c3d7958 100644 --- a/dist-plain/lib/VxgBasicAdminPlugin.d.ts +++ b/dist-plain/lib/VxgBasicAdminPlugin.d.ts @@ -1,2 +1,2 @@ declare function VxgBasicAdminPlugin(this: any): void; -export { VxgBasicAdminPlugin, }; +export { VxgBasicAdminPlugin }; diff --git a/dist-plain/lib/VxgBasicAdminPlugin.js b/dist-plain/lib/VxgBasicAdminPlugin.js index f53d44b..d55294b 100644 --- a/dist-plain/lib/VxgBasicAdminPlugin.js +++ b/dist-plain/lib/VxgBasicAdminPlugin.js @@ -16,9 +16,9 @@ function VxgBasicAdminPlugin() { await this.post('aim:app,prepare:app'); }); async function setPath(msg, meta) { - const q = Object.entries(msg.query) - .reduce((s, n) => (s + ('' === s ? '?' : '') + - (encodeURIComponent(n[0]) + '=' + encodeURIComponent(n[1]))), ''); + const q = Object.entries(msg.query).reduce((s, n) => s + + ('' === s ? '?' : '') + + (encodeURIComponent(n[0]) + '=' + encodeURIComponent(n[1])), ''); const path = '/view/' + msg.view + q; msg.navigate(path); } @@ -33,6 +33,7 @@ function VxgBasicAdminPlugin() { async function prepareApp(_msg, meta) { let state = meta.custom.state(); let model = seneca.context.model; + console.log('model', model); let frame = model.app.web.frame.private; let viewMap = frame.view; // let partMap = frame.part @@ -41,12 +42,17 @@ function VxgBasicAdminPlugin() { view: { name: '', query: {}, - hash: '' - } + hash: '', + }, }; const viewState = (0, vxg_util_1.cmap)(viewMap, { name: vxg_util_1.cmap.COPY, active: vxg_util_1.cmap.FILTER, + alert: { + active: false, + message: '', + level: 'info', + }, }); state.view = viewState; state.nav = { @@ -58,8 +64,8 @@ function VxgBasicAdminPlugin() { active: vxg_util_1.cmap.FILTER, view: vxg_util_1.cmap.COPY, name: vxg_util_1.cmap.COPY, - }) - }) + }), + }), }; } } diff --git a/dist-plain/lib/VxgBasicAdminPlugin.js.map b/dist-plain/lib/VxgBasicAdminPlugin.js.map index 10e2c5e..4a282e7 100644 --- a/dist-plain/lib/VxgBasicAdminPlugin.js.map +++ b/dist-plain/lib/VxgBasicAdminPlugin.js.map @@ -1 +1 @@ -{"version":3,"file":"VxgBasicAdminPlugin.js","sourceRoot":"","sources":["../../src/lib/VxgBasicAdminPlugin.ts"],"names":[],"mappings":";;AAwGE,kDAAmB;AAvGrB,yCAAuC;AAGvC,SAAS,mBAAmB;IAC1B,MAAM,MAAM,GAAG,IAAI,CAAA;IACnB,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC,KAAK,CAAA;IAEvC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,eAAI,CAAA;IAC/B,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,eAAI,CAAA;IAE/B,MAAM;SACH,OAAO,CAAC,iCAAiC,EAAE,UAAU,CAAC;SAEtD,OAAO,CACN,+BAA+B,EAC/B,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC,EAAE,EAC9C,QAAQ,CACT;SAEA,OAAO,CACN,uCAAuC,EACvC,EAAE,IAAI,EAAE,KAAK,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,EAClC,OAAO,CACR;SAGA,OAAO,CACN,yBAAyB,EACzB,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,EACpC,OAAO,CACR;SAGA,OAAO,CAAC,KAAK;QACZ,MAAM,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAA;IACxC,CAAC,CAAC,CAAA;IAGJ,KAAK,UAAU,OAAO,CAAC,GAAQ,EAAE,IAAS;QACxC,MAAM,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC;aAChC,MAAM,CAAC,CAAC,CAAM,EAAE,CAAM,EAAE,EAAE,CAC3B,CAAC,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;YACxB,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;QACrE,MAAM,IAAI,GAAG,QAAQ,GAAG,GAAG,CAAC,IAAI,GAAG,CAAC,CAAA;QACpC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;IACpB,CAAC;IAGD,KAAK,UAAU,OAAO,CAAC,GAAQ,EAAE,IAAS;QACxC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;IACzC,CAAC;IAGD,KAAK,UAAU,QAAQ,CAAC,GAAQ,EAAE,IAAS;QACzC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;QAChD,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAA;QAClD,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;IAClD,CAAC;IAGD,KAAK,UAAU,UAAU,CAAC,IAAS,EAAE,IAAS;QAC5C,IAAI,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;QAE/B,IAAI,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAA;QAChC,IAAI,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAA;QACvC,IAAI,OAAO,GAAG,KAAK,CAAC,IAAI,CAAA;QACxB,2BAA2B;QAC3B,IAAI,UAAU,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAAA;QAElC,KAAK,CAAC,OAAO,GAAG;YACd,IAAI,EAAE;gBACJ,IAAI,EAAE,EAAE;gBACR,KAAK,EAAE,EAAE;gBACT,IAAI,EAAE,EAAE;aACT;SACF,CAAA;QAED,MAAM,SAAS,GAAG,IAAA,eAAI,EAAC,OAAO,EAAE;YAC9B,IAAI,EAAE,eAAI,CAAC,IAAI;YACf,MAAM,EAAE,eAAI,CAAC,MAAM;SACpB,CAAC,CAAA;QACF,KAAK,CAAC,IAAI,GAAG,SAAS,CAAA;QAEtB,KAAK,CAAC,GAAG,GAAG;YACV,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,IAAA,eAAI,EAAC,UAAU,EAAE;gBACxB,IAAI,EAAE,eAAI,CAAC,IAAI;gBACf,MAAM,EAAE,eAAI,CAAC,MAAM;gBACnB,IAAI,EAAE,CAAC,CAAM,EAAE,EAAE,CAAC,IAAA,eAAI,EAAC,CAAC,EAAE;oBACxB,MAAM,EAAE,eAAI,CAAC,MAAM;oBACnB,IAAI,EAAE,eAAI,CAAC,IAAI;oBACf,IAAI,EAAE,eAAI,CAAC,IAAI;iBAChB,CAAC;aACH,CAAC;SACH,CAAA;IACH,CAAC;AAEH,CAAC"} \ No newline at end of file +{"version":3,"file":"VxgBasicAdminPlugin.js","sourceRoot":"","sources":["../../src/lib/VxgBasicAdminPlugin.ts"],"names":[],"mappings":";;AAqGS,kDAAmB;AArG5B,yCAAuC;AAEvC,SAAS,mBAAmB;IAC1B,MAAM,MAAM,GAAG,IAAI,CAAA;IACnB,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC,KAAK,CAAA;IAEvC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,eAAI,CAAA;IAC/B,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,eAAI,CAAA;IAE/B,MAAM;SACH,OAAO,CAAC,iCAAiC,EAAE,UAAU,CAAC;SAEtD,OAAO,CACN,+BAA+B,EAC/B,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC,EAAE,EAC9C,QAAQ,CACT;SAEA,OAAO,CACN,uCAAuC,EACvC,EAAE,IAAI,EAAE,KAAK,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,EAClC,OAAO,CACR;SAEA,OAAO,CACN,yBAAyB,EACzB,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,EACpC,OAAO,CACR;SAEA,OAAO,CAAC,KAAK;QACZ,MAAM,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAA;IACxC,CAAC,CAAC,CAAA;IAEJ,KAAK,UAAU,OAAO,CAAE,GAAQ,EAAE,IAAS;QACzC,MAAM,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,MAAM,CACxC,CAAC,CAAM,EAAE,CAAM,EAAE,EAAE,CACjB,CAAC;YACD,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;YACrB,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAC7D,EAAE,CACH,CAAA;QACD,MAAM,IAAI,GAAG,QAAQ,GAAG,GAAG,CAAC,IAAI,GAAG,CAAC,CAAA;QACpC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;IACpB,CAAC;IAED,KAAK,UAAU,OAAO,CAAE,GAAQ,EAAE,IAAS;QACzC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;IACzC,CAAC;IAED,KAAK,UAAU,QAAQ,CAAE,GAAQ,EAAE,IAAS;QAC1C,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;QAChD,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAA;QAClD,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;IAClD,CAAC;IAED,KAAK,UAAU,UAAU,CAAE,IAAS,EAAE,IAAS;QAC7C,IAAI,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;QAE/B,IAAI,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAA;QAChC,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;QAC3B,IAAI,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAA;QACvC,IAAI,OAAO,GAAG,KAAK,CAAC,IAAI,CAAA;QACxB,2BAA2B;QAC3B,IAAI,UAAU,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAAA;QAElC,KAAK,CAAC,OAAO,GAAG;YACd,IAAI,EAAE;gBACJ,IAAI,EAAE,EAAE;gBACR,KAAK,EAAE,EAAE;gBACT,IAAI,EAAE,EAAE;aACT;SACF,CAAA;QAED,MAAM,SAAS,GAAG,IAAA,eAAI,EAAC,OAAO,EAAE;YAC9B,IAAI,EAAE,eAAI,CAAC,IAAI;YACf,MAAM,EAAE,eAAI,CAAC,MAAM;YACnB,KAAK,EAAE;gBACL,MAAM,EAAE,KAAK;gBACb,OAAO,EAAE,EAAE;gBACX,KAAK,EAAE,MAAM;aACd;SACF,CAAC,CAAA;QACF,KAAK,CAAC,IAAI,GAAG,SAAS,CAAA;QAEtB,KAAK,CAAC,GAAG,GAAG;YACV,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,IAAA,eAAI,EAAC,UAAU,EAAE;gBACxB,IAAI,EAAE,eAAI,CAAC,IAAI;gBACf,MAAM,EAAE,eAAI,CAAC,MAAM;gBACnB,IAAI,EAAE,CAAC,CAAM,EAAE,EAAE,CACf,IAAA,eAAI,EAAC,CAAC,EAAE;oBACN,MAAM,EAAE,eAAI,CAAC,MAAM;oBACnB,IAAI,EAAE,eAAI,CAAC,IAAI;oBACf,IAAI,EAAE,eAAI,CAAC,IAAI;iBAChB,CAAC;aACL,CAAC;SACH,CAAA;IACH,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/dist-plain/lib/VxgBasicEntityEditPlugin.d.ts b/dist-plain/lib/VxgBasicEntityEditPlugin.d.ts index 1c29b3f..7685cf5 100644 --- a/dist-plain/lib/VxgBasicEntityEditPlugin.d.ts +++ b/dist-plain/lib/VxgBasicEntityEditPlugin.d.ts @@ -6,6 +6,7 @@ declare function VxgBasicEntityEditPlugin(this: any, options: any): { fields: any; }; util: { + resolveMarks: (marks: any) => any; dateTimeFromUTC: (utc: number, tz?: string) => any; localTimeToUTC: (timeString: string, tz?: string) => number; localDateTimeToUTC: (dateOrDateTimeString: string, tz?: string) => number; diff --git a/dist-plain/lib/VxgBasicEntityEditPlugin.js b/dist-plain/lib/VxgBasicEntityEditPlugin.js index 374d99c..482a0f2 100644 --- a/dist-plain/lib/VxgBasicEntityEditPlugin.js +++ b/dist-plain/lib/VxgBasicEntityEditPlugin.js @@ -2,6 +2,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.VxgBasicEntityEditPlugin = VxgBasicEntityEditPlugin; const gubu_1 = require("gubu"); +const vxg_util_1 = require("./vxg-util"); const { Open, Child } = gubu_1.Gubu; const Shape = (0, gubu_1.Gubu)(Open({ name: String, @@ -14,11 +15,12 @@ function VxgBasicEntityEditPlugin(options) { const seneca = this; const spec = Shape(options.spec); const slot = spec.prefix + spec.name; + console.log('VxgBasicEntityEditPlugin', 'slot', slot, 'spec.name', spec.name); const fields = spec.order.reduce((a, fn) => (fixField(fn, spec.field[fn], spec), a.push(spec.field[fn]), a), []); for (const field of fields) { if ('Date' === field.ux.kind) { seneca - .add('aim:app,on:BasicLed,modify:edit,view:' + spec.name, async function modify_edit_Date(msg) { + .add('aim:app,on:BasicLed,modify:edit', { view: spec.name }, async function modify_edit_Date(msg) { const out = await this.prior(msg); let item = { ...out }; if (!item[field.name + '_orig$']) { @@ -40,7 +42,7 @@ function VxgBasicEntityEditPlugin(options) { } else if ('Time' === field.ux.kind) { seneca - .add('aim:app,on:BasicLed,modify:edit,view:' + spec.name, async function modify_edit_Time(msg) { + .add('aim:app,on:BasicLed,modify:edit', { view: spec.name }, async function modify_edit_Time(msg) { const out = await this.prior(msg); let item = { ...out }; if (!item[field.name + '_orig$']) { @@ -62,7 +64,7 @@ function VxgBasicEntityEditPlugin(options) { } else if ('DateTime' === field.ux.kind) { seneca - .add('aim:app,on:BasicLed,modify:edit,view:' + spec.name, async function modify_edit_Datetime(msg) { + .add('aim:app,on:BasicLed,modify:edit', { view: spec.name }, async function modify_edit_Datetime(msg) { const out = await this.prior(msg); let item = { ...out }; if (!item[field.name + '_orig$']) { @@ -83,21 +85,85 @@ function VxgBasicEntityEditPlugin(options) { } else if ('Slider' === field.ux.kind) { // console.log('VxgBasicEntityEditPlugin', 'Slider') - seneca - .add('aim:app,on:BasicLed,modify:edit', { view: spec.name }, async function modify_edit_Slider(msg) { + seneca.add('aim:app,on:BasicLed,modify:edit', { view: spec.name }, async function modify_edit_Slider(msg) { const out = await this.prior(msg); let item = { ...out }; if (!item[field.name + '_orig$']) { item[field.name + '_orig$'] = item[field.name]; - item[field.name] = Number(item[field.name]) / 60; + item[field.name + '_uival$'] = Number(item[field.name]) / 60; + item[field.name + '_marks$'] = util.resolveMarks(field.ux.props.marks); } - // return { ...msg, item } return item; - }) - .add('aim:app,on:BasicLed,modify:save', { view: spec.name }, async function modify_save_Slider(msg) { + }); + } + else if ('Select' === field.ux.kind) { + console.log('VxgBasicEntityEditPlugin', 'Select', field.name); + seneca.add('aim:app,on:BasicLed,modify:edit', { view: spec.name }, async function modify_edit_Select(msg) { + const out = await this.prior(msg); + let item = { ...out }; + if (!item[field.name + '_orig$']) { + item[field.name + '_orig$'] = item[field.name]; + item[field.name + '_default$'] = (0, vxg_util_1.resdefault)(field.cat, (val) => val); + item[field.name + '_cat$'] = Object.keys(field.cat.item).map((key) => { + var _a, _b; + return ({ + title: (_b = (_a = field.cat.item) === null || _a === void 0 ? void 0 : _a[key]) === null || _b === void 0 ? void 0 : _b.title, + key: key, + }); + }); + item[field.name + '_uival$'] = (0, vxg_util_1.resvalue)(item[field.name], field.cat, (val) => val); + } + return item; + }); + } + else if ('Autocomplete' === field.ux.kind) { + console.log('VxgBasicEntityEditPlugin', 'Autocomplete', field.name); + seneca.add('aim:app,on:BasicLed,modify:edit', { view: spec.name }, async function modify_edit_Autocomplete(msg) { const out = await this.prior(msg); let item = { ...out }; - item[field.name] = Number(item[field.name]) * 60; + if (!item[field.name + '_orig$']) { + item[field.name + '_orig$'] = item[field.name]; + item[field.name + '_default$'] = (0, vxg_util_1.resdefault)(field.cat, (val, item) => ({ + key: val, + title: item.title, + })); + item[field.name + '_cat$'] = Object.keys(field.cat.item).map((key) => { + var _a, _b; + return ({ + title: (_b = (_a = field.cat.item) === null || _a === void 0 ? void 0 : _a[key]) === null || _b === void 0 ? void 0 : _b.title, + key: key, + }); + }); + item[field.name + '_uival$'] = (0, vxg_util_1.resvalue)(item[field.name], field.cat, (val, item) => ({ + key: val, + title: item.title, + })); + } + // console.log('modify_edit_Autocomplete', item) + return item; + }); + } + else if ('RadioGroup' === field.ux.kind) { + console.log('VxgBasicEntityEditPlugin', 'RadioGroup', field.name); + seneca.add('aim:app,on:BasicLed,modify:edit', { view: spec.name }, async function modify_edit_RadioGroup(msg) { + const out = await this.prior(msg); + let item = { ...out }; + if (!item[field.name + '_orig$']) { + item[field.name + '_orig$'] = item[field.name]; + item[field.name + '_default$'] = field.cat.default; + item[field.name + '_cat$'] = Object.keys(field.cat.item).map((key) => { + var _a, _b; + return ({ + title: (_b = (_a = field.cat.item) === null || _a === void 0 ? void 0 : _a[key]) === null || _b === void 0 ? void 0 : _b.title, + key: key, + }); + }); + item[field.name + '_uival$'] = (0, vxg_util_1.resvalue)(item[field.name], field.cat, (val, item) => ({ + key: val, + title: item.title, + })); + } + // console.log('modify_edit_Autocomplete', item) return item; }); } @@ -121,6 +187,16 @@ function fixField(name, field, spec) { field.ux.size = null == field.ux.size ? 4 : parseInt(field.ux.size, 10); } const util = { + resolveMarks: (marks) => { + if (!marks || (typeof marks === 'object' && !Object.keys(marks).length)) + return false; + return typeof marks === 'object' + ? Object.entries(marks).map(([key, value]) => ({ + label: value, + value: +key, + })) + : marks; + }, dateTimeFromUTC: (utc, tz) => { const date = new Date(utc); const iso = date.toISOString(); diff --git a/dist-plain/lib/VxgBasicEntityEditPlugin.js.map b/dist-plain/lib/VxgBasicEntityEditPlugin.js.map index edbf6c3..1253eac 100644 --- a/dist-plain/lib/VxgBasicEntityEditPlugin.js.map +++ b/dist-plain/lib/VxgBasicEntityEditPlugin.js.map @@ -1 +1 @@ -{"version":3,"file":"VxgBasicEntityEditPlugin.js","sourceRoot":"","sources":["../../src/lib/VxgBasicEntityEditPlugin.ts"],"names":[],"mappings":";;AA6SS,4DAAwB;AA3SjC,+BAA2B;AAE3B,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,WAAI,CAAA;AAE5B,MAAM,KAAK,GAAG,IAAA,WAAI,EAChB,IAAI,CAAC;IACH,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,MAAM;IACd,GAAG,EAAE,MAAM;IACX,KAAK,EAAE,CAAC,MAAM,CAAC;IACf,KAAK,EAAE,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC;CACrB,CAAC,EACF,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAC5B,CAAA;AAED,SAAS,wBAAwB,CAAa,OAAY;IACxD,MAAM,MAAM,GAAG,IAAI,CAAA;IAEnB,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IAEhC,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,CAAA;IAEpC,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAC9B,CAAC,CAAM,EAAE,EAAO,EAAE,EAAE,CAAC,CACnB,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAC9D,EACD,EAAE,CACH,CAAA;IAED,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,MAAM,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;YAC7B,MAAM;iBACH,GAAG,CACF,uCAAuC,GAAG,IAAI,CAAC,IAAI,EACnD,KAAK,UAAU,gBAAgB,CAAa,GAAQ;gBAClD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,IAAI,GAAG,EAAE,GAAG,GAAG,EAAE,CAAA;gBAErB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,EAAE,CAAC;oBACjC,MAAM,EAAE,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;oBACjD,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;oBAC9C,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,CAAA;oBACnC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAA;oBAC5B,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;gBACnD,CAAC;gBAED,OAAO,IAAI,CAAA;YACb,CAAC,CACF;iBAEA,GAAG,CACF,iCAAiC,EACjC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EACnB,KAAK,UAAU,gBAAgB,CAAa,GAAQ;gBAClD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,IAAI,GAAG,EAAE,GAAG,GAAG,EAAE,CAAA;gBAErB,MAAM,EAAE,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;gBACpD,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAA;gBAErB,OAAO,IAAI,CAAA;YACb,CAAC,CACF,CAAA;QACL,CAAC;aAAM,IAAI,MAAM,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;YACpC,MAAM;iBACH,GAAG,CACF,uCAAuC,GAAG,IAAI,CAAC,IAAI,EACnD,KAAK,UAAU,gBAAgB,CAAa,GAAQ;gBAClD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,IAAI,GAAG,EAAE,GAAG,GAAG,EAAE,CAAA;gBAErB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,EAAE,CAAC;oBACjC,MAAM,EAAE,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;oBACjD,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;oBAC9C,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,CAAA;oBACnC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAA;oBAC5B,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;gBACnD,CAAC;gBAED,OAAO,IAAI,CAAA;YACb,CAAC,CACF;iBAEA,GAAG,CACF,iCAAiC,EACjC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EACnB,KAAK,UAAU,gBAAgB,CAAa,GAAQ;gBAClD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,IAAI,GAAG,EAAE,GAAG,GAAG,EAAE,CAAA;gBAErB,MAAM,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;gBAChD,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAA;gBAErB,OAAO,IAAI,CAAA;YACb,CAAC,CACF,CAAA;QACL,CAAC;aAAM,IAAI,UAAU,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;YACxC,MAAM;iBACH,GAAG,CACF,uCAAuC,GAAG,IAAI,CAAC,IAAI,EACnD,KAAK,UAAU,oBAAoB,CAAa,GAAQ;gBACtD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,IAAI,GAAG,EAAE,GAAG,GAAG,EAAE,CAAA;gBAErB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,EAAE,CAAC;oBACjC,MAAM,EAAE,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;oBACjD,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;oBAC9C,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,CAAA;oBACnC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,GAAG,GAAG,GAAG,EAAE,CAAC,MAAM,CAAA;gBAChD,CAAC;gBAED,OAAO,IAAI,CAAA;YACb,CAAC,CACF;iBAEA,GAAG,CACF,iCAAiC,EACjC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EACnB,KAAK,UAAU,oBAAoB,CAAa,GAAQ;gBACtD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,IAAI,GAAG,EAAE,GAAG,GAAG,EAAE,CAAA;gBAErB,MAAM,EAAE,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;gBACpD,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAA;gBAErB,OAAO,IAAI,CAAA;YACb,CAAC,CACF,CAAA;QACL,CAAC;aAAM,IAAI,QAAQ,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;YACtC,oDAAoD;YACpD,MAAM;iBACH,GAAG,CACF,iCAAiC,EACjC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EACnB,KAAK,UAAU,kBAAkB,CAAa,GAAQ;gBACpD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,IAAI,GAAG,EAAE,GAAG,GAAG,EAAE,CAAA;gBAErB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,EAAE,CAAC;oBACjC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;oBAC9C,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,CAAA;gBAClD,CAAC;gBAED,0BAA0B;gBAC1B,OAAO,IAAI,CAAA;YACb,CAAC,CACF;iBAEA,GAAG,CACF,iCAAiC,EACjC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EACnB,KAAK,UAAU,kBAAkB,CAAa,GAAQ;gBACpD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,IAAI,GAAG,EAAE,GAAG,GAAG,EAAE,CAAA;gBAErB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,CAAA;gBAEhD,OAAO,IAAI,CAAA;YACb,CAAC,CACF,CAAA;QACL,CAAC;IACH,CAAC;IAED,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;IAEvB,OAAO;QACL,OAAO,EAAE;YACP,MAAM,EAAE;gBACN,IAAI;gBACJ,IAAI;gBACJ,MAAM;aACP;YACD,IAAI;SACL;KACF,CAAA;AACH,CAAC;AAED,SAAS,QAAQ,CAAE,IAAY,EAAE,KAAU,EAAE,IAAS;IACpD,KAAK,CAAC,EAAE,GAAG,YAAY,GAAG,IAAI,CAAC,IAAI,GAAG,GAAG,GAAG,IAAI,CAAA;IAChD,KAAK,CAAC,IAAI,GAAG,IAAI,CAAA;IACjB,KAAK,CAAC,EAAE,GAAG,KAAK,CAAC,EAAE,IAAI,EAAE,CAAA;IACzB,KAAK,CAAC,EAAE,CAAC,IAAI,GAAG,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;AACzE,CAAC;AAED,MAAM,IAAI,GAAG;IACX,eAAe,EAAE,CAAC,GAAW,EAAE,EAAW,EAAE,EAAE;QAC5C,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,CAAA;QAC1B,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,EAAE,CAAA;QAC9B,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QAC9B,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QAE5C,uCAAuC;QACvC,MAAM,GAAG,GACP,IAAI,CAAC,WAAW,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI;YACnC,IAAI,CAAC,aAAa,EAAE,GAAG,EAAE,GAAG,IAAI;YAChC,IAAI,CAAC,aAAa,EAAE,GAAG,IAAI;YAC3B,IAAI,CAAC,kBAAkB,EAAE,CAAA;QAE3B,IAAI,GAAG,GAAQ;YACb,GAAG;YACH,IAAI;YACJ,IAAI;YACJ,IAAI;YACJ,GAAG;SACJ,CAAA;QAED,EAAE,GAAG,EAAE,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC,eAAe,EAAE,CAAC,QAAQ,CAAA;QAC3D,MAAM,aAAa,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE;YACrD,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,SAAS;YAChB,GAAG,EAAE,SAAS;SACf,CAAC,CAAA;QAEF,MAAM,aAAa,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE;YACrD,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,SAAS;YACf,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,KAAK;SACd,CAAC,CAAA;QAEF,MAAM,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,GAC3D,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;QACnC,MAAM,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,GAC/D,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;QAEnC,GAAG,CAAC,MAAM,GAAG,GAAG,IAAI,IAAI,KAAK,IAAI,GAAG,EAAE,CAAA;QACtC,GAAG,CAAC,MAAM,GAAG,GAAG,IAAI,IAAI,MAAM,IAAI,MAAM,EAAE,CAAA;QAE1C,OAAO,GAAG,CAAA;IACZ,CAAC;IACD,cAAc,EAAE,CAAC,UAAkB,EAAE,EAAW,EAAE,EAAE;QAClD,EAAE,GAAG,EAAE,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC,eAAe,EAAE,CAAC,QAAQ,CAAA;QAC3D,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAA;QAEtB,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;QAEnE,MAAM,SAAS,GAAG,IAAI,IAAI,CACxB,GAAG,CAAC,WAAW,EAAE,EACjB,GAAG,CAAC,QAAQ,EAAE,EACd,GAAG,CAAC,OAAO,EAAE,EACb,KAAK,EACL,OAAO,EACP,OAAO,CACR,CAAA;QAED,MAAM,YAAY,GAAG,IAAI,CAAC,GAAG,CAC3B,SAAS,CAAC,WAAW,EAAE,EACvB,SAAS,CAAC,QAAQ,EAAE,EACpB,SAAS,CAAC,OAAO,EAAE,EACnB,SAAS,CAAC,QAAQ,EAAE,EACpB,SAAS,CAAC,UAAU,EAAE,EACtB,SAAS,CAAC,UAAU,EAAE,CACvB,CAAA;QAED,MAAM,QAAQ,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,iBAAiB,EAAE,GAAG,KAAK,CAAA;QAEnE,OAAO,YAAY,GAAG,QAAQ,CAAA;IAChC,CAAC;IACD,kBAAkB,EAAE,CAAC,oBAA4B,EAAE,EAAW,EAAE,EAAE;QAChE,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,oBAAoB,CAAC,CAAA;QAE3C,6BAA6B;QAC7B,IAAI,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;YAC1B,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAA;QACpD,CAAC;QAED,6CAA6C;QAC7C,IAAI,EAAE,EAAE,CAAC;YACP,MAAM,MAAM,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC,CAAA;YACvE,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,EAAE,GAAG,MAAM,CAAC,OAAO,EAAE,CAAA;YAChD,OAAO,IAAI,CAAC,OAAO,EAAE,GAAG,MAAM,CAAA;QAChC,CAAC;QAED,wEAAwE;QACxE,OAAO,IAAI,CAAC,OAAO,EAAE,CAAA;IACvB,CAAC;CACF,CAAA;AAED,MAAM,CAAC,MAAM,CAAC,wBAAwB,EAAE;IACtC,QAAQ,EAAE;QACR,IAAI,EAAE,EAAE;QACR,SAAS,EAAE,QAAQ;KACpB;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,cAAc,CAAC,wBAAwB,EAAE,MAAM,EAAE;IACtD,KAAK,EAAE,0BAA0B;CAClC,CAAC,CAAA"} \ No newline at end of file +{"version":3,"file":"VxgBasicEntityEditPlugin.js","sourceRoot":"","sources":["../../src/lib/VxgBasicEntityEditPlugin.ts"],"names":[],"mappings":";;AA6ZS,4DAAwB;AA3ZjC,+BAA2B;AAC3B,yCAAiD;AAEjD,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,WAAI,CAAA;AAE5B,MAAM,KAAK,GAAG,IAAA,WAAI,EAChB,IAAI,CAAC;IACH,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,MAAM;IACd,GAAG,EAAE,MAAM;IACX,KAAK,EAAE,CAAC,MAAM,CAAC;IACf,KAAK,EAAE,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC;CACrB,CAAC,EACF,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAC5B,CAAA;AAED,SAAS,wBAAwB,CAAa,OAAY;IACxD,MAAM,MAAM,GAAG,IAAI,CAAA;IAEnB,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IAEhC,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,CAAA;IAEpC,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;IAE7E,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAC9B,CAAC,CAAM,EAAE,EAAO,EAAE,EAAE,CAAC,CACnB,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAC9D,EACD,EAAE,CACH,CAAA;IAED,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,MAAM,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;YAC7B,MAAM;iBACH,GAAG,CACF,iCAAiC,EACjC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EACnB,KAAK,UAAU,gBAAgB,CAAa,GAAQ;gBAClD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,IAAI,GAAG,EAAE,GAAG,GAAG,EAAE,CAAA;gBAErB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,EAAE,CAAC;oBACjC,MAAM,EAAE,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;oBACjD,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;oBAC9C,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,CAAA;oBACnC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAA;oBAC5B,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;gBACnD,CAAC;gBAED,OAAO,IAAI,CAAA;YACb,CAAC,CACF;iBAEA,GAAG,CACF,iCAAiC,EACjC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EACnB,KAAK,UAAU,gBAAgB,CAAa,GAAQ;gBAClD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,IAAI,GAAG,EAAE,GAAG,GAAG,EAAE,CAAA;gBAErB,MAAM,EAAE,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;gBACpD,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAA;gBAErB,OAAO,IAAI,CAAA;YACb,CAAC,CACF,CAAA;QACL,CAAC;aAAM,IAAI,MAAM,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;YACpC,MAAM;iBACH,GAAG,CACF,iCAAiC,EACjC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EACnB,KAAK,UAAU,gBAAgB,CAAa,GAAQ;gBAClD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,IAAI,GAAG,EAAE,GAAG,GAAG,EAAE,CAAA;gBAErB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,EAAE,CAAC;oBACjC,MAAM,EAAE,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;oBACjD,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;oBAC9C,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,CAAA;oBACnC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAA;oBAC5B,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;gBACnD,CAAC;gBAED,OAAO,IAAI,CAAA;YACb,CAAC,CACF;iBAEA,GAAG,CACF,iCAAiC,EACjC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EACnB,KAAK,UAAU,gBAAgB,CAAa,GAAQ;gBAClD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,IAAI,GAAG,EAAE,GAAG,GAAG,EAAE,CAAA;gBAErB,MAAM,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;gBAChD,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAA;gBAErB,OAAO,IAAI,CAAA;YACb,CAAC,CACF,CAAA;QACL,CAAC;aAAM,IAAI,UAAU,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;YACxC,MAAM;iBACH,GAAG,CACF,iCAAiC,EACjC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EACnB,KAAK,UAAU,oBAAoB,CAAa,GAAQ;gBACtD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,IAAI,GAAG,EAAE,GAAG,GAAG,EAAE,CAAA;gBAErB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,EAAE,CAAC;oBACjC,MAAM,EAAE,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;oBACjD,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;oBAC9C,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,CAAA;oBACnC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,GAAG,GAAG,GAAG,EAAE,CAAC,MAAM,CAAA;gBAChD,CAAC;gBAED,OAAO,IAAI,CAAA;YACb,CAAC,CACF;iBAEA,GAAG,CACF,iCAAiC,EACjC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EACnB,KAAK,UAAU,oBAAoB,CAAa,GAAQ;gBACtD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,IAAI,GAAG,EAAE,GAAG,GAAG,EAAE,CAAA;gBAErB,MAAM,EAAE,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;gBACpD,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAA;gBAErB,OAAO,IAAI,CAAA;YACb,CAAC,CACF,CAAA;QACL,CAAC;aAAM,IAAI,QAAQ,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;YACtC,oDAAoD;YACpD,MAAM,CAAC,GAAG,CACR,iCAAiC,EACjC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EACnB,KAAK,UAAU,kBAAkB,CAAa,GAAQ;gBACpD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,IAAI,GAAG,EAAE,GAAG,GAAG,EAAE,CAAA;gBAErB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,EAAE,CAAC;oBACjC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;oBAC9C,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,SAAS,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,CAAA;oBAC5D,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,SAAS,CAAC,GAAG,IAAI,CAAC,YAAY,CAC9C,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CACrB,CAAA;gBACH,CAAC;gBAED,OAAO,IAAI,CAAA;YACb,CAAC,CACF,CAAA;QACH,CAAC;aAAM,IAAI,QAAQ,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;YACtC,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC,CAAA;YAC7D,MAAM,CAAC,GAAG,CACR,iCAAiC,EACjC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EACnB,KAAK,UAAU,kBAAkB,CAAa,GAAQ;gBACpD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,IAAI,GAAG,EAAE,GAAG,GAAG,EAAE,CAAA;gBAErB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,EAAE,CAAC;oBACjC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;oBAC9C,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,WAAW,CAAC,GAAG,IAAA,qBAAU,EACzC,KAAK,CAAC,GAAG,EACT,CAAC,GAAW,EAAE,EAAE,CAAC,GAAG,CACrB,CAAA;oBACD,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,CAC1D,CAAC,GAAG,EAAE,EAAE;;wBAAC,OAAA,CAAC;4BACR,KAAK,EAAE,MAAA,MAAA,KAAK,CAAC,GAAG,CAAC,IAAI,0CAAG,GAAG,CAAC,0CAAE,KAAK;4BACnC,GAAG,EAAE,GAAG;yBACT,CAAC,CAAA;qBAAA,CACH,CAAA;oBACD,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,SAAS,CAAC,GAAG,IAAA,mBAAQ,EACrC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAChB,KAAK,CAAC,GAAG,EACT,CAAC,GAAW,EAAE,EAAE,CAAC,GAAG,CACrB,CAAA;gBACH,CAAC;gBAED,OAAO,IAAI,CAAA;YACb,CAAC,CACF,CAAA;QACH,CAAC;aAAM,IAAI,cAAc,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;YAC5C,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE,cAAc,EAAE,KAAK,CAAC,IAAI,CAAC,CAAA;YACnE,MAAM,CAAC,GAAG,CACR,iCAAiC,EACjC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EACnB,KAAK,UAAU,wBAAwB,CAAa,GAAQ;gBAC1D,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,IAAI,GAAG,EAAE,GAAG,GAAG,EAAE,CAAA;gBAErB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,EAAE,CAAC;oBACjC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;oBAC9C,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,WAAW,CAAC,GAAG,IAAA,qBAAU,EACzC,KAAK,CAAC,GAAG,EACT,CAAC,GAAW,EAAE,IAAuB,EAAE,EAAE,CAAC,CAAC;wBACzC,GAAG,EAAE,GAAG;wBACR,KAAK,EAAE,IAAI,CAAC,KAAK;qBAClB,CAAC,CACH,CAAA;oBACD,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,CAC1D,CAAC,GAAG,EAAE,EAAE;;wBAAC,OAAA,CAAC;4BACR,KAAK,EAAE,MAAA,MAAA,KAAK,CAAC,GAAG,CAAC,IAAI,0CAAG,GAAG,CAAC,0CAAE,KAAK;4BACnC,GAAG,EAAE,GAAG;yBACT,CAAC,CAAA;qBAAA,CACH,CAAA;oBACD,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,SAAS,CAAC,GAAG,IAAA,mBAAQ,EACrC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAChB,KAAK,CAAC,GAAG,EACT,CAAC,GAAW,EAAE,IAAuB,EAAE,EAAE,CAAC,CAAC;wBACzC,GAAG,EAAE,GAAG;wBACR,KAAK,EAAE,IAAI,CAAC,KAAK;qBAClB,CAAC,CACH,CAAA;gBACH,CAAC;gBAED,gDAAgD;gBAEhD,OAAO,IAAI,CAAA;YACb,CAAC,CACF,CAAA;QACH,CAAC;aAAM,IAAI,YAAY,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;YAC1C,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE,YAAY,EAAE,KAAK,CAAC,IAAI,CAAC,CAAA;YACjE,MAAM,CAAC,GAAG,CACR,iCAAiC,EACjC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EACnB,KAAK,UAAU,sBAAsB,CAAa,GAAQ;gBACxD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAEjC,IAAI,IAAI,GAAG,EAAE,GAAG,GAAG,EAAE,CAAA;gBAErB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,EAAE,CAAC;oBACjC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;oBAE9C,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,WAAW,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAAA;oBAElD,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,CAC1D,CAAC,GAAG,EAAE,EAAE;;wBAAC,OAAA,CAAC;4BACR,KAAK,EAAE,MAAA,MAAA,KAAK,CAAC,GAAG,CAAC,IAAI,0CAAG,GAAG,CAAC,0CAAE,KAAK;4BACnC,GAAG,EAAE,GAAG;yBACT,CAAC,CAAA;qBAAA,CACH,CAAA;oBAED,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,SAAS,CAAC,GAAG,IAAA,mBAAQ,EACrC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAChB,KAAK,CAAC,GAAG,EACT,CAAC,GAAW,EAAE,IAAuB,EAAE,EAAE,CAAC,CAAC;wBACzC,GAAG,EAAE,GAAG;wBACR,KAAK,EAAE,IAAI,CAAC,KAAK;qBAClB,CAAC,CACH,CAAA;gBACH,CAAC;gBAED,gDAAgD;gBAEhD,OAAO,IAAI,CAAA;YACb,CAAC,CACF,CAAA;QACH,CAAC;IACH,CAAC;IAED,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;IAEvB,OAAO;QACL,OAAO,EAAE;YACP,MAAM,EAAE;gBACN,IAAI;gBACJ,IAAI;gBACJ,MAAM;aACP;YACD,IAAI;SACL;KACF,CAAA;AACH,CAAC;AAED,SAAS,QAAQ,CAAE,IAAY,EAAE,KAAU,EAAE,IAAS;IACpD,KAAK,CAAC,EAAE,GAAG,YAAY,GAAG,IAAI,CAAC,IAAI,GAAG,GAAG,GAAG,IAAI,CAAA;IAChD,KAAK,CAAC,IAAI,GAAG,IAAI,CAAA;IACjB,KAAK,CAAC,EAAE,GAAG,KAAK,CAAC,EAAE,IAAI,EAAE,CAAA;IACzB,KAAK,CAAC,EAAE,CAAC,IAAI,GAAG,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;AACzE,CAAC;AAED,MAAM,IAAI,GAAG;IACX,YAAY,EAAE,CAAC,KAAU,EAAE,EAAE;QAC3B,IAAI,CAAC,KAAK,IAAI,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC;YACrE,OAAO,KAAK,CAAA;QACd,OAAO,OAAO,KAAK,KAAK,QAAQ;YAC9B,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;gBAC3C,KAAK,EAAE,KAAK;gBACZ,KAAK,EAAE,CAAC,GAAG;aACZ,CAAC,CAAC;YACL,CAAC,CAAC,KAAK,CAAA;IACX,CAAC;IACD,eAAe,EAAE,CAAC,GAAW,EAAE,EAAW,EAAE,EAAE;QAC5C,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,CAAA;QAC1B,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,EAAE,CAAA;QAC9B,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QAC9B,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QAE5C,uCAAuC;QACvC,MAAM,GAAG,GACP,IAAI,CAAC,WAAW,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI;YACnC,IAAI,CAAC,aAAa,EAAE,GAAG,EAAE,GAAG,IAAI;YAChC,IAAI,CAAC,aAAa,EAAE,GAAG,IAAI;YAC3B,IAAI,CAAC,kBAAkB,EAAE,CAAA;QAE3B,IAAI,GAAG,GAAQ;YACb,GAAG;YACH,IAAI;YACJ,IAAI;YACJ,IAAI;YACJ,GAAG;SACJ,CAAA;QAED,EAAE,GAAG,EAAE,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC,eAAe,EAAE,CAAC,QAAQ,CAAA;QAC3D,MAAM,aAAa,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE;YACrD,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,SAAS;YAChB,GAAG,EAAE,SAAS;SACf,CAAC,CAAA;QAEF,MAAM,aAAa,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE;YACrD,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,SAAS;YACf,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,KAAK;SACd,CAAC,CAAA;QAEF,MAAM,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,GAC3D,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;QACnC,MAAM,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,AAAD,EAAG,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,GAC/D,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;QAEnC,GAAG,CAAC,MAAM,GAAG,GAAG,IAAI,IAAI,KAAK,IAAI,GAAG,EAAE,CAAA;QACtC,GAAG,CAAC,MAAM,GAAG,GAAG,IAAI,IAAI,MAAM,IAAI,MAAM,EAAE,CAAA;QAE1C,OAAO,GAAG,CAAA;IACZ,CAAC;IACD,cAAc,EAAE,CAAC,UAAkB,EAAE,EAAW,EAAE,EAAE;QAClD,EAAE,GAAG,EAAE,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC,eAAe,EAAE,CAAC,QAAQ,CAAA;QAC3D,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAA;QAEtB,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;QAEnE,MAAM,SAAS,GAAG,IAAI,IAAI,CACxB,GAAG,CAAC,WAAW,EAAE,EACjB,GAAG,CAAC,QAAQ,EAAE,EACd,GAAG,CAAC,OAAO,EAAE,EACb,KAAK,EACL,OAAO,EACP,OAAO,CACR,CAAA;QAED,MAAM,YAAY,GAAG,IAAI,CAAC,GAAG,CAC3B,SAAS,CAAC,WAAW,EAAE,EACvB,SAAS,CAAC,QAAQ,EAAE,EACpB,SAAS,CAAC,OAAO,EAAE,EACnB,SAAS,CAAC,QAAQ,EAAE,EACpB,SAAS,CAAC,UAAU,EAAE,EACtB,SAAS,CAAC,UAAU,EAAE,CACvB,CAAA;QAED,MAAM,QAAQ,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,iBAAiB,EAAE,GAAG,KAAK,CAAA;QAEnE,OAAO,YAAY,GAAG,QAAQ,CAAA;IAChC,CAAC;IACD,kBAAkB,EAAE,CAAC,oBAA4B,EAAE,EAAW,EAAE,EAAE;QAChE,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,oBAAoB,CAAC,CAAA;QAE3C,6BAA6B;QAC7B,IAAI,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;YAC1B,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAA;QACpD,CAAC;QAED,6CAA6C;QAC7C,IAAI,EAAE,EAAE,CAAC;YACP,MAAM,MAAM,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC,CAAA;YACvE,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,EAAE,GAAG,MAAM,CAAC,OAAO,EAAE,CAAA;YAChD,OAAO,IAAI,CAAC,OAAO,EAAE,GAAG,MAAM,CAAA;QAChC,CAAC;QAED,wEAAwE;QACxE,OAAO,IAAI,CAAC,OAAO,EAAE,CAAA;IACvB,CAAC;CACF,CAAA;AAED,MAAM,CAAC,MAAM,CAAC,wBAAwB,EAAE;IACtC,QAAQ,EAAE;QACR,IAAI,EAAE,EAAE;QACR,SAAS,EAAE,QAAQ;KACpB;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,cAAc,CAAC,wBAAwB,EAAE,MAAM,EAAE;IACtD,KAAK,EAAE,0BAA0B;CAClC,CAAC,CAAA"} \ No newline at end of file diff --git a/dist-plain/lib/VxgBasicEntityFieldPlugin.js.map b/dist-plain/lib/VxgBasicEntityFieldPlugin.js.map index 7b4f982..35219ae 100644 --- a/dist-plain/lib/VxgBasicEntityFieldPlugin.js.map +++ b/dist-plain/lib/VxgBasicEntityFieldPlugin.js.map @@ -1 +1 @@ -{"version":3,"file":"VxgBasicEntityFieldPlugin.js","sourceRoot":"","sources":["../../src/lib/VxgBasicEntityFieldPlugin.ts"],"names":[],"mappings":";;AAsCS,8DAAyB;AApClC,+BAA2B;AAE3B,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,WAAI,CAAA;AAE5B,MAAM,KAAK,GAAG,IAAA,WAAI,EAChB,IAAI,CAAC;IACH,KAAK,EAAE,EAAE;CACV,CAAC,EACF,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAC7B,CAAA;AAED,SAAS,yBAAyB,CAAa,OAAY;IACzD,MAAM,MAAM,GAAG,IAAI,CAAA;IAEnB,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IAEhC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;IAEvB,OAAO;QACL,OAAO,EAAE;YACP,MAAM,EAAE,EAAE;SACX;KACF,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,CAAC,yBAAyB,EAAE;IACvC,QAAQ,EAAE;QACR,IAAI,EAAE,EAAE;QACR,SAAS,EAAE,QAAQ;KACpB;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,cAAc,CAAC,yBAAyB,EAAE,MAAM,EAAE;IACvD,KAAK,EAAE,2BAA2B;CACnC,CAAC,CAAA"} \ No newline at end of file +{"version":3,"file":"VxgBasicEntityFieldPlugin.js","sourceRoot":"","sources":["../../src/lib/VxgBasicEntityFieldPlugin.ts"],"names":[],"mappings":";;AAoCS,8DAAyB;AApClC,+BAA2B;AAE3B,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,WAAI,CAAA;AAE5B,MAAM,KAAK,GAAG,IAAA,WAAI,EAChB,IAAI,CAAC;IACH,KAAK,EAAE,EAAE;CACV,CAAC,EACF,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAC7B,CAAA;AAED,SAAS,yBAAyB,CAAa,OAAY;IACzD,MAAM,MAAM,GAAG,IAAI,CAAA;IAEnB,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IAEhC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;IAEvB,OAAO;QACL,OAAO,EAAE;YACP,MAAM,EAAE,EAAE;SACX;KACF,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,CAAC,yBAAyB,EAAE;IACvC,QAAQ,EAAE;QACR,IAAI,EAAE,EAAE;QACR,SAAS,EAAE,QAAQ;KACpB;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,cAAc,CAAC,yBAAyB,EAAE,MAAM,EAAE;IACvD,KAAK,EAAE,2BAA2B;CACnC,CAAC,CAAA"} \ No newline at end of file diff --git a/dist-plain/lib/VxgBasicLedPlugin.js b/dist-plain/lib/VxgBasicLedPlugin.js index 5d25de6..ad089bb 100644 --- a/dist-plain/lib/VxgBasicLedPlugin.js +++ b/dist-plain/lib/VxgBasicLedPlugin.js @@ -94,10 +94,13 @@ function VxgBasicLedPlugin(options) { await seneca.entity(entCanon).save$({ add$: true, slot$: slotName }); navigate('/view/' + name + '/add'); }) - .message('aim:app,on:BasicLed,save:item', async function (msg) { + .message('aim:app,on:BasicLed,save:item', async function (msg, meta) { const data = Object.entries(spec.def.edit.field) .filter((n) => false !== n[1].ux.edit) .reduce((a, n) => ((a[n[0]] = msg.data[n[0]]), a), {}); + // const state = meta.custom.state() + // let view = state.view[name] + // view.alert = { active: true, message: 'Saved', level: 'success' } const item = await seneca.entity(entCanon).save$(data); navigate('/view/' + name + '/edit/' + item.id); }); diff --git a/dist-plain/lib/VxgBasicLedPlugin.js.map b/dist-plain/lib/VxgBasicLedPlugin.js.map index e8cff50..342b418 100644 --- a/dist-plain/lib/VxgBasicLedPlugin.js.map +++ b/dist-plain/lib/VxgBasicLedPlugin.js.map @@ -1 +1 @@ -{"version":3,"file":"VxgBasicLedPlugin.js","sourceRoot":"","sources":["../../src/lib/VxgBasicLedPlugin.ts"],"names":[],"mappings":";;AA2MS,8CAAiB;AAzM1B,+BAA2B;AAE3B,MAAM,EAAE,IAAI,EAAE,GAAG,WAAI,CAAA;AAErB,MAAM,KAAK,GAAG,IAAA,WAAI,EAChB;IACE,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,OAAO;IACf,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE;QACH,GAAG,EAAE,MAAM;QACX,IAAI,EAAE,IAAI,CAAC;YACT,MAAM,EAAE,KAAK;SACd,CAAC;QACF,IAAI,EAAE,IAAI,CAAC;YACT,MAAM,EAAE,KAAK;SACd,CAAC;QACF,IAAI,EAAE,IAAI,CAAC;YACT,MAAM,EAAE,KAAK;SACd,CAAC;QACF,IAAI,EAAE,IAAI,CAAC;YACT,MAAM,EAAE,KAAK;SACd,CAAC;KACH;CACF,EACD,EAAE,IAAI,EAAE,UAAU,EAAE,CACrB,CAAA;AAED,SAAS,iBAAiB,CAAa,OAAY;IACjD,MAAM,MAAM,GAAG,IAAI,CAAA;IAEnB,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IAChC,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAA;IAEjC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAA;IACtB,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAA;IAC7B,MAAM,QAAQ,GAAG,WAAW,GAAG,IAAI,CAAA;IAEnC,yDAAyD;IAEzD,MAAM;SACH,GAAG,CAAC,aAAa,CAAC;SAElB,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;SAEnB,GAAG,CACF,wCAAwC,EACxC,UAAqB,IAAS,EAAE,KAAU,EAAE,IAAS;QACnD,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;QACjC,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAE3B,IAAI,CAAC,IAAI,GAAG,MAAM,CAAA;QAClB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA;QAEjB,IAAI,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;QACnD,KAAK,EAAE,CAAA;IACT,CAAC,CACF;SAEA,GAAG,CACF,4CAA4C,EAC5C,UAAqB,GAAQ,EAAE,KAAU,EAAE,IAAS;QAClD,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAA;QAC7B,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAE3C,IAAI,CAAC,IAAI,GAAG,MAAM,CAAA;QAClB,IAAI,CAAC,MAAM,GAAG,WAAW,CAAA;QAEzB,QAAQ,CAAC,IAAI,CAAC,CAAA;QACd,KAAK,EAAE,CAAA;IACT,CAAC,CACF;SAEA,GAAG,CACF,4CAA4C,EAC5C,UAAU,GAAQ,EAAE,KAAU,EAAE,IAAS;QACvC,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAA;QAE7B,wBAAwB;QACxB,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3C,IAAI,CAAC,IAAI,GAAG,MAAM,CAAA;QAClB,IAAI,CAAC,MAAM,GAAG,WAAW,CAAA;QAEzB,QAAQ,CAAC,IAAI,CAAC,CAAA;QACd,KAAK,EAAE,CAAA;IACT,CAAC,CACF;SAEA,GAAG,CAAC,iCAAiC,EAAE,SAAS,WAAW,CAAE,GAAQ;QACpE,IAAI,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;QACnB,0BAA0B;QAE1B,IAAI,IAAI,IAAI,IAAI;YAAE,OAAO,IAAI,CAAA;QAE7B,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,CAAA;QAElB,OAAO,IAAI,CAAA;IACb,CAAC,CAAC;SAED,GAAG,CAAC,iCAAiC,EAAE,SAAS,WAAW,CAAE,GAAQ;QACpE,IAAI,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;QAEnB,IAAI,IAAI,IAAI,IAAI;YAAE,OAAO,IAAI,CAAA;QAE7B,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,CAAA;QAElB,OAAO,IAAI,CAAA;IACb,CAAC,CAAC;SAED,OAAO,CACN,2CAA2C,EAC3C,EAAE,OAAO,EAAE,MAAM,EAAE,EACnB,KAAK,WAAsB,GAAQ,EAAE,IAAS;QAC5C,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;QACjC,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3B,MAAM,EAAE,OAAO,EAAE,GAAG,GAAG,CAAA;QACvB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAA;QAClB,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QAEhD,QAAQ,CAAC,QAAQ,GAAG,IAAI,GAAG,QAAQ,GAAG,OAAO,CAAC,CAAA;QAC9C,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC;YAC7C,EAAE,EAAE,GAAG,CAAC,OAAO;YACf,KAAK,EAAE,QAAQ;YACf,OAAO;SACR,CAAC,CAAA;QAEF,OAAO,IAAI,CAAA;IACb,CAAC,CACF;SAEA,OAAO,CACN,8BAA8B,EAC9B,KAAK,WAAsB,IAAS;QAClC,MAAM,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAA;QACpE,QAAQ,CAAC,QAAQ,GAAG,IAAI,GAAG,MAAM,CAAC,CAAA;IACpC,CAAC,CACF;SAEA,OAAO,CACN,+BAA+B,EAC/B,KAAK,WAAsB,GAAQ;QACjC,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;aAC7C,MAAM,CAAC,CAAC,CAAQ,EAAE,EAAE,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC;aAC5C,MAAM,CAAC,CAAC,CAAM,EAAE,CAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;QAEpE,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QACtD,QAAQ,CAAC,QAAQ,GAAG,IAAI,GAAG,QAAQ,GAAG,IAAI,CAAC,EAAE,CAAC,CAAA;IAChD,CAAC,CACF,CAAA;IAEH,MAAM,CAAC,OAAO,CAAC,KAAK;QAClB,IAAI,CAAC,GAAG,CAAC,yCAAyC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAA;IACrE,CAAC,CAAC,CAAA;IAEF,MAAM,UAAU,GAAG;QACjB,IAAI;QACJ,GAAG,EAAE,QAAQ;QACb,MAAM,EAAE,WAAW;KACpB,CAAA;IAED,MAAM,QAAQ,GAAG;QACf,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI;QAChB,GAAG,UAAU;KACd,CAAA;IAED,MAAM,QAAQ,GAAG;QACf,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI;QAChB,GAAG,UAAU;KACd,CAAA;IAED,MAAM,QAAQ,GAAG;QACf,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI;QAChB,GAAG,UAAU;KACd,CAAA;IAED,MAAM,QAAQ,GAAG;QACf,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI;QAChB,GAAG,UAAU;KACd,CAAA;IAED,OAAO;QACL,OAAO,EAAE;YACP,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;aACf;SACF;KACF,CAAA;AACH,CAAC;AAED,iBAAiB,CAAC,QAAQ,GAAG;IAC3B,IAAI,EAAE,EAAE;IACR,QAAQ,EAAE,QAAQ;CACnB,CAAA;AAED,MAAM,CAAC,cAAc,CAAC,iBAAiB,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,CAAC,CAAA"} \ No newline at end of file +{"version":3,"file":"VxgBasicLedPlugin.js","sourceRoot":"","sources":["../../src/lib/VxgBasicLedPlugin.ts"],"names":[],"mappings":";;AA+MS,8CAAiB;AA7M1B,+BAA2B;AAE3B,MAAM,EAAE,IAAI,EAAE,GAAG,WAAI,CAAA;AAErB,MAAM,KAAK,GAAG,IAAA,WAAI,EAChB;IACE,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,OAAO;IACf,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE;QACH,GAAG,EAAE,MAAM;QACX,IAAI,EAAE,IAAI,CAAC;YACT,MAAM,EAAE,KAAK;SACd,CAAC;QACF,IAAI,EAAE,IAAI,CAAC;YACT,MAAM,EAAE,KAAK;SACd,CAAC;QACF,IAAI,EAAE,IAAI,CAAC;YACT,MAAM,EAAE,KAAK;SACd,CAAC;QACF,IAAI,EAAE,IAAI,CAAC;YACT,MAAM,EAAE,KAAK;SACd,CAAC;KACH;CACF,EACD,EAAE,IAAI,EAAE,UAAU,EAAE,CACrB,CAAA;AAED,SAAS,iBAAiB,CAAa,OAAY;IACjD,MAAM,MAAM,GAAG,IAAI,CAAA;IAEnB,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IAChC,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAA;IAEjC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAA;IACtB,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAA;IAC7B,MAAM,QAAQ,GAAG,WAAW,GAAG,IAAI,CAAA;IAEnC,yDAAyD;IAEzD,MAAM;SACH,GAAG,CAAC,aAAa,CAAC;SAElB,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;SAEnB,GAAG,CACF,wCAAwC,EACxC,UAAqB,IAAS,EAAE,KAAU,EAAE,IAAS;QACnD,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;QACjC,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAE3B,IAAI,CAAC,IAAI,GAAG,MAAM,CAAA;QAClB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA;QAEjB,IAAI,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;QACnD,KAAK,EAAE,CAAA;IACT,CAAC,CACF;SAEA,GAAG,CACF,4CAA4C,EAC5C,UAAqB,GAAQ,EAAE,KAAU,EAAE,IAAS;QAClD,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAA;QAC7B,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAE3C,IAAI,CAAC,IAAI,GAAG,MAAM,CAAA;QAClB,IAAI,CAAC,MAAM,GAAG,WAAW,CAAA;QAEzB,QAAQ,CAAC,IAAI,CAAC,CAAA;QACd,KAAK,EAAE,CAAA;IACT,CAAC,CACF;SAEA,GAAG,CACF,4CAA4C,EAC5C,UAAU,GAAQ,EAAE,KAAU,EAAE,IAAS;QACvC,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAA;QAE7B,wBAAwB;QACxB,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3C,IAAI,CAAC,IAAI,GAAG,MAAM,CAAA;QAClB,IAAI,CAAC,MAAM,GAAG,WAAW,CAAA;QAEzB,QAAQ,CAAC,IAAI,CAAC,CAAA;QACd,KAAK,EAAE,CAAA;IACT,CAAC,CACF;SAEA,GAAG,CAAC,iCAAiC,EAAE,SAAS,WAAW,CAAE,GAAQ;QACpE,IAAI,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;QACnB,0BAA0B;QAE1B,IAAI,IAAI,IAAI,IAAI;YAAE,OAAO,IAAI,CAAA;QAE7B,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,CAAA;QAElB,OAAO,IAAI,CAAA;IACb,CAAC,CAAC;SAED,GAAG,CAAC,iCAAiC,EAAE,SAAS,WAAW,CAAE,GAAQ;QACpE,IAAI,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;QAEnB,IAAI,IAAI,IAAI,IAAI;YAAE,OAAO,IAAI,CAAA;QAE7B,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,CAAA;QAElB,OAAO,IAAI,CAAA;IACb,CAAC,CAAC;SAED,OAAO,CACN,2CAA2C,EAC3C,EAAE,OAAO,EAAE,MAAM,EAAE,EACnB,KAAK,WAAsB,GAAQ,EAAE,IAAS;QAC5C,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;QACjC,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3B,MAAM,EAAE,OAAO,EAAE,GAAG,GAAG,CAAA;QACvB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAA;QAClB,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QAEhD,QAAQ,CAAC,QAAQ,GAAG,IAAI,GAAG,QAAQ,GAAG,OAAO,CAAC,CAAA;QAC9C,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC;YAC7C,EAAE,EAAE,GAAG,CAAC,OAAO;YACf,KAAK,EAAE,QAAQ;YACf,OAAO;SACR,CAAC,CAAA;QAEF,OAAO,IAAI,CAAA;IACb,CAAC,CACF;SAEA,OAAO,CACN,8BAA8B,EAC9B,KAAK,WAAsB,IAAS;QAClC,MAAM,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAA;QACpE,QAAQ,CAAC,QAAQ,GAAG,IAAI,GAAG,MAAM,CAAC,CAAA;IACpC,CAAC,CACF;SAEA,OAAO,CACN,+BAA+B,EAC/B,KAAK,WAAsB,GAAQ,EAAE,IAAS;QAC5C,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;aAC7C,MAAM,CAAC,CAAC,CAAQ,EAAE,EAAE,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC;aAC5C,MAAM,CAAC,CAAC,CAAM,EAAE,CAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;QAEpE,oCAAoC;QACpC,8BAA8B;QAC9B,oEAAoE;QAEpE,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QACtD,QAAQ,CAAC,QAAQ,GAAG,IAAI,GAAG,QAAQ,GAAG,IAAI,CAAC,EAAE,CAAC,CAAA;IAChD,CAAC,CACF,CAAA;IAEH,MAAM,CAAC,OAAO,CAAC,KAAK;QAClB,IAAI,CAAC,GAAG,CAAC,yCAAyC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAA;IACrE,CAAC,CAAC,CAAA;IAEF,MAAM,UAAU,GAAG;QACjB,IAAI;QACJ,GAAG,EAAE,QAAQ;QACb,MAAM,EAAE,WAAW;KACpB,CAAA;IAED,MAAM,QAAQ,GAAG;QACf,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI;QAChB,GAAG,UAAU;KACd,CAAA;IAED,MAAM,QAAQ,GAAG;QACf,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI;QAChB,GAAG,UAAU;KACd,CAAA;IAED,MAAM,QAAQ,GAAG;QACf,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI;QAChB,GAAG,UAAU;KACd,CAAA;IAED,MAAM,QAAQ,GAAG;QACf,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI;QAChB,GAAG,UAAU;KACd,CAAA;IAED,OAAO;QACL,OAAO,EAAE;YACP,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;aACf;SACF;KACF,CAAA;AACH,CAAC;AAED,iBAAiB,CAAC,QAAQ,GAAG;IAC3B,IAAI,EAAE,EAAE;IACR,QAAQ,EAAE,QAAQ;CACnB,CAAA;AAED,MAAM,CAAC,cAAc,CAAC,iBAAiB,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,CAAC,CAAA"} \ No newline at end of file diff --git a/dist-plain/lib/vxg-util.d.ts b/dist-plain/lib/vxg-util.d.ts index 22c3ccc..591a2c5 100644 --- a/dist-plain/lib/vxg-util.d.ts +++ b/dist-plain/lib/vxg-util.d.ts @@ -11,4 +11,22 @@ declare namespace vmap { var KEY: (_: any, p: any) => any; } declare function searchParamsToObject(searchParams: URLSearchParams): any; -export { cmap, vmap, searchParamsToObject, }; +declare function resvalue(value: object | any[] | string, cat: { + multiple: number; + item: Record; +}, mapFn: (val: string, item: { + title: string; +}) => any): any; +declare function resdefault(cat: { + multiple: number; + item: Record; + default: string; +}, mapFn: (val: string, item: { + title: string; +}) => any): any; +declare function useSanitizedId(): string; +export { cmap, vmap, searchParamsToObject, resvalue, resdefault, useSanitizedId, }; diff --git a/dist-plain/lib/vxg-util.js b/dist-plain/lib/vxg-util.js index 1b6aad4..8895132 100644 --- a/dist-plain/lib/vxg-util.js +++ b/dist-plain/lib/vxg-util.js @@ -4,39 +4,61 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.cmap = cmap; exports.vmap = vmap; exports.searchParamsToObject = searchParamsToObject; +exports.resvalue = resvalue; +exports.resdefault = resdefault; +exports.useSanitizedId = useSanitizedId; +const react_1 = require("react"); // Map child objects to new child objects function cmap(o, p) { - return Object - .entries(o) - .reduce((r, n, _) => (_ = Object - .entries(p) - .reduce((s, m) => (cmap.FILTER === s ? s : (s[m[0]] = ( - // transfom(val,key,current,parentkey,parent) - 'function' === typeof m[1] ? m[1](n[1][m[0]], { - skey: m[0], self: n[1], key: n[0], parent: o - }) : m[1]), (cmap.FILTER === s[m[0]] ? cmap.FILTER : s))), {}) - , (cmap.FILTER === _ ? 0 : r[n[0]] = _), r), {}); + return Object.entries(o).reduce((r, n, _) => ((_ = Object.entries(p).reduce((s, m) => cmap.FILTER === s + ? s + : ((s[m[0]] = + // transfom(val,key,current,parentkey,parent) + 'function' === typeof m[1] + ? m[1](n[1][m[0]], { + skey: m[0], + self: n[1], + key: n[0], + parent: o, + }) + : m[1]), + cmap.FILTER === s[m[0]] ? cmap.FILTER : s), {})), + cmap.FILTER === _ ? 0 : (r[n[0]] = _), + r), {}); } cmap.COPY = (x) => x; // keep self if x is truthy, or function returning truthy-new-value or [truthy,new-value] -cmap.FILTER = (x) => 'function' === typeof x ? ((y, p, _) => (_ = x(y, p), Array.isArray(_) ? !_[0] ? _[1] : cmap.FILTER : _)) : (x ? x : cmap.FILTER); +cmap.FILTER = (x) => 'function' === typeof x + ? (y, p, _) => ((_ = x(y, p)), Array.isArray(_) ? (!_[0] ? _[1] : cmap.FILTER) : _) + : x + ? x + : cmap.FILTER; cmap.KEY = (_, p) => p.key; // Map child objects to a list of child objects function vmap(o, p) { - return Object - .entries(o) - .reduce((r, n, _) => (_ = Object - .entries(p) - .reduce((s, m) => (vmap.FILTER === s ? s : (s[m[0]] = ( - // transfom(val,key,current,parentkey,parent) - // 'function' === typeof m[1] ? m[1](n[1][m[0]], m[0], n[1], n[0], o) : m[1] - 'function' === typeof m[1] ? m[1](n[1][m[0]], { - skey: m[0], self: n[1], key: n[0], parent: o - }) : m[1]), (vmap.FILTER === s[m[0]] ? vmap.FILTER : s))), {}) - , (vmap.FILTER === _ ? 0 : r.push(_)), r), []); + return Object.entries(o).reduce((r, n, _) => ((_ = Object.entries(p).reduce((s, m) => vmap.FILTER === s + ? s + : ((s[m[0]] = + // transfom(val,key,current,parentkey,parent) + // 'function' === typeof m[1] ? m[1](n[1][m[0]], m[0], n[1], n[0], o) : m[1] + 'function' === typeof m[1] + ? m[1](n[1][m[0]], { + skey: m[0], + self: n[1], + key: n[0], + parent: o, + }) + : m[1]), + vmap.FILTER === s[m[0]] ? vmap.FILTER : s), {})), + vmap.FILTER === _ ? 0 : r.push(_), + r), []); } vmap.COPY = (x) => x; -vmap.FILTER = (x) => 'function' === typeof x ? ((y, p, _) => (_ = x(y, p), Array.isArray(_) ? !_[0] ? _[1] : vmap.FILTER : _)) : (x ? x : vmap.FILTER); +vmap.FILTER = (x) => 'function' === typeof x + ? (y, p, _) => ((_ = x(y, p)), Array.isArray(_) ? (!_[0] ? _[1] : vmap.FILTER) : _) + : x + ? x + : vmap.FILTER; vmap.KEY = (_, p) => p.key; function searchParamsToObject(searchParams) { let params = Object.create(null); @@ -45,4 +67,57 @@ function searchParamsToObject(searchParams) { } return params; } +// Map a value (object, array, or string) to a value or array of values using a map function +// TODO: possibly not the best place for this, maybe in a plugin? +function resvalue(value, cat, mapFn) { + const { item: items, multiple } = cat; + if (!value) { + return multiple === 1 ? '' : []; + } + if (Object.keys(items).length === 0) { + return multiple === 1 ? '' : []; + } + if (Array.isArray(value)) { + return multiple === 1 && value[0] ? value[0] : value.slice(0, multiple); + } + if (typeof value === 'object') { + return multiple === 1 ? value : [value]; + } + const splitValue = value.split(','); + const mapValue = (val) => items[val] ? mapFn(val, items[val]) : undefined; + switch (multiple) { + case 1: + return mapValue(splitValue[0]) || ''; + case -1: + return splitValue.map(mapValue).filter(Boolean) || []; + default: + return splitValue.slice(0, multiple).map(mapValue).filter(Boolean); + } +} +// Map a string to a value or array of values using a map function +// TODO: possibly not the best place for this, maybe in a plugin? +function resdefault(cat, mapFn) { + const { multiple, item: items, default: defaultValues } = cat; + if (Object.keys(items).length === 0) { + return multiple === 1 ? '' : []; + } + const defaultItems = defaultValues.split(','); + const mapResolvedDefault = (list) => list.map((val) => (items[val] ? mapFn(val, items[val]) : undefined)); + switch (multiple) { + case 1: + return defaultItems[0] + ? mapFn(defaultItems[0], items[defaultItems[0]]) + : ''; + case -1: + return mapResolvedDefault(defaultItems).filter(Boolean) || []; + default: + return (mapResolvedDefault(defaultItems.slice(0, multiple)).filter(Boolean) || + []); + } +} +function useSanitizedId() { + const id = (0, react_1.useId)(); + const sanitizedId = id.replace(/[^a-zA-Z0-9_]/g, 'x'); + return sanitizedId; +} //# sourceMappingURL=vxg-util.js.map \ No newline at end of file diff --git a/dist-plain/lib/vxg-util.js.map b/dist-plain/lib/vxg-util.js.map index bc3cc0b..ec621e0 100644 --- a/dist-plain/lib/vxg-util.js.map +++ b/dist-plain/lib/vxg-util.js.map @@ -1 +1 @@ -{"version":3,"file":"vxg-util.js","sourceRoot":"","sources":["../../src/lib/vxg-util.ts"],"names":[],"mappings":";AAEA,yDAAyD;;AA0DvD,oBAAI;AACJ,oBAAI;AACJ,oDAAoB;AA1DtB,yCAAyC;AACzC,SAAS,IAAI,CAAC,CAAM,EAAE,CAAM;IAC1B,OAAO,MAAM;SACV,OAAO,CAAC,CAAC,CAAC;SACV,MAAM,CAAC,CAAC,CAAM,EAAE,CAAM,EAAE,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,MAAM;SAC5C,OAAO,CAAC,CAAC,CAAC;SACV,MAAM,CAAC,CAAC,CAAM,EAAE,CAAM,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;IAC9D,6CAA6C;IAC7C,UAAU,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;QAC5C,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC;KAC7C,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CACV,EAAE,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;UACnD,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;AACtD,CAAC;AAED,IAAI,CAAC,IAAI,GAAG,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAA;AACzB,yFAAyF;AACzF,IAAI,CAAC,MAAM,GAAG,CAAC,CAAM,EAAE,EAAE,CAAC,UAAU,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAM,EAAE,CAAM,EAAE,CAAM,EAAE,EAAE,CAC9E,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;AAC3F,IAAI,CAAC,GAAG,GAAG,CAAC,CAAM,EAAE,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAA;AAGpC,+CAA+C;AAC/C,SAAS,IAAI,CAAC,CAAM,EAAE,CAAM;IAC1B,OAAO,MAAM;SACV,OAAO,CAAC,CAAC,CAAC;SACV,MAAM,CAAC,CAAC,CAAM,EAAE,CAAM,EAAE,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,MAAM;SAC5C,OAAO,CAAC,CAAC,CAAC;SACV,MAAM,CAAC,CAAC,CAAM,EAAE,CAAM,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;IAC9D,6CAA6C;IAC7C,4EAA4E;IAC5E,UAAU,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;QAC5C,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC;KAC7C,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CACV,EAAE,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;UACnD,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;AAEpD,CAAC;AACD,IAAI,CAAC,IAAI,GAAG,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAA;AACzB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAM,EAAE,EAAE,CAAC,UAAU,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAM,EAAE,CAAM,EAAE,CAAM,EAAE,EAAE,CAC9E,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;AAC3F,IAAI,CAAC,GAAG,GAAG,CAAC,CAAM,EAAE,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAA;AAIpC,SAAS,oBAAoB,CAAC,YAA6B;IACzD,IAAI,MAAM,GAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IACrC,KAAK,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,YAAY,CAAC,OAAO,EAAE,EAAE,CAAC;QAChD,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;IACrB,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC"} \ No newline at end of file +{"version":3,"file":"vxg-util.js","sourceRoot":"","sources":["../../src/lib/vxg-util.ts"],"names":[],"mappings":";AAAA,yDAAyD;;AA8KvD,oBAAI;AACJ,oBAAI;AACJ,oDAAoB;AACpB,4BAAQ;AACR,gCAAU;AACV,wCAAc;AAjLhB,iCAA6B;AAE7B,yCAAyC;AACzC,SAAS,IAAI,CAAE,CAAM,EAAE,CAAM;IAC3B,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAC7B,CAAC,CAAM,EAAE,CAAM,EAAE,CAAM,EAAE,EAAE,CAAC,CAC1B,CAAC,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAC3B,CAAC,CAAM,EAAE,CAAM,EAAE,EAAE,CACjB,IAAI,CAAC,MAAM,KAAK,CAAC;QACf,CAAC,CAAC,CAAC;QACH,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACP,6CAA6C;YAC7C,UAAU,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;gBACxB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;oBACf,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;oBACV,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;oBACV,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;oBACT,MAAM,EAAE,CAAC;iBACV,CAAC;gBACJ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACX,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,EAChD,EAAE,CACH,CAAC;QACF,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QACrC,CAAC,CACF,EACD,EAAE,CACH,CAAA;AACH,CAAC;AAED,IAAI,CAAC,IAAI,GAAG,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAA;AACzB,yFAAyF;AACzF,IAAI,CAAC,MAAM,GAAG,CAAC,CAAM,EAAE,EAAE,CACvB,UAAU,KAAK,OAAO,CAAC;IACrB,CAAC,CAAC,CAAC,CAAM,EAAE,CAAM,EAAE,CAAM,EAAE,EAAE,CAAC,CAC1B,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CACnE;IACH,CAAC,CAAC,CAAC;QACH,CAAC,CAAC,CAAC;QACH,CAAC,CAAC,IAAI,CAAC,MAAM,CAAA;AACjB,IAAI,CAAC,GAAG,GAAG,CAAC,CAAM,EAAE,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAA;AAEpC,+CAA+C;AAC/C,SAAS,IAAI,CAAE,CAAM,EAAE,CAAM;IAC3B,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAC7B,CAAC,CAAM,EAAE,CAAM,EAAE,CAAM,EAAE,EAAE,CAAC,CAC1B,CAAC,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAC3B,CAAC,CAAM,EAAE,CAAM,EAAE,EAAE,CACjB,IAAI,CAAC,MAAM,KAAK,CAAC;QACf,CAAC,CAAC,CAAC;QACH,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACP,6CAA6C;YAC7C,4EAA4E;YAC5E,UAAU,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;gBACxB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;oBACf,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;oBACV,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;oBACV,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;oBACT,MAAM,EAAE,CAAC;iBACV,CAAC;gBACJ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACX,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,EAChD,EAAE,CACH,CAAC;QACF,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QACjC,CAAC,CACF,EACD,EAAE,CACH,CAAA;AACH,CAAC;AACD,IAAI,CAAC,IAAI,GAAG,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAA;AACzB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAM,EAAE,EAAE,CACvB,UAAU,KAAK,OAAO,CAAC;IACrB,CAAC,CAAC,CAAC,CAAM,EAAE,CAAM,EAAE,CAAM,EAAE,EAAE,CAAC,CAC1B,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CACnE;IACH,CAAC,CAAC,CAAC;QACH,CAAC,CAAC,CAAC;QACH,CAAC,CAAC,IAAI,CAAC,MAAM,CAAA;AACjB,IAAI,CAAC,GAAG,GAAG,CAAC,CAAM,EAAE,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAA;AAEpC,SAAS,oBAAoB,CAAE,YAA6B;IAC1D,IAAI,MAAM,GAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IACrC,KAAK,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,YAAY,CAAC,OAAO,EAAE,EAAE,CAAC;QAChD,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;IACrB,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AAED,4FAA4F;AAC5F,iEAAiE;AACjE,SAAS,QAAQ,CACf,KAA8B,EAC9B,GAAkE,EAClE,KAAoD;IAEpD,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAA;IAErC,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;IACjC,CAAC;IAED,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACpC,OAAO,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;IACjC,CAAC;IAED,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,QAAQ,KAAK,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAA;IACzE,CAAC;IAED,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;IACzC,CAAC;IAED,MAAM,UAAU,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAEnC,MAAM,QAAQ,GAAG,CAAC,GAAW,EAAE,EAAE,CAC/B,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;IAEjD,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,CAAC;YACJ,OAAO,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAA;QACtC,KAAK,CAAC,CAAC;YACL,OAAO,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,CAAA;QACvD;YACE,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;IACtE,CAAC;AACH,CAAC;AAED,kEAAkE;AAClE,iEAAiE;AACjE,SAAS,UAAU,CACjB,GAIC,EACD,KAAoD;IAEpD,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,GAAG,GAAG,CAAA;IAE7D,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACpC,OAAO,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;IACjC,CAAC;IAED,MAAM,YAAY,GAAG,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAE7C,MAAM,kBAAkB,GAAG,CAAC,IAAc,EAAE,EAAE,CAC5C,IAAI,CAAC,GAAG,CAAC,CAAC,GAAW,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAA;IAE9E,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,CAAC;YACJ,OAAO,YAAY,CAAC,CAAC,CAAC;gBACpB,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;gBAChD,CAAC,CAAC,EAAE,CAAA;QACR,KAAK,CAAC,CAAC;YACL,OAAO,kBAAkB,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,CAAA;QAC/D;YACE,OAAO,CACL,kBAAkB,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;gBACnE,EAAE,CACH,CAAA;IACL,CAAC;AACH,CAAC;AAED,SAAS,cAAc;IACrB,MAAM,EAAE,GAAG,IAAA,aAAK,GAAE,CAAA;IAClB,MAAM,WAAW,GAAG,EAAE,CAAC,OAAO,CAAC,gBAAgB,EAAE,GAAG,CAAC,CAAA;IACrD,OAAO,WAAW,CAAA;AACpB,CAAC"} \ No newline at end of file diff --git a/dist/BasicEntityAutocompleteField.d.ts b/dist/BasicEntityAutocompleteField.d.ts index 94e7e62..cf25015 100644 --- a/dist/BasicEntityAutocompleteField.d.ts +++ b/dist/BasicEntityAutocompleteField.d.ts @@ -1,21 +1,2 @@ declare function BasicEntityAutocompleteField(props: any): import("react/jsx-runtime").JSX.Element; -export declare const resolveCategories: ({ item, }: { - item: Record; -}) => { - key: string; - title: string; -}[]; -export declare function resolveDefault(cat: { - multiple: number; - item: any; - default: string; -}): any; -export declare function resolveValue(value: any, cat: { - multiple: number; - item: Record; -}): any; export { BasicEntityAutocompleteField }; diff --git a/dist/BasicEntitySelectField.d.ts b/dist/BasicEntitySelectField.d.ts index b0faef3..4a87de4 100644 --- a/dist/BasicEntitySelectField.d.ts +++ b/dist/BasicEntitySelectField.d.ts @@ -1,17 +1,2 @@ declare function BasicEntitySelectField(props: any): import("react/jsx-runtime").JSX.Element; -export declare function resolveCategories(cat: any): { - title: any; - key: string; -}[]; -export declare function resolveDefault(cat: { - multiple: number; - item: any; - default: string; -}): any; -export declare function resolveValue(value: any, cat: { - multiple: number; - item: Record; -}): any; export { BasicEntitySelectField }; diff --git a/dist/VxgBasicEntityEditPlugin.d.ts b/dist/VxgBasicEntityEditPlugin.d.ts index 1c29b3f..7685cf5 100644 --- a/dist/VxgBasicEntityEditPlugin.d.ts +++ b/dist/VxgBasicEntityEditPlugin.d.ts @@ -6,6 +6,7 @@ declare function VxgBasicEntityEditPlugin(this: any, options: any): { fields: any; }; util: { + resolveMarks: (marks: any) => any; dateTimeFromUTC: (utc: number, tz?: string) => any; localTimeToUTC: (timeString: string, tz?: string) => number; localDateTimeToUTC: (dateOrDateTimeString: string, tz?: string) => number; diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index b1f364a..5e29af0 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -1030,21 +1030,15 @@ function requireReactJsxRuntime_development() { } return reactJsxRuntime_development; } -var jsxRuntime$1 = jsxRuntime$2.exports; -var hasRequiredJsxRuntime; -function requireJsxRuntime() { - if (hasRequiredJsxRuntime) return jsxRuntime$2.exports; - hasRequiredJsxRuntime = 1; - "use strict"; - if (process.env.NODE_ENV === "production") { - jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); - } else { - jsxRuntime$2.exports = requireReactJsxRuntime_development(); - } - return jsxRuntime$2.exports; +var jsxRuntime = jsxRuntime$2.exports; +"use strict"; +if (process.env.NODE_ENV === "production") { + jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); +} else { + jsxRuntime$2.exports = requireReactJsxRuntime_development(); } -var jsxRuntimeExports = requireJsxRuntime(); -const jsxRuntime = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); +var jsxRuntimeExports = jsxRuntime$2.exports; +const jsxRuntime$1 = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); var gubu_min$2 = { exports: {} }; var gubu_min = gubu_min$2.exports; (function(module, exports) { @@ -1735,6 +1729,9 @@ function searchParamsToObject(searchParams) { } function resvalue(value, cat, mapFn) { const { item: items, multiple } = cat; + if (!value) { + return multiple === 1 ? "" : []; + } if (Object.keys(items).length === 0) { return multiple === 1 ? "" : []; } @@ -25371,7 +25368,7 @@ Object.defineProperty(ArrowDownward, "__esModule", { }); var default_1$y = ArrowDownward.default = void 0; var _createSvgIcon$y = _interopRequireDefault$y(requireCreateSvgIcon()); -var _jsxRuntime$y = requireJsxRuntime(); +var _jsxRuntime$y = jsxRuntimeExports; var _default$y = default_1$y = ArrowDownward.default = (0, _createSvgIcon$y.default)(/* @__PURE__ */ (0, _jsxRuntime$y.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); @@ -25384,7 +25381,7 @@ Object.defineProperty(ArrowRight, "__esModule", { }); var default_1$x = ArrowRight.default = void 0; var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); -var _jsxRuntime$x = requireJsxRuntime(); +var _jsxRuntime$x = jsxRuntimeExports; var _default$x = default_1$x = ArrowRight.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); @@ -25397,7 +25394,7 @@ Object.defineProperty(Cancel, "__esModule", { }); var default_1$w = Cancel.default = void 0; var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); -var _jsxRuntime$w = requireJsxRuntime(); +var _jsxRuntime$w = jsxRuntimeExports; var _default$w = default_1$w = Cancel.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); @@ -25410,7 +25407,7 @@ Object.defineProperty(ChevronLeft, "__esModule", { }); var default_1$v = ChevronLeft.default = void 0; var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); -var _jsxRuntime$v = requireJsxRuntime(); +var _jsxRuntime$v = jsxRuntimeExports; var _default$v = default_1$v = ChevronLeft.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); @@ -25423,7 +25420,7 @@ Object.defineProperty(ChevronRight, "__esModule", { }); var default_1$u = ChevronRight.default = void 0; var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); -var _jsxRuntime$u = requireJsxRuntime(); +var _jsxRuntime$u = jsxRuntimeExports; var _default$u = default_1$u = ChevronRight.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); @@ -25436,7 +25433,7 @@ Object.defineProperty(ClearAll, "__esModule", { }); var default_1$t = ClearAll.default = void 0; var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); -var _jsxRuntime$t = requireJsxRuntime(); +var _jsxRuntime$t = jsxRuntimeExports; var _default$t = default_1$t = ClearAll.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); @@ -25449,7 +25446,7 @@ Object.defineProperty(Close, "__esModule", { }); var default_1$s = Close.default = void 0; var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); -var _jsxRuntime$s = requireJsxRuntime(); +var _jsxRuntime$s = jsxRuntimeExports; var _default$s = default_1$s = Close.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); @@ -25462,7 +25459,7 @@ Object.defineProperty(ContentCopy, "__esModule", { }); var default_1$r = ContentCopy.default = void 0; var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); -var _jsxRuntime$r = requireJsxRuntime(); +var _jsxRuntime$r = jsxRuntimeExports; var _default$r = default_1$r = ContentCopy.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); @@ -25475,7 +25472,7 @@ Object.defineProperty(DensityLarge, "__esModule", { }); var default_1$q = DensityLarge.default = void 0; var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); -var _jsxRuntime$q = requireJsxRuntime(); +var _jsxRuntime$q = jsxRuntimeExports; var _default$q = default_1$q = DensityLarge.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); @@ -25488,7 +25485,7 @@ Object.defineProperty(DensityMedium, "__esModule", { }); var default_1$p = DensityMedium.default = void 0; var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); -var _jsxRuntime$p = requireJsxRuntime(); +var _jsxRuntime$p = jsxRuntimeExports; var _default$p = default_1$p = DensityMedium.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); @@ -25501,7 +25498,7 @@ Object.defineProperty(DensitySmall, "__esModule", { }); var default_1$o = DensitySmall.default = void 0; var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); -var _jsxRuntime$o = requireJsxRuntime(); +var _jsxRuntime$o = jsxRuntimeExports; var _default$o = default_1$o = DensitySmall.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); @@ -25514,7 +25511,7 @@ Object.defineProperty(DragHandle, "__esModule", { }); var default_1$n = DragHandle.default = void 0; var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); -var _jsxRuntime$n = requireJsxRuntime(); +var _jsxRuntime$n = jsxRuntimeExports; var _default$n = default_1$n = DragHandle.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); @@ -25527,7 +25524,7 @@ Object.defineProperty(DynamicFeed, "__esModule", { }); var default_1$m = DynamicFeed.default = void 0; var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); -var _jsxRuntime$m = requireJsxRuntime(); +var _jsxRuntime$m = jsxRuntimeExports; var _default$m = default_1$m = DynamicFeed.default = (0, _createSvgIcon$m.default)([/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { @@ -25542,7 +25539,7 @@ Object.defineProperty(Edit, "__esModule", { }); var default_1$l = Edit.default = void 0; var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); -var _jsxRuntime$l = requireJsxRuntime(); +var _jsxRuntime$l = jsxRuntimeExports; var _default$l = default_1$l = Edit.default = (0, _createSvgIcon$l.default)(/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); @@ -25555,7 +25552,7 @@ Object.defineProperty(ExpandMore, "__esModule", { }); var default_1$k = ExpandMore.default = void 0; var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); -var _jsxRuntime$k = requireJsxRuntime(); +var _jsxRuntime$k = jsxRuntimeExports; var _default$k = default_1$k = ExpandMore.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); @@ -25568,7 +25565,7 @@ Object.defineProperty(FilterAlt, "__esModule", { }); var default_1$j = FilterAlt.default = void 0; var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); -var _jsxRuntime$j = requireJsxRuntime(); +var _jsxRuntime$j = jsxRuntimeExports; var _default$j = default_1$j = FilterAlt.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); @@ -25581,7 +25578,7 @@ Object.defineProperty(FilterList, "__esModule", { }); var default_1$i = FilterList.default = void 0; var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); -var _jsxRuntime$i = requireJsxRuntime(); +var _jsxRuntime$i = jsxRuntimeExports; var _default$i = default_1$i = FilterList.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); @@ -25594,7 +25591,7 @@ Object.defineProperty(FilterListOff, "__esModule", { }); var default_1$h = FilterListOff.default = void 0; var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); -var _jsxRuntime$h = requireJsxRuntime(); +var _jsxRuntime$h = jsxRuntimeExports; var _default$h = default_1$h = FilterListOff.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); @@ -25607,7 +25604,7 @@ Object.defineProperty(FirstPage, "__esModule", { }); var default_1$g = FirstPage.default = void 0; var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); -var _jsxRuntime$g = requireJsxRuntime(); +var _jsxRuntime$g = jsxRuntimeExports; var _default$g = default_1$g = FirstPage.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); @@ -25620,7 +25617,7 @@ Object.defineProperty(Fullscreen, "__esModule", { }); var default_1$f = Fullscreen.default = void 0; var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); -var _jsxRuntime$f = requireJsxRuntime(); +var _jsxRuntime$f = jsxRuntimeExports; var _default$f = default_1$f = Fullscreen.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); @@ -25633,7 +25630,7 @@ Object.defineProperty(FullscreenExit, "__esModule", { }); var default_1$e = FullscreenExit.default = void 0; var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); -var _jsxRuntime$e = requireJsxRuntime(); +var _jsxRuntime$e = jsxRuntimeExports; var _default$e = default_1$e = FullscreenExit.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); @@ -25646,7 +25643,7 @@ Object.defineProperty(KeyboardDoubleArrowDown, "__esModule", { }); var default_1$d = KeyboardDoubleArrowDown.default = void 0; var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); -var _jsxRuntime$d = requireJsxRuntime(); +var _jsxRuntime$d = jsxRuntimeExports; var _default$d = default_1$d = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$d.default)([/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { @@ -25661,7 +25658,7 @@ Object.defineProperty(LastPage, "__esModule", { }); var default_1$c = LastPage.default = void 0; var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); -var _jsxRuntime$c = requireJsxRuntime(); +var _jsxRuntime$c = jsxRuntimeExports; var _default$c = default_1$c = LastPage.default = (0, _createSvgIcon$c.default)(/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); @@ -25674,7 +25671,7 @@ Object.defineProperty(MoreHoriz, "__esModule", { }); var default_1$b = MoreHoriz.default = void 0; var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); -var _jsxRuntime$b = requireJsxRuntime(); +var _jsxRuntime$b = jsxRuntimeExports; var _default$b = default_1$b = MoreHoriz.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); @@ -25687,7 +25684,7 @@ Object.defineProperty(MoreVert, "__esModule", { }); var default_1$a = MoreVert.default = void 0; var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); -var _jsxRuntime$a = requireJsxRuntime(); +var _jsxRuntime$a = jsxRuntimeExports; var _default$a = default_1$a = MoreVert.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); @@ -25700,7 +25697,7 @@ Object.defineProperty(PushPin, "__esModule", { }); var default_1$9 = PushPin.default = void 0; var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); -var _jsxRuntime$9 = requireJsxRuntime(); +var _jsxRuntime$9 = jsxRuntimeExports; var _default$9 = default_1$9 = PushPin.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" @@ -25714,7 +25711,7 @@ Object.defineProperty(RestartAlt, "__esModule", { }); var default_1$8 = RestartAlt.default = void 0; var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); -var _jsxRuntime$8 = requireJsxRuntime(); +var _jsxRuntime$8 = jsxRuntimeExports; var _default$8 = default_1$8 = RestartAlt.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); @@ -25727,7 +25724,7 @@ Object.defineProperty(Save, "__esModule", { }); var default_1$7 = Save.default = void 0; var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); -var _jsxRuntime$7 = requireJsxRuntime(); +var _jsxRuntime$7 = jsxRuntimeExports; var _default$7 = default_1$7 = Save.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); @@ -25740,7 +25737,7 @@ Object.defineProperty(Search, "__esModule", { }); var default_1$6 = Search.default = void 0; var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); -var _jsxRuntime$6 = requireJsxRuntime(); +var _jsxRuntime$6 = jsxRuntimeExports; var _default$6 = default_1$6 = Search.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); @@ -25753,7 +25750,7 @@ Object.defineProperty(SearchOff, "__esModule", { }); var default_1$5 = SearchOff.default = void 0; var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); -var _jsxRuntime$5 = requireJsxRuntime(); +var _jsxRuntime$5 = jsxRuntimeExports; var _default$5 = default_1$5 = SearchOff.default = (0, _createSvgIcon$5.default)([/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { @@ -25768,7 +25765,7 @@ Object.defineProperty(Sort, "__esModule", { }); var default_1$4 = Sort.default = void 0; var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); -var _jsxRuntime$4 = requireJsxRuntime(); +var _jsxRuntime$4 = jsxRuntimeExports; var _default$4 = default_1$4 = Sort.default = (0, _createSvgIcon$4.default)(/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); @@ -25781,7 +25778,7 @@ Object.defineProperty(SyncAlt, "__esModule", { }); var default_1$3 = SyncAlt.default = void 0; var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); -var _jsxRuntime$3 = requireJsxRuntime(); +var _jsxRuntime$3 = jsxRuntimeExports; var _default$3 = default_1$3 = SyncAlt.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); @@ -25794,7 +25791,7 @@ Object.defineProperty(ViewColumn, "__esModule", { }); var default_1$2 = ViewColumn.default = void 0; var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); -var _jsxRuntime$2 = requireJsxRuntime(); +var _jsxRuntime$2 = jsxRuntimeExports; var _default$2 = default_1$2 = ViewColumn.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); @@ -25807,7 +25804,7 @@ Object.defineProperty(VisibilityOff, "__esModule", { }); var default_1$1 = VisibilityOff.default = void 0; var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); -var _jsxRuntime$1 = requireJsxRuntime(); +var _jsxRuntime$1 = jsxRuntimeExports; var _default$1 = default_1$1 = VisibilityOff.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); @@ -64818,15 +64815,19 @@ const BasicEntityAutocompleteFieldSpecShape = gubu_minExports.Gubu( function BasicEntityAutocompleteField(props) { const { spec } = props; const basicEntityAutocompleteField = BasicEntityAutocompleteFieldSpecShape(spec); - const { control, field, errors } = basicEntityAutocompleteField; + const { control, field, errors, getValues, setValue } = basicEntityAutocompleteField; + console.log("BERF", "multiple", field.cat.multiple); + const defaultAlternative = field.cat.multiple === 1 ? {} : []; + const defaultValues = getValues(`${field.name}_default$`) || defaultAlternative; + const categories = getValues(`${field.name}_cat$`) || []; const err = errors[field.name]; const { field: controllerField, fieldState: { error } } = useController({ - name: field.name, + name: field.name + "_uival$", control, - defaultValue: resolveDefault$2(field.cat) + defaultValue: defaultValues }); return /* @__PURE__ */ jsxRuntimeExports.jsxs(Box$2, { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx( @@ -64835,15 +64836,18 @@ function BasicEntityAutocompleteField(props) { freeSolo: true, forcePopupIcon: true, multiple: field.cat.multiple !== 1, - options: resolveCategories$2(field.cat), + options: categories, isOptionEqualToValue: (opt, val) => opt === val || (opt == null ? void 0 : opt.id) != null && (val == null ? void 0 : val.id) != null && opt.id === val.id || (opt == null ? void 0 : opt.key) != null && (val == null ? void 0 : val.key) != null && opt.key === val.key, - getOptionLabel: (option) => option.title, - value: resolveValue$1(controllerField.value, field.cat), + getOptionLabel: (option) => (option == null ? void 0 : option.title) || "", + value: controllerField.value, disabled: !field.ux.edit, onChange: (_2, v) => { - controllerField.onChange( + console.log("v", v); + setValue( + field.name, Array.isArray(v) ? v.map((val) => val.key).join(",") : v == null ? void 0 : v.key ); + controllerField.onChange(v); }, renderInput: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx(TextField$1, __spreadProps(__spreadValues({}, params), { label: field.label })) }, field.ux.props) @@ -64851,21 +64855,6 @@ function BasicEntityAutocompleteField(props) { /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, `${field.id}-box`); } -const resolveCategories$2 = ({ - item -}) => Object.entries(item).map(([key, { title }]) => ({ key, title })); -function resolveDefault$2(cat) { - return resdefault(cat, (val, item) => ({ - key: val, - title: item.title - })); -} -function resolveValue$1(value, cat) { - return resvalue(value, cat, (val, item) => ({ - key: val, - title: item.title - })); -} const CMPNAME$l = "BasicEntitySliderField"; const { Open: Open$k } = gubu_minExports.Gubu; const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu( @@ -64895,11 +64884,13 @@ const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu( function BasicEntitySliderField(props) { const { spec } = props; const basicEntityAutocompleteField = BasicEntitySliderFieldSpecShape(spec); - const { control, field, getValues, errors } = basicEntityAutocompleteField; - const val = getValues(field.name); - const err = errors[field.name]; + const { control, field, getValues, setValue, errors } = basicEntityAutocompleteField; + const fieldName = field.name; + const val = getValues(`${fieldName}_uival$`); + const marks = getValues(`${fieldName}_marks$`); + const err = errors[fieldName]; const { field: controllerField } = useController({ - name: field.name, + name: `${fieldName}_uival$`, control, defaultValue: val || field.ux.min }); @@ -64909,11 +64900,14 @@ function BasicEntitySliderField(props) { Slider$1, { step: field.ux.step, - marks: resolveMarks(field.ux.props.marks), + marks, min: field.ux.min, max: field.ux.max, value: controllerField.value, - onChange: (_2, newVal) => controllerField.onChange(newVal), + onChange: (_2, newVal) => { + setValue(field.name, newVal * 60); + controllerField.onChange(newVal); + }, disabled: !field.ux.edit, orientation: field.ux.direction, track: field.ux.track, @@ -64924,18 +64918,6 @@ function BasicEntitySliderField(props) { /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }); } -function resolveMarks(marks) { - if (!marks || typeof marks === "object" && Object.keys(marks).length === 0) { - return false; - } - if (typeof marks === "object") { - return Object.entries(marks).map(([key, value]) => ({ - label: value, - value: +key - })); - } - return marks; -} const CMPNAME$k = "BasicEntitySliderField"; const { Open: Open$j } = gubu_minExports.Gubu; const BasicEntityRadioGroupFieldSpecShape = gubu_minExports.Gubu( @@ -64967,15 +64949,18 @@ const BasicEntityRadioGroupFieldSpecShape = gubu_minExports.Gubu( function BasicEntityRadioGroupField(props) { const { spec } = props; const basicEntityRadioGroupField = BasicEntityRadioGroupFieldSpecShape(spec); - const { control, field, errors } = basicEntityRadioGroupField; + const { control, field, errors, getValues, setValue } = basicEntityRadioGroupField; + const defaultValues = getValues(`${field.name}_default$`) || ""; + const categories = getValues(`${field.name}_cat$`) || []; + console.log("BERF", "default", defaultValues); const err = errors[field.name]; const { field: controllerField, fieldState: { error } } = useController({ - name: field.name, + name: field.name + "_uival$", control, - defaultValue: field.cat.default + defaultValue: defaultValues }); return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx(FormLabel$1, { children: field.label }, `${field.id}-label`), @@ -64987,7 +64972,7 @@ function BasicEntityRadioGroupField(props) { row: "row" === field.ux.direction, disabled: !field.ux.edit }, field.ux.props), { - children: resolveCategories$1(field.cat).map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx( + children: categories.map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx( FormControlLabel$1, { value: option.key, @@ -65002,7 +64987,7 @@ function BasicEntityRadioGroupField(props) { /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }); } -function resolveCategories$1(cat) { +function resolveCategories(cat) { return Object.keys(cat.item).map((key) => { var _a, _b; return { @@ -65011,7 +64996,7 @@ function resolveCategories$1(cat) { }; }); } -function resolveDefault$1(cat) { +function resolveDefault(cat) { const { default: defaultValues } = cat; return defaultValues; } @@ -65366,15 +65351,17 @@ const BasicEntitySelectFieldSpecShape = gubu_minExports.Gubu( function BasicEntitySelectField(props) { const { spec } = props; const basicEntitySelectField = BasicEntitySelectFieldSpecShape(spec); - const { control, field, errors } = basicEntitySelectField; + const { control, field, errors, getValues, setValue } = basicEntitySelectField; const err = errors[field.name]; + const defaultValues = getValues(field.name + "_default$") || (field.cat.multiple === 1 ? "" : []); + const categories = getValues(field.name + "_cat$") || []; const { field: controllerField, fieldState: { error } } = useController({ - name: field.name, + name: field.name + "_uival$", control, - defaultValue: resolveDefault(field.cat) + defaultValue: defaultValues }); return /* @__PURE__ */ jsxRuntimeExports.jsxs(Box$2, { children: [ /* @__PURE__ */ jsxRuntimeExports.jsxs(FormControl$1, { fullWidth: true, children: [ @@ -65384,37 +65371,23 @@ function BasicEntitySelectField(props) { __spreadProps(__spreadValues({ labelId: `${field.id}-label`, id: `${field.id}-select`, - value: resolveValue(controllerField.value, field.cat), + value: controllerField.value, multiple: field.cat.multiple !== 1, label: field.name, onChange: (event) => { - const v = event.target.value; - controllerField.onChange(Array.isArray(v) ? v.join(",") : v); + const { value } = event.target; + setValue(field.name, Array.isArray(value) ? value.join(",") : value); + controllerField.onChange(value); }, disabled: !field.ux.edit }, field.ux.props), { - children: resolveCategories(field.cat).map((opt) => /* @__PURE__ */ jsxRuntimeExports.jsx(MenuItem$1, { value: opt.key, children: opt.title }, opt.key)) + children: categories.map((opt) => /* @__PURE__ */ jsxRuntimeExports.jsx(MenuItem$1, { value: opt.key, children: opt.title }, opt.key)) }) ) ] }), /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, `${field.id}-box`); } -function resolveCategories(cat) { - return Object.keys(cat.item).map((key) => { - var _a, _b; - return { - title: (_b = (_a = cat.item) == null ? void 0 : _a[key]) == null ? void 0 : _b.title, - key - }; - }); -} -function resolveDefault(cat) { - return resdefault(cat, (val, item) => val); -} -function resolveValue(value, cat) { - return resvalue(value, cat, (val, item) => val); -} const CMPNAME$a = "BasicEntitySliderField"; const { Open: Open$9 } = gubu_minExports.Gubu; const BasicEntitySwitchFieldSpecShape = gubu_minExports.Gubu( @@ -65577,7 +65550,8 @@ const BasicEntityFieldSpecShape = gubu_minExports.Gubu( "ButtonGroup", "Select", "Switch", - "ToggleButton" + "ToggleButton", + "custom" ), edit: gubu_minExports.Default(true), rows: gubu_minExports.Default(3), @@ -65606,7 +65580,7 @@ const fieldMap = { }; function BasicEntityField(props) { const { ctx, spec } = props; - const { seneca } = ctx(); + const { seneca, cmp } = ctx(); const basicEntityField = BasicEntityFieldSpecShape(spec); const [plugin, setPlugin] = useState(false); const cid = basicEntityField.cid + "-" + basicEntityField.field.name; @@ -65625,7 +65599,7 @@ function BasicEntityField(props) { } }, []); const field = spec.field; - const Field = fieldMap[field.ux.kind]; + const Field = "custom" === field.ux.kind ? cmp[field.ux.cmp] : fieldMap[field.ux.kind]; return Field ? /* @__PURE__ */ jsxRuntimeExports.jsx(Field, { ctx, spec: basicEntityField }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", {}); } const { Open: Open$5, Child: Child$3 } = gubu_minExports.Gubu; @@ -65643,6 +65617,7 @@ function VxgBasicEntityEditPlugin(options) { const seneca = this; const spec = Shape$1(options.spec); const slot = spec.prefix + spec.name; + console.log("VxgBasicEntityEditPlugin", "slot", slot, "spec.name", spec.name); const fields = spec.order.reduce( (a, fn2) => (fixField(fn2, spec.field[fn2], spec), a.push(spec.field[fn2]), a), [] @@ -65650,7 +65625,8 @@ function VxgBasicEntityEditPlugin(options) { for (const field of fields) { if ("Date" === field.ux.kind) { seneca.add( - "aim:app,on:BasicLed,modify:edit,view:" + spec.name, + "aim:app,on:BasicLed,modify:edit", + { view: spec.name }, function modify_edit_Date(msg) { return __async(this, null, function* () { const out = yield this.prior(msg); @@ -65680,7 +65656,8 @@ function VxgBasicEntityEditPlugin(options) { ); } else if ("Time" === field.ux.kind) { seneca.add( - "aim:app,on:BasicLed,modify:edit,view:" + spec.name, + "aim:app,on:BasicLed,modify:edit", + { view: spec.name }, function modify_edit_Time(msg) { return __async(this, null, function* () { const out = yield this.prior(msg); @@ -65710,7 +65687,8 @@ function VxgBasicEntityEditPlugin(options) { ); } else if ("DateTime" === field.ux.kind) { seneca.add( - "aim:app,on:BasicLed,modify:edit,view:" + spec.name, + "aim:app,on:BasicLed,modify:edit", + { view: spec.name }, function modify_edit_Datetime(msg) { return __async(this, null, function* () { const out = yield this.prior(msg); @@ -65747,19 +65725,119 @@ function VxgBasicEntityEditPlugin(options) { let item = __spreadValues({}, out); if (!item[field.name + "_orig$"]) { item[field.name + "_orig$"] = item[field.name]; - item[field.name] = Number(item[field.name]) / 60; + item[field.name + "_uival$"] = Number(item[field.name]) / 60; + item[field.name + "_marks$"] = util$1.resolveMarks( + field.ux.props.marks + ); } return item; }); } - ).add( - "aim:app,on:BasicLed,modify:save", + ); + } else if ("Select" === field.ux.kind) { + console.log("VxgBasicEntityEditPlugin", "Select", field.name); + seneca.add( + "aim:app,on:BasicLed,modify:edit", { view: spec.name }, - function modify_save_Slider(msg) { + function modify_edit_Select(msg) { return __async(this, null, function* () { const out = yield this.prior(msg); let item = __spreadValues({}, out); - item[field.name] = Number(item[field.name]) * 60; + if (!item[field.name + "_orig$"]) { + item[field.name + "_orig$"] = item[field.name]; + item[field.name + "_default$"] = resdefault( + field.cat, + (val) => val + ); + item[field.name + "_cat$"] = Object.keys(field.cat.item).map( + (key) => { + var _a, _b; + return { + title: (_b = (_a = field.cat.item) == null ? void 0 : _a[key]) == null ? void 0 : _b.title, + key + }; + } + ); + item[field.name + "_uival$"] = resvalue( + item[field.name], + field.cat, + (val) => val + ); + } + return item; + }); + } + ); + } else if ("Autocomplete" === field.ux.kind) { + console.log("VxgBasicEntityEditPlugin", "Autocomplete", field.name); + seneca.add( + "aim:app,on:BasicLed,modify:edit", + { view: spec.name }, + function modify_edit_Autocomplete(msg) { + return __async(this, null, function* () { + const out = yield this.prior(msg); + let item = __spreadValues({}, out); + if (!item[field.name + "_orig$"]) { + item[field.name + "_orig$"] = item[field.name]; + item[field.name + "_default$"] = resdefault( + field.cat, + (val, item2) => ({ + key: val, + title: item2.title + }) + ); + item[field.name + "_cat$"] = Object.keys(field.cat.item).map( + (key) => { + var _a, _b; + return { + title: (_b = (_a = field.cat.item) == null ? void 0 : _a[key]) == null ? void 0 : _b.title, + key + }; + } + ); + item[field.name + "_uival$"] = resvalue( + item[field.name], + field.cat, + (val, item2) => ({ + key: val, + title: item2.title + }) + ); + } + return item; + }); + } + ); + } else if ("RadioGroup" === field.ux.kind) { + console.log("VxgBasicEntityEditPlugin", "RadioGroup", field.name); + seneca.add( + "aim:app,on:BasicLed,modify:edit", + { view: spec.name }, + function modify_edit_RadioGroup(msg) { + return __async(this, null, function* () { + const out = yield this.prior(msg); + let item = __spreadValues({}, out); + if (!item[field.name + "_orig$"]) { + item[field.name + "_orig$"] = item[field.name]; + item[field.name + "_default$"] = field.cat.default; + item[field.name + "_cat$"] = Object.keys(field.cat.item).map( + (key) => { + var _a, _b; + return { + title: (_b = (_a = field.cat.item) == null ? void 0 : _a[key]) == null ? void 0 : _b.title, + key + }; + } + ); + item[field.name + "_uival$"] = resvalue( + item[field.name], + field.cat, + (val, item2) => ({ + key: val, + title: item2.title + }) + ); + } return item; }); } @@ -65785,6 +65863,14 @@ function fixField(name, field, spec) { field.ux.size = null == field.ux.size ? 4 : parseInt(field.ux.size, 10); } const util$1 = { + resolveMarks: (marks) => { + if (!marks || typeof marks === "object" && !Object.keys(marks).length) + return false; + return typeof marks === "object" ? Object.entries(marks).map(([key, value]) => ({ + label: value, + value: +key + })) : marks; + }, dateTimeFromUTC: (utc, tz) => { const date = new Date(utc); const iso = date.toISOString(); @@ -65913,7 +65999,7 @@ function BasicEntityEdit(props) { } }, []); const { spec, slot, fields } = seneca.export( - "VxgBasicEntityEditPlugin/handle" + "VxgBasicEntityEditPlugin$" + cid + "/handle" ) || { spec: {}, slot: null, fields: [] }; const { ent, name } = spec; if (plugin && !ready) { @@ -65923,10 +66009,11 @@ function BasicEntityEdit(props) { let { selectItem, selectList, selectMeta } = slotSelectors(slot); let item = useSelector((state) => selectItem(state)); useEffect(() => { - const fetchData = () => __async(this, null, function* () { - console.log("BEE", "effect", "mod:edit", "init", "view", name); - console.log("BEE", "effect", "mod:edit", "init", "item", item == null ? void 0 : item.title); + const modifyEdit = () => __async(this, null, function* () { + console.log("BEE", "effect", "modify:edit", "init", "view", name); + console.log("BEE", "effect", "modify:edit", "init", "item", item); if (item && name) { + console.log("BEE", "effect", "modify:edit", "seneca.direct"); item = yield seneca.direct("aim:app,on:BasicLed,modify:edit", { view: name, item, @@ -65936,7 +66023,7 @@ function BasicEntityEdit(props) { reset(item); } }); - fetchData(); + modifyEdit(); }, [item, name]); const params = useParams(); useEffect(() => { @@ -65955,6 +66042,7 @@ function BasicEntityEdit(props) { register, handleSubmit, getValues, + setValue, reset, control, formState: { errors } @@ -65992,6 +66080,7 @@ function BasicEntityEdit(props) { field, register, getValues, + setValue, control, errors } @@ -66011,7 +66100,7 @@ Object.defineProperty(Check, "__esModule", { }); var default_1 = Check.default = void 0; var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); -var _jsxRuntime = requireJsxRuntime(); +var _jsxRuntime = jsxRuntimeExports; var _default = default_1 = Check.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { d: "M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" }), "Check"); @@ -66207,13 +66296,10 @@ function VxgBasicLedPlugin(options) { }); } ).message( - "aim:app,on:BasicLed,save:item,redux$:true", + "aim:app,on:BasicLed,save:item", function(msg, meta) { return __async(this, null, function* () { const data = Object.entries(spec.def.edit.field).filter((n) => false !== n[1].ux.edit).reduce((a, n) => (a[n[0]] = msg.data[n[0]], a), {}); - const state = meta.custom.state(); - let view = state.view[name]; - view.alert = { active: true, message: "Saved", level: "success" }; const item = yield seneca.entity(entCanon).save$(data); navigate("/view/" + name + "/edit/" + item.id); }); diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index 5defbe8..619e597 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -1042,21 +1042,15 @@ var __async = (__this, __arguments, generator) => { } return reactJsxRuntime_development; } - var jsxRuntime$1 = jsxRuntime$2.exports; - var hasRequiredJsxRuntime; - function requireJsxRuntime() { - if (hasRequiredJsxRuntime) return jsxRuntime$2.exports; - hasRequiredJsxRuntime = 1; - "use strict"; - if (process.env.NODE_ENV === "production") { - jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); - } else { - jsxRuntime$2.exports = requireReactJsxRuntime_development(); - } - return jsxRuntime$2.exports; + var jsxRuntime = jsxRuntime$2.exports; + "use strict"; + if (process.env.NODE_ENV === "production") { + jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); + } else { + jsxRuntime$2.exports = requireReactJsxRuntime_development(); } - var jsxRuntimeExports = requireJsxRuntime(); - const jsxRuntime = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); + var jsxRuntimeExports = jsxRuntime$2.exports; + const jsxRuntime$1 = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); var gubu_min$2 = { exports: {} }; var gubu_min = gubu_min$2.exports; (function(module2, exports3) { @@ -1747,6 +1741,9 @@ var __async = (__this, __arguments, generator) => { } function resvalue(value, cat, mapFn) { const { item: items, multiple } = cat; + if (!value) { + return multiple === 1 ? "" : []; + } if (Object.keys(items).length === 0) { return multiple === 1 ? "" : []; } @@ -25383,7 +25380,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$y = ArrowDownward.default = void 0; var _createSvgIcon$y = _interopRequireDefault$y(requireCreateSvgIcon()); - var _jsxRuntime$y = requireJsxRuntime(); + var _jsxRuntime$y = jsxRuntimeExports; var _default$y = default_1$y = ArrowDownward.default = (0, _createSvgIcon$y.default)(/* @__PURE__ */ (0, _jsxRuntime$y.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); @@ -25396,7 +25393,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$x = ArrowRight.default = void 0; var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); - var _jsxRuntime$x = requireJsxRuntime(); + var _jsxRuntime$x = jsxRuntimeExports; var _default$x = default_1$x = ArrowRight.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); @@ -25409,7 +25406,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$w = Cancel.default = void 0; var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); - var _jsxRuntime$w = requireJsxRuntime(); + var _jsxRuntime$w = jsxRuntimeExports; var _default$w = default_1$w = Cancel.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); @@ -25422,7 +25419,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$v = ChevronLeft.default = void 0; var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); - var _jsxRuntime$v = requireJsxRuntime(); + var _jsxRuntime$v = jsxRuntimeExports; var _default$v = default_1$v = ChevronLeft.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); @@ -25435,7 +25432,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$u = ChevronRight.default = void 0; var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); - var _jsxRuntime$u = requireJsxRuntime(); + var _jsxRuntime$u = jsxRuntimeExports; var _default$u = default_1$u = ChevronRight.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); @@ -25448,7 +25445,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$t = ClearAll.default = void 0; var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); - var _jsxRuntime$t = requireJsxRuntime(); + var _jsxRuntime$t = jsxRuntimeExports; var _default$t = default_1$t = ClearAll.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); @@ -25461,7 +25458,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$s = Close.default = void 0; var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); - var _jsxRuntime$s = requireJsxRuntime(); + var _jsxRuntime$s = jsxRuntimeExports; var _default$s = default_1$s = Close.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); @@ -25474,7 +25471,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$r = ContentCopy.default = void 0; var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); - var _jsxRuntime$r = requireJsxRuntime(); + var _jsxRuntime$r = jsxRuntimeExports; var _default$r = default_1$r = ContentCopy.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); @@ -25487,7 +25484,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$q = DensityLarge.default = void 0; var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); - var _jsxRuntime$q = requireJsxRuntime(); + var _jsxRuntime$q = jsxRuntimeExports; var _default$q = default_1$q = DensityLarge.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); @@ -25500,7 +25497,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$p = DensityMedium.default = void 0; var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); - var _jsxRuntime$p = requireJsxRuntime(); + var _jsxRuntime$p = jsxRuntimeExports; var _default$p = default_1$p = DensityMedium.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); @@ -25513,7 +25510,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$o = DensitySmall.default = void 0; var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); - var _jsxRuntime$o = requireJsxRuntime(); + var _jsxRuntime$o = jsxRuntimeExports; var _default$o = default_1$o = DensitySmall.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); @@ -25526,7 +25523,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$n = DragHandle.default = void 0; var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); - var _jsxRuntime$n = requireJsxRuntime(); + var _jsxRuntime$n = jsxRuntimeExports; var _default$n = default_1$n = DragHandle.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); @@ -25539,7 +25536,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$m = DynamicFeed.default = void 0; var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); - var _jsxRuntime$m = requireJsxRuntime(); + var _jsxRuntime$m = jsxRuntimeExports; var _default$m = default_1$m = DynamicFeed.default = (0, _createSvgIcon$m.default)([/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { @@ -25554,7 +25551,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$l = Edit.default = void 0; var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); - var _jsxRuntime$l = requireJsxRuntime(); + var _jsxRuntime$l = jsxRuntimeExports; var _default$l = default_1$l = Edit.default = (0, _createSvgIcon$l.default)(/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); @@ -25567,7 +25564,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$k = ExpandMore.default = void 0; var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); - var _jsxRuntime$k = requireJsxRuntime(); + var _jsxRuntime$k = jsxRuntimeExports; var _default$k = default_1$k = ExpandMore.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); @@ -25580,7 +25577,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$j = FilterAlt.default = void 0; var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); - var _jsxRuntime$j = requireJsxRuntime(); + var _jsxRuntime$j = jsxRuntimeExports; var _default$j = default_1$j = FilterAlt.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); @@ -25593,7 +25590,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$i = FilterList.default = void 0; var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); - var _jsxRuntime$i = requireJsxRuntime(); + var _jsxRuntime$i = jsxRuntimeExports; var _default$i = default_1$i = FilterList.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); @@ -25606,7 +25603,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$h = FilterListOff.default = void 0; var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); - var _jsxRuntime$h = requireJsxRuntime(); + var _jsxRuntime$h = jsxRuntimeExports; var _default$h = default_1$h = FilterListOff.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); @@ -25619,7 +25616,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$g = FirstPage.default = void 0; var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); - var _jsxRuntime$g = requireJsxRuntime(); + var _jsxRuntime$g = jsxRuntimeExports; var _default$g = default_1$g = FirstPage.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); @@ -25632,7 +25629,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$f = Fullscreen.default = void 0; var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); - var _jsxRuntime$f = requireJsxRuntime(); + var _jsxRuntime$f = jsxRuntimeExports; var _default$f = default_1$f = Fullscreen.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); @@ -25645,7 +25642,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$e = FullscreenExit.default = void 0; var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); - var _jsxRuntime$e = requireJsxRuntime(); + var _jsxRuntime$e = jsxRuntimeExports; var _default$e = default_1$e = FullscreenExit.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); @@ -25658,7 +25655,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$d = KeyboardDoubleArrowDown.default = void 0; var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); - var _jsxRuntime$d = requireJsxRuntime(); + var _jsxRuntime$d = jsxRuntimeExports; var _default$d = default_1$d = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$d.default)([/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { @@ -25673,7 +25670,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$c = LastPage.default = void 0; var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); - var _jsxRuntime$c = requireJsxRuntime(); + var _jsxRuntime$c = jsxRuntimeExports; var _default$c = default_1$c = LastPage.default = (0, _createSvgIcon$c.default)(/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); @@ -25686,7 +25683,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$b = MoreHoriz.default = void 0; var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); - var _jsxRuntime$b = requireJsxRuntime(); + var _jsxRuntime$b = jsxRuntimeExports; var _default$b = default_1$b = MoreHoriz.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); @@ -25699,7 +25696,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$a = MoreVert.default = void 0; var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); - var _jsxRuntime$a = requireJsxRuntime(); + var _jsxRuntime$a = jsxRuntimeExports; var _default$a = default_1$a = MoreVert.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); @@ -25712,7 +25709,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$9 = PushPin.default = void 0; var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); - var _jsxRuntime$9 = requireJsxRuntime(); + var _jsxRuntime$9 = jsxRuntimeExports; var _default$9 = default_1$9 = PushPin.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" @@ -25726,7 +25723,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$8 = RestartAlt.default = void 0; var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); - var _jsxRuntime$8 = requireJsxRuntime(); + var _jsxRuntime$8 = jsxRuntimeExports; var _default$8 = default_1$8 = RestartAlt.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); @@ -25739,7 +25736,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$7 = Save.default = void 0; var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); - var _jsxRuntime$7 = requireJsxRuntime(); + var _jsxRuntime$7 = jsxRuntimeExports; var _default$7 = default_1$7 = Save.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); @@ -25752,7 +25749,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$6 = Search.default = void 0; var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); - var _jsxRuntime$6 = requireJsxRuntime(); + var _jsxRuntime$6 = jsxRuntimeExports; var _default$6 = default_1$6 = Search.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); @@ -25765,7 +25762,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$5 = SearchOff.default = void 0; var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); - var _jsxRuntime$5 = requireJsxRuntime(); + var _jsxRuntime$5 = jsxRuntimeExports; var _default$5 = default_1$5 = SearchOff.default = (0, _createSvgIcon$5.default)([/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { @@ -25780,7 +25777,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$4 = Sort.default = void 0; var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); - var _jsxRuntime$4 = requireJsxRuntime(); + var _jsxRuntime$4 = jsxRuntimeExports; var _default$4 = default_1$4 = Sort.default = (0, _createSvgIcon$4.default)(/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); @@ -25793,7 +25790,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$3 = SyncAlt.default = void 0; var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); - var _jsxRuntime$3 = requireJsxRuntime(); + var _jsxRuntime$3 = jsxRuntimeExports; var _default$3 = default_1$3 = SyncAlt.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); @@ -25806,7 +25803,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$2 = ViewColumn.default = void 0; var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); - var _jsxRuntime$2 = requireJsxRuntime(); + var _jsxRuntime$2 = jsxRuntimeExports; var _default$2 = default_1$2 = ViewColumn.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); @@ -25819,7 +25816,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$1 = VisibilityOff.default = void 0; var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); - var _jsxRuntime$1 = requireJsxRuntime(); + var _jsxRuntime$1 = jsxRuntimeExports; var _default$1 = default_1$1 = VisibilityOff.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); @@ -64830,15 +64827,19 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha function BasicEntityAutocompleteField(props) { const { spec } = props; const basicEntityAutocompleteField = BasicEntityAutocompleteFieldSpecShape(spec); - const { control, field, errors } = basicEntityAutocompleteField; + const { control, field, errors, getValues, setValue } = basicEntityAutocompleteField; + console.log("BERF", "multiple", field.cat.multiple); + const defaultAlternative = field.cat.multiple === 1 ? {} : []; + const defaultValues = getValues(`${field.name}_default$`) || defaultAlternative; + const categories = getValues(`${field.name}_cat$`) || []; const err = errors[field.name]; const { field: controllerField, fieldState: { error } } = useController({ - name: field.name, + name: field.name + "_uival$", control, - defaultValue: resolveDefault$2(field.cat) + defaultValue: defaultValues }); return /* @__PURE__ */ jsxRuntimeExports.jsxs(material.Box, { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx( @@ -64847,15 +64848,18 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha freeSolo: true, forcePopupIcon: true, multiple: field.cat.multiple !== 1, - options: resolveCategories$2(field.cat), + options: categories, isOptionEqualToValue: (opt, val) => opt === val || (opt == null ? void 0 : opt.id) != null && (val == null ? void 0 : val.id) != null && opt.id === val.id || (opt == null ? void 0 : opt.key) != null && (val == null ? void 0 : val.key) != null && opt.key === val.key, - getOptionLabel: (option) => option.title, - value: resolveValue$1(controllerField.value, field.cat), + getOptionLabel: (option) => (option == null ? void 0 : option.title) || "", + value: controllerField.value, disabled: !field.ux.edit, onChange: (_2, v) => { - controllerField.onChange( + console.log("v", v); + setValue( + field.name, Array.isArray(v) ? v.map((val) => val.key).join(",") : v == null ? void 0 : v.key ); + controllerField.onChange(v); }, renderInput: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.TextField, __spreadProps(__spreadValues({}, params), { label: field.label })) }, field.ux.props) @@ -64863,21 +64867,6 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, `${field.id}-box`); } - const resolveCategories$2 = ({ - item - }) => Object.entries(item).map(([key, { title }]) => ({ key, title })); - function resolveDefault$2(cat) { - return resdefault(cat, (val, item) => ({ - key: val, - title: item.title - })); - } - function resolveValue$1(value, cat) { - return resvalue(value, cat, (val, item) => ({ - key: val, - title: item.title - })); - } const CMPNAME$l = "BasicEntitySliderField"; const { Open: Open$k } = gubu_minExports.Gubu; const BasicEntitySliderFieldSpecShape = gubu_minExports.Gubu( @@ -64907,11 +64896,13 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha function BasicEntitySliderField(props) { const { spec } = props; const basicEntityAutocompleteField = BasicEntitySliderFieldSpecShape(spec); - const { control, field, getValues, errors } = basicEntityAutocompleteField; - const val = getValues(field.name); - const err = errors[field.name]; + const { control, field, getValues, setValue, errors } = basicEntityAutocompleteField; + const fieldName = field.name; + const val = getValues(`${fieldName}_uival$`); + const marks = getValues(`${fieldName}_marks$`); + const err = errors[fieldName]; const { field: controllerField } = useController({ - name: field.name, + name: `${fieldName}_uival$`, control, defaultValue: val || field.ux.min }); @@ -64921,11 +64912,14 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha material.Slider, { step: field.ux.step, - marks: resolveMarks(field.ux.props.marks), + marks, min: field.ux.min, max: field.ux.max, value: controllerField.value, - onChange: (_2, newVal) => controllerField.onChange(newVal), + onChange: (_2, newVal) => { + setValue(field.name, newVal * 60); + controllerField.onChange(newVal); + }, disabled: !field.ux.edit, orientation: field.ux.direction, track: field.ux.track, @@ -64936,18 +64930,6 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }); } - function resolveMarks(marks) { - if (!marks || typeof marks === "object" && Object.keys(marks).length === 0) { - return false; - } - if (typeof marks === "object") { - return Object.entries(marks).map(([key, value]) => ({ - label: value, - value: +key - })); - } - return marks; - } const CMPNAME$k = "BasicEntitySliderField"; const { Open: Open$j } = gubu_minExports.Gubu; const BasicEntityRadioGroupFieldSpecShape = gubu_minExports.Gubu( @@ -64979,15 +64961,18 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha function BasicEntityRadioGroupField(props) { const { spec } = props; const basicEntityRadioGroupField = BasicEntityRadioGroupFieldSpecShape(spec); - const { control, field, errors } = basicEntityRadioGroupField; + const { control, field, errors, getValues, setValue } = basicEntityRadioGroupField; + const defaultValues = getValues(`${field.name}_default$`) || ""; + const categories = getValues(`${field.name}_cat$`) || []; + console.log("BERF", "default", defaultValues); const err = errors[field.name]; const { field: controllerField, fieldState: { error } } = useController({ - name: field.name, + name: field.name + "_uival$", control, - defaultValue: field.cat.default + defaultValue: defaultValues }); return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [ /* @__PURE__ */ jsxRuntimeExports.jsx(material.FormLabel, { children: field.label }, `${field.id}-label`), @@ -64999,7 +64984,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha row: "row" === field.ux.direction, disabled: !field.ux.edit }, field.ux.props), { - children: resolveCategories$1(field.cat).map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx( + children: categories.map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx( material.FormControlLabel, { value: option.key, @@ -65014,7 +64999,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }); } - function resolveCategories$1(cat) { + function resolveCategories(cat) { return Object.keys(cat.item).map((key) => { var _a, _b; return { @@ -65023,7 +65008,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }; }); } - function resolveDefault$1(cat) { + function resolveDefault(cat) { const { default: defaultValues } = cat; return defaultValues; } @@ -65378,15 +65363,17 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha function BasicEntitySelectField(props) { const { spec } = props; const basicEntitySelectField = BasicEntitySelectFieldSpecShape(spec); - const { control, field, errors } = basicEntitySelectField; + const { control, field, errors, getValues, setValue } = basicEntitySelectField; const err = errors[field.name]; + const defaultValues = getValues(field.name + "_default$") || (field.cat.multiple === 1 ? "" : []); + const categories = getValues(field.name + "_cat$") || []; const { field: controllerField, fieldState: { error } } = useController({ - name: field.name, + name: field.name + "_uival$", control, - defaultValue: resolveDefault(field.cat) + defaultValue: defaultValues }); return /* @__PURE__ */ jsxRuntimeExports.jsxs(material.Box, { children: [ /* @__PURE__ */ jsxRuntimeExports.jsxs(material.FormControl, { fullWidth: true, children: [ @@ -65396,37 +65383,23 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha __spreadProps(__spreadValues({ labelId: `${field.id}-label`, id: `${field.id}-select`, - value: resolveValue(controllerField.value, field.cat), + value: controllerField.value, multiple: field.cat.multiple !== 1, label: field.name, onChange: (event) => { - const v = event.target.value; - controllerField.onChange(Array.isArray(v) ? v.join(",") : v); + const { value } = event.target; + setValue(field.name, Array.isArray(value) ? value.join(",") : value); + controllerField.onChange(value); }, disabled: !field.ux.edit }, field.ux.props), { - children: resolveCategories(field.cat).map((opt) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.MenuItem, { value: opt.key, children: opt.title }, opt.key)) + children: categories.map((opt) => /* @__PURE__ */ jsxRuntimeExports.jsx(material.MenuItem, { value: opt.key, children: opt.title }, opt.key)) }) ) ] }), /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }, `${field.id}-box`); } - function resolveCategories(cat) { - return Object.keys(cat.item).map((key) => { - var _a, _b; - return { - title: (_b = (_a = cat.item) == null ? void 0 : _a[key]) == null ? void 0 : _b.title, - key - }; - }); - } - function resolveDefault(cat) { - return resdefault(cat, (val, item) => val); - } - function resolveValue(value, cat) { - return resvalue(value, cat, (val, item) => val); - } const CMPNAME$a = "BasicEntitySliderField"; const { Open: Open$9 } = gubu_minExports.Gubu; const BasicEntitySwitchFieldSpecShape = gubu_minExports.Gubu( @@ -65589,7 +65562,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha "ButtonGroup", "Select", "Switch", - "ToggleButton" + "ToggleButton", + "custom" ), edit: gubu_minExports.Default(true), rows: gubu_minExports.Default(3), @@ -65618,7 +65592,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }; function BasicEntityField(props) { const { ctx, spec } = props; - const { seneca } = ctx(); + const { seneca, cmp } = ctx(); const basicEntityField = BasicEntityFieldSpecShape(spec); const [plugin, setPlugin] = React$1.useState(false); const cid = basicEntityField.cid + "-" + basicEntityField.field.name; @@ -65637,7 +65611,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } }, []); const field = spec.field; - const Field = fieldMap[field.ux.kind]; + const Field = "custom" === field.ux.kind ? cmp[field.ux.cmp] : fieldMap[field.ux.kind]; return Field ? /* @__PURE__ */ jsxRuntimeExports.jsx(Field, { ctx, spec: basicEntityField }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", {}); } const { Open: Open$5, Child: Child$3 } = gubu_minExports.Gubu; @@ -65655,6 +65629,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const seneca = this; const spec = Shape$1(options.spec); const slot = spec.prefix + spec.name; + console.log("VxgBasicEntityEditPlugin", "slot", slot, "spec.name", spec.name); const fields = spec.order.reduce( (a, fn) => (fixField(fn, spec.field[fn], spec), a.push(spec.field[fn]), a), [] @@ -65662,7 +65637,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha for (const field of fields) { if ("Date" === field.ux.kind) { seneca.add( - "aim:app,on:BasicLed,modify:edit,view:" + spec.name, + "aim:app,on:BasicLed,modify:edit", + { view: spec.name }, function modify_edit_Date(msg) { return __async(this, null, function* () { const out = yield this.prior(msg); @@ -65692,7 +65668,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ); } else if ("Time" === field.ux.kind) { seneca.add( - "aim:app,on:BasicLed,modify:edit,view:" + spec.name, + "aim:app,on:BasicLed,modify:edit", + { view: spec.name }, function modify_edit_Time(msg) { return __async(this, null, function* () { const out = yield this.prior(msg); @@ -65722,7 +65699,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha ); } else if ("DateTime" === field.ux.kind) { seneca.add( - "aim:app,on:BasicLed,modify:edit,view:" + spec.name, + "aim:app,on:BasicLed,modify:edit", + { view: spec.name }, function modify_edit_Datetime(msg) { return __async(this, null, function* () { const out = yield this.prior(msg); @@ -65759,19 +65737,119 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha let item = __spreadValues({}, out); if (!item[field.name + "_orig$"]) { item[field.name + "_orig$"] = item[field.name]; - item[field.name] = Number(item[field.name]) / 60; + item[field.name + "_uival$"] = Number(item[field.name]) / 60; + item[field.name + "_marks$"] = util$1.resolveMarks( + field.ux.props.marks + ); } return item; }); } - ).add( - "aim:app,on:BasicLed,modify:save", + ); + } else if ("Select" === field.ux.kind) { + console.log("VxgBasicEntityEditPlugin", "Select", field.name); + seneca.add( + "aim:app,on:BasicLed,modify:edit", { view: spec.name }, - function modify_save_Slider(msg) { + function modify_edit_Select(msg) { return __async(this, null, function* () { const out = yield this.prior(msg); let item = __spreadValues({}, out); - item[field.name] = Number(item[field.name]) * 60; + if (!item[field.name + "_orig$"]) { + item[field.name + "_orig$"] = item[field.name]; + item[field.name + "_default$"] = resdefault( + field.cat, + (val) => val + ); + item[field.name + "_cat$"] = Object.keys(field.cat.item).map( + (key) => { + var _a, _b; + return { + title: (_b = (_a = field.cat.item) == null ? void 0 : _a[key]) == null ? void 0 : _b.title, + key + }; + } + ); + item[field.name + "_uival$"] = resvalue( + item[field.name], + field.cat, + (val) => val + ); + } + return item; + }); + } + ); + } else if ("Autocomplete" === field.ux.kind) { + console.log("VxgBasicEntityEditPlugin", "Autocomplete", field.name); + seneca.add( + "aim:app,on:BasicLed,modify:edit", + { view: spec.name }, + function modify_edit_Autocomplete(msg) { + return __async(this, null, function* () { + const out = yield this.prior(msg); + let item = __spreadValues({}, out); + if (!item[field.name + "_orig$"]) { + item[field.name + "_orig$"] = item[field.name]; + item[field.name + "_default$"] = resdefault( + field.cat, + (val, item2) => ({ + key: val, + title: item2.title + }) + ); + item[field.name + "_cat$"] = Object.keys(field.cat.item).map( + (key) => { + var _a, _b; + return { + title: (_b = (_a = field.cat.item) == null ? void 0 : _a[key]) == null ? void 0 : _b.title, + key + }; + } + ); + item[field.name + "_uival$"] = resvalue( + item[field.name], + field.cat, + (val, item2) => ({ + key: val, + title: item2.title + }) + ); + } + return item; + }); + } + ); + } else if ("RadioGroup" === field.ux.kind) { + console.log("VxgBasicEntityEditPlugin", "RadioGroup", field.name); + seneca.add( + "aim:app,on:BasicLed,modify:edit", + { view: spec.name }, + function modify_edit_RadioGroup(msg) { + return __async(this, null, function* () { + const out = yield this.prior(msg); + let item = __spreadValues({}, out); + if (!item[field.name + "_orig$"]) { + item[field.name + "_orig$"] = item[field.name]; + item[field.name + "_default$"] = field.cat.default; + item[field.name + "_cat$"] = Object.keys(field.cat.item).map( + (key) => { + var _a, _b; + return { + title: (_b = (_a = field.cat.item) == null ? void 0 : _a[key]) == null ? void 0 : _b.title, + key + }; + } + ); + item[field.name + "_uival$"] = resvalue( + item[field.name], + field.cat, + (val, item2) => ({ + key: val, + title: item2.title + }) + ); + } return item; }); } @@ -65797,6 +65875,14 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha field.ux.size = null == field.ux.size ? 4 : parseInt(field.ux.size, 10); } const util$1 = { + resolveMarks: (marks) => { + if (!marks || typeof marks === "object" && !Object.keys(marks).length) + return false; + return typeof marks === "object" ? Object.entries(marks).map(([key, value]) => ({ + label: value, + value: +key + })) : marks; + }, dateTimeFromUTC: (utc, tz) => { const date = new Date(utc); const iso = date.toISOString(); @@ -65925,7 +66011,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha } }, []); const { spec, slot, fields } = seneca.export( - "VxgBasicEntityEditPlugin/handle" + "VxgBasicEntityEditPlugin$" + cid + "/handle" ) || { spec: {}, slot: null, fields: [] }; const { ent, name } = spec; if (plugin && !ready) { @@ -65935,10 +66021,11 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha let { selectItem, selectList, selectMeta } = slotSelectors(slot); let item = reactRedux.useSelector((state) => selectItem(state)); React$1.useEffect(() => { - const fetchData = () => __async(this, null, function* () { - console.log("BEE", "effect", "mod:edit", "init", "view", name); - console.log("BEE", "effect", "mod:edit", "init", "item", item == null ? void 0 : item.title); + const modifyEdit = () => __async(this, null, function* () { + console.log("BEE", "effect", "modify:edit", "init", "view", name); + console.log("BEE", "effect", "modify:edit", "init", "item", item); if (item && name) { + console.log("BEE", "effect", "modify:edit", "seneca.direct"); item = yield seneca.direct("aim:app,on:BasicLed,modify:edit", { view: name, item, @@ -65948,7 +66035,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha reset(item); } }); - fetchData(); + modifyEdit(); }, [item, name]); const params = reactRouterDom.useParams(); React$1.useEffect(() => { @@ -65967,6 +66054,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha register, handleSubmit, getValues, + setValue, reset, control, formState: { errors } @@ -66004,6 +66092,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha field, register, getValues, + setValue, control, errors } @@ -66023,7 +66112,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1 = Check.default = void 0; var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); - var _jsxRuntime = requireJsxRuntime(); + var _jsxRuntime = jsxRuntimeExports; var _default = default_1 = Check.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { d: "M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" }), "Check"); @@ -66219,13 +66308,10 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); } ).message( - "aim:app,on:BasicLed,save:item,redux$:true", + "aim:app,on:BasicLed,save:item", function(msg, meta) { return __async(this, null, function* () { const data = Object.entries(spec.def.edit.field).filter((n) => false !== n[1].ux.edit).reduce((a, n) => (a[n[0]] = msg.data[n[0]], a), {}); - const state = meta.custom.state(); - let view = state.view[name]; - view.alert = { active: true, message: "Saved", level: "success" }; const item = yield seneca.entity(entCanon).save$(data); navigate("/view/" + name + "/edit/" + item.id); }); From 814ed030a8722d7972d0fe8cb8029ffa4260ad47 Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Mon, 12 Aug 2024 18:13:47 +0100 Subject: [PATCH 120/122] Add support for custom input field --- src/lib/BasicEntityField.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/lib/BasicEntityField.tsx b/src/lib/BasicEntityField.tsx index dd95fda..4321367 100644 --- a/src/lib/BasicEntityField.tsx +++ b/src/lib/BasicEntityField.tsx @@ -48,7 +48,8 @@ const BasicEntityFieldSpecShape = Gubu( 'ButtonGroup', 'Select', 'Switch', - 'ToggleButton' + 'ToggleButton', + 'custom' ), edit: Default(true), rows: Default(3), @@ -79,7 +80,7 @@ const fieldMap: any = { function BasicEntityField (props: any) { const { ctx, spec } = props - const { seneca } = ctx() + const { seneca, cmp } = ctx() const basicEntityField: Spec = BasicEntityFieldSpecShape(spec) const [plugin, setPlugin] = useState(false) @@ -107,7 +108,8 @@ function BasicEntityField (props: any) { // ) || { Field: null } const field: any = spec.field - const Field: any = fieldMap[field.ux.kind] + const Field: any = + 'custom' === field.ux.kind ? cmp[field.ux.cmp] : fieldMap[field.ux.kind] return Field ? :
} From cea0703e07e0084b786333dd7a54760ee492755c Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Mon, 12 Aug 2024 18:28:11 +0100 Subject: [PATCH 121/122] Fix BasicEntityRadioGroupField --- dist/BasicEntityRadioGroupField.d.ts | 5 - dist/voxgig-model-react.es.js | 112 ++++++++++------------- dist/voxgig-model-react.umd.js | 112 ++++++++++------------- src/lib/BasicEntityAutocompleteField.tsx | 2 +- src/lib/BasicEntityRadioGroupField.tsx | 15 --- src/lib/VxgBasicEntityEditPlugin.ts | 7 +- 6 files changed, 103 insertions(+), 150 deletions(-) diff --git a/dist/BasicEntityRadioGroupField.d.ts b/dist/BasicEntityRadioGroupField.d.ts index 5a2efe2..3219868 100644 --- a/dist/BasicEntityRadioGroupField.d.ts +++ b/dist/BasicEntityRadioGroupField.d.ts @@ -1,7 +1,2 @@ declare function BasicEntityRadioGroupField(props: any): import("react/jsx-runtime").JSX.Element; -export declare function resolveCategories(cat: any): { - title: any; - key: string; -}[]; -export declare function resolveDefault(cat: any): any; export { BasicEntityRadioGroupField }; diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index 5e29af0..6050e05 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -1030,15 +1030,21 @@ function requireReactJsxRuntime_development() { } return reactJsxRuntime_development; } -var jsxRuntime = jsxRuntime$2.exports; -"use strict"; -if (process.env.NODE_ENV === "production") { - jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); -} else { - jsxRuntime$2.exports = requireReactJsxRuntime_development(); +var jsxRuntime$1 = jsxRuntime$2.exports; +var hasRequiredJsxRuntime; +function requireJsxRuntime() { + if (hasRequiredJsxRuntime) return jsxRuntime$2.exports; + hasRequiredJsxRuntime = 1; + "use strict"; + if (process.env.NODE_ENV === "production") { + jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); + } else { + jsxRuntime$2.exports = requireReactJsxRuntime_development(); + } + return jsxRuntime$2.exports; } -var jsxRuntimeExports = jsxRuntime$2.exports; -const jsxRuntime$1 = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); +var jsxRuntimeExports = requireJsxRuntime(); +const jsxRuntime = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); var gubu_min$2 = { exports: {} }; var gubu_min = gubu_min$2.exports; (function(module, exports) { @@ -25368,7 +25374,7 @@ Object.defineProperty(ArrowDownward, "__esModule", { }); var default_1$y = ArrowDownward.default = void 0; var _createSvgIcon$y = _interopRequireDefault$y(requireCreateSvgIcon()); -var _jsxRuntime$y = jsxRuntimeExports; +var _jsxRuntime$y = requireJsxRuntime(); var _default$y = default_1$y = ArrowDownward.default = (0, _createSvgIcon$y.default)(/* @__PURE__ */ (0, _jsxRuntime$y.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); @@ -25381,7 +25387,7 @@ Object.defineProperty(ArrowRight, "__esModule", { }); var default_1$x = ArrowRight.default = void 0; var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); -var _jsxRuntime$x = jsxRuntimeExports; +var _jsxRuntime$x = requireJsxRuntime(); var _default$x = default_1$x = ArrowRight.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); @@ -25394,7 +25400,7 @@ Object.defineProperty(Cancel, "__esModule", { }); var default_1$w = Cancel.default = void 0; var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); -var _jsxRuntime$w = jsxRuntimeExports; +var _jsxRuntime$w = requireJsxRuntime(); var _default$w = default_1$w = Cancel.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); @@ -25407,7 +25413,7 @@ Object.defineProperty(ChevronLeft, "__esModule", { }); var default_1$v = ChevronLeft.default = void 0; var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); -var _jsxRuntime$v = jsxRuntimeExports; +var _jsxRuntime$v = requireJsxRuntime(); var _default$v = default_1$v = ChevronLeft.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); @@ -25420,7 +25426,7 @@ Object.defineProperty(ChevronRight, "__esModule", { }); var default_1$u = ChevronRight.default = void 0; var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); -var _jsxRuntime$u = jsxRuntimeExports; +var _jsxRuntime$u = requireJsxRuntime(); var _default$u = default_1$u = ChevronRight.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); @@ -25433,7 +25439,7 @@ Object.defineProperty(ClearAll, "__esModule", { }); var default_1$t = ClearAll.default = void 0; var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); -var _jsxRuntime$t = jsxRuntimeExports; +var _jsxRuntime$t = requireJsxRuntime(); var _default$t = default_1$t = ClearAll.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); @@ -25446,7 +25452,7 @@ Object.defineProperty(Close, "__esModule", { }); var default_1$s = Close.default = void 0; var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); -var _jsxRuntime$s = jsxRuntimeExports; +var _jsxRuntime$s = requireJsxRuntime(); var _default$s = default_1$s = Close.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); @@ -25459,7 +25465,7 @@ Object.defineProperty(ContentCopy, "__esModule", { }); var default_1$r = ContentCopy.default = void 0; var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); -var _jsxRuntime$r = jsxRuntimeExports; +var _jsxRuntime$r = requireJsxRuntime(); var _default$r = default_1$r = ContentCopy.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); @@ -25472,7 +25478,7 @@ Object.defineProperty(DensityLarge, "__esModule", { }); var default_1$q = DensityLarge.default = void 0; var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); -var _jsxRuntime$q = jsxRuntimeExports; +var _jsxRuntime$q = requireJsxRuntime(); var _default$q = default_1$q = DensityLarge.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); @@ -25485,7 +25491,7 @@ Object.defineProperty(DensityMedium, "__esModule", { }); var default_1$p = DensityMedium.default = void 0; var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); -var _jsxRuntime$p = jsxRuntimeExports; +var _jsxRuntime$p = requireJsxRuntime(); var _default$p = default_1$p = DensityMedium.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); @@ -25498,7 +25504,7 @@ Object.defineProperty(DensitySmall, "__esModule", { }); var default_1$o = DensitySmall.default = void 0; var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); -var _jsxRuntime$o = jsxRuntimeExports; +var _jsxRuntime$o = requireJsxRuntime(); var _default$o = default_1$o = DensitySmall.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); @@ -25511,7 +25517,7 @@ Object.defineProperty(DragHandle, "__esModule", { }); var default_1$n = DragHandle.default = void 0; var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); -var _jsxRuntime$n = jsxRuntimeExports; +var _jsxRuntime$n = requireJsxRuntime(); var _default$n = default_1$n = DragHandle.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); @@ -25524,7 +25530,7 @@ Object.defineProperty(DynamicFeed, "__esModule", { }); var default_1$m = DynamicFeed.default = void 0; var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); -var _jsxRuntime$m = jsxRuntimeExports; +var _jsxRuntime$m = requireJsxRuntime(); var _default$m = default_1$m = DynamicFeed.default = (0, _createSvgIcon$m.default)([/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { @@ -25539,7 +25545,7 @@ Object.defineProperty(Edit, "__esModule", { }); var default_1$l = Edit.default = void 0; var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); -var _jsxRuntime$l = jsxRuntimeExports; +var _jsxRuntime$l = requireJsxRuntime(); var _default$l = default_1$l = Edit.default = (0, _createSvgIcon$l.default)(/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); @@ -25552,7 +25558,7 @@ Object.defineProperty(ExpandMore, "__esModule", { }); var default_1$k = ExpandMore.default = void 0; var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); -var _jsxRuntime$k = jsxRuntimeExports; +var _jsxRuntime$k = requireJsxRuntime(); var _default$k = default_1$k = ExpandMore.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); @@ -25565,7 +25571,7 @@ Object.defineProperty(FilterAlt, "__esModule", { }); var default_1$j = FilterAlt.default = void 0; var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); -var _jsxRuntime$j = jsxRuntimeExports; +var _jsxRuntime$j = requireJsxRuntime(); var _default$j = default_1$j = FilterAlt.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); @@ -25578,7 +25584,7 @@ Object.defineProperty(FilterList, "__esModule", { }); var default_1$i = FilterList.default = void 0; var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); -var _jsxRuntime$i = jsxRuntimeExports; +var _jsxRuntime$i = requireJsxRuntime(); var _default$i = default_1$i = FilterList.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); @@ -25591,7 +25597,7 @@ Object.defineProperty(FilterListOff, "__esModule", { }); var default_1$h = FilterListOff.default = void 0; var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); -var _jsxRuntime$h = jsxRuntimeExports; +var _jsxRuntime$h = requireJsxRuntime(); var _default$h = default_1$h = FilterListOff.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); @@ -25604,7 +25610,7 @@ Object.defineProperty(FirstPage, "__esModule", { }); var default_1$g = FirstPage.default = void 0; var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); -var _jsxRuntime$g = jsxRuntimeExports; +var _jsxRuntime$g = requireJsxRuntime(); var _default$g = default_1$g = FirstPage.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); @@ -25617,7 +25623,7 @@ Object.defineProperty(Fullscreen, "__esModule", { }); var default_1$f = Fullscreen.default = void 0; var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); -var _jsxRuntime$f = jsxRuntimeExports; +var _jsxRuntime$f = requireJsxRuntime(); var _default$f = default_1$f = Fullscreen.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); @@ -25630,7 +25636,7 @@ Object.defineProperty(FullscreenExit, "__esModule", { }); var default_1$e = FullscreenExit.default = void 0; var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); -var _jsxRuntime$e = jsxRuntimeExports; +var _jsxRuntime$e = requireJsxRuntime(); var _default$e = default_1$e = FullscreenExit.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); @@ -25643,7 +25649,7 @@ Object.defineProperty(KeyboardDoubleArrowDown, "__esModule", { }); var default_1$d = KeyboardDoubleArrowDown.default = void 0; var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); -var _jsxRuntime$d = jsxRuntimeExports; +var _jsxRuntime$d = requireJsxRuntime(); var _default$d = default_1$d = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$d.default)([/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { @@ -25658,7 +25664,7 @@ Object.defineProperty(LastPage, "__esModule", { }); var default_1$c = LastPage.default = void 0; var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); -var _jsxRuntime$c = jsxRuntimeExports; +var _jsxRuntime$c = requireJsxRuntime(); var _default$c = default_1$c = LastPage.default = (0, _createSvgIcon$c.default)(/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); @@ -25671,7 +25677,7 @@ Object.defineProperty(MoreHoriz, "__esModule", { }); var default_1$b = MoreHoriz.default = void 0; var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); -var _jsxRuntime$b = jsxRuntimeExports; +var _jsxRuntime$b = requireJsxRuntime(); var _default$b = default_1$b = MoreHoriz.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); @@ -25684,7 +25690,7 @@ Object.defineProperty(MoreVert, "__esModule", { }); var default_1$a = MoreVert.default = void 0; var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); -var _jsxRuntime$a = jsxRuntimeExports; +var _jsxRuntime$a = requireJsxRuntime(); var _default$a = default_1$a = MoreVert.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); @@ -25697,7 +25703,7 @@ Object.defineProperty(PushPin, "__esModule", { }); var default_1$9 = PushPin.default = void 0; var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); -var _jsxRuntime$9 = jsxRuntimeExports; +var _jsxRuntime$9 = requireJsxRuntime(); var _default$9 = default_1$9 = PushPin.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" @@ -25711,7 +25717,7 @@ Object.defineProperty(RestartAlt, "__esModule", { }); var default_1$8 = RestartAlt.default = void 0; var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); -var _jsxRuntime$8 = jsxRuntimeExports; +var _jsxRuntime$8 = requireJsxRuntime(); var _default$8 = default_1$8 = RestartAlt.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); @@ -25724,7 +25730,7 @@ Object.defineProperty(Save, "__esModule", { }); var default_1$7 = Save.default = void 0; var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); -var _jsxRuntime$7 = jsxRuntimeExports; +var _jsxRuntime$7 = requireJsxRuntime(); var _default$7 = default_1$7 = Save.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); @@ -25737,7 +25743,7 @@ Object.defineProperty(Search, "__esModule", { }); var default_1$6 = Search.default = void 0; var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); -var _jsxRuntime$6 = jsxRuntimeExports; +var _jsxRuntime$6 = requireJsxRuntime(); var _default$6 = default_1$6 = Search.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); @@ -25750,7 +25756,7 @@ Object.defineProperty(SearchOff, "__esModule", { }); var default_1$5 = SearchOff.default = void 0; var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); -var _jsxRuntime$5 = jsxRuntimeExports; +var _jsxRuntime$5 = requireJsxRuntime(); var _default$5 = default_1$5 = SearchOff.default = (0, _createSvgIcon$5.default)([/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { @@ -25765,7 +25771,7 @@ Object.defineProperty(Sort, "__esModule", { }); var default_1$4 = Sort.default = void 0; var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); -var _jsxRuntime$4 = jsxRuntimeExports; +var _jsxRuntime$4 = requireJsxRuntime(); var _default$4 = default_1$4 = Sort.default = (0, _createSvgIcon$4.default)(/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); @@ -25778,7 +25784,7 @@ Object.defineProperty(SyncAlt, "__esModule", { }); var default_1$3 = SyncAlt.default = void 0; var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); -var _jsxRuntime$3 = jsxRuntimeExports; +var _jsxRuntime$3 = requireJsxRuntime(); var _default$3 = default_1$3 = SyncAlt.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); @@ -25791,7 +25797,7 @@ Object.defineProperty(ViewColumn, "__esModule", { }); var default_1$2 = ViewColumn.default = void 0; var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); -var _jsxRuntime$2 = jsxRuntimeExports; +var _jsxRuntime$2 = requireJsxRuntime(); var _default$2 = default_1$2 = ViewColumn.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); @@ -25804,7 +25810,7 @@ Object.defineProperty(VisibilityOff, "__esModule", { }); var default_1$1 = VisibilityOff.default = void 0; var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); -var _jsxRuntime$1 = jsxRuntimeExports; +var _jsxRuntime$1 = requireJsxRuntime(); var _default$1 = default_1$1 = VisibilityOff.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); @@ -64816,7 +64822,6 @@ function BasicEntityAutocompleteField(props) { const { spec } = props; const basicEntityAutocompleteField = BasicEntityAutocompleteFieldSpecShape(spec); const { control, field, errors, getValues, setValue } = basicEntityAutocompleteField; - console.log("BERF", "multiple", field.cat.multiple); const defaultAlternative = field.cat.multiple === 1 ? {} : []; const defaultValues = getValues(`${field.name}_default$`) || defaultAlternative; const categories = getValues(`${field.name}_cat$`) || []; @@ -64952,7 +64957,6 @@ function BasicEntityRadioGroupField(props) { const { control, field, errors, getValues, setValue } = basicEntityRadioGroupField; const defaultValues = getValues(`${field.name}_default$`) || ""; const categories = getValues(`${field.name}_cat$`) || []; - console.log("BERF", "default", defaultValues); const err = errors[field.name]; const { field: controllerField, @@ -64987,19 +64991,6 @@ function BasicEntityRadioGroupField(props) { /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }); } -function resolveCategories(cat) { - return Object.keys(cat.item).map((key) => { - var _a, _b; - return { - title: (_b = (_a = cat.item) == null ? void 0 : _a[key]) == null ? void 0 : _b.title, - key - }; - }); -} -function resolveDefault(cat) { - const { default: defaultValues } = cat; - return defaultValues; -} const CMPNAME$j = "BasicEntityTextBoxField"; const { Open: Open$i } = gubu_minExports.Gubu; const BasicEntityTextBoxFieldSpecShape = gubu_minExports.Gubu( @@ -65832,10 +65823,7 @@ function VxgBasicEntityEditPlugin(options) { item[field.name + "_uival$"] = resvalue( item[field.name], field.cat, - (val, item2) => ({ - key: val, - title: item2.title - }) + (val) => val ); } return item; @@ -66100,7 +66088,7 @@ Object.defineProperty(Check, "__esModule", { }); var default_1 = Check.default = void 0; var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); -var _jsxRuntime = jsxRuntimeExports; +var _jsxRuntime = requireJsxRuntime(); var _default = default_1 = Check.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { d: "M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" }), "Check"); diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index 619e597..3c6b56d 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -1042,15 +1042,21 @@ var __async = (__this, __arguments, generator) => { } return reactJsxRuntime_development; } - var jsxRuntime = jsxRuntime$2.exports; - "use strict"; - if (process.env.NODE_ENV === "production") { - jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); - } else { - jsxRuntime$2.exports = requireReactJsxRuntime_development(); + var jsxRuntime$1 = jsxRuntime$2.exports; + var hasRequiredJsxRuntime; + function requireJsxRuntime() { + if (hasRequiredJsxRuntime) return jsxRuntime$2.exports; + hasRequiredJsxRuntime = 1; + "use strict"; + if (process.env.NODE_ENV === "production") { + jsxRuntime$2.exports = requireReactJsxRuntime_production_min(); + } else { + jsxRuntime$2.exports = requireReactJsxRuntime_development(); + } + return jsxRuntime$2.exports; } - var jsxRuntimeExports = jsxRuntime$2.exports; - const jsxRuntime$1 = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); + var jsxRuntimeExports = requireJsxRuntime(); + const jsxRuntime = /* @__PURE__ */ getDefaultExportFromCjs(jsxRuntimeExports); var gubu_min$2 = { exports: {} }; var gubu_min = gubu_min$2.exports; (function(module2, exports3) { @@ -25380,7 +25386,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$y = ArrowDownward.default = void 0; var _createSvgIcon$y = _interopRequireDefault$y(requireCreateSvgIcon()); - var _jsxRuntime$y = jsxRuntimeExports; + var _jsxRuntime$y = requireJsxRuntime(); var _default$y = default_1$y = ArrowDownward.default = (0, _createSvgIcon$y.default)(/* @__PURE__ */ (0, _jsxRuntime$y.jsx)("path", { d: "m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z" }), "ArrowDownward"); @@ -25393,7 +25399,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$x = ArrowRight.default = void 0; var _createSvgIcon$x = _interopRequireDefault$x(requireCreateSvgIcon()); - var _jsxRuntime$x = jsxRuntimeExports; + var _jsxRuntime$x = requireJsxRuntime(); var _default$x = default_1$x = ArrowRight.default = (0, _createSvgIcon$x.default)(/* @__PURE__ */ (0, _jsxRuntime$x.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); @@ -25406,7 +25412,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$w = Cancel.default = void 0; var _createSvgIcon$w = _interopRequireDefault$w(requireCreateSvgIcon()); - var _jsxRuntime$w = jsxRuntimeExports; + var _jsxRuntime$w = requireJsxRuntime(); var _default$w = default_1$w = Cancel.default = (0, _createSvgIcon$w.default)(/* @__PURE__ */ (0, _jsxRuntime$w.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), "Cancel"); @@ -25419,7 +25425,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$v = ChevronLeft.default = void 0; var _createSvgIcon$v = _interopRequireDefault$v(requireCreateSvgIcon()); - var _jsxRuntime$v = jsxRuntimeExports; + var _jsxRuntime$v = requireJsxRuntime(); var _default$v = default_1$v = ChevronLeft.default = (0, _createSvgIcon$v.default)(/* @__PURE__ */ (0, _jsxRuntime$v.jsx)("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"); @@ -25432,7 +25438,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$u = ChevronRight.default = void 0; var _createSvgIcon$u = _interopRequireDefault$u(requireCreateSvgIcon()); - var _jsxRuntime$u = jsxRuntimeExports; + var _jsxRuntime$u = requireJsxRuntime(); var _default$u = default_1$u = ChevronRight.default = (0, _createSvgIcon$u.default)(/* @__PURE__ */ (0, _jsxRuntime$u.jsx)("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"); @@ -25445,7 +25451,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$t = ClearAll.default = void 0; var _createSvgIcon$t = _interopRequireDefault$t(requireCreateSvgIcon()); - var _jsxRuntime$t = jsxRuntimeExports; + var _jsxRuntime$t = requireJsxRuntime(); var _default$t = default_1$t = ClearAll.default = (0, _createSvgIcon$t.default)(/* @__PURE__ */ (0, _jsxRuntime$t.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), "ClearAll"); @@ -25458,7 +25464,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$s = Close.default = void 0; var _createSvgIcon$s = _interopRequireDefault$s(requireCreateSvgIcon()); - var _jsxRuntime$s = jsxRuntimeExports; + var _jsxRuntime$s = requireJsxRuntime(); var _default$s = default_1$s = Close.default = (0, _createSvgIcon$s.default)(/* @__PURE__ */ (0, _jsxRuntime$s.jsx)("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"); @@ -25471,7 +25477,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$r = ContentCopy.default = void 0; var _createSvgIcon$r = _interopRequireDefault$r(requireCreateSvgIcon()); - var _jsxRuntime$r = jsxRuntimeExports; + var _jsxRuntime$r = requireJsxRuntime(); var _default$r = default_1$r = ContentCopy.default = (0, _createSvgIcon$r.default)(/* @__PURE__ */ (0, _jsxRuntime$r.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), "ContentCopy"); @@ -25484,7 +25490,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$q = DensityLarge.default = void 0; var _createSvgIcon$q = _interopRequireDefault$q(requireCreateSvgIcon()); - var _jsxRuntime$q = jsxRuntimeExports; + var _jsxRuntime$q = requireJsxRuntime(); var _default$q = default_1$q = DensityLarge.default = (0, _createSvgIcon$q.default)(/* @__PURE__ */ (0, _jsxRuntime$q.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3z" }), "DensityLarge"); @@ -25497,7 +25503,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$p = DensityMedium.default = void 0; var _createSvgIcon$p = _interopRequireDefault$p(requireCreateSvgIcon()); - var _jsxRuntime$p = jsxRuntimeExports; + var _jsxRuntime$p = requireJsxRuntime(); var _default$p = default_1$p = DensityMedium.default = (0, _createSvgIcon$p.default)(/* @__PURE__ */ (0, _jsxRuntime$p.jsx)("path", { d: "M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z" }), "DensityMedium"); @@ -25510,7 +25516,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$o = DensitySmall.default = void 0; var _createSvgIcon$o = _interopRequireDefault$o(requireCreateSvgIcon()); - var _jsxRuntime$o = jsxRuntimeExports; + var _jsxRuntime$o = requireJsxRuntime(); var _default$o = default_1$o = DensitySmall.default = (0, _createSvgIcon$o.default)(/* @__PURE__ */ (0, _jsxRuntime$o.jsx)("path", { d: "M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z" }), "DensitySmall"); @@ -25523,7 +25529,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$n = DragHandle.default = void 0; var _createSvgIcon$n = _interopRequireDefault$n(requireCreateSvgIcon()); - var _jsxRuntime$n = jsxRuntimeExports; + var _jsxRuntime$n = requireJsxRuntime(); var _default$n = default_1$n = DragHandle.default = (0, _createSvgIcon$n.default)(/* @__PURE__ */ (0, _jsxRuntime$n.jsx)("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"); @@ -25536,7 +25542,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$m = DynamicFeed.default = void 0; var _createSvgIcon$m = _interopRequireDefault$m(requireCreateSvgIcon()); - var _jsxRuntime$m = jsxRuntimeExports; + var _jsxRuntime$m = requireJsxRuntime(); var _default$m = default_1$m = DynamicFeed.default = (0, _createSvgIcon$m.default)([/* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { d: "M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$m.jsx)("path", { @@ -25551,7 +25557,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$l = Edit.default = void 0; var _createSvgIcon$l = _interopRequireDefault$l(requireCreateSvgIcon()); - var _jsxRuntime$l = jsxRuntimeExports; + var _jsxRuntime$l = requireJsxRuntime(); var _default$l = default_1$l = Edit.default = (0, _createSvgIcon$l.default)(/* @__PURE__ */ (0, _jsxRuntime$l.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), "Edit"); @@ -25564,7 +25570,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$k = ExpandMore.default = void 0; var _createSvgIcon$k = _interopRequireDefault$k(requireCreateSvgIcon()); - var _jsxRuntime$k = jsxRuntimeExports; + var _jsxRuntime$k = requireJsxRuntime(); var _default$k = default_1$k = ExpandMore.default = (0, _createSvgIcon$k.default)(/* @__PURE__ */ (0, _jsxRuntime$k.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"); @@ -25577,7 +25583,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$j = FilterAlt.default = void 0; var _createSvgIcon$j = _interopRequireDefault$j(requireCreateSvgIcon()); - var _jsxRuntime$j = jsxRuntimeExports; + var _jsxRuntime$j = requireJsxRuntime(); var _default$j = default_1$j = FilterAlt.default = (0, _createSvgIcon$j.default)(/* @__PURE__ */ (0, _jsxRuntime$j.jsx)("path", { d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61" }), "FilterAlt"); @@ -25590,7 +25596,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$i = FilterList.default = void 0; var _createSvgIcon$i = _interopRequireDefault$i(requireCreateSvgIcon()); - var _jsxRuntime$i = jsxRuntimeExports; + var _jsxRuntime$i = requireJsxRuntime(); var _default$i = default_1$i = FilterList.default = (0, _createSvgIcon$i.default)(/* @__PURE__ */ (0, _jsxRuntime$i.jsx)("path", { d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" }), "FilterList"); @@ -25603,7 +25609,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$h = FilterListOff.default = void 0; var _createSvgIcon$h = _interopRequireDefault$h(requireCreateSvgIcon()); - var _jsxRuntime$h = jsxRuntimeExports; + var _jsxRuntime$h = requireJsxRuntime(); var _default$h = default_1$h = FilterListOff.default = (0, _createSvgIcon$h.default)(/* @__PURE__ */ (0, _jsxRuntime$h.jsx)("path", { d: "M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z" }), "FilterListOff"); @@ -25616,7 +25622,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$g = FirstPage.default = void 0; var _createSvgIcon$g = _interopRequireDefault$g(requireCreateSvgIcon()); - var _jsxRuntime$g = jsxRuntimeExports; + var _jsxRuntime$g = requireJsxRuntime(); var _default$g = default_1$g = FirstPage.default = (0, _createSvgIcon$g.default)(/* @__PURE__ */ (0, _jsxRuntime$g.jsx)("path", { d: "M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), "FirstPage"); @@ -25629,7 +25635,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$f = Fullscreen.default = void 0; var _createSvgIcon$f = _interopRequireDefault$f(requireCreateSvgIcon()); - var _jsxRuntime$f = jsxRuntimeExports; + var _jsxRuntime$f = requireJsxRuntime(); var _default$f = default_1$f = Fullscreen.default = (0, _createSvgIcon$f.default)(/* @__PURE__ */ (0, _jsxRuntime$f.jsx)("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "Fullscreen"); @@ -25642,7 +25648,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$e = FullscreenExit.default = void 0; var _createSvgIcon$e = _interopRequireDefault$e(requireCreateSvgIcon()); - var _jsxRuntime$e = jsxRuntimeExports; + var _jsxRuntime$e = requireJsxRuntime(); var _default$e = default_1$e = FullscreenExit.default = (0, _createSvgIcon$e.default)(/* @__PURE__ */ (0, _jsxRuntime$e.jsx)("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExit"); @@ -25655,7 +25661,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$d = KeyboardDoubleArrowDown.default = void 0; var _createSvgIcon$d = _interopRequireDefault$d(requireCreateSvgIcon()); - var _jsxRuntime$d = jsxRuntimeExports; + var _jsxRuntime$d = requireJsxRuntime(); var _default$d = default_1$d = KeyboardDoubleArrowDown.default = (0, _createSvgIcon$d.default)([/* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { d: "M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$d.jsx)("path", { @@ -25670,7 +25676,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$c = LastPage.default = void 0; var _createSvgIcon$c = _interopRequireDefault$c(requireCreateSvgIcon()); - var _jsxRuntime$c = jsxRuntimeExports; + var _jsxRuntime$c = requireJsxRuntime(); var _default$c = default_1$c = LastPage.default = (0, _createSvgIcon$c.default)(/* @__PURE__ */ (0, _jsxRuntime$c.jsx)("path", { d: "M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), "LastPage"); @@ -25683,7 +25689,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$b = MoreHoriz.default = void 0; var _createSvgIcon$b = _interopRequireDefault$b(requireCreateSvgIcon()); - var _jsxRuntime$b = jsxRuntimeExports; + var _jsxRuntime$b = requireJsxRuntime(); var _default$b = default_1$b = MoreHoriz.default = (0, _createSvgIcon$b.default)(/* @__PURE__ */ (0, _jsxRuntime$b.jsx)("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHoriz"); @@ -25696,7 +25702,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$a = MoreVert.default = void 0; var _createSvgIcon$a = _interopRequireDefault$a(requireCreateSvgIcon()); - var _jsxRuntime$a = jsxRuntimeExports; + var _jsxRuntime$a = requireJsxRuntime(); var _default$a = default_1$a = MoreVert.default = (0, _createSvgIcon$a.default)(/* @__PURE__ */ (0, _jsxRuntime$a.jsx)("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVert"); @@ -25709,7 +25715,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$9 = PushPin.default = void 0; var _createSvgIcon$9 = _interopRequireDefault$9(requireCreateSvgIcon()); - var _jsxRuntime$9 = jsxRuntimeExports; + var _jsxRuntime$9 = requireJsxRuntime(); var _default$9 = default_1$9 = PushPin.default = (0, _createSvgIcon$9.default)(/* @__PURE__ */ (0, _jsxRuntime$9.jsx)("path", { fillRule: "evenodd", d: "M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3" @@ -25723,7 +25729,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$8 = RestartAlt.default = void 0; var _createSvgIcon$8 = _interopRequireDefault$8(requireCreateSvgIcon()); - var _jsxRuntime$8 = jsxRuntimeExports; + var _jsxRuntime$8 = requireJsxRuntime(); var _default$8 = default_1$8 = RestartAlt.default = (0, _createSvgIcon$8.default)(/* @__PURE__ */ (0, _jsxRuntime$8.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"); @@ -25736,7 +25742,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$7 = Save.default = void 0; var _createSvgIcon$7 = _interopRequireDefault$7(requireCreateSvgIcon()); - var _jsxRuntime$7 = jsxRuntimeExports; + var _jsxRuntime$7 = requireJsxRuntime(); var _default$7 = default_1$7 = Save.default = (0, _createSvgIcon$7.default)(/* @__PURE__ */ (0, _jsxRuntime$7.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), "Save"); @@ -25749,7 +25755,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$6 = Search.default = void 0; var _createSvgIcon$6 = _interopRequireDefault$6(requireCreateSvgIcon()); - var _jsxRuntime$6 = jsxRuntimeExports; + var _jsxRuntime$6 = requireJsxRuntime(); var _default$6 = default_1$6 = Search.default = (0, _createSvgIcon$6.default)(/* @__PURE__ */ (0, _jsxRuntime$6.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); @@ -25762,7 +25768,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$5 = SearchOff.default = void 0; var _createSvgIcon$5 = _interopRequireDefault$5(requireCreateSvgIcon()); - var _jsxRuntime$5 = jsxRuntimeExports; + var _jsxRuntime$5 = requireJsxRuntime(); var _default$5 = default_1$5 = SearchOff.default = (0, _createSvgIcon$5.default)([/* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z" }, "0"), /* @__PURE__ */ (0, _jsxRuntime$5.jsx)("path", { @@ -25777,7 +25783,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$4 = Sort.default = void 0; var _createSvgIcon$4 = _interopRequireDefault$4(requireCreateSvgIcon()); - var _jsxRuntime$4 = jsxRuntimeExports; + var _jsxRuntime$4 = requireJsxRuntime(); var _default$4 = default_1$4 = Sort.default = (0, _createSvgIcon$4.default)(/* @__PURE__ */ (0, _jsxRuntime$4.jsx)("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "Sort"); @@ -25790,7 +25796,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$3 = SyncAlt.default = void 0; var _createSvgIcon$3 = _interopRequireDefault$3(requireCreateSvgIcon()); - var _jsxRuntime$3 = jsxRuntimeExports; + var _jsxRuntime$3 = requireJsxRuntime(); var _default$3 = default_1$3 = SyncAlt.default = (0, _createSvgIcon$3.default)(/* @__PURE__ */ (0, _jsxRuntime$3.jsx)("path", { d: "m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z" }), "SyncAlt"); @@ -25803,7 +25809,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$2 = ViewColumn.default = void 0; var _createSvgIcon$2 = _interopRequireDefault$2(requireCreateSvgIcon()); - var _jsxRuntime$2 = jsxRuntimeExports; + var _jsxRuntime$2 = requireJsxRuntime(); var _default$2 = default_1$2 = ViewColumn.default = (0, _createSvgIcon$2.default)(/* @__PURE__ */ (0, _jsxRuntime$2.jsx)("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn"); @@ -25816,7 +25822,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1$1 = VisibilityOff.default = void 0; var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon()); - var _jsxRuntime$1 = jsxRuntimeExports; + var _jsxRuntime$1 = requireJsxRuntime(); var _default$1 = default_1$1 = VisibilityOff.default = (0, _createSvgIcon$1.default)(/* @__PURE__ */ (0, _jsxRuntime$1.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"); @@ -64828,7 +64834,6 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const { spec } = props; const basicEntityAutocompleteField = BasicEntityAutocompleteFieldSpecShape(spec); const { control, field, errors, getValues, setValue } = basicEntityAutocompleteField; - console.log("BERF", "multiple", field.cat.multiple); const defaultAlternative = field.cat.multiple === 1 ? {} : []; const defaultValues = getValues(`${field.name}_default$`) || defaultAlternative; const categories = getValues(`${field.name}_cat$`) || []; @@ -64964,7 +64969,6 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha const { control, field, errors, getValues, setValue } = basicEntityRadioGroupField; const defaultValues = getValues(`${field.name}_default$`) || ""; const categories = getValues(`${field.name}_cat$`) || []; - console.log("BERF", "default", defaultValues); const err = errors[field.name]; const { field: controllerField, @@ -64999,19 +65003,6 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha /* @__PURE__ */ jsxRuntimeExports.jsx(BasicEntityFieldError, { err }) ] }); } - function resolveCategories(cat) { - return Object.keys(cat.item).map((key) => { - var _a, _b; - return { - title: (_b = (_a = cat.item) == null ? void 0 : _a[key]) == null ? void 0 : _b.title, - key - }; - }); - } - function resolveDefault(cat) { - const { default: defaultValues } = cat; - return defaultValues; - } const CMPNAME$j = "BasicEntityTextBoxField"; const { Open: Open$i } = gubu_minExports.Gubu; const BasicEntityTextBoxFieldSpecShape = gubu_minExports.Gubu( @@ -65844,10 +65835,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha item[field.name + "_uival$"] = resvalue( item[field.name], field.cat, - (val, item2) => ({ - key: val, - title: item2.title - }) + (val) => val ); } return item; @@ -66112,7 +66100,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha }); var default_1 = Check.default = void 0; var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon()); - var _jsxRuntime = jsxRuntimeExports; + var _jsxRuntime = requireJsxRuntime(); var _default = default_1 = Check.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", { d: "M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" }), "Check"); diff --git a/src/lib/BasicEntityAutocompleteField.tsx b/src/lib/BasicEntityAutocompleteField.tsx index c93a501..3def515 100644 --- a/src/lib/BasicEntityAutocompleteField.tsx +++ b/src/lib/BasicEntityAutocompleteField.tsx @@ -45,7 +45,7 @@ function BasicEntityAutocompleteField (props: any) { const { control, field, errors, getValues, setValue } = basicEntityAutocompleteField - console.log('BERF', 'multiple', field.cat.multiple) + // console.log('BERF', 'multiple', field.cat.multiple) const defaultAlternative = field.cat.multiple === 1 ? {} : [] const defaultValues = diff --git a/src/lib/BasicEntityRadioGroupField.tsx b/src/lib/BasicEntityRadioGroupField.tsx index 6fe9bcd..3d86ab1 100644 --- a/src/lib/BasicEntityRadioGroupField.tsx +++ b/src/lib/BasicEntityRadioGroupField.tsx @@ -47,9 +47,6 @@ function BasicEntityRadioGroupField (props: any) { const defaultValues = getValues(`${field.name}_default$`) || '' const categories = getValues(`${field.name}_cat$`) || [] - - console.log('BERF', 'default', defaultValues) - const err = errors[field.name] const { @@ -86,16 +83,4 @@ function BasicEntityRadioGroupField (props: any) { ) } -export function resolveCategories (cat: any) { - return Object.keys(cat.item).map((key) => ({ - title: cat.item?.[key]?.title, - key: key, - })) -} - -export function resolveDefault (cat: any) { - const { default: defaultValues } = cat - return defaultValues -} - export { BasicEntityRadioGroupField } diff --git a/src/lib/VxgBasicEntityEditPlugin.ts b/src/lib/VxgBasicEntityEditPlugin.ts index 00ca302..d482417 100644 --- a/src/lib/VxgBasicEntityEditPlugin.ts +++ b/src/lib/VxgBasicEntityEditPlugin.ts @@ -258,14 +258,11 @@ function VxgBasicEntityEditPlugin (this: any, options: any) { item[field.name + '_uival$'] = resvalue( item[field.name], field.cat, - (val: string, item: { title: string }) => ({ - key: val, - title: item.title, - }) + (val: string) => val ) } - // console.log('modify_edit_Autocomplete', item) + // console.log('modify_edit_RadioGroup', item) return item } From a651a05b06eed48c605d1744e00f20eac907628d Mon Sep 17 00:00:00 2001 From: Zack Braksa Date: Tue, 13 Aug 2024 15:48:10 +0100 Subject: [PATCH 122/122] Add console.log to makeResolver --- dist/voxgig-model-react.es.js | 1 + dist/voxgig-model-react.umd.js | 1 + src/lib/BasicEntityEdit.tsx | 2 ++ 3 files changed, 4 insertions(+) diff --git a/dist/voxgig-model-react.es.js b/dist/voxgig-model-react.es.js index 6050e05..d011753 100644 --- a/dist/voxgig-model-react.es.js +++ b/dist/voxgig-model-react.es.js @@ -65963,6 +65963,7 @@ const makeResolver = (seneca, spec) => useCallback( values: values2, errors }; + console.log("makeResolver", "out", out); return out; }), [spec.ent] diff --git a/dist/voxgig-model-react.umd.js b/dist/voxgig-model-react.umd.js index 3c6b56d..b105a13 100644 --- a/dist/voxgig-model-react.umd.js +++ b/dist/voxgig-model-react.umd.js @@ -65975,6 +65975,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha values: values2, errors }; + console.log("makeResolver", "out", out); return out; }), [spec.ent] diff --git a/src/lib/BasicEntityEdit.tsx b/src/lib/BasicEntityEdit.tsx index 7911635..ee8f975 100644 --- a/src/lib/BasicEntityEdit.tsx +++ b/src/lib/BasicEntityEdit.tsx @@ -64,6 +64,8 @@ const makeResolver = (seneca: any, spec: any) => errors, } + console.log('makeResolver', 'out', out) + return out }, [spec.ent]