bt-core-app 2.1.37 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_commonjs-dynamic-modules.mjs +6 -0
- package/dist/_virtual/_commonjsHelpers.mjs +30 -0
- package/dist/_virtual/_plugin-vue_export-helper.mjs +9 -0
- package/dist/_virtual/index.mjs +4 -0
- package/dist/_virtual/localforage.mjs +4 -0
- package/dist/_virtual/luxon.mjs +6 -0
- package/dist/_virtual/matcher.mjs +4 -0
- package/dist/_virtual/parser.mjs +4 -0
- package/dist/bt-core/core/node_modules/@datasert/cronjs-matcher/dist/index.mjs +12 -0
- package/dist/bt-core/core/node_modules/@datasert/cronjs-matcher/dist/matcher.mjs +220 -0
- package/dist/bt-core/core/node_modules/@datasert/cronjs-parser/dist/parser.mjs +186 -0
- package/dist/bt-core/core/node_modules/@mdi/js/mdi.mjs +70 -0
- package/dist/bt-core/core/node_modules/@vuepic/vue-datepicker/dist/main.css.mjs +1 -0
- package/dist/bt-core/core/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.mjs +5210 -0
- package/dist/bt-core/core/node_modules/date-fns/_lib/addLeadingZeros.mjs +7 -0
- package/dist/bt-core/core/node_modules/date-fns/_lib/defaultOptions.mjs +7 -0
- package/dist/bt-core/core/node_modules/date-fns/_lib/format/formatters.mjs +517 -0
- package/dist/bt-core/core/node_modules/date-fns/_lib/format/lightFormatters.mjs +59 -0
- package/dist/bt-core/core/node_modules/date-fns/_lib/format/longFormatters.mjs +52 -0
- package/dist/bt-core/core/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.mjs +18 -0
- package/dist/bt-core/core/node_modules/date-fns/_lib/normalizeDates.mjs +11 -0
- package/dist/bt-core/core/node_modules/date-fns/_lib/normalizeInterval.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/_lib/protectedTokens.mjs +21 -0
- package/dist/bt-core/core/node_modules/date-fns/add.mjs +20 -0
- package/dist/bt-core/core/node_modules/date-fns/addDays.mjs +10 -0
- package/dist/bt-core/core/node_modules/date-fns/addHours.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/addMilliseconds.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/addMonths.mjs +21 -0
- package/dist/bt-core/core/node_modules/date-fns/addQuarters.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/addYears.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/compareAsc.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/constants.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/constructFrom.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/differenceInCalendarDays.mjs +16 -0
- package/dist/bt-core/core/node_modules/date-fns/differenceInCalendarYears.mjs +13 -0
- package/dist/bt-core/core/node_modules/date-fns/differenceInYears.mjs +17 -0
- package/dist/bt-core/core/node_modules/date-fns/eachDayOfInterval.mjs +20 -0
- package/dist/bt-core/core/node_modules/date-fns/eachQuarterOfInterval.mjs +21 -0
- package/dist/bt-core/core/node_modules/date-fns/endOfQuarter.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/endOfWeek.mjs +11 -0
- package/dist/bt-core/core/node_modules/date-fns/endOfYear.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/format.mjs +60 -0
- package/dist/bt-core/core/node_modules/date-fns/getDay.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/getDayOfYear.mjs +11 -0
- package/dist/bt-core/core/node_modules/date-fns/getDaysInMonth.mjs +10 -0
- package/dist/bt-core/core/node_modules/date-fns/getDefaultOptions.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/getHours.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/getISODay.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/getISOWeek.mjs +12 -0
- package/dist/bt-core/core/node_modules/date-fns/getISOWeekYear.mjs +15 -0
- package/dist/bt-core/core/node_modules/date-fns/getMinutes.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/getMonth.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/getQuarter.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/getSeconds.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/getWeek.mjs +12 -0
- package/dist/bt-core/core/node_modules/date-fns/getWeekYear.mjs +17 -0
- package/dist/bt-core/core/node_modules/date-fns/getYear.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/isAfter.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/isBefore.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/isDate.mjs +7 -0
- package/dist/bt-core/core/node_modules/date-fns/isEqual.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/isSameQuarter.mjs +14 -0
- package/dist/bt-core/core/node_modules/date-fns/isValid.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/locale/_lib/buildFormatLongFn.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/locale/_lib/buildLocalizeFn.mjs +18 -0
- package/dist/bt-core/core/node_modules/date-fns/locale/_lib/buildMatchFn.mjs +31 -0
- package/dist/bt-core/core/node_modules/date-fns/locale/_lib/buildMatchPatternFn.mjs +17 -0
- package/dist/bt-core/core/node_modules/date-fns/locale/en-US/_lib/formatDistance.mjs +70 -0
- package/dist/bt-core/core/node_modules/date-fns/locale/en-US/_lib/formatLong.mjs +33 -0
- package/dist/bt-core/core/node_modules/date-fns/locale/en-US/_lib/formatRelative.mjs +11 -0
- package/dist/bt-core/core/node_modules/date-fns/locale/en-US/_lib/localize.mjs +155 -0
- package/dist/bt-core/core/node_modules/date-fns/locale/en-US/_lib/match.mjs +110 -0
- package/dist/bt-core/core/node_modules/date-fns/locale/en-US.mjs +21 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/Parser.mjs +22 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/Setter.mjs +41 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/constants.mjs +49 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.mjs +49 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/AMPMParser.mjs +49 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/DateParser.mjs +61 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.mjs +51 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/DayParser.mjs +45 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.mjs +49 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/EraParser.mjs +30 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.mjs +21 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.mjs +22 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.mjs +32 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.mjs +32 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.mjs +33 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.mjs +33 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/ISODayParser.mjs +99 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.mjs +48 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.mjs +48 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.mjs +49 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.mjs +40 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/LocalDayParser.mjs +74 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.mjs +48 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.mjs +69 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/MinuteParser.mjs +32 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/MonthParser.mjs +71 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/QuarterParser.mjs +70 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/SecondParser.mjs +32 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.mjs +74 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.mjs +71 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.mjs +70 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.mjs +22 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.mjs +22 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/YearParser.mjs +49 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers.mjs +67 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/utils.mjs +103 -0
- package/dist/bt-core/core/node_modules/date-fns/parse.mjs +90 -0
- package/dist/bt-core/core/node_modules/date-fns/set.mjs +11 -0
- package/dist/bt-core/core/node_modules/date-fns/setDay.mjs +12 -0
- package/dist/bt-core/core/node_modules/date-fns/setHours.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/setISODay.mjs +11 -0
- package/dist/bt-core/core/node_modules/date-fns/setISOWeek.mjs +10 -0
- package/dist/bt-core/core/node_modules/date-fns/setMilliseconds.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/setMinutes.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/setMonth.mjs +13 -0
- package/dist/bt-core/core/node_modules/date-fns/setSeconds.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/setWeek.mjs +10 -0
- package/dist/bt-core/core/node_modules/date-fns/setYear.mjs +10 -0
- package/dist/bt-core/core/node_modules/date-fns/startOfDay.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/startOfISOWeek.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/startOfISOWeekYear.mjs +11 -0
- package/dist/bt-core/core/node_modules/date-fns/startOfMonth.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/startOfQuarter.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/startOfWeek.mjs +11 -0
- package/dist/bt-core/core/node_modules/date-fns/startOfWeekYear.mjs +13 -0
- package/dist/bt-core/core/node_modules/date-fns/startOfYear.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/sub.mjs +19 -0
- package/dist/bt-core/core/node_modules/date-fns/subDays.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/subMonths.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/subYears.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/toDate.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/transpose.mjs +18 -0
- package/dist/bt-core/core/node_modules/localforage/dist/localforage.mjs +1454 -0
- package/dist/bt-core/core/node_modules/luxon/src/datetime.mjs +1855 -0
- package/dist/bt-core/core/node_modules/luxon/src/duration.mjs +753 -0
- package/dist/bt-core/core/node_modules/luxon/src/errors.mjs +40 -0
- package/dist/bt-core/core/node_modules/luxon/src/impl/conversions.mjs +92 -0
- package/dist/bt-core/core/node_modules/luxon/src/impl/diff.mjs +36 -0
- package/dist/bt-core/core/node_modules/luxon/src/impl/digits.mjs +77 -0
- package/dist/bt-core/core/node_modules/luxon/src/impl/english.mjs +138 -0
- package/dist/bt-core/core/node_modules/luxon/src/impl/formats.mjs +150 -0
- package/dist/bt-core/core/node_modules/luxon/src/impl/formatter.mjs +258 -0
- package/dist/bt-core/core/node_modules/luxon/src/impl/invalid.mjs +11 -0
- package/dist/bt-core/core/node_modules/luxon/src/impl/locale.mjs +294 -0
- package/dist/bt-core/core/node_modules/luxon/src/impl/regexParser.mjs +202 -0
- package/dist/bt-core/core/node_modules/luxon/src/impl/tokenParser.mjs +329 -0
- package/dist/bt-core/core/node_modules/luxon/src/impl/util.mjs +220 -0
- package/dist/bt-core/core/node_modules/luxon/src/impl/zoneUtil.mjs +20 -0
- package/dist/bt-core/core/node_modules/luxon/src/info.mjs +180 -0
- package/dist/bt-core/core/node_modules/luxon/src/interval.mjs +481 -0
- package/dist/bt-core/core/node_modules/luxon/src/luxon.mjs +24 -0
- package/dist/bt-core/core/node_modules/luxon/src/settings.mjs +150 -0
- package/dist/bt-core/core/node_modules/luxon/src/zone.mjs +88 -0
- package/dist/bt-core/core/node_modules/luxon/src/zones/IANAZone.mjs +183 -0
- package/dist/bt-core/core/node_modules/luxon/src/zones/fixedOffsetZone.mjs +125 -0
- package/dist/bt-core/core/node_modules/luxon/src/zones/invalidZone.mjs +41 -0
- package/dist/bt-core/core/node_modules/luxon/src/zones/systemZone.mjs +47 -0
- package/dist/bt-core/core/node_modules/merge-images/dist/index.es2015.mjs +47 -0
- package/dist/bt-core/core/node_modules/signature_pad/dist/signature_pad.mjs +248 -0
- package/dist/bt-core/core/node_modules/thenby/thenBy.module.mjs +38 -0
- package/dist/bt-core/core/node_modules/vue-picture-cropper/lib/index.mjs +1643 -0
- package/dist/bt-core/core/node_modules/vue-signature-pad/dist/vue-signature-pad.esm.mjs +173 -0
- package/dist/bt-core/core/node_modules/vue-use-spring/dist/index.mjs +204 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/defaults.mjs +61 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/icons.mjs +82 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/iconsets/mdi-svg.mjs +74 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/colors.mjs +322 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/console.mjs +7 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/defineComponent.mjs +34 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/getCurrentInstance.mjs +10 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/helpers.mjs +44 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/injectSelf.mjs +12 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/propsFactory.mjs +14 -0
- package/dist/components/BT-Assistant-Menu.vue.d.ts +19 -0
- package/dist/components/BT-Assistant-Menu.vue.mjs +464 -0
- package/dist/components/BT-Assistant-Menu.vue2.mjs +4 -0
- package/dist/components/BT-Avatar.vue.d.ts +16 -0
- package/dist/components/BT-Avatar.vue.mjs +41 -0
- package/dist/components/BT-Avatar.vue2.mjs +4 -0
- package/dist/components/BT-Background-Task.vue.d.ts +61 -0
- package/dist/components/BT-Background-Task.vue.mjs +89 -0
- package/dist/components/BT-Background-Task.vue2.mjs +4 -0
- package/dist/components/BT-Blade-Item.vue.d.ts +578 -0
- package/dist/components/BT-Blade-Item.vue.mjs +441 -0
- package/dist/components/BT-Blade-Item.vue2.mjs +4 -0
- package/dist/components/BT-Blade-Items.vue.d.ts +2358 -0
- package/dist/components/BT-Blade-Items.vue.mjs +7 -0
- package/dist/components/BT-Blade-Items.vue2.mjs +943 -0
- package/dist/components/BT-Blade-Items.vue3.mjs +1 -0
- package/dist/components/BT-Blade-Steps.vue.d.ts +1740 -0
- package/dist/components/BT-Blade-Steps.vue.mjs +7 -0
- package/dist/components/BT-Blade-Steps.vue2.mjs +1305 -0
- package/dist/components/BT-Blade-Steps.vue3.mjs +1 -0
- package/dist/components/BT-Blade.vue.d.ts +109 -0
- package/dist/components/BT-Blade.vue.mjs +268 -0
- package/dist/components/BT-Blade.vue2.mjs +4 -0
- package/dist/components/BT-Btn.vue.d.ts +47 -0
- package/dist/components/BT-Btn.vue.mjs +43 -0
- package/dist/components/BT-Btn.vue2.mjs +4 -0
- package/dist/components/BT-Camera-Overlay.vue.d.ts +57 -0
- package/dist/components/BT-Camera-Overlay.vue.mjs +173 -0
- package/dist/components/BT-Camera-Overlay.vue2.mjs +4 -0
- package/dist/components/BT-Col.vue.d.ts +49 -0
- package/dist/components/BT-Col.vue.mjs +33 -0
- package/dist/components/BT-Col.vue2.mjs +4 -0
- package/dist/components/BT-Color-Picker-Menu.vue.d.ts +23 -0
- package/dist/components/BT-Color-Picker-Menu.vue.mjs +63 -0
- package/dist/components/BT-Color-Picker-Menu.vue2.mjs +4 -0
- package/dist/components/BT-Cosmetics-Menu.vue.d.ts +14 -0
- package/dist/components/BT-Cosmetics-Menu.vue.mjs +211 -0
- package/dist/components/BT-Cosmetics-Menu.vue2.mjs +4 -0
- package/dist/components/BT-Cron-Span.vue.d.ts +21 -0
- package/dist/components/BT-Cron-Span.vue.mjs +66 -0
- package/dist/components/BT-Cron-Span.vue2.mjs +4 -0
- package/dist/components/BT-Cron.vue.d.ts +37 -0
- package/dist/components/BT-Cron.vue.mjs +538 -0
- package/dist/components/BT-Cron.vue2.mjs +4 -0
- package/dist/components/BT-Date-Select.vue.d.ts +46 -0
- package/dist/components/BT-Date-Select.vue.mjs +71 -0
- package/dist/components/BT-Date-Select.vue2.mjs +4 -0
- package/dist/components/BT-Date.vue.d.ts +53 -0
- package/dist/components/BT-Date.vue.mjs +55 -0
- package/dist/components/BT-Date.vue2.mjs +4 -0
- package/dist/components/BT-Demo-Profile-Select.vue.d.ts +17 -0
- package/dist/components/BT-Demo-Profile-Select.vue.mjs +52 -0
- package/dist/components/BT-Demo-Profile-Select.vue2.mjs +4 -0
- package/dist/components/BT-Dialog-Confirm.vue.d.ts +2 -0
- package/dist/components/BT-Dialog-Confirm.vue.mjs +63 -0
- package/dist/components/BT-Dialog-Confirm.vue2.mjs +4 -0
- package/dist/components/BT-Dialog-Date.vue.d.ts +2 -0
- package/dist/components/BT-Dialog-Date.vue.mjs +79 -0
- package/dist/components/BT-Dialog-Date.vue2.mjs +4 -0
- package/dist/components/BT-Dialog-Number.vue.d.ts +2 -0
- package/dist/components/BT-Dialog-Number.vue.mjs +178 -0
- package/dist/components/BT-Dialog-Number.vue2.mjs +4 -0
- package/dist/components/BT-Dialog-Select.vue.d.ts +2 -0
- package/dist/components/BT-Dialog-Select.vue.mjs +235 -0
- package/dist/components/BT-Dialog-Select.vue2.mjs +4 -0
- package/dist/components/BT-Divider.vue.d.ts +24 -0
- package/dist/components/BT-Divider.vue.mjs +31 -0
- package/dist/components/BT-Divider.vue2.mjs +4 -0
- package/dist/components/BT-Drag-Counter.vue.d.ts +114 -0
- package/dist/components/BT-Drag-Counter.vue.mjs +7 -0
- package/dist/components/BT-Drag-Counter.vue2.mjs +156 -0
- package/dist/components/BT-Drag-Counter.vue3.mjs +1 -0
- package/dist/components/BT-Entity.vue.d.ts +82 -0
- package/dist/components/BT-Entity.vue.mjs +172 -0
- package/dist/components/BT-Entity.vue2.mjs +4 -0
- package/dist/components/BT-Error.vue.d.ts +15 -0
- package/dist/components/BT-Error.vue.mjs +35 -0
- package/dist/components/BT-Error.vue2.mjs +4 -0
- package/dist/components/BT-Field-Checkbox.vue.d.ts +57 -0
- package/dist/components/BT-Field-Checkbox.vue.mjs +61 -0
- package/dist/components/BT-Field-Checkbox.vue2.mjs +4 -0
- package/dist/components/BT-Field-Date.vue.d.ts +69 -0
- package/dist/components/BT-Field-Date.vue.mjs +120 -0
- package/dist/components/BT-Field-Date.vue2.mjs +4 -0
- package/dist/components/BT-Field-Entity.vue.d.ts +48 -0
- package/dist/components/BT-Field-Entity.vue.mjs +55 -0
- package/dist/components/BT-Field-Entity.vue2.mjs +4 -0
- package/dist/components/BT-Field-Select-Simple.vue.d.ts +55 -0
- package/dist/components/BT-Field-Select-Simple.vue.mjs +52 -0
- package/dist/components/BT-Field-Select-Simple.vue2.mjs +4 -0
- package/dist/components/BT-Field-Select.vue.d.ts +70 -0
- package/dist/components/BT-Field-Select.vue.mjs +60 -0
- package/dist/components/BT-Field-Select.vue2.mjs +4 -0
- package/dist/components/BT-Field-String.vue.d.ts +57 -0
- package/dist/components/BT-Field-String.vue.mjs +87 -0
- package/dist/components/BT-Field-String.vue2.mjs +4 -0
- package/dist/components/BT-Field-Switch.vue.d.ts +51 -0
- package/dist/components/BT-Field-Switch.vue.mjs +64 -0
- package/dist/components/BT-Field-Switch.vue2.mjs +4 -0
- package/dist/components/BT-Field-Tags.vue.d.ts +53 -0
- package/dist/components/BT-Field-Tags.vue.mjs +80 -0
- package/dist/components/BT-Field-Tags.vue2.mjs +4 -0
- package/dist/components/BT-Field-Textarea.vue.d.ts +53 -0
- package/dist/components/BT-Field-Textarea.vue.mjs +66 -0
- package/dist/components/BT-Field-Textarea.vue2.mjs +4 -0
- package/dist/components/BT-Field-Trigger.vue.d.ts +113 -0
- package/dist/components/BT-Field-Trigger.vue.mjs +368 -0
- package/dist/components/BT-Field-Trigger.vue2.mjs +4 -0
- package/dist/components/BT-Field.vue.d.ts +49 -0
- package/dist/components/BT-Field.vue.mjs +59 -0
- package/dist/components/BT-Field.vue2.mjs +4 -0
- package/dist/components/BT-Form-Builder.vue.d.ts +74 -0
- package/dist/components/BT-Form-Builder.vue.mjs +762 -0
- package/dist/components/BT-Form-Builder.vue2.mjs +4 -0
- package/dist/components/BT-Form-Field.vue.d.ts +41 -0
- package/dist/components/BT-Form-Field.vue.mjs +186 -0
- package/dist/components/BT-Form-Field.vue2.mjs +4 -0
- package/dist/components/BT-Form.vue.d.ts +95 -0
- package/dist/components/BT-Form.vue.mjs +635 -0
- package/dist/components/BT-Form.vue2.mjs +4 -0
- package/dist/components/BT-Header-Option.vue.d.ts +18 -0
- package/dist/components/BT-Header-Option.vue.mjs +62 -0
- package/dist/components/BT-Header-Option.vue2.mjs +4 -0
- package/dist/components/BT-Image-Select.vue.d.ts +71 -0
- package/dist/components/BT-Image-Select.vue.mjs +219 -0
- package/dist/components/BT-Image-Select.vue2.mjs +4 -0
- package/dist/components/BT-Json.vue.d.ts +6 -0
- package/dist/components/BT-Json.vue.mjs +38 -0
- package/dist/components/BT-Json.vue2.mjs +1 -0
- package/dist/components/BT-Json.vue3.mjs +5 -0
- package/dist/components/BT-Loader.vue.d.ts +6 -0
- package/dist/components/BT-Loader.vue.mjs +37 -0
- package/dist/components/BT-Loader.vue2.mjs +4 -0
- package/dist/components/BT-Nav-Sidebar.vue.d.ts +25 -0
- package/dist/components/BT-Nav-Sidebar.vue.mjs +138 -0
- package/dist/components/BT-Nav-Sidebar.vue2.mjs +4 -0
- package/dist/components/BT-Number.vue.d.ts +23 -0
- package/dist/components/BT-Number.vue.mjs +7 -0
- package/dist/components/BT-Number.vue2.mjs +43 -0
- package/dist/components/BT-Number.vue3.mjs +1 -0
- package/dist/components/BT-Numpad.vue.d.ts +68 -0
- package/dist/components/BT-Numpad.vue.mjs +191 -0
- package/dist/components/BT-Numpad.vue2.mjs +4 -0
- package/dist/components/BT-Select-Inline.vue.d.ts +121 -0
- package/dist/components/BT-Select-Inline.vue.mjs +74 -0
- package/dist/components/BT-Select-Inline.vue2.mjs +24 -0
- package/dist/components/BT-Select-Inline.vue3.mjs +1 -0
- package/dist/components/BT-Select-List-Box.vue.d.ts +137 -0
- package/dist/components/BT-Select-List-Box.vue.mjs +414 -0
- package/dist/components/BT-Select-List-Box.vue2.mjs +4 -0
- package/dist/components/BT-Select-Simple.vue.d.ts +58 -0
- package/dist/components/BT-Select-Simple.vue.mjs +126 -0
- package/dist/components/BT-Select-Simple.vue2.mjs +4 -0
- package/dist/components/BT-Select.vue.d.ts +73 -0
- package/dist/components/BT-Select.vue.mjs +138 -0
- package/dist/components/BT-Select.vue2.mjs +4 -0
- package/dist/components/BT-Signature-Overlay.vue.d.ts +65 -0
- package/dist/components/BT-Signature-Overlay.vue.mjs +146 -0
- package/dist/components/BT-Signature-Overlay.vue2.mjs +4 -0
- package/dist/components/BT-Signature.vue.d.ts +70 -0
- package/dist/components/BT-Signature.vue.mjs +155 -0
- package/dist/components/BT-Signature.vue2.mjs +4 -0
- package/dist/components/BT-Slider.vue.d.ts +37 -0
- package/dist/components/BT-Slider.vue.mjs +126 -0
- package/dist/components/BT-Slider.vue2.mjs +4 -0
- package/dist/components/BT-Span.vue.d.ts +19 -0
- package/dist/components/BT-Span.vue.mjs +23 -0
- package/dist/components/BT-Span.vue2.mjs +4 -0
- package/dist/components/BT-Square-Check.vue.d.ts +104 -0
- package/dist/components/BT-Square-Check.vue.mjs +98 -0
- package/dist/components/BT-Square-Check.vue2.mjs +4 -0
- package/dist/components/BT-Status-Item.vue.d.ts +45 -0
- package/dist/components/BT-Status-Item.vue.mjs +51 -0
- package/dist/components/BT-Status-Item.vue2.mjs +4 -0
- package/dist/components/BT-Tags.vue.d.ts +19 -0
- package/dist/components/BT-Tags.vue.mjs +32 -0
- package/dist/components/BT-Tags.vue2.mjs +4 -0
- package/dist/components/BT-Tour.vue.d.ts +43 -0
- package/dist/components/BT-Tour.vue.mjs +78 -0
- package/dist/components/BT-Tour.vue2.mjs +4 -0
- package/dist/components.mjs +36 -0
- package/dist/composables/actions-local.d.ts +14 -0
- package/dist/composables/actions-local.mjs +26 -0
- package/dist/composables/actions-tracker.d.ts +36 -0
- package/dist/composables/actions-tracker.mjs +88 -0
- package/dist/composables/actions.d.ts +116 -0
- package/dist/composables/actions.mjs +272 -0
- package/dist/composables/api.d.ts +100 -0
- package/dist/composables/api.mjs +329 -0
- package/dist/composables/assistant.d.ts +38 -0
- package/dist/composables/assistant.mjs +70 -0
- package/dist/composables/auth.d.ts +94 -0
- package/dist/composables/auth.mjs +257 -0
- package/dist/composables/background-tasks.d.ts +31 -0
- package/dist/composables/background-tasks.mjs +79 -0
- package/dist/composables/blade-old.d.ts +1 -0
- package/dist/composables/blade.d.ts +91 -0
- package/dist/composables/blade.mjs +156 -0
- package/dist/composables/charts.d.ts +10 -0
- package/dist/composables/colorizer.d.ts +5 -0
- package/dist/composables/colorizer.mjs +27 -0
- package/dist/composables/component-config.d.ts +8 -0
- package/dist/composables/component-config.mjs +11 -0
- package/dist/composables/confirm.d.ts +1 -0
- package/dist/composables/confirm.mjs +11 -0
- package/dist/composables/cosmetics.d.ts +44 -0
- package/dist/composables/cosmetics.mjs +125 -0
- package/dist/composables/cron-adjustments.d.ts +63 -0
- package/dist/composables/cron-adjustments.mjs +106 -0
- package/dist/composables/cron.d.ts +72 -0
- package/dist/composables/cron.mjs +326 -0
- package/dist/composables/csv.d.ts +44 -0
- package/dist/composables/csv.mjs +163 -0
- package/dist/composables/dates.d.ts +22 -0
- package/dist/composables/dates.mjs +61 -0
- package/dist/composables/demo.d.ts +68 -0
- package/dist/composables/demo.mjs +173 -0
- package/dist/composables/dialog-items.d.ts +117 -0
- package/dist/composables/dialog-items.mjs +72 -0
- package/dist/composables/document-meta.d.ts +11 -0
- package/dist/composables/document-meta.mjs +20 -0
- package/dist/composables/draggable.d.ts +56 -0
- package/dist/composables/draggable.mjs +76 -0
- package/dist/composables/feedback.d.ts +24 -0
- package/dist/composables/feedback.mjs +32 -0
- package/dist/composables/filters.d.ts +27 -0
- package/dist/composables/filters.mjs +218 -0
- package/dist/composables/forage.d.ts +89 -0
- package/dist/composables/forage.mjs +37 -0
- package/dist/composables/forms.d.ts +104 -0
- package/dist/composables/forms.mjs +256 -0
- package/dist/composables/geo.d.ts +24 -0
- package/dist/composables/geo.mjs +95 -0
- package/dist/composables/graph-pro.d.ts +98 -0
- package/dist/composables/graph-pro.mjs +205 -0
- package/dist/composables/graphing.d.ts +1 -0
- package/dist/composables/heights.d.ts +24 -0
- package/dist/composables/heights.mjs +41 -0
- package/dist/composables/helpers.d.ts +114 -0
- package/dist/composables/helpers.mjs +512 -0
- package/dist/composables/icons.d.ts +3 -0
- package/dist/composables/icons.mjs +84 -0
- package/dist/composables/id.d.ts +8 -0
- package/dist/composables/id.mjs +32 -0
- package/dist/composables/item.d.ts +132 -0
- package/dist/composables/item.mjs +263 -0
- package/dist/composables/iterating.d.ts +1 -0
- package/dist/composables/list.d.ts +345 -0
- package/dist/composables/list.mjs +460 -0
- package/dist/composables/lists.d.ts +10 -0
- package/dist/composables/lists.mjs +31 -0
- package/dist/composables/menu.d.ts +35 -0
- package/dist/composables/menu.mjs +63 -0
- package/dist/composables/navigation.d.ts +123 -0
- package/dist/composables/navigation.mjs +157 -0
- package/dist/composables/nested.d.ts +3 -0
- package/dist/composables/nested.mjs +20 -0
- package/dist/composables/old-dialogs.d.ts +1 -0
- package/dist/composables/presets.d.ts +8 -0
- package/dist/composables/presets.mjs +16 -0
- package/dist/composables/pwa-old.d.ts +15 -0
- package/dist/composables/pwa.d.ts +26 -0
- package/dist/composables/pwa.mjs +80 -0
- package/dist/composables/resizable.d.ts +34 -0
- package/dist/composables/resizable.mjs +135 -0
- package/dist/composables/routing-old.d.ts +1 -0
- package/dist/composables/routing.d.ts +16 -0
- package/dist/composables/routing.mjs +112 -0
- package/dist/composables/rules.d.ts +13 -0
- package/dist/composables/rules.mjs +22 -0
- package/dist/composables/select.d.ts +78 -0
- package/dist/composables/select.mjs +129 -0
- package/dist/composables/settings.d.ts +6 -0
- package/dist/composables/settings.mjs +21 -0
- package/dist/composables/setup.d.ts +1 -0
- package/dist/composables/steps-old.d.ts +1 -0
- package/dist/composables/steps.d.ts +53 -0
- package/dist/composables/steps.mjs +39 -0
- package/dist/composables/stores.d.ts +258 -0
- package/dist/composables/stores.mjs +1257 -0
- package/dist/composables/sync.d.ts +33 -0
- package/dist/composables/track.d.ts +13 -0
- package/dist/composables/track.mjs +30 -0
- package/dist/composables/urls.d.ts +35 -0
- package/dist/composables/urls.mjs +66 -0
- package/dist/composables/vuetify.d.ts +85 -0
- package/dist/composables.mjs +237 -0
- package/dist/core.d.ts +48 -0
- package/dist/core.mjs +6 -0
- package/dist/core2.mjs +118 -0
- package/dist/index-components.d.ts +19 -0
- package/dist/index-composables.d.ts +75 -0
- package/dist/index-core.d.ts +3 -0
- package/dist/index.d.ts +96 -3036
- package/dist/index.mjs +275 -0
- package/dist/main.d.ts +1 -0
- package/dist/node_modules/bt-core-app/dist/bt-core-app.mjs +30372 -0
- package/dist/style.css +1 -5
- package/dist/types.d.ts +18 -0
- package/dist/types.mjs +7 -0
- package/package.json +13 -1
- package/dist/bt-core-app.js +0 -81355
|
@@ -0,0 +1,460 @@
|
|
|
1
|
+
import { useCSV as ca } from "./csv.mjs";
|
|
2
|
+
import { isLengthyArray as q, nestedValue as _, hasSearch as ia } from "./helpers.mjs";
|
|
3
|
+
import { t as j } from "../bt-core/core/node_modules/thenby/thenBy.module.mjs";
|
|
4
|
+
import { ref as y, toValue as V, computed as v, shallowRef as p, watch as C, onMounted as da } from "vue";
|
|
5
|
+
import { useArrayUnique as fa, useArrayDifference as Ie, watchDebounced as sa, watchArray as oe } from "@vueuse/core";
|
|
6
|
+
import { useActions as va } from "./actions.mjs";
|
|
7
|
+
import { useStoreDefinition as ya } from "./stores.mjs";
|
|
8
|
+
import { useNavigation as ma } from "./navigation.mjs";
|
|
9
|
+
import { useBlade as ha } from "./blade.mjs";
|
|
10
|
+
import { useDialogConfirm as ga } from "./dialog-items.mjs";
|
|
11
|
+
import { isNullOrEmpty as Fe } from "../node_modules/bt-core-app/dist/bt-core-app.mjs";
|
|
12
|
+
import { useUrlUpdater as Sa } from "./routing.mjs";
|
|
13
|
+
function Ma(a, F, r) {
|
|
14
|
+
var ge, Se, Pe, Ae;
|
|
15
|
+
const we = ca(), xe = ma(), Ne = Sa(), ee = (r == null ? void 0 : r.idSelector) ?? a.idSelector ?? ((e) => e.id), n = (r == null ? void 0 : r.isNotSetup) == !0 ? void 0 : ha({
|
|
16
|
+
bladeGroup: a.bladeGroup,
|
|
17
|
+
bladeName: a.bladeName,
|
|
18
|
+
onUpdate: (e) => {
|
|
19
|
+
var l;
|
|
20
|
+
g({ deepRefresh: !!a.refreshOnChange || !!((l = e == null ? void 0 : e.data) != null && l.refresh), resetSearch: !0 });
|
|
21
|
+
},
|
|
22
|
+
bladeStartShowing: a.bladeStartShowing
|
|
23
|
+
}), w = a.useBladeSrc ?? !!a.bladeName, k = a.useRouteSrc ?? a.variant == "page", A = a.nav ?? a.bladeName ?? a.itemBladeName;
|
|
24
|
+
var h = xe.findItem(A);
|
|
25
|
+
const z = a.storeMode ?? (h == null ? void 0 : h.storeMode), Be = a.storageMode ?? (h == null ? void 0 : h.storageMode), ae = h == null ? void 0 : h.deleteStrat, le = y((h == null ? void 0 : h.externals) ?? []), U = y(), te = V(a.customFilters) ?? [], re = y([]), $ = v(() => fa([
|
|
26
|
+
...(a.localFilters ?? []).filter((e) => e.predicate != null || e.onFilter != null).map((e) => e.name),
|
|
27
|
+
...te.filter((e) => e.name != null).map((e) => e.name),
|
|
28
|
+
...a.defaultFilters ?? [],
|
|
29
|
+
...re.value
|
|
30
|
+
]).value), M = y((a.defaultFilters ?? []).map((e) => $.value.indexOf(e)));
|
|
31
|
+
let J = y([...M.value]);
|
|
32
|
+
const Ce = v(() => Ie(J, M).value.length > 0 || Ie(M, J).value.length > 0), Ue = y([]), x = y(Me());
|
|
33
|
+
function Me() {
|
|
34
|
+
var e, l, t, u;
|
|
35
|
+
if (w) {
|
|
36
|
+
const c = (l = (e = n == null ? void 0 : n.bladeData) == null ? void 0 : e.data) == null ? void 0 : l.page;
|
|
37
|
+
if (c != null)
|
|
38
|
+
return Number.parseInt(c);
|
|
39
|
+
}
|
|
40
|
+
if (k) {
|
|
41
|
+
const c = (u = (t = r == null ? void 0 : r.route) == null ? void 0 : t.query) == null ? void 0 : u.page;
|
|
42
|
+
if (c != null)
|
|
43
|
+
return Number.parseInt(typeof c == "string" ? c : c.toString());
|
|
44
|
+
}
|
|
45
|
+
return 1;
|
|
46
|
+
}
|
|
47
|
+
const ue = a.proxyKey ?? "proxyID", D = v(() => {
|
|
48
|
+
var l, t, u;
|
|
49
|
+
let e = a.proxyID;
|
|
50
|
+
return e == null && w && ((l = n == null ? void 0 : n.bladeData) == null ? void 0 : l.data) != null && (e = n.bladeData.data[ue]), e == null && k && (e = (u = (t = r == null ? void 0 : r.route) == null ? void 0 : t.query) == null ? void 0 : u[ue]), e;
|
|
51
|
+
}), ne = a.searchKey ?? "search", S = y(ce());
|
|
52
|
+
function ce() {
|
|
53
|
+
var l, t, u;
|
|
54
|
+
let e;
|
|
55
|
+
return e == null && w && ((l = n == null ? void 0 : n.bladeData) == null ? void 0 : l.data) != null && (e = n.bladeData.data[ne]), e == null && k && (e = (u = (t = r == null ? void 0 : r.route) == null ? void 0 : t.query) == null ? void 0 : u[ne]), e;
|
|
56
|
+
}
|
|
57
|
+
const T = y(V(a.startShowingInactive) ?? !1), Te = v(() => [
|
|
58
|
+
...a.searchProps ?? [],
|
|
59
|
+
...(a.headers ?? []).filter((e) => e.searchable != null && e.value != null).map((e) => e.value ?? "")
|
|
60
|
+
]), f = y(), ie = y(), L = p([]), Q = y([]);
|
|
61
|
+
let N;
|
|
62
|
+
const b = a.onFinished ?? (r == null ? void 0 : r.onFinished), { actionErrorMsg: Ge, actionLoadingMsg: Le, deleteItem: be, doAction: qe, getItem: Ve, getAllItems: ke, restoreItem: Ke, saveItem: He, syncItem: de } = va({
|
|
63
|
+
nav: A,
|
|
64
|
+
onError: a.onError ?? (r == null ? void 0 : r.onError),
|
|
65
|
+
onFinished: () => {
|
|
66
|
+
b != null && b(f.value);
|
|
67
|
+
},
|
|
68
|
+
proxyID: D.value,
|
|
69
|
+
store: A != null ? ya({
|
|
70
|
+
storeMode: z,
|
|
71
|
+
storageMode: Be,
|
|
72
|
+
nav: A,
|
|
73
|
+
proxyID: D.value
|
|
74
|
+
}) : void 0
|
|
75
|
+
}), fe = v(() => a.errorMsg ?? Ge.value), X = y(), se = v(() => X.value ?? a.loadingMsg ?? Le.value), Re = v(() => se.value != null), Y = p(!1), K = p($e());
|
|
76
|
+
function $e() {
|
|
77
|
+
return a.startShowingSearch ? !0 : !Fe(ce());
|
|
78
|
+
}
|
|
79
|
+
const Z = y(0), ve = v(() => {
|
|
80
|
+
let e, l = [];
|
|
81
|
+
M.value.forEach((u) => {
|
|
82
|
+
const c = $.value[u], i = te.find((d) => d.name == c);
|
|
83
|
+
i != null ? e = e != null ? `${e}ANDALSO${i.filterFunction()}` : i.filterFunction() : l.push(c);
|
|
84
|
+
});
|
|
85
|
+
const t = {};
|
|
86
|
+
return q(l) && (t.filterBy = l.toString()), e != null && (t.query = e), t;
|
|
87
|
+
}), W = v(() => {
|
|
88
|
+
var l, t, u, c, i, d;
|
|
89
|
+
let e = a.itemID;
|
|
90
|
+
return e == null && w && (e = (t = (l = n == null ? void 0 : n.bladeData) == null ? void 0 : l.data) == null ? void 0 : t.id), e == null && k && (e = (c = (u = r == null ? void 0 : r.route) == null ? void 0 : u.query) == null ? void 0 : c.id), e == null && k && (e = (d = (i = r == null ? void 0 : r.route) == null ? void 0 : i.params) == null ? void 0 : d.id), e;
|
|
91
|
+
}), E = y(W.value == "new" ? "new" : a.startEditing ? "edit" : "view"), ye = v(() => {
|
|
92
|
+
var u, c, i;
|
|
93
|
+
var e = a.params ?? {}, l = (r == null ? void 0 : r.params) ?? {};
|
|
94
|
+
let t = { ...e, ...l };
|
|
95
|
+
return a.paginate == "server" && a.itemsPerPage != null && (t.includeCount = !0, t.takeAmount = a.itemsPerPage, t.takeFrom = (x.value - 1) * a.itemsPerPage), ve.value != null && (t = { ...t, ...ve.value }), T.value && (t.includeInactive = !0), q(a.selectProps) && (t.properties = (u = a.selectProps) == null ? void 0 : u.toString()), S.value != null && (t.searchString = S.value), q(a.queryParams) && ((c = r == null ? void 0 : r.route) == null ? void 0 : c.query) != null && ((i = a.queryParams) == null || i.forEach((d) => {
|
|
96
|
+
var B, m, P, R;
|
|
97
|
+
typeof d == "string" ? ((B = r.route) == null ? void 0 : B.query[d]) != null && (t[d] = (m = r.route) == null ? void 0 : m.query[d]) : ((P = r.route) == null ? void 0 : P.query[d.key]) != null && (t[d.value] = (R = r.route) == null ? void 0 : R.query[d.key]);
|
|
98
|
+
})), t;
|
|
99
|
+
}), Qe = v(() => (e) => a.onCanDelete != null ? a.onCanDelete(e) : !(e != null && e.isInactive === !0)), We = v(() => (e) => a.onCanIntegrate != null ? a.onCanIntegrate(e) : !(!q(le.value) || U.value == null || (e == null ? void 0 : e.isInactive) === !0)), _e = v(() => (e) => U.value != null ? !Fe(_(e, U.value.localIDProp)) : !1), je = v(() => (e) => T.value ? a.onCanRestore != null ? a.onCanRestore(e) : (e == null ? void 0 : e.isInactive) === !0 : !1), me = a.onUpdateAsyncItem ?? ((e, l) => {
|
|
100
|
+
l.hasOwnProperty("rowVersion") && (e.rowVersion = l.rowVersion), l.hasOwnProperty("version") && (e.version = l.version), l.hasOwnProperty("isDeleted") && (e.isDeleted = l.isDeleted), l.hasOwnProperty("isInactive") && (e.isInactive = l.isInactive), l.hasOwnProperty("id") && (e.id = l.id);
|
|
101
|
+
}), H = v(() => Q.value.filter((e) => !e.hide)), ze = v(() => {
|
|
102
|
+
let e = new Array();
|
|
103
|
+
return H.value.filter((t) => t.sublevel != null).forEach((t) => {
|
|
104
|
+
let u = e.find((c) => c.position == t.sublevel);
|
|
105
|
+
u == null ? e.push({ position: t.sublevel ?? 0, values: [t] }) : u.values.push(t);
|
|
106
|
+
}), e.sort(j.firstBy((t) => t.position));
|
|
107
|
+
}), Je = v(() => {
|
|
108
|
+
let e = new Array();
|
|
109
|
+
return H.value.filter((t) => t.level != null).forEach((t) => {
|
|
110
|
+
let u = e.find((c) => c.position == t.level);
|
|
111
|
+
u == null ? e.push({ position: t.level ?? 0, values: [t] }) : u.values.push(t);
|
|
112
|
+
}), e.sort(j.firstBy((t) => t.position));
|
|
113
|
+
}), Xe = v(() => H.value.filter((e) => e.nav != null && e.itemText != null || e.textFilter != null || e.display != null || e.bool != null));
|
|
114
|
+
function Ye(e) {
|
|
115
|
+
U.value = e, Ue.value = [];
|
|
116
|
+
}
|
|
117
|
+
function Ze(e) {
|
|
118
|
+
var t;
|
|
119
|
+
const l = a.addBladeName ?? a.itemBladeName;
|
|
120
|
+
l != null && (e == "page" || a.navType == "page" ? (t = r == null ? void 0 : r.router) == null || t.push({
|
|
121
|
+
name: l,
|
|
122
|
+
params: { id: "new" },
|
|
123
|
+
query: { proxyID: D.value }
|
|
124
|
+
}) : l != null && (n == null || n.updateBlade({
|
|
125
|
+
data: { id: "new" },
|
|
126
|
+
bladeName: l,
|
|
127
|
+
closeBladeNames: a.closeBladeNames
|
|
128
|
+
})));
|
|
129
|
+
}
|
|
130
|
+
async function Ee(e) {
|
|
131
|
+
const l = ee(e), {
|
|
132
|
+
additionalUrl: t,
|
|
133
|
+
onDeleteAsync: u
|
|
134
|
+
} = { ...a };
|
|
135
|
+
if (l == null)
|
|
136
|
+
return;
|
|
137
|
+
if (a.confirmOnDelete) {
|
|
138
|
+
var c = await ga({ text: "Are you sure you want to delete?" });
|
|
139
|
+
if (!c.isConfirmed)
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
const i = (d, B) => {
|
|
143
|
+
if (d == null || !Array.isArray(d))
|
|
144
|
+
return !1;
|
|
145
|
+
if (B != null) {
|
|
146
|
+
let m = d.findIndex((P) => ee(P) == B);
|
|
147
|
+
if (m > -1)
|
|
148
|
+
return d.splice(m, 1), !0;
|
|
149
|
+
} else {
|
|
150
|
+
let m = d.findIndex((P) => P === e);
|
|
151
|
+
if (m == -1 && (m = d.findIndex((P) => P == e)), m > -1)
|
|
152
|
+
return d.splice(m, 1), !0;
|
|
153
|
+
}
|
|
154
|
+
return !1;
|
|
155
|
+
};
|
|
156
|
+
a.localOnly == !0 || A == null ? ae != "soft" ? (i(f.value, l), i(a.items, l)) : T.value || i(L.value, l) : await be({
|
|
157
|
+
additionalUrl: t,
|
|
158
|
+
data: e,
|
|
159
|
+
nav: A,
|
|
160
|
+
onCanDeleteAsync: a.onCanDeleteAsync,
|
|
161
|
+
onDeleteAsync: u,
|
|
162
|
+
onDeleteSuccessAsync: async (d) => (ae != "soft" ? i(a.items, l) : (me(e, d), T.value || i(L.value, l)), a.onDeleteSuccessAsync != null ? a.onDeleteSuccessAsync(e) : Promise.resolve(void 0)),
|
|
163
|
+
proxyID: D.value
|
|
164
|
+
// ...(useBladeSrc ? bladeData.value : {}),
|
|
165
|
+
// requireConfirmation: true
|
|
166
|
+
}), F && F("deleted", e);
|
|
167
|
+
}
|
|
168
|
+
async function Oe(e) {
|
|
169
|
+
let l = U.value;
|
|
170
|
+
if ((l == null ? void 0 : l.party) == null || (l == null ? void 0 : l.localIDProp) == null || (l == null ? void 0 : l.additionalUrl) == null)
|
|
171
|
+
return;
|
|
172
|
+
const t = V(e), {
|
|
173
|
+
nav: u,
|
|
174
|
+
onSyncAsync: c
|
|
175
|
+
} = { ...a };
|
|
176
|
+
var i = await de({
|
|
177
|
+
actions: [{
|
|
178
|
+
action: "push",
|
|
179
|
+
item: e,
|
|
180
|
+
localItemID: t.id
|
|
181
|
+
}],
|
|
182
|
+
additionalUrl: l.additionalUrl,
|
|
183
|
+
localIDProp: l.localIDProp,
|
|
184
|
+
nav: u,
|
|
185
|
+
onSyncAsync: c,
|
|
186
|
+
partyID: l == null ? void 0 : l.party
|
|
187
|
+
});
|
|
188
|
+
i != null && i.length > 0 && !i[0].isSuccess && (e.errorMsg = i[0].msg ?? "Failed");
|
|
189
|
+
}
|
|
190
|
+
async function pe(e) {
|
|
191
|
+
let l = U.value;
|
|
192
|
+
if ((l == null ? void 0 : l.party) == null || (l == null ? void 0 : l.localIDProp) == null || (l == null ? void 0 : l.additionalUrl) == null)
|
|
193
|
+
return;
|
|
194
|
+
const t = V(e), {
|
|
195
|
+
nav: u,
|
|
196
|
+
onSyncAsync: c
|
|
197
|
+
} = { ...a };
|
|
198
|
+
var i = await de({
|
|
199
|
+
actions: [{
|
|
200
|
+
action: "unlink",
|
|
201
|
+
item: e,
|
|
202
|
+
localItemID: t.id
|
|
203
|
+
}],
|
|
204
|
+
additionalUrl: l.additionalUrl,
|
|
205
|
+
localIDProp: l.localIDProp,
|
|
206
|
+
nav: u,
|
|
207
|
+
onSyncAsync: c,
|
|
208
|
+
partyID: l == null ? void 0 : l.party
|
|
209
|
+
});
|
|
210
|
+
i != null && i.length > 0 && !i[0].isSuccess && (e.errorMsg = i[0].msg ?? "Failed");
|
|
211
|
+
}
|
|
212
|
+
function ea(e) {
|
|
213
|
+
const {
|
|
214
|
+
additionalUrl: l,
|
|
215
|
+
onRestoreAsync: t,
|
|
216
|
+
onRestoreSuccessAsync: u = (c) => (me(e, c), c)
|
|
217
|
+
} = { ...a };
|
|
218
|
+
return Ke({
|
|
219
|
+
additionalUrl: l,
|
|
220
|
+
data: e,
|
|
221
|
+
nav: A,
|
|
222
|
+
onRestoreAsync: t,
|
|
223
|
+
onRestoreSuccessAsync: u,
|
|
224
|
+
proxyID: D.value
|
|
225
|
+
// ...params.getOptions(),
|
|
226
|
+
// ...(useBladeSrc ? bladeData.value : {}),
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
function aa(e) {
|
|
230
|
+
const l = V(e), {
|
|
231
|
+
additionalUrl: t,
|
|
232
|
+
onCanSaveAsync: u,
|
|
233
|
+
onGetSaveAsync: c,
|
|
234
|
+
onSaveAsync: i,
|
|
235
|
+
onSaveSuccessAsync: d
|
|
236
|
+
} = { ...a };
|
|
237
|
+
return He({
|
|
238
|
+
additionalUrl: t,
|
|
239
|
+
data: l,
|
|
240
|
+
nav: A,
|
|
241
|
+
onCanSaveAsync: u,
|
|
242
|
+
onGetSaveAsync: c,
|
|
243
|
+
onSaveAsync: i,
|
|
244
|
+
onSaveSuccessAsync: d,
|
|
245
|
+
proxyID: D.value
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
function la() {
|
|
249
|
+
qe(() => {
|
|
250
|
+
var e = z == "session" ? L.value : f.value;
|
|
251
|
+
e != null && we.exportToCSV({ headers: H.value, items: e });
|
|
252
|
+
}, { loadingMsg: "Exporting to CSV" });
|
|
253
|
+
}
|
|
254
|
+
function he(e) {
|
|
255
|
+
if (a.sortProp == null)
|
|
256
|
+
return e;
|
|
257
|
+
if (Array.isArray(a.sortProp)) {
|
|
258
|
+
var l = void 0;
|
|
259
|
+
return a.sortProp.forEach((t) => {
|
|
260
|
+
l == null ? l = j.firstBy((u) => _(u, t), a.sortDirection ?? "asc") : l = l.thenBy((u) => _(u, t), a.sortDirection ?? "asc");
|
|
261
|
+
}), l != null ? e.sort(l) : e;
|
|
262
|
+
} else
|
|
263
|
+
return e.sort(j.firstBy((t) => _(t, a.sortProp), a.sortDirection ?? "asc"));
|
|
264
|
+
}
|
|
265
|
+
function G() {
|
|
266
|
+
if (f.value == null || !Array.isArray(f.value)) {
|
|
267
|
+
L.value = [];
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
let e = he(f.value);
|
|
271
|
+
if (a.onFilter != null && (e = a.onFilter(e)), q(a.localFilters) && M.value.forEach((l) => {
|
|
272
|
+
var u;
|
|
273
|
+
const t = (u = a.localFilters) == null ? void 0 : u.find((c) => c.name == $.value[l]);
|
|
274
|
+
t != null && (t.onFilter != null ? e = t.onFilter(e) : t.predicate != null && (e = e.filter((c) => t.predicate(c))));
|
|
275
|
+
}), a.inactiveProp != null && !T.value) {
|
|
276
|
+
const l = a.inactiveProp;
|
|
277
|
+
e = e.filter((t) => t[l] !== !0);
|
|
278
|
+
}
|
|
279
|
+
if (S.value != null && S.value.length > 0) {
|
|
280
|
+
let l = [...Te.value];
|
|
281
|
+
a.itemText && l.push(a.itemText), q(l) && (e = e.filter((t) => ia(t, S.value, l)));
|
|
282
|
+
}
|
|
283
|
+
if (a.paginate == "local" && (O(e, e.length), a.itemsPerPage != null)) {
|
|
284
|
+
let l = (x.value - 1) * a.itemsPerPage, t = l + a.itemsPerPage;
|
|
285
|
+
t >= e.length && (t = e.length), e = e.slice(l, t);
|
|
286
|
+
}
|
|
287
|
+
L.value = he(e);
|
|
288
|
+
}
|
|
289
|
+
function ta() {
|
|
290
|
+
const e = (r == null ? void 0 : r.hideActions) ?? a.hideActions;
|
|
291
|
+
a.headers != null && (Q.value = [...a.headers], e || Q.value.push({ title: "Actions", value: "itemActions", align: "end" }));
|
|
292
|
+
}
|
|
293
|
+
function O(e, l) {
|
|
294
|
+
if (a.itemsPerPage == null || e == null || e.length == 0)
|
|
295
|
+
return;
|
|
296
|
+
const t = typeof a.itemsPerPage == "string" ? Number.parseInt(a.itemsPerPage) : a.itemsPerPage;
|
|
297
|
+
t <= 0 || (a.paginate == "server" ? l != null && (Z.value = Math.ceil(l / t)) : a.paginate == "local" && (Z.value = Math.ceil(e.length / t)));
|
|
298
|
+
}
|
|
299
|
+
async function g(e) {
|
|
300
|
+
var t, u, c, i, d, B, m, P, R, De;
|
|
301
|
+
if (Y.value = !1, (e == null ? void 0 : e.resetSearch) == !0 && (K.value = !1, S.value = void 0), a.items != null) {
|
|
302
|
+
let I = { data: a.items };
|
|
303
|
+
X.value = "Loading";
|
|
304
|
+
let s = a.onGetSuccessAsync != null ? await a.onGetSuccessAsync(I) : I;
|
|
305
|
+
if (X.value = void 0, s == null || !Array.isArray(s.data))
|
|
306
|
+
return;
|
|
307
|
+
f.value = (s == null ? void 0 : s.data) ?? [], a.paginate != "local" && O(f.value, f.value.length), G(), b != null && b(f.value), (r == null ? void 0 : r.onFinishedAsync) != null && await (r == null ? void 0 : r.onFinishedAsync(f.value)), F && F("fetched", f.value);
|
|
308
|
+
return;
|
|
309
|
+
}
|
|
310
|
+
if (a.isSingle) {
|
|
311
|
+
var l = w ? (u = (t = n == null ? void 0 : n.bladeData) == null ? void 0 : t.data) == null ? void 0 : u.data : void 0;
|
|
312
|
+
if (l != null) {
|
|
313
|
+
let I = { data: l }, s = a.onGetSingleSuccessAsync != null ? await a.onGetSingleSuccessAsync(I) : I;
|
|
314
|
+
Array.isArray(s == null ? void 0 : s.data) ? f.value = s.data : f.value = (s == null ? void 0 : s.data) != null ? [s.data] : void 0;
|
|
315
|
+
} else {
|
|
316
|
+
const I = {
|
|
317
|
+
additionalUrl: a.additionalUrl,
|
|
318
|
+
id: a.ignoreID ? void 0 : W.value,
|
|
319
|
+
nav: A,
|
|
320
|
+
params: {
|
|
321
|
+
...ye.value,
|
|
322
|
+
...w ? (i = (c = n == null ? void 0 : n.bladeData) == null ? void 0 : c.data) == null ? void 0 : i.params : {},
|
|
323
|
+
...r == null ? void 0 : r.params,
|
|
324
|
+
...e == null ? void 0 : e.params
|
|
325
|
+
},
|
|
326
|
+
proxyID: D.value,
|
|
327
|
+
refresh: (e == null ? void 0 : e.deepRefresh) ?? !1,
|
|
328
|
+
onGetAsync: a.onGetSingleAsync,
|
|
329
|
+
onGetSuccessAsync: a.onGetSingleSuccessAsync
|
|
330
|
+
};
|
|
331
|
+
if (I.id === "new")
|
|
332
|
+
f.value = [];
|
|
333
|
+
else {
|
|
334
|
+
const s = await Ve(I);
|
|
335
|
+
s == null ? f.value = void 0 : Array.isArray(s.data) ? f.value = s.data : f.value = s.data != null ? [s.data] : void 0;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
} else {
|
|
339
|
+
const I = {
|
|
340
|
+
additionalUrl: a.additionalUrl,
|
|
341
|
+
dateFrom: (w ? (B = (d = n == null ? void 0 : n.bladeData) == null ? void 0 : d.data) == null ? void 0 : B.dateFrom : void 0) ?? a.dateFrom,
|
|
342
|
+
dateTo: (w ? (P = (m = n == null ? void 0 : n.bladeData) == null ? void 0 : m.data) == null ? void 0 : P.dateTo : void 0) ?? a.dateTo,
|
|
343
|
+
id: a.ignoreID ? void 0 : W.value,
|
|
344
|
+
nav: A,
|
|
345
|
+
params: {
|
|
346
|
+
...ye.value,
|
|
347
|
+
...w ? (De = (R = n == null ? void 0 : n.bladeData) == null ? void 0 : R.data) == null ? void 0 : De.params : {},
|
|
348
|
+
...r == null ? void 0 : r.params,
|
|
349
|
+
...e == null ? void 0 : e.params
|
|
350
|
+
},
|
|
351
|
+
proxyID: D.value,
|
|
352
|
+
refresh: (e == null ? void 0 : e.deepRefresh) ?? !1,
|
|
353
|
+
onGetAsync: a.onGetAsync,
|
|
354
|
+
onGetSuccessAsync: a.onGetSuccessAsync
|
|
355
|
+
};
|
|
356
|
+
let s = await ke({
|
|
357
|
+
...I,
|
|
358
|
+
onGetSuccessAsync: async (o, na) => o != null && (o.filters != null && (re.value = (o == null ? void 0 : o.filters) ?? []), ie.value = o.count, O(o.data, o.count), a.onGetSuccessAsync != null) ? await a.onGetSuccessAsync(o, na) : o
|
|
359
|
+
});
|
|
360
|
+
f.value = (s == null ? void 0 : s.data) ?? [], J.value = [...M.value];
|
|
361
|
+
}
|
|
362
|
+
G(), b && b(f.value), (r == null ? void 0 : r.onFinishedAsync) != null && await (r == null ? void 0 : r.onFinishedAsync(f.value)), F && F("fetched", f.value);
|
|
363
|
+
}
|
|
364
|
+
function ra(e, l) {
|
|
365
|
+
var c;
|
|
366
|
+
const t = V(e);
|
|
367
|
+
if (a.canUnselect ? N = t === N ? null : t : N = t ?? N, a.canSelect == !0 && (a.onCanSelectItem == null || a.onCanSelectItem(t))) {
|
|
368
|
+
var u = a.navType == "blade" || a.itemBladeName != null && N == null;
|
|
369
|
+
a.onSelectItem != null ? a.onSelectItem(N) : u ? (n == null || n.closeBlade({ bladeName: a.itemBladeName }), a.closeBladeNames != null && (n == null || n.closeBlade({ bladeName: a.closeBladeNames }))) : a.navType == "page" || l == "page" ? (c = r == null ? void 0 : r.router) == null || c.push({
|
|
370
|
+
name: a.itemBladeName,
|
|
371
|
+
params: { id: t.id },
|
|
372
|
+
query: { proxyID: D.value }
|
|
373
|
+
}) : a.itemBladeName != null && (n == null || n.updateBlade({
|
|
374
|
+
data: { id: t.id, data: t },
|
|
375
|
+
bladeName: a.itemBladeName,
|
|
376
|
+
closeBladeNames: a.closeBladeNames
|
|
377
|
+
}));
|
|
378
|
+
}
|
|
379
|
+
F != null && (F("select", N), F("confirm", N));
|
|
380
|
+
}
|
|
381
|
+
function ua() {
|
|
382
|
+
K.value = !K.value, S.value = void 0, g();
|
|
383
|
+
}
|
|
384
|
+
return ta(), sa([S], ([e]) => {
|
|
385
|
+
(a.trackSearchQuery || a.variant == "page") && Ne.updateSearch(e), x.value != 1 ? x.value = 1 : G();
|
|
386
|
+
}, { debounce: 1e3, maxWait: 5e3 }), C(() => a.searchStr, (e) => {
|
|
387
|
+
S.value = e;
|
|
388
|
+
}), C(T, async () => {
|
|
389
|
+
z == "whole-last-updated" ? G() : await g();
|
|
390
|
+
}), C(x, async () => {
|
|
391
|
+
await g();
|
|
392
|
+
}), C([fe, () => a.errorMsg], ([e, l]) => {
|
|
393
|
+
Y.value = e != null || l != null;
|
|
394
|
+
}), C(() => a.refreshToggle, () => {
|
|
395
|
+
g({ deepRefresh: !0 });
|
|
396
|
+
}), C(() => a.refreshLiteToggle, () => {
|
|
397
|
+
g();
|
|
398
|
+
}), C(() => a.filterToggle, () => {
|
|
399
|
+
G();
|
|
400
|
+
}), C(() => a.proxyID, () => {
|
|
401
|
+
g();
|
|
402
|
+
}), oe([f], () => {
|
|
403
|
+
G();
|
|
404
|
+
}, { deep: !0 }), oe([() => a.items], () => {
|
|
405
|
+
g();
|
|
406
|
+
}, { deep: !0 }), r != null && r.isNotSetup ? (r == null ? void 0 : r.isNotSetup) == !0 && a.eager == !0 && g({ deepRefresh: ((Se = (ge = r == null ? void 0 : r.route) == null ? void 0 : ge.params) == null ? void 0 : Se.refresh) == "true" || ((Ae = (Pe = r == null ? void 0 : r.route) == null ? void 0 : Pe.query) == null ? void 0 : Ae.refresh) == "true" }) : da(async () => {
|
|
407
|
+
var e, l, t, u;
|
|
408
|
+
a.eager == !0 && await g({ deepRefresh: ((l = (e = r == null ? void 0 : r.route) == null ? void 0 : e.params) == null ? void 0 : l.refresh) == "true" || ((u = (t = r == null ? void 0 : r.route) == null ? void 0 : t.query) == null ? void 0 : u.refresh) == "true" });
|
|
409
|
+
}), {
|
|
410
|
+
add: Ze,
|
|
411
|
+
applyFilters: async () => {
|
|
412
|
+
x.value != 1 ? (K.value = !1, S.value = void 0, x.value = 1) : await g({ resetSearch: !0 });
|
|
413
|
+
},
|
|
414
|
+
asyncItems: f,
|
|
415
|
+
currentExternalParty: U,
|
|
416
|
+
currentPage: x,
|
|
417
|
+
deleteItem: Ee,
|
|
418
|
+
displayHeaders: Xe,
|
|
419
|
+
errorMsg: fe,
|
|
420
|
+
exportToCSV: la,
|
|
421
|
+
externalParties: le,
|
|
422
|
+
filteredItems: L,
|
|
423
|
+
filters: $,
|
|
424
|
+
filtersChanged: Ce,
|
|
425
|
+
headerOptions: Q,
|
|
426
|
+
id: W,
|
|
427
|
+
isDeletable: Qe,
|
|
428
|
+
isEditing: v(() => E.value == "new" || E.value == "edit"),
|
|
429
|
+
isIntegratable: We,
|
|
430
|
+
isIntegrated: _e,
|
|
431
|
+
isLoading: Re,
|
|
432
|
+
isRestorable: je,
|
|
433
|
+
loadingMsg: se,
|
|
434
|
+
mode: E,
|
|
435
|
+
proxyID: D,
|
|
436
|
+
pushToExternalParty: Oe,
|
|
437
|
+
refresh: g,
|
|
438
|
+
refreshFilteredList: G,
|
|
439
|
+
restoreItem: ea,
|
|
440
|
+
saveItem: aa,
|
|
441
|
+
searchString: S,
|
|
442
|
+
selectExternalParty: Ye,
|
|
443
|
+
selectedFilters: M,
|
|
444
|
+
selectItem: ra,
|
|
445
|
+
showError: Y,
|
|
446
|
+
showInactive: T,
|
|
447
|
+
showSearch: K,
|
|
448
|
+
subtitleOptions: ze,
|
|
449
|
+
tableHeaders: H,
|
|
450
|
+
titleOptions: Je,
|
|
451
|
+
toggleSearch: ua,
|
|
452
|
+
totalCount: ie,
|
|
453
|
+
totalPages: Z,
|
|
454
|
+
unlinkFromExternalParty: pe,
|
|
455
|
+
...n
|
|
456
|
+
};
|
|
457
|
+
}
|
|
458
|
+
export {
|
|
459
|
+
Ma as useList
|
|
460
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ListProps } from './list.ts';
|
|
2
|
+
import { Ref } from 'vue';
|
|
3
|
+
|
|
4
|
+
export interface UseListsOptions {
|
|
5
|
+
onAllLoaded: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function useLists(options: UseListsOptions): {
|
|
8
|
+
loading: Ref<boolean, boolean>;
|
|
9
|
+
registerList: (listOptions: ListProps<any, any, any>) => ListProps<any, any, any>;
|
|
10
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ref as r } from "vue";
|
|
2
|
+
function s(u) {
|
|
3
|
+
const d = r([]), a = r(!1);
|
|
4
|
+
function o() {
|
|
5
|
+
d.value.every((e) => e.loaded) && (u.onAllLoaded(), a.value = !1);
|
|
6
|
+
}
|
|
7
|
+
function l(e) {
|
|
8
|
+
const n = {
|
|
9
|
+
nav: e.nav ?? e.bladeName ?? "",
|
|
10
|
+
loaded: !1
|
|
11
|
+
};
|
|
12
|
+
if (d.value.push(n), a.value = !0, e.onFinished == null)
|
|
13
|
+
e.onFinished = () => {
|
|
14
|
+
n.loaded = !0, o();
|
|
15
|
+
};
|
|
16
|
+
else {
|
|
17
|
+
const i = e.onFinished;
|
|
18
|
+
e.onFinished = (f) => {
|
|
19
|
+
n.loaded = !0, o(), i(f);
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
return e;
|
|
23
|
+
}
|
|
24
|
+
return {
|
|
25
|
+
loading: a,
|
|
26
|
+
registerList: l
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
s as useLists
|
|
31
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Ref, ComputedRef } from 'vue';
|
|
2
|
+
|
|
3
|
+
export interface MenuGroup {
|
|
4
|
+
displayName: string;
|
|
5
|
+
icon?: string;
|
|
6
|
+
id?: string;
|
|
7
|
+
isGroup?: boolean;
|
|
8
|
+
items?: MenuGroup[];
|
|
9
|
+
permissions?: string[];
|
|
10
|
+
requiresAuth?: boolean;
|
|
11
|
+
sortNumber?: number;
|
|
12
|
+
subscriptions?: string[];
|
|
13
|
+
subFilters?: string[] | 'All';
|
|
14
|
+
routeName?: any;
|
|
15
|
+
}
|
|
16
|
+
export interface CreateMenuOptions {
|
|
17
|
+
default?: string;
|
|
18
|
+
groups?: MenuGroup[];
|
|
19
|
+
/**whether to read from vue routes or just purely the given groups */
|
|
20
|
+
useRoutes?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface BTCreateMenu {
|
|
23
|
+
/**filter to only these groups */
|
|
24
|
+
currentGroup: Ref<string | undefined>;
|
|
25
|
+
/**filter to only menu items with this subscription view */
|
|
26
|
+
currentView: Ref<string | undefined>;
|
|
27
|
+
groupOptions: Ref<MenuGroup[]>;
|
|
28
|
+
/**whether to read from vue routes or just purely the given groups */
|
|
29
|
+
useRoutes?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export interface BTMenu extends BTCreateMenu {
|
|
32
|
+
sidebarNavItems: ComputedRef<MenuGroup[]>;
|
|
33
|
+
}
|
|
34
|
+
export declare function createMenu(options?: CreateMenuOptions): BTCreateMenu;
|
|
35
|
+
export declare function useMenu(): BTMenu;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { ref as d, computed as g } from "vue";
|
|
2
|
+
import { useRouter as A } from "vue-router";
|
|
3
|
+
import { t as h } from "../bt-core/core/node_modules/thenby/thenBy.module.mjs";
|
|
4
|
+
import { useNavigation as F } from "./navigation.mjs";
|
|
5
|
+
import { useAuth as G } from "./auth.mjs";
|
|
6
|
+
import { isLengthyArray as N } from "./helpers.mjs";
|
|
7
|
+
import { useIds as w } from "./id.mjs";
|
|
8
|
+
let l;
|
|
9
|
+
function E(i) {
|
|
10
|
+
const o = d(i == null ? void 0 : i.default), f = d(), c = d((i == null ? void 0 : i.groups) ?? []);
|
|
11
|
+
return l = {
|
|
12
|
+
currentGroup: o,
|
|
13
|
+
currentView: f,
|
|
14
|
+
groupOptions: c,
|
|
15
|
+
useRoutes: i == null ? void 0 : i.useRoutes
|
|
16
|
+
}, l;
|
|
17
|
+
}
|
|
18
|
+
function O() {
|
|
19
|
+
const i = A(), o = F(), f = G();
|
|
20
|
+
let c = i.getRoutes();
|
|
21
|
+
const a = w();
|
|
22
|
+
return {
|
|
23
|
+
...l,
|
|
24
|
+
sidebarNavItems: g(() => {
|
|
25
|
+
var b;
|
|
26
|
+
c = c.filter((e) => e.meta != null && e.meta.menuGroup != null);
|
|
27
|
+
let t = [];
|
|
28
|
+
return c.forEach((e) => {
|
|
29
|
+
var y;
|
|
30
|
+
const u = l.groupOptions.value.find((n) => n.displayName == e.meta.menuGroup), r = o.findItem(e.meta.nav), s = e.meta;
|
|
31
|
+
let p = t.find((n) => n.displayName == s.menuGroup);
|
|
32
|
+
p == null && (p = {
|
|
33
|
+
displayName: s.menuGroup,
|
|
34
|
+
icon: (u == null ? void 0 : u.icon) ?? (s == null ? void 0 : s.icon) ?? (r == null ? void 0 : r.icon),
|
|
35
|
+
id: a.getID(),
|
|
36
|
+
isGroup: !0,
|
|
37
|
+
items: [],
|
|
38
|
+
routeName: "",
|
|
39
|
+
sortNumber: u == null ? void 0 : u.sortNumber
|
|
40
|
+
}, t.push(p));
|
|
41
|
+
let m = [];
|
|
42
|
+
s.subFilters != null && (Array.isArray(s.subFilters) ? m = s.subFilters : m = [s.subFilters]), (r == null ? void 0 : r.subFilters) != null && !N(m) && (m = Array.isArray(r.subFilters) ? r.subFilters : [r.subFilters]), (l.currentView.value == null || !N(m) || m.some((n) => n == "All" || l.currentView.value == n)) && ((y = p.items) == null || y.push({
|
|
43
|
+
displayName: (s == null ? void 0 : s.displayName) ?? o.findDisplay(r ?? void 0),
|
|
44
|
+
icon: (s == null ? void 0 : s.icon) ?? o.findIcon(r ?? void 0),
|
|
45
|
+
id: a.getID(),
|
|
46
|
+
permissions: (s == null ? void 0 : s.permissions) ?? (r == null ? void 0 : r.permissions) ?? [],
|
|
47
|
+
requiresAuth: (s == null ? void 0 : s.requiresAuth) !== !1,
|
|
48
|
+
subscriptions: (s == null ? void 0 : s.subscriptions) ?? (r == null ? void 0 : r.subscriptions) ?? [],
|
|
49
|
+
subFilters: m,
|
|
50
|
+
//routeMeta?.subFilters as string[] ?? navMeta?.subFilters ?? [],
|
|
51
|
+
routeName: e.name
|
|
52
|
+
}));
|
|
53
|
+
}), t.forEach((e) => {
|
|
54
|
+
var u;
|
|
55
|
+
e.items = (u = e.items) == null ? void 0 : u.filter((r) => !r.requiresAuth || f.doShow(r.subscriptions, r.permissions, "view")).sort(h.firstBy((r) => r.displayName));
|
|
56
|
+
}), t.sort(h.firstBy((e) => e.sortNumber ?? e.displayName)), l.currentGroup.value != null ? ((b = t.find((e) => e.displayName == l.currentGroup.value)) == null ? void 0 : b.items) ?? [] : t.filter((e) => e.items != null && e.items.length > 0 && (!e.requiresAuth || f.doShow(e.subscriptions, e.permissions, "view")));
|
|
57
|
+
})
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
export {
|
|
61
|
+
E as createMenu,
|
|
62
|
+
O as useMenu
|
|
63
|
+
};
|