@farris/ui-vue 1.7.0-beta.4 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +61 -312
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +56 -1481
- package/components/avatar/index.umd.cjs +1 -1
- package/components/binding-selector/index.esm.js +8 -752
- package/components/binding-selector/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +358 -351
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/button-group/index.esm.js +110 -266
- package/components/button-group/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +1371 -1284
- package/components/calendar/index.umd.cjs +30 -30
- package/components/code-editor/index.esm.js +169 -237
- package/components/code-editor/index.umd.cjs +3 -3
- package/components/collection-property-editor/index.esm.js +382 -351
- package/components/collection-property-editor/index.umd.cjs +2 -2
- package/components/color-picker/index.esm.js +502 -812
- package/components/color-picker/index.umd.cjs +1 -1
- package/components/combo-list/index.esm.js +197 -183
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +199 -364
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/comment/index.esm.js +1501 -1465
- package/components/comment/index.umd.cjs +6 -6
- package/components/common/index.esm.js +136 -100
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.css +1 -1
- package/components/component/index.esm.js +2662 -3647
- package/components/component/index.umd.cjs +1 -8
- package/components/condition/index.esm.js +492 -2449
- package/components/condition/index.umd.cjs +1 -8
- package/components/content-container/index.esm.js +252 -241
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +505 -409
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3326 -3258
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +1709 -1634
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +2693 -3021
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-outline/index.esm.js +102 -98
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +409 -358
- package/components/drawer/index.umd.cjs +2 -2
- package/components/dropdown/index.esm.js +124 -373
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +760 -573
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +354 -327
- package/components/dynamic-resolver/index.umd.cjs +2 -2
- package/components/dynamic-view/index.esm.js +413 -359
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/event-parameter/index.esm.js +1 -1
- package/components/event-parameter/index.umd.cjs +1 -1
- package/components/events-editor/index.css +1 -1
- package/components/events-editor/index.esm.js +1535 -1941
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.css +1 -1
- package/components/expression-editor/index.esm.js +2 -7317
- package/components/expression-editor/index.umd.cjs +1 -427
- package/components/field-selector/index.esm.js +13 -13
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/fieldset/index.esm.js +140 -123
- package/components/fieldset/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +1021 -1012
- package/components/filter-bar/index.umd.cjs +2 -2
- package/components/filter-condition-editor/index.css +1 -1
- package/components/filter-condition-editor/index.esm.js +448 -9000
- package/components/filter-condition-editor/index.umd.cjs +1 -427
- package/components/html-template/index.esm.js +167 -147
- package/components/html-template/index.umd.cjs +1 -1
- package/components/image/index.esm.js +372 -352
- package/components/image/index.umd.cjs +2 -2
- package/components/image-cropper/index.esm.js +361 -615
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/json-editor/index.esm.js +247 -325
- package/components/json-editor/index.umd.cjs +1 -1
- package/components/language-textbox/index.esm.js +835 -421
- package/components/language-textbox/index.umd.cjs +2 -2
- package/components/layout/index.esm.js +163 -549
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +39 -836
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +690 -474
- package/components/list-view/index.umd.cjs +6 -8
- package/components/loading/index.esm.js +128 -97
- package/components/loading/index.umd.cjs +2 -2
- package/components/locale/index.esm.js +361 -340
- package/components/locale/index.umd.cjs +5 -5
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +3396 -3368
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +1684 -1584
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/menu-lookup/index.esm.js +586 -609
- package/components/menu-lookup/index.umd.cjs +6 -6
- package/components/message-box/index.css +1 -1
- package/components/message-box/index.esm.js +357 -353
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +325 -318
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +31 -311
- package/components/nav/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +189 -1633
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +195 -175
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +761 -1057
- package/components/order/index.umd.cjs +7 -9
- package/components/page-footer/index.esm.js +48 -331
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +92 -73
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +195 -472
- package/components/pagination/index.umd.cjs +1 -1
- package/components/popover/index.esm.js +77 -76
- package/components/popover/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +148 -353
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +74 -68
- package/components/property-editor/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +872 -1800
- package/components/property-panel/index.umd.cjs +5 -12
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +4223 -6205
- package/components/query-solution/index.umd.cjs +6 -13
- package/components/response-layout/index.esm.js +206 -170
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +1 -1
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +378 -359
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +2491 -2653
- package/components/schema-selector/index.umd.cjs +8 -10
- package/components/search-box/index.esm.js +79 -240
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +304 -289
- package/components/section/index.umd.cjs +2 -2
- package/components/smoke-detector/index.esm.js +8 -179
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/sort-condition-editor/index.esm.js +4 -9421
- package/components/sort-condition-editor/index.umd.cjs +1 -427
- package/components/splitter/index.esm.js +142 -1171
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +48 -47
- package/components/step/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +460 -513
- package/components/tabs/index.umd.cjs +1 -1
- package/components/text/index.esm.js +73 -217
- package/components/text/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +380 -375
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/tooltip/index.esm.js +40 -40
- package/components/tooltip/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +551 -771
- package/components/transfer/index.umd.cjs +6 -8
- package/components/tree-grid/index.esm.js +250 -235
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +157 -314
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +634 -1125
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +106 -359
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +89 -222
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +199 -290
- package/components/weather/index.umd.cjs +1 -1
- package/designer/accordion/index.esm.js +257 -0
- package/designer/accordion/index.umd.cjs +1 -0
- package/designer/avatar/index.esm.js +227 -0
- package/designer/avatar/index.umd.cjs +1 -0
- package/designer/binding-selector/index.esm.js +792 -0
- package/designer/binding-selector/index.umd.cjs +1 -0
- package/designer/button-edit/index.esm.js +210 -203
- package/designer/button-edit/index.umd.cjs +1 -1
- package/designer/button-group/index.esm.js +282 -0
- package/designer/button-group/index.umd.cjs +1 -0
- package/designer/checkbox/index.esm.js +51 -45
- package/designer/checkbox/index.umd.cjs +1 -1
- package/designer/checkbox-group/index.esm.js +89 -83
- package/designer/checkbox-group/index.umd.cjs +1 -1
- package/designer/code-editor/index.esm.js +75 -0
- package/designer/code-editor/index.umd.cjs +1 -0
- package/designer/color-picker/index.esm.js +1096 -0
- package/designer/color-picker/index.umd.cjs +1 -0
- package/designer/combo-list/index.esm.js +1095 -0
- package/designer/combo-list/index.umd.cjs +1 -0
- package/designer/combo-tree/index.esm.js +186 -0
- package/designer/combo-tree/index.umd.cjs +1 -0
- package/designer/component/index.css +1 -0
- package/designer/component/index.esm.js +5002 -0
- package/designer/component/index.umd.cjs +1 -0
- package/designer/condition/index.esm.js +1899 -0
- package/designer/condition/index.umd.cjs +1 -0
- package/designer/data-grid/index.esm.js +5580 -6213
- package/designer/data-grid/index.umd.cjs +10 -17
- package/designer/data-view/index.esm.js +212 -191
- package/designer/data-view/index.umd.cjs +2 -2
- package/designer/date-picker/index.esm.js +621 -607
- package/designer/date-picker/index.umd.cjs +1 -1
- package/designer/drawer/index.css +1 -1
- package/designer/drawer/index.esm.js +869 -620
- package/designer/drawer/index.umd.cjs +2 -2
- package/designer/dropdown/index.esm.js +261 -0
- package/designer/dropdown/index.umd.cjs +1 -0
- package/designer/dynamic-form/index.esm.js +1166 -1384
- package/designer/dynamic-form/index.umd.cjs +1 -8
- package/designer/expression-editor/index.css +1 -0
- package/designer/expression-editor/index.esm.js +7006 -0
- package/designer/expression-editor/index.umd.cjs +427 -0
- package/designer/farris-designer.all.esm.js +10309 -10617
- package/designer/farris-designer.all.umd.cjs +17 -19
- package/designer/filter-condition-editor/index.css +1 -0
- package/designer/filter-condition-editor/index.esm.js +4795 -0
- package/designer/filter-condition-editor/index.umd.cjs +1 -0
- package/designer/html-template/index.esm.js +718 -0
- package/designer/html-template/index.umd.cjs +1 -0
- package/designer/image-cropper/index.esm.js +765 -0
- package/designer/image-cropper/index.umd.cjs +1 -0
- package/designer/index.css +1 -1
- package/designer/input-group/index.esm.js +72 -66
- package/designer/input-group/index.umd.cjs +1 -1
- package/designer/json-editor/index.esm.js +83 -0
- package/designer/json-editor/index.umd.cjs +1 -0
- package/designer/language-textbox/index.esm.js +783 -0
- package/designer/language-textbox/index.umd.cjs +8 -0
- package/designer/layout/index.esm.js +430 -0
- package/designer/layout/index.umd.cjs +1 -0
- package/designer/list-nav/index.esm.js +802 -0
- package/designer/list-nav/index.umd.cjs +1 -0
- package/designer/list-view/index.esm.js +864 -844
- package/designer/list-view/index.umd.cjs +7 -9
- package/designer/lookup/index.esm.js +2083 -0
- package/designer/lookup/index.umd.cjs +1 -0
- package/designer/menu-lookup/index.esm.js +46 -0
- package/designer/menu-lookup/index.umd.cjs +1 -0
- package/designer/modal/index.esm.js +137 -29
- package/designer/modal/index.umd.cjs +1 -1
- package/designer/nav/index.esm.js +284 -0
- package/designer/nav/index.umd.cjs +1 -0
- package/designer/number-range/index.esm.js +1616 -0
- package/designer/number-range/index.umd.cjs +1 -0
- package/designer/number-spinner/index.esm.js +19 -17
- package/designer/number-spinner/index.umd.cjs +1 -1
- package/designer/order/index.css +1 -0
- package/designer/order/index.esm.js +2196 -0
- package/designer/order/index.umd.cjs +18 -0
- package/designer/page-footer/index.esm.js +290 -0
- package/designer/page-footer/index.umd.cjs +1 -0
- package/designer/page-header/index.esm.js +1003 -0
- package/designer/page-header/index.umd.cjs +1 -0
- package/designer/pagination/index.esm.js +591 -0
- package/designer/pagination/index.umd.cjs +1 -0
- package/designer/progress/index.esm.js +213 -0
- package/designer/progress/index.umd.cjs +1 -0
- package/designer/radio-group/index.esm.js +978 -949
- package/designer/radio-group/index.umd.cjs +1 -1
- package/designer/response-layout-editor/index.esm.js +1 -1
- package/designer/response-layout-editor/index.umd.cjs +1 -1
- package/designer/response-toolbar/index.esm.js +1471 -1416
- package/designer/response-toolbar/index.umd.cjs +1 -1
- package/designer/search-box/index.esm.js +245 -0
- package/designer/search-box/index.umd.cjs +1 -0
- package/designer/section/index.esm.js +83 -78
- package/designer/section/index.umd.cjs +1 -1
- package/designer/smoke-detector/index.css +1 -0
- package/designer/smoke-detector/index.esm.js +178 -0
- package/designer/smoke-detector/index.umd.cjs +1 -0
- package/designer/sort-condition-editor/index.esm.js +138 -0
- package/designer/sort-condition-editor/index.umd.cjs +1 -0
- package/designer/splitter/index.esm.js +1120 -0
- package/designer/splitter/index.umd.cjs +1 -0
- package/designer/step/index.esm.js +226 -0
- package/designer/step/index.umd.cjs +1 -0
- package/designer/switch/index.esm.js +10 -10
- package/designer/switch/index.umd.cjs +1 -1
- package/designer/tabs/index.css +1 -1
- package/designer/tabs/index.esm.js +2447 -2698
- package/designer/tabs/index.umd.cjs +2 -2
- package/designer/text/index.esm.js +147 -0
- package/designer/text/index.umd.cjs +1 -0
- package/designer/time-picker/index.esm.js +101 -100
- package/designer/time-picker/index.umd.cjs +1 -1
- package/designer/transfer/index.esm.js +254 -0
- package/designer/transfer/index.umd.cjs +1 -0
- package/designer/tree-grid/index.esm.js +473 -810
- package/designer/tree-grid/index.umd.cjs +1 -1
- package/designer/tree-view/index.esm.js +313 -0
- package/designer/tree-view/index.umd.cjs +1 -0
- package/designer/uploader/index.esm.js +1190 -0
- package/designer/uploader/index.umd.cjs +2 -0
- package/designer/verify-detail/index.esm.js +258 -0
- package/designer/verify-detail/index.umd.cjs +1 -0
- package/designer/video/index.esm.js +136 -0
- package/designer/video/index.umd.cjs +1 -0
- package/designer/weather/index.css +1 -0
- package/designer/weather/index.esm.js +6244 -0
- package/designer/weather/index.umd.cjs +14 -0
- package/farris.all.esm.js +69941 -70514
- package/farris.all.umd.cjs +117 -117
- package/index.css +1 -1
- package/locales/filter-bar/ui/en.json +2 -1
- package/locales/filter-bar/ui/zh-CHS.json +2 -1
- package/locales/filter-bar/ui/zh-CHT.json +2 -1
- package/locales/query-solution/ui/en.json +1 -1
- package/locales/query-solution/ui/zh-CHS.json +1 -1
- package/locales/query-solution/ui/zh-CHT.json +1 -1
- package/locales/ui/en.json +3 -2
- package/locales/ui/zh-CHS.json +3 -2
- package/locales/ui/zh-CHT.json +3 -2
- package/package.json +1 -1
- package/types/accordion/designer.d.ts +44 -0
- package/types/accordion/src/accordion.props.d.ts +0 -1
- package/types/accordion/src/components/accordion-item.props.d.ts +0 -1
- package/types/avatar/designer.d.ts +29 -0
- package/types/avatar/src/avatar.props.d.ts +0 -1
- package/types/avatar/src/property-config/avatar.property-config.d.ts +1 -1
- package/types/{expression-editor/index.d.ts → binding-selector/designer.d.ts} +6 -6
- package/types/binding-selector/index.d.ts +0 -54
- package/types/binding-selector/src/binding-selector.props.d.ts +0 -1
- package/types/button-group/designer.d.ts +29 -0
- package/types/button-group/index.d.ts +15 -0
- package/types/button-group/src/button-group.props.d.ts +0 -1
- package/types/calendar/src/calendar.props.d.ts +1 -0
- package/types/calendar/src/components/month/month-view.component.d.ts +6 -6
- package/types/calendar/src/composition/use-calendar-events.d.ts +1 -1
- package/types/calendar/src/composition/use-locales.d.ts +1 -0
- package/types/calendar/src/property-config/calendar.property-config.d.ts +2 -0
- package/types/capsule/src/capsule-item.component.d.ts +6 -6
- package/types/checkbox/designer.d.ts +2 -0
- package/types/checkbox-group/designer.d.ts +2 -0
- package/types/code-editor/designer.d.ts +5 -0
- package/types/code-editor/index.d.ts +0 -1
- package/types/code-editor/src/code-textbox.component.d.ts +6 -6
- package/types/code-editor/src/code-textbox.props.d.ts +0 -2
- package/types/color-picker/designer.d.ts +29 -0
- package/types/color-picker/index.d.ts +0 -15
- package/types/color-picker/src/color-picker.props.d.ts +0 -1
- package/types/combo-list/designer.d.ts +29 -0
- package/types/combo-list/src/combo-list.props.d.ts +1 -0
- package/types/combo-list/src/designer/combo-list.design.props.d.ts +6 -0
- package/types/combo-tree/designer.d.ts +5 -0
- package/types/combo-tree/src/combo-tree.props.d.ts +0 -1
- package/types/combo-tree/src/components/tree-container.component.d.ts +7 -7
- package/types/comment/src/comment.props.d.ts +4 -0
- package/types/comment/src/designer/comment.design.props.d.ts +4 -0
- package/types/common/index.d.ts +1 -0
- package/types/common/utils/use-mobile.d.ts +1 -0
- package/types/component/designer.d.ts +35 -0
- package/types/component/index.d.ts +0 -2
- package/types/component/src/component.props.d.ts +0 -8
- package/types/component/src/composition/field-tree-builder.d.ts +1 -0
- package/types/components.d.ts +2 -6
- package/types/condition/designer.d.ts +56 -0
- package/types/condition/index.d.ts +0 -55
- package/types/content-container/index.d.ts +3 -2
- package/types/content-container/src/content-container.props.d.ts +1 -0
- package/types/data-grid/designer.d.ts +2 -0
- package/types/data-grid/index.d.ts +5 -2
- package/types/data-grid/src/data-grid.component.d.ts +2 -1
- package/types/data-grid/src/designer/grid-field-editor.props.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +7 -1
- package/types/data-view/composition/use-mobile.d.ts +3 -0
- package/types/data-view/designer/property-config/use-command-option.d.ts +11 -0
- package/types/data-view/index.d.ts +1 -0
- package/types/designer-canvas/src/composition/designer-canvas-changed.d.ts +3 -3
- package/types/designer-canvas/src/composition/dg-control.d.ts +8 -0
- package/types/designer-outline/src/designer-outline.component.d.ts +3 -3
- package/types/designer-outline/src/types.d.ts +5 -1
- package/types/drawer/designer.d.ts +12 -0
- package/types/drawer/src/designer/drawer-toolbar.design.props.d.ts +12 -0
- package/types/drawer/src/designer/drawer.design.component.d.ts +8 -0
- package/types/drawer/src/designer/drawer.design.props.d.ts +4 -0
- package/types/drawer/src/schema/schema-mapper.d.ts +1 -0
- package/types/drawer/src/schema/schema-resolver.d.ts +1 -0
- package/types/dropdown/designer.d.ts +6 -0
- package/types/dropdown/index.d.ts +27 -6
- package/types/dropdown/src/dropdown.item.component.d.ts +2 -2
- package/types/dropdown/src/dropdown.props.d.ts +0 -1
- package/types/dynamic-form/designer.d.ts +3 -1
- package/types/dynamic-form/index.d.ts +4 -3
- package/types/dynamic-form/src/component/dynamic-form-label/dynamic-form-label.component.d.ts +6 -6
- package/types/dynamic-form/src/composition/use-input-type-resolver.d.ts +11 -0
- package/types/dynamic-resolver/index.d.ts +3 -0
- package/types/dynamic-resolver/src/props-resolver.d.ts +2 -0
- package/types/dynamic-resolver/src/resolver/property-config/property-config-resolver-design.d.ts +1 -1
- package/types/dynamic-resolver/src/resolver/property-config/property-config-resolver.d.ts +1 -1
- package/types/dynamic-resolver/src/resolver/property-config/use-property-config-resolver.d.ts +2 -2
- package/types/dynamic-resolver/src/resolver/schema/schema-resolver-design.d.ts +1 -1
- package/types/dynamic-resolver/src/resolver/schema/schema-resolver.d.ts +1 -1
- package/types/dynamic-view/src/components/maps.d.ts +883 -1
- package/types/dynamic-view/src/dynamic-view.component.d.ts +1 -1
- package/types/dynamic-view/src/types.d.ts +4 -0
- package/types/expression-editor/designer.d.ts +9 -0
- package/types/field-selector/index.d.ts +2 -1
- package/types/fieldset/index.d.ts +3 -2
- package/types/fieldset/src/fieldset.props.d.ts +1 -0
- package/types/filter-bar/src/composition/types.d.ts +1 -1
- package/types/filter-bar/src/composition/use-size.d.ts +2 -2
- package/types/filter-bar/src/locale/locale.d.ts +1 -0
- package/types/filter-condition-editor/designer.d.ts +10 -0
- package/types/filter-condition-editor/index.d.ts +0 -9
- package/types/filter-condition-editor/src/components/filter-condition-grid.component.d.ts +12 -12
- package/types/filter-condition-editor/src/components/sort-editor-grid.component.d.ts +12 -12
- package/types/filter-condition-editor/src/filter-condition-editor.props.d.ts +0 -1
- package/types/html-template/designer.d.ts +31 -0
- package/types/html-template/src/designer/html-template.design.props.d.ts +9 -0
- package/types/html-template/src/html-template.props.d.ts +2 -0
- package/types/image-cropper/designer.d.ts +4 -0
- package/types/image-cropper/src/image-cropper.props.d.ts +0 -1
- package/types/index.d.ts +0 -1
- package/types/input-group/designer.d.ts +2 -0
- package/types/json-editor/designer.d.ts +5 -0
- package/types/json-editor/src/components/editable-combo/editable-combo.component.d.ts +3 -3
- package/types/json-editor/src/components/editable-combo/popup-container.component.d.ts +3 -3
- package/types/json-editor/src/json-editor.props.d.ts +0 -1
- package/types/language-textbox/index.d.ts +6 -6
- package/types/language-textbox/src/language-textbox.component.d.ts +2 -2
- package/types/language-textbox/src/language-textbox.props.d.ts +1 -0
- package/types/layout/index.d.ts +1 -0
- package/types/layout/src/components/layout-pane.props.d.ts +0 -1
- package/types/layout/src/layout.props.d.ts +0 -1
- package/types/list-nav/index.d.ts +24 -5
- package/types/list-nav/src/list-nav.props.d.ts +0 -1
- package/types/list-view/index.d.ts +1 -0
- package/types/list-view/src/composition/use-draggable.d.ts +1 -1
- package/types/list-view/src/designer/list-view.design.props.d.ts +1 -0
- package/types/list-view/src/list-view-table.props.d.ts +1 -0
- package/types/loading/index.d.ts +6 -6
- package/types/loading/src/loading.component.d.ts +3 -3
- package/types/lookup/index.d.ts +1 -1
- package/types/lookup/src/components/popup-container.component.d.ts +6 -6
- package/types/lookup/src/lookup.props.d.ts +1 -0
- package/types/lookup/src/property-config/external-lookup.property-config.d.ts +1 -0
- package/types/lookup/src/property-config/lookup.property-config.d.ts +1 -0
- package/types/menu-lookup/designer.d.ts +5 -0
- package/types/menu-lookup/src/menu-lookup.props.d.ts +0 -1
- package/types/message-box/index.d.ts +6 -6
- package/types/message-box/src/message-box.component.d.ts +3 -3
- package/types/modal/designer.d.ts +2 -0
- package/types/modal/index.d.ts +30 -24
- package/types/modal/src/modal.component.d.ts +15 -12
- package/types/modal/src/modal.props.d.ts +4 -0
- package/types/nav/designer.d.ts +6 -0
- package/types/nav/index.d.ts +24 -20
- package/types/nav/src/nav.props.d.ts +0 -1
- package/types/notify/index.d.ts +3 -3
- package/types/notify/src/notify.component.d.ts +2 -2
- package/types/number-range/designer.d.ts +29 -0
- package/types/number-range/src/number-range.props.d.ts +0 -1
- package/types/number-spinner/src/composition/types.d.ts +1 -0
- package/types/order/designer.d.ts +6 -0
- package/types/order/index.d.ts +36 -5
- package/types/order/src/designer/order.design.component.d.ts +1 -1
- package/types/order/src/order.props.d.ts +0 -1
- package/types/page-footer/designer.d.ts +6 -0
- package/types/page-footer/index.d.ts +0 -2
- package/types/page-footer/src/page-footer.props.d.ts +0 -1
- package/types/page-header/index.d.ts +3 -2
- package/types/page-header/src/designer/page-header.design.props.d.ts +20 -0
- package/types/page-header/src/page-header.props.d.ts +2 -0
- package/types/pagination/designer.d.ts +29 -0
- package/types/pagination/index.d.ts +15 -0
- package/types/pagination/src/pagination.props.d.ts +0 -1
- package/types/popover/index.d.ts +3 -3
- package/types/popover/src/composition/use-resize.d.ts +1 -1
- package/types/popover/src/popover.component.d.ts +2 -2
- package/types/progress/designer.d.ts +29 -0
- package/types/progress/src/progress.props.d.ts +0 -1
- package/types/property-panel/src/property-panel.component.d.ts +3 -3
- package/types/query-solution/index.d.ts +4 -4
- package/types/query-solution/src/composition/types.d.ts +8 -2
- package/types/query-solution/src/composition/use-header.d.ts +2 -2
- package/types/query-solution/src/composition/use-solution-utils.d.ts +1 -1
- package/types/query-solution/src/designer/query-solution-config/composition/use-util.d.ts +1 -1
- package/types/query-solution/src/designer/query-solution-config/query-solution-config.props.d.ts +1 -0
- package/types/query-solution/src/designer/solution-preset-config/solution-preset.props.d.ts +1 -0
- package/types/query-solution/src/query-solution.props.d.ts +1 -0
- package/types/radio-group/designer.d.ts +4 -1
- package/types/radio-group/src/designer/item-collection-editor.props.d.ts +1 -0
- package/types/response-layout/index.d.ts +3 -2
- package/types/response-layout/src/component/response-layout-item.props.d.ts +1 -0
- package/types/response-layout/src/property-config/response-layout-splitter/response-layout-splitter.props.d.ts +1 -0
- package/types/response-layout/src/response-layout.props.d.ts +1 -0
- package/types/response-toolbar/designer.d.ts +2 -1
- package/types/response-toolbar/src/designer/response-toolbar.design.props.d.ts +1 -0
- package/types/search-box/designer.d.ts +52 -0
- package/types/search-box/index.d.ts +1 -17
- package/types/search-box/src/components/search-box-container.component.d.ts +3 -3
- package/types/search-box/src/search-box.props.d.ts +0 -1
- package/types/section/designer.d.ts +1 -0
- package/types/smoke-detector/designer.d.ts +6 -0
- package/types/smoke-detector/index.d.ts +0 -2
- package/types/smoke-detector/src/smoke-detector.props.d.ts +0 -1
- package/types/sort-condition-editor/designer.d.ts +9 -0
- package/types/sort-condition-editor/index.d.ts +2 -7
- package/types/sort-condition-editor/src/sort-condition-editor.props.d.ts +0 -1
- package/types/splitter/designer.d.ts +32 -0
- package/types/splitter/index.d.ts +1 -0
- package/types/splitter/src/components/splitter-pane.props.d.ts +0 -1
- package/types/splitter/src/splitter.props.d.ts +0 -1
- package/types/step/designer.d.ts +6 -0
- package/types/tabs/designer.d.ts +1 -0
- package/types/tabs/index.d.ts +0 -1
- package/types/tabs/src/composition/types.d.ts +1 -0
- package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +1 -0
- package/types/tags/index.d.ts +3 -3
- package/types/tags/src/tags.component.d.ts +1 -1
- package/types/text/designer.d.ts +6 -0
- package/types/text/index.d.ts +24 -20
- package/types/text/src/text.props.d.ts +0 -1
- package/types/time-picker/src/components/time.component.d.ts +3 -3
- package/types/transfer/designer.d.ts +35 -0
- package/types/transfer/src/transfer.props.d.ts +0 -1
- package/types/tree-view/designer.d.ts +29 -0
- package/types/tree-view/src/tree-view.props.d.ts +0 -1
- package/types/uploader/designer.d.ts +141 -0
- package/types/uploader/index.d.ts +6 -6
- package/types/uploader/src/components/upload-progress.component.d.ts +3 -3
- package/types/uploader/src/uploader.component.d.ts +3 -3
- package/types/uploader/src/uploader.props.d.ts +0 -1
- package/types/verify-detail/designer.d.ts +6 -0
- package/types/verify-detail/index.d.ts +58 -5
- package/types/verify-detail/src/designer/verify-detail.design.component.d.ts +8 -8
- package/types/verify-detail/src/verify-detail.props.d.ts +0 -1
- package/types/video/designer.d.ts +6 -0
- package/types/video/index.d.ts +24 -20
- package/types/video/src/video.props.d.ts +0 -1
- package/components/sort-condition-editor/index.css +0 -1
- package/package.zip +0 -0
- package/types/designer-toolbox/index.d.ts +0 -3
- package/types/designer-toolbox/src/toolbox.component.d.ts +0 -14
- package/types/designer-toolbox/src/toolbox.props.d.ts +0 -29
- package/types/designer-toolbox/src/types.d.ts +0 -21
- package/types/designer.d.ts +0 -13
- package/types/flow-canvas/index.d.ts +0 -3
- package/types/flow-canvas/src/components/flow-node-item.component.d.ts +0 -8
- package/types/flow-canvas/src/components/flow-node-item.props.d.ts +0 -3
- package/types/flow-canvas/src/composition/types.d.ts +0 -42
- package/types/flow-canvas/src/composition/use-bezier-curve.d.ts +0 -2
- package/types/flow-canvas/src/composition/use-connections.d.ts +0 -2
- package/types/flow-canvas/src/composition/use-curve.d.ts +0 -4
- package/types/flow-canvas/src/composition/use-drawing-bezier.d.ts +0 -2
- package/types/flow-canvas/src/composition/use-drawing.d.ts +0 -4
- package/types/flow-canvas/src/flow-canvas.component.d.ts +0 -8
- package/types/flow-canvas/src/flow-canvas.props.d.ts +0 -3
- package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +0 -2
- package/types/layout/src/designer/layout-pane.design.component.d.ts +0 -8
- package/types/layout/src/designer/layout-use-designer-rules.d.ts +0 -2
- package/types/layout/src/designer/layout.design.component.d.ts +0 -8
- package/types/layout/src/schema/schema-mapper.d.ts +0 -2
- package/types/layout/src/schema/schema-resolver.d.ts +0 -2
- package/types/list-nav/src/designer/use-designer-rules.d.ts +0 -2
- package/types/list-nav/src/property-config/list-nav.property-config.d.ts +0 -8
- package/types/list-nav/src/schema/schema-mapper.d.ts +0 -2
- package/types/list-nav/src/schema/schema-resolver.d.ts +0 -2
- /package/{components → designer}/condition/index.css +0 -0
- /package/{components → designer}/uploader/index.css +0 -0
- /package/types/{list-nav/src/designer/list-nav.design.component.d.ts → dynamic-form/src/component/form-control/form-control.component.d.ts} +0 -0
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { resolveAppearance as
|
|
6
|
-
import { DgControl as ye, useDesignerComponent as
|
|
7
|
-
import { cloneDeep as
|
|
8
|
-
import { resolveField as
|
|
9
|
-
import
|
|
10
|
-
import { LocaleService as
|
|
11
|
-
import { BaseControlProperty as
|
|
12
|
-
const
|
|
13
|
-
["appearance",
|
|
14
|
-
]),
|
|
15
|
-
function
|
|
1
|
+
var xt = Object.defineProperty;
|
|
2
|
+
var Ft = (e, t, n) => t in e ? xt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var Be = (e, t, n) => Ft(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { defineComponent as ee, ref as B, watch as Y, computed as A, createVNode as l, inject as le, nextTick as Ve, onMounted as ie, createTextVNode as se, provide as Et, onUnmounted as It, Fragment as Ae } from "vue";
|
|
5
|
+
import { resolveAppearance as Vt, createPropsResolver as Nt, getPropsResolverGenerator as Ot } from "../dynamic-resolver/index.esm.js";
|
|
6
|
+
import { DgControl as ye, useDesignerComponent as Pt } from "../designer-canvas/index.esm.js";
|
|
7
|
+
import { cloneDeep as ce, isFunction as Te, isPlainObject as $e } from "lodash-es";
|
|
8
|
+
import { resolveField as K, useDateFormat as Wt, useResizeObserver as Re, getCustomClass as Lt, getCustomStyle as jt } from "../common/index.esm.js";
|
|
9
|
+
import Bt from "../popover/index.esm.js";
|
|
10
|
+
import { LocaleService as $t } from "../locale/index.esm.js";
|
|
11
|
+
import { BaseControlProperty as Rt } from "../property-panel/index.esm.js";
|
|
12
|
+
const He = /* @__PURE__ */ new Map([
|
|
13
|
+
["appearance", Vt]
|
|
14
|
+
]), At = "root-viewmodel";
|
|
15
|
+
function Ht(e, t) {
|
|
16
16
|
const {
|
|
17
17
|
formSchemaUtils: n,
|
|
18
18
|
designViewModelUtils: o
|
|
19
19
|
} = t;
|
|
20
|
-
function
|
|
20
|
+
function m(f) {
|
|
21
21
|
return {
|
|
22
|
-
id: `${
|
|
23
|
-
code: `${
|
|
24
|
-
name:
|
|
25
|
-
bindTo:
|
|
26
|
-
parent:
|
|
22
|
+
id: `${f.componentId}-component-viewmodel`,
|
|
23
|
+
code: `${f.componentId}-component-viewmodel`,
|
|
24
|
+
name: f.componentName,
|
|
25
|
+
bindTo: f.bindTo,
|
|
26
|
+
parent: At,
|
|
27
27
|
fields: [],
|
|
28
28
|
commands: [],
|
|
29
29
|
states: [],
|
|
30
30
|
enableValidation: !0
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function w(f) {
|
|
34
34
|
const a = e.getSchemaByType("component-ref");
|
|
35
35
|
return Object.assign(a, {
|
|
36
|
-
id: `${
|
|
37
|
-
component: `${
|
|
36
|
+
id: `${f.componentId}-component-ref`,
|
|
37
|
+
component: `${f.componentId}-component`
|
|
38
38
|
}), a;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
var
|
|
42
|
-
const
|
|
40
|
+
function p(f, a, c) {
|
|
41
|
+
var v, d, E, s;
|
|
42
|
+
const y = (d = (v = a == null ? void 0 : a.parentComponentInstance) == null ? void 0 : v.schema) == null ? void 0 : d.type, r = (s = (E = n.getFormSchema()) == null ? void 0 : E.module) == null ? void 0 : s.templateId;
|
|
43
43
|
if (["double-list-template", "tree-list-template", "list-template"].includes(r))
|
|
44
|
-
return
|
|
45
|
-
const i = [ye["content-container"].type, ye["response-layout-item"].type, ye["splitter-pane"].type];
|
|
46
|
-
if (
|
|
47
|
-
const
|
|
44
|
+
return f;
|
|
45
|
+
const i = [ye["content-container"].type, ye["response-layout-item"].type, ye["splitter-pane"].type, ye.drawer.type];
|
|
46
|
+
if (y && i.includes(y)) {
|
|
47
|
+
const h = e.getSchemaByType(
|
|
48
48
|
"section",
|
|
49
49
|
{
|
|
50
50
|
parentComponentInstance: a.parentComponentInstance,
|
|
@@ -52,61 +52,66 @@ function It(e, t) {
|
|
|
52
52
|
},
|
|
53
53
|
t
|
|
54
54
|
);
|
|
55
|
-
if (
|
|
56
|
-
const
|
|
57
|
-
return
|
|
55
|
+
if (h && h.contents && h.contents.length) {
|
|
56
|
+
const N = h.contents[0];
|
|
57
|
+
return N.contents = [f], h;
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
return
|
|
60
|
+
return f;
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function D(f) {
|
|
63
63
|
const a = e.getSchemaByType("calendar");
|
|
64
64
|
return Object.assign(a, {
|
|
65
|
-
id:
|
|
65
|
+
id: f.componentId + "-calendar",
|
|
66
66
|
appearance: {
|
|
67
67
|
class: ""
|
|
68
68
|
},
|
|
69
69
|
type: "calendar",
|
|
70
|
-
dataSource:
|
|
70
|
+
dataSource: f.dataSource || "",
|
|
71
71
|
pagination: {
|
|
72
72
|
enable: !1
|
|
73
73
|
}
|
|
74
74
|
}), [a];
|
|
75
75
|
}
|
|
76
|
-
function
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
76
|
+
function I(f) {
|
|
77
|
+
var i, v, d;
|
|
78
|
+
const a = e.getSchemaByType("component"), c = D(f);
|
|
79
|
+
let y = !1;
|
|
80
|
+
const r = (d = (v = (i = f.parentComponentInstance) == null ? void 0 : i.schema) == null ? void 0 : v.appearance) == null ? void 0 : d.class;
|
|
81
|
+
return r && r.includes("f-page-main") && (y = !0), Object.assign(a, {
|
|
82
|
+
id: `${f.componentId}-component`,
|
|
83
|
+
viewModel: `${f.componentId}-component-viewmodel`,
|
|
84
|
+
componentType: f.componentType,
|
|
85
|
+
appearance: {
|
|
86
|
+
class: y ? "f-utils-fill-flex-column f-utils-overflow-auto" : "f-grid-is-sub f-utils-overflow-auto"
|
|
87
|
+
},
|
|
88
|
+
contents: c
|
|
84
89
|
}), a;
|
|
85
90
|
}
|
|
86
|
-
function
|
|
87
|
-
const a =
|
|
88
|
-
return r.module.viewmodels.push(
|
|
91
|
+
function C(f) {
|
|
92
|
+
const a = w(f), c = I(f), y = m(f), r = n.getFormSchema();
|
|
93
|
+
return r.module.viewmodels.push(y), r.module.components.push(c), o.assembleDesignViewModel(), p(a, f);
|
|
89
94
|
}
|
|
90
|
-
return { createComponent:
|
|
95
|
+
return { createComponent: C };
|
|
91
96
|
}
|
|
92
|
-
function
|
|
93
|
-
var
|
|
94
|
-
const
|
|
95
|
-
if (
|
|
96
|
-
const a = Math.random().toString(36).slice(2, 6),
|
|
97
|
+
function Ye(e, t, n, o) {
|
|
98
|
+
var w, p, D, I, C, f;
|
|
99
|
+
const m = n.parentComponentInstance;
|
|
100
|
+
if (m && o) {
|
|
101
|
+
const a = Math.random().toString(36).slice(2, 6), c = {
|
|
97
102
|
componentId: `calendar-${a}`,
|
|
98
|
-
componentName: ((
|
|
103
|
+
componentName: ((w = n.bindingSourceContext) == null ? void 0 : w.entityTitle) || ((D = (p = n.bindingSourceContext) == null ? void 0 : p.bindingEntity) == null ? void 0 : D.name) || `日历-${a}`,
|
|
99
104
|
componentType: "calendar",
|
|
100
|
-
parentContainerId:
|
|
101
|
-
parentComponentInstance:
|
|
102
|
-
bindTo: ((
|
|
103
|
-
dataSource: (
|
|
104
|
-
}, { createComponent:
|
|
105
|
-
return
|
|
105
|
+
parentContainerId: m.schema.id,
|
|
106
|
+
parentComponentInstance: m,
|
|
107
|
+
bindTo: ((I = n.bindingSourceContext) == null ? void 0 : I.bindTo) || "",
|
|
108
|
+
dataSource: (f = (C = n.bindingSourceContext) == null ? void 0 : C.bindingEntity) == null ? void 0 : f.label
|
|
109
|
+
}, { createComponent: y } = Ht(e, o);
|
|
110
|
+
return y(c);
|
|
106
111
|
} else
|
|
107
112
|
return t;
|
|
108
113
|
}
|
|
109
|
-
const
|
|
114
|
+
const Yt = "https://json-schema.org/draft/2020-12/schema", qt = "https://farris-design.gitee.io/calendar.schema.json", zt = "calendar", Gt = "A Farris Input Component", Ut = "object", _t = {
|
|
110
115
|
id: {
|
|
111
116
|
description: "The unique identifier for calendar",
|
|
112
117
|
type: "string"
|
|
@@ -219,24 +224,24 @@ const Nt = "https://json-schema.org/draft/2020-12/schema", Ot = "https://farris-
|
|
|
219
224
|
type: "String",
|
|
220
225
|
default: ""
|
|
221
226
|
}
|
|
222
|
-
},
|
|
227
|
+
}, Jt = [
|
|
223
228
|
"id",
|
|
224
229
|
"type"
|
|
225
|
-
],
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
},
|
|
231
|
-
$schema:
|
|
232
|
-
$id:
|
|
233
|
-
title:
|
|
234
|
-
description:
|
|
235
|
-
type:
|
|
236
|
-
properties:
|
|
237
|
-
required:
|
|
238
|
-
events:
|
|
239
|
-
},
|
|
230
|
+
], Xt = {
|
|
231
|
+
onEventClick: "日程点击事件",
|
|
232
|
+
onDateChange: "日期切换事件",
|
|
233
|
+
onMoreClick: "更多点击事件",
|
|
234
|
+
onViewChange: "视图切换事件"
|
|
235
|
+
}, Me = {
|
|
236
|
+
$schema: Yt,
|
|
237
|
+
$id: qt,
|
|
238
|
+
title: zt,
|
|
239
|
+
description: Gt,
|
|
240
|
+
type: Ut,
|
|
241
|
+
properties: _t,
|
|
242
|
+
required: Jt,
|
|
243
|
+
events: Xt
|
|
244
|
+
}, Ne = {
|
|
240
245
|
events: { type: Array, default: [] },
|
|
241
246
|
firstDayOfTheWeek: { type: String, default: "Sun" },
|
|
242
247
|
enableMoreView: { type: Boolean, default: !1 },
|
|
@@ -256,10 +261,16 @@ const Nt = "https://json-schema.org/draft/2020-12/schema", Ot = "https://farris-
|
|
|
256
261
|
activeDate: { type: Date, default: /* @__PURE__ */ new Date() },
|
|
257
262
|
textField: { type: String, default: "title" },
|
|
258
263
|
customStyle: { type: String, default: "" },
|
|
259
|
-
enableWeekdayBorder: { type: Boolean, default: !1 }
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
264
|
+
enableWeekdayBorder: { type: Boolean, default: !1 },
|
|
265
|
+
visible: { type: Boolean, default: !0 }
|
|
266
|
+
}, ia = Nt(Ne, Me, He, Ye), qe = Ot(
|
|
267
|
+
Me,
|
|
268
|
+
Me,
|
|
269
|
+
He,
|
|
270
|
+
Ye
|
|
271
|
+
), X = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
|
|
272
|
+
var te = /* @__PURE__ */ ((e) => (e[e.previous = 1] = "previous", e[e.current = 2] = "current", e[e.next = 3] = "next", e))(te || {});
|
|
273
|
+
function de() {
|
|
263
274
|
function e() {
|
|
264
275
|
return { year: 0, month: 0, day: 0 };
|
|
265
276
|
}
|
|
@@ -275,8 +286,8 @@ function se() {
|
|
|
275
286
|
);
|
|
276
287
|
}
|
|
277
288
|
function n(a) {
|
|
278
|
-
const
|
|
279
|
-
return a.year || (a.year =
|
|
289
|
+
const c = /* @__PURE__ */ new Date();
|
|
290
|
+
return a.year || (a.year = c.getFullYear()), a.month || (a.month = c.getMonth() + 1), a.day || (a.day = 1), new Date(
|
|
280
291
|
a.year,
|
|
281
292
|
a.month - 1,
|
|
282
293
|
a.day,
|
|
@@ -297,20 +308,20 @@ function se() {
|
|
|
297
308
|
0
|
|
298
309
|
).getDay();
|
|
299
310
|
}
|
|
300
|
-
function
|
|
301
|
-
return
|
|
311
|
+
function m(a) {
|
|
312
|
+
return X.indexOf(a);
|
|
302
313
|
}
|
|
303
|
-
function
|
|
314
|
+
function w(a) {
|
|
304
315
|
return t(a).getTime();
|
|
305
316
|
}
|
|
306
|
-
function
|
|
307
|
-
return Math.round(
|
|
317
|
+
function p(a) {
|
|
318
|
+
return Math.round(w(a) / 1e3);
|
|
308
319
|
}
|
|
309
|
-
function
|
|
310
|
-
const r =
|
|
311
|
-
return i -
|
|
320
|
+
function D(a, c, y) {
|
|
321
|
+
const r = w(c), i = w(y), v = w(a);
|
|
322
|
+
return i - v > v - r ? c : y;
|
|
312
323
|
}
|
|
313
|
-
function
|
|
324
|
+
function I() {
|
|
314
325
|
const a = /* @__PURE__ */ new Date();
|
|
315
326
|
return {
|
|
316
327
|
year: a.getFullYear(),
|
|
@@ -321,7 +332,7 @@ function se() {
|
|
|
321
332
|
second: a.getSeconds()
|
|
322
333
|
};
|
|
323
334
|
}
|
|
324
|
-
function
|
|
335
|
+
function C(a) {
|
|
325
336
|
return a ? {
|
|
326
337
|
year: a.getFullYear(),
|
|
327
338
|
month: a.getMonth() + 1,
|
|
@@ -331,173 +342,173 @@ function se() {
|
|
|
331
342
|
second: a.getSeconds()
|
|
332
343
|
} : e();
|
|
333
344
|
}
|
|
334
|
-
function
|
|
335
|
-
const
|
|
336
|
-
return
|
|
345
|
+
function f(a) {
|
|
346
|
+
const c = o(a);
|
|
347
|
+
return c === 0 || c === 6;
|
|
337
348
|
}
|
|
338
|
-
return { convertDateToDateObject:
|
|
349
|
+
return { convertDateToDateObject: C, emptyDate: e, getDate: t, getDate2: n, getDayNumber: o, getEpocTime: p, getNearDate: D, getWeekdayIndex: m, getTimeInMilliseconds: w, getToday: I, isWeekEnd: f };
|
|
339
350
|
}
|
|
340
|
-
function
|
|
341
|
-
function e(
|
|
342
|
-
return new Date(
|
|
343
|
-
}
|
|
344
|
-
function t(
|
|
345
|
-
return new Date(
|
|
346
|
-
}
|
|
347
|
-
function n(
|
|
348
|
-
const
|
|
349
|
-
return
|
|
350
|
-
}
|
|
351
|
-
function o(
|
|
352
|
-
const
|
|
353
|
-
year:
|
|
354
|
-
},
|
|
355
|
-
return
|
|
356
|
-
}
|
|
357
|
-
function
|
|
358
|
-
const
|
|
359
|
-
year:
|
|
360
|
-
},
|
|
361
|
-
return
|
|
362
|
-
}
|
|
363
|
-
return { daysInMonth: e, daysInPreMonth: n, getNextMonth: o, getPreviousMonth:
|
|
351
|
+
function Qt() {
|
|
352
|
+
function e(w, p) {
|
|
353
|
+
return new Date(p, w, 0).getDate();
|
|
354
|
+
}
|
|
355
|
+
function t(w, p, D) {
|
|
356
|
+
return new Date(w, p - 1, D, 0, 0, 0, 0);
|
|
357
|
+
}
|
|
358
|
+
function n(w, p) {
|
|
359
|
+
const D = t(p, w, 1);
|
|
360
|
+
return D.setMonth(D.getMonth() - 1), e(D.getMonth() + 1, D.getFullYear());
|
|
361
|
+
}
|
|
362
|
+
function o(w, p) {
|
|
363
|
+
const D = {
|
|
364
|
+
year: w === 12 ? p + 1 : p
|
|
365
|
+
}, I = w === 12 ? 1 : w + 1;
|
|
366
|
+
return D.month = I, D;
|
|
367
|
+
}
|
|
368
|
+
function m(w, p) {
|
|
369
|
+
const D = {
|
|
370
|
+
year: w === 1 ? p - 1 : p
|
|
371
|
+
}, I = w === 1 ? 12 : w - 1;
|
|
372
|
+
return D.month = I, D;
|
|
373
|
+
}
|
|
374
|
+
return { daysInMonth: e, daysInPreMonth: n, getNextMonth: o, getPreviousMonth: m };
|
|
364
375
|
}
|
|
365
|
-
function
|
|
366
|
-
const { getToday: e, getDayNumber: t, isWeekEnd: n } =
|
|
367
|
-
function
|
|
368
|
-
const { day: E, month: s, year:
|
|
369
|
-
if (E === void 0 || s === void 0 ||
|
|
376
|
+
function Zt() {
|
|
377
|
+
const { getToday: e, getDayNumber: t, isWeekEnd: n } = de(), { daysInMonth: o, daysInPreMonth: m, getNextMonth: w, getPreviousMonth: p } = Qt();
|
|
378
|
+
function D(d) {
|
|
379
|
+
const { day: E, month: s, year: h } = d;
|
|
380
|
+
if (E === void 0 || s === void 0 || h === void 0)
|
|
370
381
|
throw new Error("invalided date.");
|
|
371
|
-
const
|
|
382
|
+
const N = E === 1, M = N ? m(s, h) : E - 1, $ = N ? s - 1 : s, S = $ < 1, P = S ? 12 : $;
|
|
372
383
|
return {
|
|
373
|
-
year:
|
|
374
|
-
month:
|
|
375
|
-
day:
|
|
384
|
+
year: S ? h - 1 : h,
|
|
385
|
+
month: P,
|
|
386
|
+
day: M
|
|
376
387
|
};
|
|
377
388
|
}
|
|
378
|
-
function
|
|
379
|
-
const { day: E, month: s, year:
|
|
380
|
-
if (E === void 0 || s === void 0 ||
|
|
389
|
+
function I(d) {
|
|
390
|
+
const { day: E, month: s, year: h } = d;
|
|
391
|
+
if (E === void 0 || s === void 0 || h === void 0)
|
|
381
392
|
throw new Error("invalided date.");
|
|
382
|
-
const
|
|
393
|
+
const N = o(s, h), M = E === N, $ = M ? 1 : E + 1, S = M ? s + 1 : s, P = S > 12, x = P ? 1 : S;
|
|
383
394
|
return {
|
|
384
|
-
year:
|
|
385
|
-
month:
|
|
386
|
-
day:
|
|
395
|
+
year: P ? h + 1 : h,
|
|
396
|
+
month: x,
|
|
397
|
+
day: $
|
|
387
398
|
};
|
|
388
399
|
}
|
|
389
|
-
function
|
|
390
|
-
const E =
|
|
400
|
+
function C(d) {
|
|
401
|
+
const E = p(d.month || 1, d.year || 1), s = o(E.month || 1, E.year || 1);
|
|
391
402
|
return {
|
|
392
|
-
day: (
|
|
403
|
+
day: (d.day || 1) <= s ? d.day : s,
|
|
393
404
|
month: E.month,
|
|
394
405
|
year: E.year
|
|
395
406
|
};
|
|
396
407
|
}
|
|
397
|
-
function
|
|
398
|
-
const E =
|
|
408
|
+
function f(d) {
|
|
409
|
+
const E = w(d.month || 1, d.year || 1), s = o(E.month || 1, E.year || 1);
|
|
399
410
|
return {
|
|
400
|
-
day: (
|
|
411
|
+
day: (d.day || 1) <= s ? d.day : s,
|
|
401
412
|
month: E.month,
|
|
402
413
|
year: E.year
|
|
403
414
|
};
|
|
404
415
|
}
|
|
405
|
-
function a(
|
|
416
|
+
function a(d) {
|
|
406
417
|
return {
|
|
407
|
-
day:
|
|
408
|
-
month:
|
|
409
|
-
year: (
|
|
418
|
+
day: d.day,
|
|
419
|
+
month: d.month,
|
|
420
|
+
year: (d.year || 1) + 1
|
|
410
421
|
};
|
|
411
422
|
}
|
|
412
|
-
function
|
|
423
|
+
function c(d) {
|
|
413
424
|
return {
|
|
414
|
-
day:
|
|
415
|
-
month:
|
|
416
|
-
year: (
|
|
425
|
+
day: d.day,
|
|
426
|
+
month: d.month,
|
|
427
|
+
year: (d.year || 1) - 1
|
|
417
428
|
};
|
|
418
429
|
}
|
|
419
|
-
function
|
|
420
|
-
const s = (
|
|
430
|
+
function y(d) {
|
|
431
|
+
const s = (d.day || 1) - 7, h = s < 1, N = h ? o(d.month || 1, d.year || 1) + s : s, M = h ? p(d.month || 1, d.year || 1) : d;
|
|
421
432
|
return {
|
|
422
|
-
day:
|
|
423
|
-
month:
|
|
424
|
-
year:
|
|
433
|
+
day: N,
|
|
434
|
+
month: M.month,
|
|
435
|
+
year: M.year
|
|
425
436
|
};
|
|
426
437
|
}
|
|
427
|
-
function r(
|
|
428
|
-
const s = (
|
|
438
|
+
function r(d) {
|
|
439
|
+
const s = (d.day || 1) + 7, h = o(d.month || 1, d.year || 1), N = s > h, M = N ? s - h : s, $ = N ? w(d.month || 1, d.year || 1) : d;
|
|
429
440
|
return {
|
|
430
|
-
day:
|
|
431
|
-
month:
|
|
432
|
-
year:
|
|
441
|
+
day: M,
|
|
442
|
+
month: $.month,
|
|
443
|
+
year: $.year
|
|
433
444
|
};
|
|
434
445
|
}
|
|
435
|
-
function i(
|
|
436
|
-
if (
|
|
446
|
+
function i(d, E, s, h, N) {
|
|
447
|
+
if (d < 1 || E < 1 || s < 1)
|
|
437
448
|
throw new Error("Invalid date input");
|
|
438
|
-
const
|
|
439
|
-
if (
|
|
449
|
+
const M = { day: d, month: E, year: s }, $ = X.indexOf(h);
|
|
450
|
+
if ($ === -1)
|
|
440
451
|
throw new Error("Invalid firstDayOfWeek value");
|
|
441
|
-
const
|
|
442
|
-
let
|
|
443
|
-
for (let
|
|
444
|
-
|
|
445
|
-
for (let
|
|
446
|
-
let
|
|
447
|
-
if (
|
|
448
|
-
|
|
452
|
+
const P = (t(M) - $ + 7) % 7, x = e(), g = (O) => O.day === x.day && O.month === x.month && O.year === x.year, u = [];
|
|
453
|
+
let T = { ...M };
|
|
454
|
+
for (let O = 0; O < P; O++)
|
|
455
|
+
T = D(T);
|
|
456
|
+
for (let O = 0; O < 7; O++) {
|
|
457
|
+
let b;
|
|
458
|
+
if (T.month === N.month && T.year === N.year)
|
|
459
|
+
b = te.current;
|
|
449
460
|
else {
|
|
450
|
-
const F =
|
|
451
|
-
|
|
461
|
+
const F = p(M.month, M.year);
|
|
462
|
+
T.month === F.month && T.year === F.year ? b = te.previous : b = te.next;
|
|
452
463
|
}
|
|
453
|
-
const
|
|
454
|
-
|
|
455
|
-
date:
|
|
456
|
-
monthTag:
|
|
457
|
-
isCurrent:
|
|
458
|
-
weekEnd:
|
|
459
|
-
}),
|
|
464
|
+
const j = g(T), V = n(T);
|
|
465
|
+
u.push({
|
|
466
|
+
date: T,
|
|
467
|
+
monthTag: b,
|
|
468
|
+
isCurrent: j,
|
|
469
|
+
weekEnd: V
|
|
470
|
+
}), O < 6 && (T = I(T));
|
|
460
471
|
}
|
|
461
472
|
return {
|
|
462
|
-
days:
|
|
473
|
+
days: u,
|
|
463
474
|
weekNumber: 0,
|
|
464
475
|
year: s
|
|
465
476
|
};
|
|
466
477
|
}
|
|
467
|
-
function
|
|
468
|
-
const
|
|
469
|
-
if (
|
|
478
|
+
function v(d, E, s, h) {
|
|
479
|
+
const N = [], M = { day: 1, month: d, year: E }, $ = t(M), S = X.indexOf(s);
|
|
480
|
+
if (S === -1)
|
|
470
481
|
throw new Error("Invalid firstDayOfWeek value");
|
|
471
|
-
const
|
|
472
|
-
let
|
|
473
|
-
for (let
|
|
474
|
-
|
|
475
|
-
let
|
|
476
|
-
for (let
|
|
477
|
-
const
|
|
478
|
-
|
|
479
|
-
for (let
|
|
480
|
-
|
|
482
|
+
const P = ($ - S + 7) % 7;
|
|
483
|
+
let x = M;
|
|
484
|
+
for (let u = 0; u < P; u++)
|
|
485
|
+
x = D(x);
|
|
486
|
+
let g = x;
|
|
487
|
+
for (let u = 0; u < 6; u++) {
|
|
488
|
+
const T = i(g.day, g.month, g.year, s, h);
|
|
489
|
+
N.push(T);
|
|
490
|
+
for (let L = 0; L < 7; L++)
|
|
491
|
+
g = I(g);
|
|
481
492
|
}
|
|
482
|
-
return
|
|
493
|
+
return N;
|
|
483
494
|
}
|
|
484
495
|
return {
|
|
485
|
-
getMonthlyCalendar:
|
|
496
|
+
getMonthlyCalendar: v,
|
|
486
497
|
getWeeklyCalendar: i,
|
|
487
|
-
getPreviousDay:
|
|
488
|
-
getNextDay:
|
|
489
|
-
getDayInPreviousWeek:
|
|
498
|
+
getPreviousDay: D,
|
|
499
|
+
getNextDay: I,
|
|
500
|
+
getDayInPreviousWeek: y,
|
|
490
501
|
getDayInNextWeek: r,
|
|
491
|
-
getDayInPreviousMonth:
|
|
492
|
-
getDayInNextMonth:
|
|
502
|
+
getDayInPreviousMonth: C,
|
|
503
|
+
getDayInNextMonth: f,
|
|
493
504
|
getNextYear: a,
|
|
494
|
-
getPreviousYear:
|
|
505
|
+
getPreviousYear: c
|
|
495
506
|
};
|
|
496
507
|
}
|
|
497
|
-
const
|
|
498
|
-
var
|
|
499
|
-
function
|
|
500
|
-
const { getTimeInMilliseconds: e } =
|
|
508
|
+
const oe = ["year", "month", "week", "day"];
|
|
509
|
+
var ke = /* @__PURE__ */ ((e) => (e[e.Equal = 0] = "Equal", e[e.NotEqual = 1] = "NotEqual", e[e.Greater = 2] = "Greater", e[e.GreaterOrEqual = 3] = "GreaterOrEqual", e[e.Less = 4] = "Less", e[e.LessOrEqual = 5] = "LessOrEqual", e[e.Like = 6] = "Like", e[e.LikeStartWith = 7] = "LikeStartWith", e[e.LikeEndWith = 8] = "LikeEndWith", e[e.NotLike = 9] = "NotLike", e[e.NotLikeStartWith = 10] = "NotLikeStartWith", e[e.NotLikeEndWith = 11] = "NotLikeEndWith", e[e.Is = 12] = "Is", e[e.IsNot = 13] = "IsNot", e[e.In = 14] = "In", e[e.NotIn = 15] = "NotIn", e))(ke || {}), Se = /* @__PURE__ */ ((e) => (e[e.Empty = 0] = "Empty", e[e.And = 1] = "And", e[e.Or = 2] = "Or", e))(Se || {});
|
|
510
|
+
function Oe() {
|
|
511
|
+
const { getTimeInMilliseconds: e } = de();
|
|
501
512
|
function t(r) {
|
|
502
513
|
return r && r.year !== 0 && r.month !== 0 && r.day !== 0;
|
|
503
514
|
}
|
|
@@ -507,53 +518,53 @@ function Me() {
|
|
|
507
518
|
function o(r) {
|
|
508
519
|
return r && r.year !== 0;
|
|
509
520
|
}
|
|
510
|
-
function
|
|
521
|
+
function m(r, i) {
|
|
511
522
|
return e(r) < e(i);
|
|
512
523
|
}
|
|
513
|
-
function
|
|
524
|
+
function w(r) {
|
|
514
525
|
return e({ year: r.year, month: r.month, day: r.day });
|
|
515
526
|
}
|
|
516
|
-
function
|
|
517
|
-
return
|
|
527
|
+
function p(r, i, v = !0) {
|
|
528
|
+
return v ? e(r) <= e(i) : w(r) <= w(i);
|
|
518
529
|
}
|
|
519
|
-
function
|
|
530
|
+
function D(r, i) {
|
|
520
531
|
return e(r) === e(i);
|
|
521
532
|
}
|
|
522
|
-
function
|
|
523
|
-
const
|
|
524
|
-
return e(r.from) ===
|
|
533
|
+
function I(r, i) {
|
|
534
|
+
const v = e(i);
|
|
535
|
+
return e(r.from) === v || e(r.to) === v;
|
|
525
536
|
}
|
|
526
|
-
function
|
|
527
|
-
return !i || !t(i.to) || !t(i.from) ? !1 :
|
|
537
|
+
function C(r, i) {
|
|
538
|
+
return !i || !t(i.to) || !t(i.from) ? !1 : p(i.from, r) && p(r, i.to);
|
|
528
539
|
}
|
|
529
|
-
function
|
|
540
|
+
function f(r, i) {
|
|
530
541
|
return t(i) && e(r) >= e(i);
|
|
531
542
|
}
|
|
532
543
|
function a(r, i) {
|
|
533
544
|
return t(i) && e(r) <= e(i);
|
|
534
545
|
}
|
|
535
|
-
function
|
|
546
|
+
function c(r, i) {
|
|
536
547
|
return e({ year: r.year, month: r.month, day: r.day }) === e({ year: i.year, month: i.month, day: i.day });
|
|
537
548
|
}
|
|
538
|
-
function
|
|
549
|
+
function y(r, i) {
|
|
539
550
|
return e({ hour: r.hour, minute: r.minute, second: r.second }) === e({ hour: i.hour, minute: i.minute, second: i.second });
|
|
540
551
|
}
|
|
541
552
|
return {
|
|
542
|
-
isDateEarlier:
|
|
543
|
-
equal:
|
|
544
|
-
inPeriod:
|
|
545
|
-
isPoint:
|
|
546
|
-
equalOrEarlier:
|
|
553
|
+
isDateEarlier: m,
|
|
554
|
+
equal: D,
|
|
555
|
+
inPeriod: C,
|
|
556
|
+
isPoint: I,
|
|
557
|
+
equalOrEarlier: p,
|
|
547
558
|
isInitializedDate: t,
|
|
548
559
|
isInitializedMonth: n,
|
|
549
560
|
isInitializedYear: o,
|
|
550
|
-
isMonthDisabledByDisableSince:
|
|
561
|
+
isMonthDisabledByDisableSince: f,
|
|
551
562
|
isMonthDisabledByDisableUntil: a,
|
|
552
|
-
sameTime:
|
|
553
|
-
sameDay:
|
|
563
|
+
sameTime: y,
|
|
564
|
+
sameDay: c
|
|
554
565
|
};
|
|
555
566
|
}
|
|
556
|
-
const
|
|
567
|
+
const Kt = {
|
|
557
568
|
activeView: { type: Number, default: 3 },
|
|
558
569
|
title: { type: String, default: "" },
|
|
559
570
|
dailyViewTitle: { type: String, default: "Day" },
|
|
@@ -565,30 +576,30 @@ const qt = {
|
|
|
565
576
|
enableMoreView: { type: Boolean, default: !1 },
|
|
566
577
|
isCurrent: { type: Boolean, default: !1 },
|
|
567
578
|
yearViewTitle: { type: String, default: "Year" }
|
|
568
|
-
},
|
|
579
|
+
}, xe = /* @__PURE__ */ ee({
|
|
569
580
|
name: "FCalendarHeader",
|
|
570
|
-
props:
|
|
581
|
+
props: Kt,
|
|
571
582
|
emits: ["viewChange", "previous", "next", "resetToToday"],
|
|
572
583
|
setup(e, t) {
|
|
573
|
-
const n =
|
|
574
|
-
Y(() => e.activeView, (
|
|
575
|
-
|
|
584
|
+
const n = B(e.title), o = B(e.dailyViewTitle), m = B(e.weeklyViewTitle), w = B(e.monthlyViewTitle), p = B(e.yearViewTitle), D = 2, I = 62, C = B(e.activeView);
|
|
585
|
+
Y(() => e.activeView, (v, d) => {
|
|
586
|
+
C.value = v;
|
|
576
587
|
}), Y(() => e.title, () => {
|
|
577
588
|
n.value = e.title;
|
|
578
589
|
});
|
|
579
|
-
const
|
|
580
|
-
top: `${
|
|
581
|
-
left: `${
|
|
582
|
-
})), a =
|
|
583
|
-
function
|
|
584
|
-
const
|
|
585
|
-
|
|
590
|
+
const f = A(() => ({
|
|
591
|
+
top: `${D}px`,
|
|
592
|
+
left: `${C.value * (D + 1) + (C.value - 1) * (I + 1)}px`
|
|
593
|
+
})), a = A(() => C.value === 4 ? o.value : C.value === 3 ? m.value : C.value === 1 ? p.value : w.value);
|
|
594
|
+
function c(v) {
|
|
595
|
+
const d = oe.indexOf(v) + 1;
|
|
596
|
+
C.value = d, t.emit("viewChange", d);
|
|
586
597
|
}
|
|
587
|
-
function
|
|
588
|
-
t.emit("previous",
|
|
598
|
+
function y() {
|
|
599
|
+
t.emit("previous", C.value);
|
|
589
600
|
}
|
|
590
601
|
function r() {
|
|
591
|
-
t.emit("next",
|
|
602
|
+
t.emit("next", C.value);
|
|
592
603
|
}
|
|
593
604
|
function i() {
|
|
594
605
|
t.emit("resetToToday");
|
|
@@ -608,7 +619,7 @@ const qt = {
|
|
|
608
619
|
class: "f-calendar-navigator-button-group"
|
|
609
620
|
}, [l("div", {
|
|
610
621
|
class: "f-calendar-navigator-previous btn btn-default",
|
|
611
|
-
onClick: () =>
|
|
622
|
+
onClick: () => y(),
|
|
612
623
|
title: e.previousText
|
|
613
624
|
}, [l("i", {
|
|
614
625
|
class: "f-icon f-icon-arrow-chevron-left"
|
|
@@ -625,18 +636,18 @@ const qt = {
|
|
|
625
636
|
style: "width: 134px;"
|
|
626
637
|
}, [l("span", {
|
|
627
638
|
class: "f-calendar-view-switch-monthly",
|
|
628
|
-
onClick: (
|
|
629
|
-
}, [
|
|
639
|
+
onClick: (v) => c("year")
|
|
640
|
+
}, [p.value]), l("span", {
|
|
630
641
|
class: "f-calendar-view-switch-monthly",
|
|
631
|
-
onClick: (
|
|
632
|
-
}, [
|
|
642
|
+
onClick: (v) => c("month")
|
|
643
|
+
}, [w.value])]), l("div", {
|
|
633
644
|
class: "f-calendar-view-switch-active-view",
|
|
634
|
-
style:
|
|
645
|
+
style: f.value
|
|
635
646
|
}, [a.value])])]);
|
|
636
647
|
}
|
|
637
|
-
}),
|
|
648
|
+
}), en = {
|
|
638
649
|
dates: { type: Array, default: [] },
|
|
639
|
-
daysInWeek: { type: Array, default:
|
|
650
|
+
daysInWeek: { type: Array, default: X },
|
|
640
651
|
enableKeyboadNavigate: { type: Boolean, default: !0 },
|
|
641
652
|
enableMarkCurrent: { type: Boolean, default: !0 },
|
|
642
653
|
events: { type: Array, default: [] },
|
|
@@ -656,85 +667,85 @@ const qt = {
|
|
|
656
667
|
/** 月视图头部应用边框线条与背景色,默认不启用 */
|
|
657
668
|
showBorder: { type: Boolean, default: !1 },
|
|
658
669
|
moreText: { type: String, default: "更多" }
|
|
659
|
-
},
|
|
670
|
+
}, Fe = /* @__PURE__ */ ee({
|
|
660
671
|
name: "FCalendarMonthView",
|
|
661
|
-
props:
|
|
672
|
+
props: en,
|
|
662
673
|
emits: ["click", "keyDown", "moreClick"],
|
|
663
674
|
setup(e, t) {
|
|
664
|
-
const n =
|
|
665
|
-
|
|
666
|
-
const o =
|
|
667
|
-
assignEventsToWeeks:
|
|
668
|
-
assignEventsToDays:
|
|
669
|
-
renderEventItem:
|
|
670
|
-
useCompareCompsition:
|
|
671
|
-
} =
|
|
672
|
-
equal:
|
|
673
|
-
} =
|
|
674
|
-
function
|
|
675
|
-
return e.enableCrossDay ? g
|
|
675
|
+
const n = B(e.daysInWeek);
|
|
676
|
+
B(e.enableKeyboadNavigate);
|
|
677
|
+
const o = B(e.enableMarkCurrent), m = B(e.activeDay), w = B(e.events), {
|
|
678
|
+
assignEventsToWeeks: p,
|
|
679
|
+
assignEventsToDays: D,
|
|
680
|
+
renderEventItem: I,
|
|
681
|
+
useCompareCompsition: C
|
|
682
|
+
} = le("eventsComposition"), {
|
|
683
|
+
equal: f
|
|
684
|
+
} = C, a = B();
|
|
685
|
+
function c(g, u) {
|
|
686
|
+
return e.enableCrossDay ? p(g, u) : D(g, u);
|
|
676
687
|
}
|
|
677
|
-
const
|
|
688
|
+
const y = B(c(e.dates, w.value));
|
|
678
689
|
Y(() => e.enableCrossDay, () => {
|
|
679
|
-
|
|
690
|
+
y.value = c(e.dates, e.events);
|
|
680
691
|
}), Y(() => e.dates, () => {
|
|
681
|
-
|
|
692
|
+
y.value = c(e.dates, w.value);
|
|
682
693
|
}), Y(() => e.activeDay, () => {
|
|
683
|
-
|
|
694
|
+
m.value = e.activeDay;
|
|
684
695
|
}), Y(() => e.events, () => {
|
|
685
|
-
|
|
686
|
-
}), Y(() => e.daysInWeek, (
|
|
687
|
-
n.value =
|
|
696
|
+
w.value = e.events, y.value = c(e.dates, e.events);
|
|
697
|
+
}), Y(() => e.daysInWeek, (g, u) => {
|
|
698
|
+
n.value = g;
|
|
688
699
|
});
|
|
689
|
-
function r(
|
|
690
|
-
return !!
|
|
691
|
-
year:
|
|
692
|
-
month:
|
|
693
|
-
day:
|
|
694
|
-
},
|
|
700
|
+
function r(g) {
|
|
701
|
+
return !!m.value && f({
|
|
702
|
+
year: m.value.year,
|
|
703
|
+
month: m.value.month,
|
|
704
|
+
day: m.value.day
|
|
705
|
+
}, g);
|
|
695
706
|
}
|
|
696
|
-
const i = (
|
|
697
|
-
const
|
|
698
|
-
"f-datepicker-no-currmonth":
|
|
699
|
-
"f-calendar-weekday":
|
|
700
|
-
"f-calendar-workday": !
|
|
701
|
-
"f-calendar-today":
|
|
702
|
-
},
|
|
703
|
-
return
|
|
704
|
-
},
|
|
705
|
-
const
|
|
707
|
+
const i = (g, u, T) => {
|
|
708
|
+
const O = {
|
|
709
|
+
"f-datepicker-no-currmonth": g.monthTag === te.previous || g.monthTag === te.next,
|
|
710
|
+
"f-calendar-weekday": g.weekEnd,
|
|
711
|
+
"f-calendar-workday": !g.weekEnd,
|
|
712
|
+
"f-calendar-today": g.isCurrent
|
|
713
|
+
}, b = `d_${u}_${T}`;
|
|
714
|
+
return O[b] = !0, O;
|
|
715
|
+
}, v = (g) => {
|
|
716
|
+
const u = g.monthTag === te.current && r(g.date), T = g.isCurrent && o.value;
|
|
706
717
|
return {
|
|
707
718
|
"f-calendar-month-view-date": !0,
|
|
708
|
-
"f-calendar-month-view-selected":
|
|
709
|
-
"f-calendar-month-view-current":
|
|
719
|
+
"f-calendar-month-view-selected": u,
|
|
720
|
+
"f-calendar-month-view-current": T
|
|
710
721
|
};
|
|
711
722
|
};
|
|
712
|
-
function
|
|
713
|
-
e.disabled ||
|
|
714
|
-
date:
|
|
723
|
+
function d(g, u) {
|
|
724
|
+
e.disabled || u.showMore || (g.stopPropagation(), t.emit("click", {
|
|
725
|
+
date: u.date,
|
|
715
726
|
view: "month"
|
|
716
727
|
}));
|
|
717
728
|
}
|
|
718
|
-
function E(
|
|
729
|
+
function E(g, u) {
|
|
719
730
|
e.disabled || t.emit("moreClick", {
|
|
720
|
-
date:
|
|
731
|
+
date: u.date,
|
|
721
732
|
view: "month"
|
|
722
733
|
});
|
|
723
734
|
}
|
|
724
|
-
const s =
|
|
735
|
+
const s = A(() => ({
|
|
725
736
|
width: `${e.width}px`,
|
|
726
737
|
height: `${e.height}px`
|
|
727
|
-
})),
|
|
728
|
-
const
|
|
729
|
-
if (!
|
|
738
|
+
})), h = B(0), N = () => {
|
|
739
|
+
const g = a.value;
|
|
740
|
+
if (!g)
|
|
730
741
|
return 0;
|
|
731
|
-
const
|
|
732
|
-
if (!
|
|
742
|
+
const u = g.querySelector(".f-calendar--daygrid-row");
|
|
743
|
+
if (!u)
|
|
733
744
|
return 0;
|
|
734
|
-
const
|
|
735
|
-
return Math.max(0, Math.floor(
|
|
745
|
+
const T = u.offsetHeight;
|
|
746
|
+
return Math.max(0, Math.floor(T / 19) - 1);
|
|
736
747
|
};
|
|
737
|
-
function
|
|
748
|
+
function M() {
|
|
738
749
|
return l("div", {
|
|
739
750
|
class: "w-100"
|
|
740
751
|
}, [l("table", {
|
|
@@ -742,64 +753,64 @@ const qt = {
|
|
|
742
753
|
"w-100": !0,
|
|
743
754
|
"show-border": e.showBorder
|
|
744
755
|
}
|
|
745
|
-
}, [n.value && n.value.map((
|
|
756
|
+
}, [n.value && n.value.map((g) => l("th", null, [g]))])]);
|
|
746
757
|
}
|
|
747
|
-
function
|
|
758
|
+
function $(g, u) {
|
|
748
759
|
return l("div", {
|
|
749
760
|
class: "f-calendar--daygrid-row-header"
|
|
750
|
-
}, [l("table", null, [l("tbody", null, [l("tr", null, [
|
|
751
|
-
class: i(
|
|
752
|
-
onClick: (
|
|
761
|
+
}, [l("table", null, [l("tbody", null, [l("tr", null, [g.days && g.days.map((T, L) => l("td", {
|
|
762
|
+
class: i(T, u, L),
|
|
763
|
+
onClick: (O) => d(O, T),
|
|
753
764
|
style: "position: relative;"
|
|
754
765
|
}, null))])])])]);
|
|
755
766
|
}
|
|
756
|
-
function
|
|
757
|
-
return
|
|
758
|
-
class: i(
|
|
767
|
+
function S(g, u) {
|
|
768
|
+
return g.days && g.days.map((T, L) => l("td", {
|
|
769
|
+
class: i(T, u, L)
|
|
759
770
|
}, [l("div", {
|
|
760
771
|
class: "f-calendar-month-view-title"
|
|
761
772
|
}, [l("div", {
|
|
762
|
-
class:
|
|
763
|
-
}, [
|
|
773
|
+
class: v(T)
|
|
774
|
+
}, [T.date.day]), l("div", {
|
|
764
775
|
class: "f-calendar-month-view-date-month"
|
|
765
|
-
}, [
|
|
776
|
+
}, [T.date.day === 1 ? e.monthLabels[T.date.month || 1] : ""])])]));
|
|
766
777
|
}
|
|
767
|
-
function
|
|
768
|
-
const
|
|
769
|
-
return
|
|
770
|
-
|
|
771
|
-
}),
|
|
778
|
+
function P(g) {
|
|
779
|
+
const u = Math.max(0, h.value || N()), T = !!(g.events && g.events.length > u), L = ce([...g.events || []]), O = T ? L.slice(0, u) : L;
|
|
780
|
+
return T && O && O.length > 0 && O[O.length - 1].forEach((b) => {
|
|
781
|
+
b.data && (b.showMore = !0, b.moreCount = g.events.length - u + 1);
|
|
782
|
+
}), O.map((b, j) => l("tr", null, [b.map((V, F) => V.showMore ? l("td", {
|
|
772
783
|
colspan: 1,
|
|
773
784
|
rowspan: 1,
|
|
774
|
-
onClick: (
|
|
785
|
+
onClick: (q) => d(q, V)
|
|
775
786
|
}, [l("a", {
|
|
776
787
|
class: "f-calendar-event p-0 m-0 pl-1 more-events ",
|
|
777
|
-
onClick: (
|
|
788
|
+
onClick: (q) => E(q, g.days[F])
|
|
778
789
|
}, [l("div", {
|
|
779
790
|
class: "event-title"
|
|
780
|
-
}, [e.moreText.replace("#count#",
|
|
781
|
-
colspan:
|
|
782
|
-
rowspan:
|
|
783
|
-
onClick: (
|
|
784
|
-
}, [
|
|
791
|
+
}, [e.moreText.replace("#count#", V.moreCount)])])]) : l("td", {
|
|
792
|
+
colspan: V.colspan || 1,
|
|
793
|
+
rowspan: V.rowspan || 1,
|
|
794
|
+
onClick: (q) => d(q, g.days[F])
|
|
795
|
+
}, [V.data && I(V)]))]));
|
|
785
796
|
}
|
|
786
|
-
function
|
|
797
|
+
function x() {
|
|
787
798
|
return l("div", {
|
|
788
799
|
class: "w-100 h-100"
|
|
789
800
|
}, [l("div", {
|
|
790
801
|
class: "f-calendar--daygrid"
|
|
791
|
-
}, [
|
|
802
|
+
}, [y.value.map((g, u) => l("div", {
|
|
792
803
|
class: "f-calendar--daygrid-row"
|
|
793
|
-
}, [
|
|
804
|
+
}, [$(g, u), l("div", {
|
|
794
805
|
class: "f-calendar--daygrid-content"
|
|
795
|
-
}, [l("table", null, [l("thead", null, [l("tr", null, [
|
|
806
|
+
}, [l("table", null, [l("thead", null, [l("tr", null, [S(g, u)])]), l("tbody", null, [P(g)])])])]))])]);
|
|
796
807
|
}
|
|
797
|
-
return Y(() => e.height, (
|
|
798
|
-
|
|
799
|
-
|
|
808
|
+
return Y(() => e.height, (g, u) => {
|
|
809
|
+
g !== u && Ve(() => {
|
|
810
|
+
h.value = N(), y.value = [...y.value];
|
|
800
811
|
});
|
|
801
|
-
}),
|
|
802
|
-
|
|
812
|
+
}), ie(() => {
|
|
813
|
+
h.value = N();
|
|
803
814
|
}), () => l("div", {
|
|
804
815
|
class: "f-calendar-month-view",
|
|
805
816
|
ref: a
|
|
@@ -809,82 +820,82 @@ const qt = {
|
|
|
809
820
|
style: s.value
|
|
810
821
|
}, [l("thead", null, [l("tr", null, [l("td", {
|
|
811
822
|
class: "f-calendar-header"
|
|
812
|
-
}, [
|
|
823
|
+
}, [M()])])]), l("tbody", null, [l("tr", {
|
|
813
824
|
style: "height: 100%"
|
|
814
825
|
}, [l("td", {
|
|
815
826
|
class: "f-calendar-content"
|
|
816
|
-
}, [
|
|
827
|
+
}, [x()])])])])]);
|
|
817
828
|
}
|
|
818
|
-
}),
|
|
819
|
-
daysInWeek: { type: Array, default:
|
|
829
|
+
}), tn = {
|
|
830
|
+
daysInWeek: { type: Array, default: X },
|
|
820
831
|
enableMarkCurrent: { type: Boolean, default: !0 },
|
|
821
832
|
events: { type: Array, default: [] },
|
|
822
833
|
week: { type: Object, default: { days: [], weekNumber: 0, year: 0 } },
|
|
823
834
|
dateField: { type: String, default: "date" },
|
|
824
835
|
startDateField: { type: String, default: "startDate" },
|
|
825
836
|
endDateField: { type: String, default: "endDate" }
|
|
826
|
-
},
|
|
837
|
+
}, Ee = /* @__PURE__ */ ee({
|
|
827
838
|
name: "FCalendarWeekView",
|
|
828
|
-
props:
|
|
839
|
+
props: tn,
|
|
829
840
|
emits: [],
|
|
830
841
|
setup(e) {
|
|
831
|
-
const t =
|
|
832
|
-
equal:
|
|
833
|
-
} =
|
|
834
|
-
convertDateToDateObject:
|
|
835
|
-
} =
|
|
836
|
-
function
|
|
837
|
-
return
|
|
838
|
-
const
|
|
839
|
-
year:
|
|
840
|
-
month:
|
|
841
|
-
day:
|
|
842
|
+
const t = B(), n = B(), o = B(e.daysInWeek), m = B(e.week), w = B(e.enableMarkCurrent), p = B(e.events), D = B([]), {
|
|
843
|
+
equal: I
|
|
844
|
+
} = Oe(), {
|
|
845
|
+
convertDateToDateObject: C
|
|
846
|
+
} = de();
|
|
847
|
+
function f(s) {
|
|
848
|
+
return m.value.days.map((N) => {
|
|
849
|
+
const M = {
|
|
850
|
+
year: N.date.year,
|
|
851
|
+
month: N.date.month,
|
|
852
|
+
day: N.date.day,
|
|
842
853
|
hour: s.hour,
|
|
843
854
|
minute: s.minute,
|
|
844
855
|
second: s.second
|
|
845
|
-
},
|
|
856
|
+
}, $ = p.value.filter((S) => I(C(S[e.startDateField]), M));
|
|
846
857
|
return {
|
|
847
|
-
day:
|
|
848
|
-
events:
|
|
858
|
+
day: M,
|
|
859
|
+
events: $
|
|
849
860
|
};
|
|
850
861
|
});
|
|
851
862
|
}
|
|
852
863
|
function a() {
|
|
853
864
|
const s = [];
|
|
854
|
-
for (let
|
|
855
|
-
const
|
|
856
|
-
hour:
|
|
865
|
+
for (let h = 0; h < 24; h++) {
|
|
866
|
+
const N = {
|
|
867
|
+
hour: h,
|
|
857
868
|
minute: 0,
|
|
858
869
|
second: 0
|
|
859
|
-
},
|
|
860
|
-
hour:
|
|
870
|
+
}, M = {
|
|
871
|
+
hour: h,
|
|
861
872
|
minute: 30,
|
|
862
873
|
second: 0
|
|
863
|
-
},
|
|
874
|
+
}, $ = f(N), S = f(M);
|
|
864
875
|
s.push({
|
|
865
|
-
time:
|
|
866
|
-
events:
|
|
867
|
-
title:
|
|
876
|
+
time: N,
|
|
877
|
+
events: $,
|
|
878
|
+
title: h > 0 ? `${h}:00` : "",
|
|
868
879
|
part: "upper"
|
|
869
880
|
}), s.push({
|
|
870
|
-
time:
|
|
871
|
-
events:
|
|
872
|
-
title: `${
|
|
881
|
+
time: M,
|
|
882
|
+
events: S,
|
|
883
|
+
title: `${h}:30`,
|
|
873
884
|
part: "lower"
|
|
874
885
|
});
|
|
875
886
|
}
|
|
876
|
-
|
|
887
|
+
D.value = s;
|
|
877
888
|
}
|
|
878
889
|
a(), Y(() => e.week, () => {
|
|
879
|
-
|
|
890
|
+
m.value = e.week, a();
|
|
880
891
|
}), Y(() => e.events, () => {
|
|
881
|
-
|
|
892
|
+
p.value = e.events, a();
|
|
882
893
|
});
|
|
883
|
-
const
|
|
894
|
+
const c = (s) => ({
|
|
884
895
|
"f-calendar-week-view-date": !0,
|
|
885
|
-
"f-calendar-week-view-current": s.isCurrent &&
|
|
896
|
+
"f-calendar-week-view-current": s.isCurrent && w.value
|
|
886
897
|
});
|
|
887
|
-
function
|
|
898
|
+
function y() {
|
|
888
899
|
return l("div", {
|
|
889
900
|
class: "f-calendar-week-view-header"
|
|
890
901
|
}, [l("div", {
|
|
@@ -893,18 +904,18 @@ const qt = {
|
|
|
893
904
|
class: "f-calendar-week-view-header-primary"
|
|
894
905
|
}, [l("div", {
|
|
895
906
|
class: "f-calendar-week-view-header-columns"
|
|
896
|
-
}, [o.value.map((s,
|
|
907
|
+
}, [o.value.map((s, h) => l("div", {
|
|
897
908
|
class: "f-calendar-week-view-header-cell"
|
|
898
909
|
}, [l("div", {
|
|
899
|
-
class:
|
|
900
|
-
}, [
|
|
910
|
+
class: c(m.value.days[h])
|
|
911
|
+
}, [m.value.days[h].date.day]), l("span", null, [s])]))])])]);
|
|
901
912
|
}
|
|
902
913
|
function r() {
|
|
903
914
|
return l("div", {
|
|
904
915
|
class: "f-calendar-week-view-content-side"
|
|
905
916
|
}, [l("div", {
|
|
906
917
|
class: "f-calendar-side"
|
|
907
|
-
}, [
|
|
918
|
+
}, [D.value.map((s) => l("div", {
|
|
908
919
|
class: "f-calendar-side-row"
|
|
909
920
|
}, [l("div", {
|
|
910
921
|
class: "f-calendar-side-row-number"
|
|
@@ -917,21 +928,21 @@ const qt = {
|
|
|
917
928
|
"f-calendar-week-view-item-lower": s.part === "lower"
|
|
918
929
|
};
|
|
919
930
|
}
|
|
920
|
-
function
|
|
921
|
-
const
|
|
931
|
+
function v(s) {
|
|
932
|
+
const P = (s[e.startDateField].hour || 0) + (s[e.startDateField].minute || 0) / 60;
|
|
922
933
|
return {
|
|
923
|
-
height: `${44 * ((s.ends.hour || 0) + (s.ends.minute || 0) / 60 -
|
|
934
|
+
height: `${44 * ((s.ends.hour || 0) + (s.ends.minute || 0) / 60 - P) - 2 - 2 - 1 - 1}px`
|
|
924
935
|
};
|
|
925
936
|
}
|
|
926
|
-
function
|
|
927
|
-
return
|
|
937
|
+
function d() {
|
|
938
|
+
return D.value.map((s) => l("div", {
|
|
928
939
|
class: i(s)
|
|
929
|
-
}, [s.events.map((
|
|
940
|
+
}, [s.events.map((h) => l("div", {
|
|
930
941
|
class: "f-calendar-week-view-item-cell"
|
|
931
|
-
}, [
|
|
942
|
+
}, [h.events.length > 0 && h.events.map((N) => l("div", {
|
|
932
943
|
class: "f-calendar-event",
|
|
933
|
-
style:
|
|
934
|
-
}, [
|
|
944
|
+
style: v(N)
|
|
945
|
+
}, [N.title]))]))]));
|
|
935
946
|
}
|
|
936
947
|
function E() {
|
|
937
948
|
return l("div", {
|
|
@@ -939,83 +950,83 @@ const qt = {
|
|
|
939
950
|
class: "f-calendar-content-primary"
|
|
940
951
|
}, [l("div", {
|
|
941
952
|
class: "f-calendar-content-data"
|
|
942
|
-
}, [
|
|
953
|
+
}, [d()])]);
|
|
943
954
|
}
|
|
944
|
-
return
|
|
955
|
+
return ie(() => {
|
|
945
956
|
t.value && t.value.scrollTo(0, 250);
|
|
946
957
|
}), () => l("div", {
|
|
947
958
|
class: "f-calendar-week-view"
|
|
948
|
-
}, [
|
|
959
|
+
}, [y(), l("div", {
|
|
949
960
|
class: "f-calendar-week-view-content",
|
|
950
961
|
ref: t
|
|
951
962
|
}, [r(), E()])]);
|
|
952
963
|
}
|
|
953
|
-
}),
|
|
964
|
+
}), nn = {
|
|
954
965
|
day: { type: Object, default: {} },
|
|
955
966
|
dayInWeek: { type: String, default: "" },
|
|
956
967
|
enableMarkCurrent: { type: Boolean, default: !0 },
|
|
957
968
|
events: { type: Array, default: [] },
|
|
958
969
|
dateField: { type: String, default: "date" }
|
|
959
|
-
},
|
|
970
|
+
}, Ie = /* @__PURE__ */ ee({
|
|
960
971
|
name: "FCalendarDayView",
|
|
961
|
-
props:
|
|
972
|
+
props: nn,
|
|
962
973
|
emits: [],
|
|
963
974
|
setup(e) {
|
|
964
|
-
const t =
|
|
965
|
-
convertDateToDateObject:
|
|
966
|
-
} =
|
|
967
|
-
equal:
|
|
968
|
-
} =
|
|
969
|
-
function
|
|
970
|
-
const
|
|
971
|
-
year:
|
|
972
|
-
month:
|
|
973
|
-
day:
|
|
975
|
+
const t = B(), n = B(), o = B(e.dayInWeek), m = B(e.day), w = B(e.enableMarkCurrent), p = B(e.events), D = B([]), {
|
|
976
|
+
convertDateToDateObject: I
|
|
977
|
+
} = de(), {
|
|
978
|
+
equal: C
|
|
979
|
+
} = Oe();
|
|
980
|
+
function f(s) {
|
|
981
|
+
const h = {
|
|
982
|
+
year: m.value.date.year,
|
|
983
|
+
month: m.value.date.month,
|
|
984
|
+
day: m.value.date.day,
|
|
974
985
|
hour: s.hour,
|
|
975
986
|
minute: s.minute,
|
|
976
987
|
second: s.second
|
|
977
|
-
},
|
|
988
|
+
}, N = p.value.filter((M) => C(I(M[e.dateField]), h));
|
|
978
989
|
return [{
|
|
979
|
-
day:
|
|
980
|
-
events:
|
|
990
|
+
day: h,
|
|
991
|
+
events: N
|
|
981
992
|
}];
|
|
982
993
|
}
|
|
983
994
|
function a() {
|
|
984
995
|
const s = [];
|
|
985
|
-
for (let
|
|
986
|
-
const
|
|
987
|
-
hour:
|
|
996
|
+
for (let h = 0; h < 24; h++) {
|
|
997
|
+
const N = {
|
|
998
|
+
hour: h,
|
|
988
999
|
minute: 0,
|
|
989
1000
|
second: 0
|
|
990
|
-
},
|
|
991
|
-
hour:
|
|
1001
|
+
}, M = {
|
|
1002
|
+
hour: h,
|
|
992
1003
|
minute: 30,
|
|
993
1004
|
second: 0
|
|
994
|
-
},
|
|
1005
|
+
}, $ = f(N), S = f(M);
|
|
995
1006
|
s.push({
|
|
996
|
-
time:
|
|
997
|
-
events:
|
|
998
|
-
title:
|
|
1007
|
+
time: N,
|
|
1008
|
+
events: $,
|
|
1009
|
+
title: h > 0 ? `${h}:00` : "",
|
|
999
1010
|
part: "upper"
|
|
1000
1011
|
}), s.push({
|
|
1001
|
-
time:
|
|
1002
|
-
events:
|
|
1003
|
-
title: `${
|
|
1012
|
+
time: M,
|
|
1013
|
+
events: S,
|
|
1014
|
+
title: `${h}:30`,
|
|
1004
1015
|
part: "lower"
|
|
1005
1016
|
});
|
|
1006
1017
|
}
|
|
1007
|
-
|
|
1018
|
+
D.value = s;
|
|
1008
1019
|
}
|
|
1009
1020
|
a(), Y(() => e.day, () => {
|
|
1010
|
-
|
|
1021
|
+
m.value = e.day, a();
|
|
1011
1022
|
}), Y(() => e.events, () => {
|
|
1012
|
-
|
|
1023
|
+
p.value = e.events, a();
|
|
1013
1024
|
});
|
|
1014
|
-
const
|
|
1025
|
+
const c = (s) => ({
|
|
1015
1026
|
"f-calendar-day-view-date": !0,
|
|
1016
|
-
"f-calendar-day-view-current": s.isCurrent &&
|
|
1027
|
+
"f-calendar-day-view-current": s.isCurrent && w.value
|
|
1017
1028
|
});
|
|
1018
|
-
function
|
|
1029
|
+
function y() {
|
|
1019
1030
|
return l("div", {
|
|
1020
1031
|
class: "f-calendar-day-view-header"
|
|
1021
1032
|
}, [l("div", {
|
|
@@ -1027,15 +1038,15 @@ const qt = {
|
|
|
1027
1038
|
}, [l("div", {
|
|
1028
1039
|
class: "f-calendar-day-view-header-cell"
|
|
1029
1040
|
}, [l("div", {
|
|
1030
|
-
class:
|
|
1031
|
-
}, [
|
|
1041
|
+
class: c(m.value)
|
|
1042
|
+
}, [m.value.date.day]), l("span", null, [o.value])])])])]);
|
|
1032
1043
|
}
|
|
1033
1044
|
function r() {
|
|
1034
1045
|
return l("div", {
|
|
1035
1046
|
class: "f-calendar-day-view-content-side"
|
|
1036
1047
|
}, [l("div", {
|
|
1037
1048
|
class: "f-calendar-side"
|
|
1038
|
-
}, [
|
|
1049
|
+
}, [D.value.map((s) => l("div", {
|
|
1039
1050
|
class: "f-calendar-side-row"
|
|
1040
1051
|
}, [l("div", {
|
|
1041
1052
|
class: "f-calendar-side-row-number"
|
|
@@ -1048,22 +1059,22 @@ const qt = {
|
|
|
1048
1059
|
"f-calendar-day-view-item-lower": s.part === "lower"
|
|
1049
1060
|
};
|
|
1050
1061
|
}
|
|
1051
|
-
function
|
|
1052
|
-
var
|
|
1053
|
-
const
|
|
1062
|
+
function v(s) {
|
|
1063
|
+
var T, L, O, b;
|
|
1064
|
+
const P = (((T = s.starts) == null ? void 0 : T.hour) || 0) + (((L = s.starts) == null ? void 0 : L.minute) || 0) / 60;
|
|
1054
1065
|
return {
|
|
1055
|
-
height: `${44 * ((((
|
|
1066
|
+
height: `${44 * ((((O = s.ends) == null ? void 0 : O.hour) || 0) + (((b = s.ends) == null ? void 0 : b.minute) || 0) / 60 - P) - 2 - 2 - 1 - 1}px`
|
|
1056
1067
|
};
|
|
1057
1068
|
}
|
|
1058
|
-
function
|
|
1059
|
-
return
|
|
1069
|
+
function d() {
|
|
1070
|
+
return D.value.map((s) => l("div", {
|
|
1060
1071
|
class: i(s)
|
|
1061
|
-
}, [s.events.map((
|
|
1072
|
+
}, [s.events.map((h) => l("div", {
|
|
1062
1073
|
class: "f-calendar-day-view-item-cell"
|
|
1063
|
-
}, [
|
|
1074
|
+
}, [h.events.length > 0 && h.events.map((N) => l("div", {
|
|
1064
1075
|
class: "f-calendar-event",
|
|
1065
|
-
style:
|
|
1066
|
-
}, [
|
|
1076
|
+
style: v(N)
|
|
1077
|
+
}, [N.title]))]))]));
|
|
1067
1078
|
}
|
|
1068
1079
|
function E() {
|
|
1069
1080
|
return l("div", {
|
|
@@ -1071,18 +1082,18 @@ const qt = {
|
|
|
1071
1082
|
class: "f-calendar-content-primary"
|
|
1072
1083
|
}, [l("div", {
|
|
1073
1084
|
class: "f-calendar-content-data"
|
|
1074
|
-
}, [
|
|
1085
|
+
}, [d()])]);
|
|
1075
1086
|
}
|
|
1076
|
-
return
|
|
1087
|
+
return ie(() => {
|
|
1077
1088
|
t.value && t.value.scrollTo(0, 250);
|
|
1078
1089
|
}), () => l("div", {
|
|
1079
1090
|
class: "f-calendar-day-view"
|
|
1080
|
-
}, [
|
|
1091
|
+
}, [y(), l("div", {
|
|
1081
1092
|
class: "f-calendar-day-view-content",
|
|
1082
1093
|
ref: t
|
|
1083
1094
|
}, [r(), E()])]);
|
|
1084
1095
|
}
|
|
1085
|
-
}),
|
|
1096
|
+
}), an = /* @__PURE__ */ ee({
|
|
1086
1097
|
name: "FCalendarYearView",
|
|
1087
1098
|
props: {
|
|
1088
1099
|
monthLabels: {
|
|
@@ -1112,54 +1123,54 @@ const qt = {
|
|
|
1112
1123
|
},
|
|
1113
1124
|
emits: ["moreClick"],
|
|
1114
1125
|
setup(e, t) {
|
|
1115
|
-
const n =
|
|
1116
|
-
assignEventsToMonths:
|
|
1117
|
-
renderEventItemForMonths:
|
|
1118
|
-
} =
|
|
1126
|
+
const n = B(), o = B(e.monthLabels), {
|
|
1127
|
+
assignEventsToMonths: m,
|
|
1128
|
+
renderEventItemForMonths: w
|
|
1129
|
+
} = le("eventsComposition"), p = B(0), D = () => {
|
|
1119
1130
|
const a = n.value;
|
|
1120
1131
|
if (!a)
|
|
1121
1132
|
return 0;
|
|
1122
|
-
const
|
|
1123
|
-
return Math.max(0, Math.floor((
|
|
1124
|
-
},
|
|
1125
|
-
const
|
|
1126
|
-
if (
|
|
1127
|
-
const
|
|
1133
|
+
const y = a.querySelector(".yearview-monthitem").offsetHeight;
|
|
1134
|
+
return Math.max(0, Math.floor((y - 40) / 24));
|
|
1135
|
+
}, I = (a) => {
|
|
1136
|
+
const c = !!(a && a.length > p.value);
|
|
1137
|
+
if (c) {
|
|
1138
|
+
const y = ce(a), r = c ? y == null ? void 0 : y.slice(0, p.value) : y;
|
|
1128
1139
|
if (r && r.length > 0) {
|
|
1129
1140
|
const i = r[r.length - 1];
|
|
1130
|
-
i.data && (i.showMore = !0, i.moreCount = a.length -
|
|
1141
|
+
i.data && (i.showMore = !0, i.moreCount = a.length - p.value + 1);
|
|
1131
1142
|
}
|
|
1132
1143
|
return r;
|
|
1133
1144
|
}
|
|
1134
1145
|
return a;
|
|
1135
|
-
},
|
|
1136
|
-
function
|
|
1137
|
-
const
|
|
1146
|
+
}, C = A(() => m(e.activeYear, e.events));
|
|
1147
|
+
function f(a, c) {
|
|
1148
|
+
const y = {
|
|
1138
1149
|
year: e.activeYear,
|
|
1139
|
-
month: parseInt(
|
|
1150
|
+
month: parseInt(c, 10)
|
|
1140
1151
|
};
|
|
1141
1152
|
t.emit("moreClick", a, {
|
|
1142
|
-
date:
|
|
1153
|
+
date: y,
|
|
1143
1154
|
view: "year"
|
|
1144
1155
|
});
|
|
1145
1156
|
}
|
|
1146
|
-
return Y(() => e.height, (a,
|
|
1147
|
-
a !==
|
|
1148
|
-
|
|
1157
|
+
return Y(() => e.height, (a, c) => {
|
|
1158
|
+
a !== c && Ve(() => {
|
|
1159
|
+
p.value = D(), o.value = {
|
|
1149
1160
|
...e.monthLabels
|
|
1150
1161
|
};
|
|
1151
1162
|
});
|
|
1152
|
-
}),
|
|
1153
|
-
|
|
1163
|
+
}), ie(() => {
|
|
1164
|
+
p.value = D();
|
|
1154
1165
|
}), () => l("div", {
|
|
1155
1166
|
class: "h-100 w-100 f-calendar-year-view",
|
|
1156
1167
|
ref: n
|
|
1157
1168
|
}, [l("ul", {
|
|
1158
1169
|
style: "height: 100%;overflow: auto; display: flex;flex-wrap: wrap;"
|
|
1159
|
-
}, [Object.keys(e.monthLabels).map((a,
|
|
1160
|
-
var
|
|
1170
|
+
}, [Object.keys(e.monthLabels).map((a, c) => {
|
|
1171
|
+
var y;
|
|
1161
1172
|
return l("li", {
|
|
1162
|
-
key:
|
|
1173
|
+
key: c,
|
|
1163
1174
|
class: "col-md-4 col-lg-3 col-sm-12 yearview-monthitem"
|
|
1164
1175
|
}, [l("div", {
|
|
1165
1176
|
class: "f-calendar-year-view-content w-100 h-100 d-flex flex-column",
|
|
@@ -1170,52 +1181,52 @@ const qt = {
|
|
|
1170
1181
|
class: "f-calendar-month-events p-2"
|
|
1171
1182
|
}, [l("ul", {
|
|
1172
1183
|
class: "events"
|
|
1173
|
-
}, [(
|
|
1184
|
+
}, [(y = I(C.value[a])) == null ? void 0 : y.map((r, i) => r.showMore ? l("li", {
|
|
1174
1185
|
class: "event-item more-events ",
|
|
1175
1186
|
key: i
|
|
1176
1187
|
}, [l("a", {
|
|
1177
1188
|
class: "f-calendar-event p-0 mt-0 pl-1 ",
|
|
1178
|
-
onClick: (
|
|
1179
|
-
}, [e.moreText.replace("#count#", r.moreCount)])]) :
|
|
1189
|
+
onClick: (v) => f(v, a)
|
|
1190
|
+
}, [e.moreText.replace("#count#", r.moreCount)])]) : w(r))])])])]);
|
|
1180
1191
|
})])]);
|
|
1181
1192
|
}
|
|
1182
|
-
}),
|
|
1193
|
+
}), rn = /* @__PURE__ */ ee({
|
|
1183
1194
|
name: "MoreEventList",
|
|
1184
1195
|
props: {
|
|
1185
1196
|
events: Array,
|
|
1186
1197
|
popoverOffsetX: Number
|
|
1187
1198
|
},
|
|
1188
1199
|
setup(e, t) {
|
|
1189
|
-
const n =
|
|
1190
|
-
renderEventItemForMore:
|
|
1191
|
-
} =
|
|
1200
|
+
const n = B(), o = A(() => n), m = A(() => e.events), {
|
|
1201
|
+
renderEventItemForMore: w
|
|
1202
|
+
} = le("eventsComposition"), p = B(0);
|
|
1192
1203
|
return t.expose({
|
|
1193
1204
|
popoverRef: o
|
|
1194
|
-
}), () => l(
|
|
1205
|
+
}), () => l(Bt, {
|
|
1195
1206
|
id: "calendar-more-events",
|
|
1196
1207
|
customStyles: {
|
|
1197
1208
|
filter: "drop-shadow(#c5c5c5 0px 0px 6px)"
|
|
1198
1209
|
},
|
|
1199
|
-
offsetX:
|
|
1210
|
+
offsetX: p,
|
|
1200
1211
|
ref: n,
|
|
1201
1212
|
placement: "auto",
|
|
1202
1213
|
keepWidthWithReference: !1,
|
|
1203
1214
|
fitContent: !0
|
|
1204
1215
|
}, {
|
|
1205
1216
|
default: () => {
|
|
1206
|
-
var
|
|
1217
|
+
var D;
|
|
1207
1218
|
return [l("div", {
|
|
1208
1219
|
style: "height: 400px; width: 300px;overflow: hidden;"
|
|
1209
1220
|
}, [l("div", {
|
|
1210
1221
|
class: "f-calendar-more-events-list h-100",
|
|
1211
1222
|
style: "overflow:auto;"
|
|
1212
|
-
}, [l("ul", null, [(
|
|
1223
|
+
}, [l("ul", null, [(D = m.value) == null ? void 0 : D.map((I) => w(I))])])])];
|
|
1213
1224
|
}
|
|
1214
1225
|
});
|
|
1215
1226
|
}
|
|
1216
1227
|
});
|
|
1217
|
-
function
|
|
1218
|
-
const { getLocaleValue: e } =
|
|
1228
|
+
function on() {
|
|
1229
|
+
const { getLocaleValue: e, getLocale: t } = $t, n = {
|
|
1219
1230
|
1: e("calendar.monthLabels.1"),
|
|
1220
1231
|
2: e("calendar.monthLabels.2"),
|
|
1221
1232
|
3: e("calendar.monthLabels.3"),
|
|
@@ -1228,7 +1239,7 @@ function Jt() {
|
|
|
1228
1239
|
10: e("calendar.monthLabels.10"),
|
|
1229
1240
|
11: e("calendar.monthLabels.11"),
|
|
1230
1241
|
12: e("calendar.monthLabels.12")
|
|
1231
|
-
},
|
|
1242
|
+
}, o = {
|
|
1232
1243
|
Sun: e("calendar.dayLabels.Sun"),
|
|
1233
1244
|
Mon: e("calendar.dayLabels.Mon"),
|
|
1234
1245
|
Tue: e("calendar.dayLabels.Tue"),
|
|
@@ -1236,626 +1247,665 @@ function Jt() {
|
|
|
1236
1247
|
Thu: e("calendar.dayLabels.Thu"),
|
|
1237
1248
|
Fri: e("calendar.dayLabels.Fri"),
|
|
1238
1249
|
Sat: e("calendar.dayLabels.Sat")
|
|
1239
|
-
},
|
|
1250
|
+
}, m = e("calendar.today"), w = e("calendar.thisYear"), p = e("calendar.yearView"), D = e("calendar.monthView"), I = e("calendar.weekView"), C = e("calendar.dayView"), f = e("calendar.titleFormat"), a = e("calendar.yearViewTitleFormat"), c = e("calendar.prevMonth"), y = e("calendar.nextMonth"), r = e("calendar.prevWeek"), i = e("calendar.nextWeek"), v = e("calendar.prevDay"), d = e("calendar.nextDay"), E = e("calendar.prevYear"), s = e("calendar.nextYear"), h = e("calendar.more", "") || "还有 #count# 项...";
|
|
1240
1251
|
return {
|
|
1241
|
-
monthLabels:
|
|
1242
|
-
weekDayLabels:
|
|
1243
|
-
today:
|
|
1244
|
-
monthViewTitle:
|
|
1245
|
-
weekViewTitle:
|
|
1246
|
-
dayViewTitle:
|
|
1247
|
-
titleFormat:
|
|
1248
|
-
prevMonth:
|
|
1249
|
-
nextMonth:
|
|
1250
|
-
prevWeek:
|
|
1251
|
-
nextWeek:
|
|
1252
|
-
prevDay:
|
|
1253
|
-
nextDay:
|
|
1254
|
-
yearViewTitle:
|
|
1255
|
-
yearViewTitleFormat:
|
|
1256
|
-
thisYear:
|
|
1257
|
-
prevYear:
|
|
1258
|
-
nextYear:
|
|
1259
|
-
moreText:
|
|
1252
|
+
monthLabels: n,
|
|
1253
|
+
weekDayLabels: o,
|
|
1254
|
+
today: m,
|
|
1255
|
+
monthViewTitle: D,
|
|
1256
|
+
weekViewTitle: I,
|
|
1257
|
+
dayViewTitle: C,
|
|
1258
|
+
titleFormat: f,
|
|
1259
|
+
prevMonth: c,
|
|
1260
|
+
nextMonth: y,
|
|
1261
|
+
prevWeek: r,
|
|
1262
|
+
nextWeek: i,
|
|
1263
|
+
prevDay: v,
|
|
1264
|
+
nextDay: d,
|
|
1265
|
+
yearViewTitle: p,
|
|
1266
|
+
yearViewTitleFormat: a,
|
|
1267
|
+
thisYear: w,
|
|
1268
|
+
prevYear: E,
|
|
1269
|
+
nextYear: s,
|
|
1270
|
+
moreText: h,
|
|
1271
|
+
locale: t()
|
|
1260
1272
|
};
|
|
1261
1273
|
}
|
|
1262
|
-
function
|
|
1274
|
+
function ln(e) {
|
|
1263
1275
|
const t = Object.prototype.toString.call(e);
|
|
1264
1276
|
return e instanceof Date || typeof e == "object" && t === "[object Date]" ? new e.constructor(+e) : typeof e == "number" || t === "[object Number]" || typeof e == "string" || t === "[object String]" ? new Date(e) : /* @__PURE__ */ new Date(NaN);
|
|
1265
1277
|
}
|
|
1266
|
-
function
|
|
1278
|
+
function sn(e) {
|
|
1267
1279
|
return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
|
|
1268
1280
|
}
|
|
1269
|
-
function
|
|
1270
|
-
if (!
|
|
1281
|
+
function cn(e) {
|
|
1282
|
+
if (!sn(e) && typeof e != "number")
|
|
1271
1283
|
return !1;
|
|
1272
|
-
const t =
|
|
1284
|
+
const t = ln(e);
|
|
1273
1285
|
return !isNaN(Number(t));
|
|
1274
1286
|
}
|
|
1275
|
-
function
|
|
1287
|
+
function dn(e, t, n, o, m, w, p) {
|
|
1276
1288
|
const {
|
|
1277
|
-
equalOrEarlier:
|
|
1278
|
-
sameDay:
|
|
1289
|
+
equalOrEarlier: D,
|
|
1290
|
+
sameDay: I
|
|
1279
1291
|
} = o, {
|
|
1280
|
-
convertDateToDateObject:
|
|
1292
|
+
convertDateToDateObject: C
|
|
1281
1293
|
} = t, {
|
|
1282
|
-
parseToDate:
|
|
1283
|
-
formatTo:
|
|
1294
|
+
parseToDate: f,
|
|
1295
|
+
formatTo: a
|
|
1284
1296
|
} = n;
|
|
1285
|
-
function
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1297
|
+
function c(S, P) {
|
|
1298
|
+
S.forEach((u) => {
|
|
1299
|
+
u.days.forEach((T) => {
|
|
1300
|
+
T.events = [];
|
|
1289
1301
|
});
|
|
1290
1302
|
});
|
|
1291
|
-
const
|
|
1292
|
-
if (!
|
|
1303
|
+
const x = /* @__PURE__ */ new Map(), g = (u) => {
|
|
1304
|
+
if (!u)
|
|
1293
1305
|
return null;
|
|
1294
|
-
if (
|
|
1295
|
-
return
|
|
1296
|
-
const
|
|
1297
|
-
if (!
|
|
1306
|
+
if (x.has(u))
|
|
1307
|
+
return x.get(u);
|
|
1308
|
+
const T = f(u, "yyyy-MM-dd");
|
|
1309
|
+
if (!T)
|
|
1298
1310
|
return null;
|
|
1299
|
-
const
|
|
1300
|
-
return
|
|
1311
|
+
const L = C(T);
|
|
1312
|
+
return x.set(u, L), L;
|
|
1301
1313
|
};
|
|
1302
|
-
return
|
|
1314
|
+
return P.forEach((u) => {
|
|
1303
1315
|
const {
|
|
1304
|
-
eventDateField:
|
|
1305
|
-
startDateField:
|
|
1306
|
-
} = e,
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
var
|
|
1310
|
-
|
|
1311
|
-
id:
|
|
1316
|
+
eventDateField: T,
|
|
1317
|
+
startDateField: L
|
|
1318
|
+
} = e, O = K(u, T) || K(u, L), b = g(O);
|
|
1319
|
+
b && S.forEach((j) => {
|
|
1320
|
+
j.days.forEach((V) => {
|
|
1321
|
+
var F;
|
|
1322
|
+
I(V.date, b) && ((F = V.events) == null || F.push({
|
|
1323
|
+
id: u[e.idField],
|
|
1312
1324
|
data: {
|
|
1313
|
-
...
|
|
1325
|
+
...u
|
|
1314
1326
|
},
|
|
1315
|
-
eventDate:
|
|
1327
|
+
eventDate: b,
|
|
1316
1328
|
isSingleDay: !0
|
|
1317
1329
|
}));
|
|
1318
1330
|
});
|
|
1319
1331
|
});
|
|
1320
|
-
}),
|
|
1321
|
-
const
|
|
1322
|
-
...
|
|
1332
|
+
}), S.forEach((u) => {
|
|
1333
|
+
const T = [], L = u.days.map((b, j) => b.events && b.events.length > 0 ? b.events.map((V, F) => ({
|
|
1334
|
+
...V,
|
|
1323
1335
|
// 在非跨天模式下,colspan为1,rowspan为1
|
|
1324
1336
|
colspan: 1,
|
|
1325
1337
|
rowspan: 1,
|
|
1326
1338
|
// 添加位置信息
|
|
1327
|
-
startIndex:
|
|
1328
|
-
endIndex:
|
|
1329
|
-
})) : []),
|
|
1330
|
-
for (let
|
|
1331
|
-
const
|
|
1332
|
-
for (let
|
|
1333
|
-
|
|
1339
|
+
startIndex: j,
|
|
1340
|
+
endIndex: j
|
|
1341
|
+
})) : []), O = Math.max(...L.map((b) => b.length), 0);
|
|
1342
|
+
for (let b = 0; b < O; b++) {
|
|
1343
|
+
const j = [];
|
|
1344
|
+
for (let V = 0; V < 7; V++)
|
|
1345
|
+
L[V][b] ? j.push(L[V][b]) : j.push({
|
|
1334
1346
|
colspan: 1,
|
|
1335
1347
|
rowspan: 1,
|
|
1336
1348
|
data: null
|
|
1337
1349
|
});
|
|
1338
|
-
|
|
1350
|
+
T.push(j);
|
|
1339
1351
|
}
|
|
1340
|
-
|
|
1341
|
-
}),
|
|
1352
|
+
u.events = T;
|
|
1353
|
+
}), S;
|
|
1342
1354
|
}
|
|
1343
|
-
function
|
|
1344
|
-
|
|
1345
|
-
|
|
1355
|
+
function y(S, P) {
|
|
1356
|
+
S.forEach((u) => {
|
|
1357
|
+
u.events = [];
|
|
1346
1358
|
});
|
|
1347
|
-
const
|
|
1348
|
-
if (!
|
|
1359
|
+
const x = /* @__PURE__ */ new Map(), g = (u) => {
|
|
1360
|
+
if (!u)
|
|
1349
1361
|
return null;
|
|
1350
|
-
if (
|
|
1351
|
-
return
|
|
1352
|
-
const
|
|
1353
|
-
if (!
|
|
1362
|
+
if (x.has(u))
|
|
1363
|
+
return x.get(u);
|
|
1364
|
+
const T = f(u, "yyyy-MM-dd");
|
|
1365
|
+
if (!T)
|
|
1354
1366
|
return null;
|
|
1355
|
-
const
|
|
1356
|
-
return
|
|
1367
|
+
const L = C(T);
|
|
1368
|
+
return x.set(u, L), L;
|
|
1357
1369
|
};
|
|
1358
|
-
return
|
|
1370
|
+
return P.forEach((u) => {
|
|
1359
1371
|
const {
|
|
1360
|
-
startDateField:
|
|
1361
|
-
endDateField:
|
|
1362
|
-
} = e,
|
|
1363
|
-
!
|
|
1364
|
-
var
|
|
1365
|
-
const
|
|
1366
|
-
if (!(
|
|
1367
|
-
if (
|
|
1368
|
-
(
|
|
1369
|
-
id:
|
|
1372
|
+
startDateField: T,
|
|
1373
|
+
endDateField: L
|
|
1374
|
+
} = e, O = g(K(u, T)), b = g(K(u, L));
|
|
1375
|
+
!O || !b || S.forEach((j) => {
|
|
1376
|
+
var W, H, G, _;
|
|
1377
|
+
const V = j.days[0].date, F = j.days[j.days.length - 1].date;
|
|
1378
|
+
if (!(D(b, V, !1) || D(F, O, !1)))
|
|
1379
|
+
if (I(O, b))
|
|
1380
|
+
(W = j.events) == null || W.push({
|
|
1381
|
+
id: u[e.idField],
|
|
1370
1382
|
data: {
|
|
1371
|
-
...
|
|
1383
|
+
...u
|
|
1372
1384
|
},
|
|
1373
|
-
eventDate:
|
|
1385
|
+
eventDate: O,
|
|
1374
1386
|
isSingleDay: !0
|
|
1375
1387
|
});
|
|
1376
1388
|
else {
|
|
1377
|
-
const J =
|
|
1378
|
-
let
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
}),
|
|
1382
|
-
id:
|
|
1389
|
+
const J = D(V, O, !1) ? O : V, z = D(b, F, !1) ? b : F;
|
|
1390
|
+
let Q = -1, ae = -1;
|
|
1391
|
+
j.days.forEach((ue, fe) => {
|
|
1392
|
+
I(ue.date, J) && (Q = fe), I(ue.date, z) && (ae = fe);
|
|
1393
|
+
}), Q !== -1 && ae !== -1 && ((H = j.events) == null || H.push({
|
|
1394
|
+
id: u[e.idField],
|
|
1383
1395
|
data: {
|
|
1384
|
-
...
|
|
1396
|
+
...u
|
|
1385
1397
|
},
|
|
1386
1398
|
// 修复:eventDate 应该是事件在整个事件范围内的起始日期
|
|
1387
|
-
eventDate:
|
|
1399
|
+
eventDate: O,
|
|
1388
1400
|
// 添加在当前周的起始和结束日期
|
|
1389
1401
|
startDate: J,
|
|
1390
|
-
endDate:
|
|
1402
|
+
endDate: z,
|
|
1391
1403
|
// 添加在当前周的起始和结束索引
|
|
1392
|
-
startIndex:
|
|
1393
|
-
endIndex:
|
|
1394
|
-
colspan:
|
|
1404
|
+
startIndex: Q,
|
|
1405
|
+
endIndex: ae,
|
|
1406
|
+
colspan: ae - Q + 1,
|
|
1395
1407
|
isCrossDay: !0
|
|
1396
1408
|
}));
|
|
1397
1409
|
}
|
|
1398
1410
|
else
|
|
1399
|
-
|
|
1400
|
-
id: `${
|
|
1411
|
+
I(O, F) && !I(b, F) && ((G = j.events) == null || G.push({
|
|
1412
|
+
id: `${u[e.idField]}_start`,
|
|
1401
1413
|
data: {
|
|
1402
|
-
...
|
|
1414
|
+
...u
|
|
1403
1415
|
},
|
|
1404
|
-
eventDate:
|
|
1416
|
+
eventDate: O,
|
|
1405
1417
|
isSingleDay: !0,
|
|
1406
1418
|
isOverlapping: !0,
|
|
1407
|
-
originalId:
|
|
1408
|
-
})), b
|
|
1409
|
-
id: `${
|
|
1419
|
+
originalId: u[e.idField]
|
|
1420
|
+
})), I(b, V) && !I(O, V) && ((_ = j.events) == null || _.push({
|
|
1421
|
+
id: `${u[e.idField]}_end`,
|
|
1410
1422
|
data: {
|
|
1411
|
-
...
|
|
1423
|
+
...u
|
|
1412
1424
|
},
|
|
1413
|
-
eventDate:
|
|
1425
|
+
eventDate: b,
|
|
1414
1426
|
isSingleDay: !0,
|
|
1415
1427
|
isOverlapping: !0,
|
|
1416
|
-
originalId:
|
|
1428
|
+
originalId: u[e.idField]
|
|
1417
1429
|
}));
|
|
1418
1430
|
});
|
|
1419
|
-
}),
|
|
1420
|
-
|
|
1421
|
-
var
|
|
1422
|
-
const
|
|
1423
|
-
year:
|
|
1424
|
-
month:
|
|
1425
|
-
day:
|
|
1431
|
+
}), S.forEach((u) => {
|
|
1432
|
+
u.days.forEach((T, L) => {
|
|
1433
|
+
var V;
|
|
1434
|
+
const O = (V = u.events) == null ? void 0 : V.filter((F) => F.isCrossDay ? L >= F.startIndex && L <= F.endIndex : F.isSingleDay ? I({
|
|
1435
|
+
year: F.eventDate.year,
|
|
1436
|
+
month: F.eventDate.month,
|
|
1437
|
+
day: F.eventDate.day
|
|
1426
1438
|
}, {
|
|
1427
|
-
year:
|
|
1428
|
-
month:
|
|
1429
|
-
day:
|
|
1430
|
-
}) : !1),
|
|
1431
|
-
|
|
1432
|
-
var
|
|
1433
|
-
((
|
|
1434
|
-
year:
|
|
1435
|
-
month:
|
|
1436
|
-
day:
|
|
1439
|
+
year: T.date.year,
|
|
1440
|
+
month: T.date.month,
|
|
1441
|
+
day: T.date.day
|
|
1442
|
+
}) : !1), b = O == null ? void 0 : O.find((F) => F.isCrossDay), j = (O == null ? void 0 : O.filter((F) => F.isSingleDay)) || [];
|
|
1443
|
+
b && j.length > 0 && j.forEach((F) => {
|
|
1444
|
+
var W, H;
|
|
1445
|
+
((W = u.events) == null ? void 0 : W.some((G) => (G.originalId === F.id || G.id === F.id) && I({
|
|
1446
|
+
year: G.eventDate.year,
|
|
1447
|
+
month: G.eventDate.month,
|
|
1448
|
+
day: G.eventDate.day
|
|
1437
1449
|
}, {
|
|
1438
|
-
year:
|
|
1439
|
-
month:
|
|
1440
|
-
day:
|
|
1441
|
-
}))) || (
|
|
1442
|
-
id:
|
|
1450
|
+
year: T.date.year,
|
|
1451
|
+
month: T.date.month,
|
|
1452
|
+
day: T.date.day
|
|
1453
|
+
}))) || (H = u.events) == null || H.push({
|
|
1454
|
+
id: F.id,
|
|
1443
1455
|
data: {
|
|
1444
|
-
...
|
|
1456
|
+
...F.data
|
|
1445
1457
|
},
|
|
1446
|
-
eventDate:
|
|
1458
|
+
eventDate: T.date,
|
|
1447
1459
|
isSingleDay: !0,
|
|
1448
1460
|
isOverlapping: !0,
|
|
1449
|
-
originalId:
|
|
1461
|
+
originalId: F.id
|
|
1450
1462
|
});
|
|
1451
1463
|
});
|
|
1452
1464
|
});
|
|
1453
|
-
}),
|
|
1454
|
-
const
|
|
1455
|
-
for (let
|
|
1456
|
-
|
|
1457
|
-
[...
|
|
1458
|
-
if (
|
|
1465
|
+
}), S.forEach((u) => {
|
|
1466
|
+
const T = [];
|
|
1467
|
+
for (let b = 0; b < 10; b++)
|
|
1468
|
+
T[b] = Array(7).fill(null);
|
|
1469
|
+
[...u.events].sort((b, j) => {
|
|
1470
|
+
if (b.isCrossDay && !j.isCrossDay)
|
|
1459
1471
|
return -1;
|
|
1460
|
-
if (!
|
|
1472
|
+
if (!b.isCrossDay && j.isCrossDay)
|
|
1461
1473
|
return 1;
|
|
1462
|
-
if (
|
|
1463
|
-
return
|
|
1464
|
-
const
|
|
1465
|
-
return
|
|
1466
|
-
}).forEach((
|
|
1467
|
-
let
|
|
1468
|
-
for (
|
|
1469
|
-
year:
|
|
1470
|
-
month:
|
|
1471
|
-
day:
|
|
1474
|
+
if (b.isCrossDay && j.isCrossDay)
|
|
1475
|
+
return b.startIndex - j.startIndex;
|
|
1476
|
+
const V = b.eventDate, F = j.eventDate;
|
|
1477
|
+
return V.year !== F.year ? V.year - F.year : V.month !== F.month ? V.month - F.month : V.day - F.day;
|
|
1478
|
+
}).forEach((b) => {
|
|
1479
|
+
let j = 0, V = !1, F = 0, q = 1;
|
|
1480
|
+
for (b.isCrossDay ? (F = b.startIndex, q = b.colspan) : (F = u.days.findIndex((W) => I({
|
|
1481
|
+
year: b.eventDate.year,
|
|
1482
|
+
month: b.eventDate.month,
|
|
1483
|
+
day: b.eventDate.day
|
|
1472
1484
|
}, {
|
|
1473
|
-
year:
|
|
1474
|
-
month:
|
|
1475
|
-
day:
|
|
1476
|
-
})),
|
|
1477
|
-
let
|
|
1478
|
-
for (let
|
|
1479
|
-
if (
|
|
1480
|
-
|
|
1485
|
+
year: W.date.year,
|
|
1486
|
+
month: W.date.month,
|
|
1487
|
+
day: W.date.day
|
|
1488
|
+
})), q = 1); !V && j < T.length; ) {
|
|
1489
|
+
let W = !0;
|
|
1490
|
+
for (let H = F; H < F + q; H++)
|
|
1491
|
+
if (T[j][H] !== null) {
|
|
1492
|
+
W = !1;
|
|
1481
1493
|
break;
|
|
1482
1494
|
}
|
|
1483
|
-
if (
|
|
1484
|
-
for (let
|
|
1485
|
-
|
|
1486
|
-
...
|
|
1495
|
+
if (W) {
|
|
1496
|
+
for (let H = F; H < F + q; H++)
|
|
1497
|
+
T[j][H] = H === F ? b : {
|
|
1498
|
+
...b,
|
|
1487
1499
|
isPlaceholder: !0,
|
|
1488
|
-
colspan:
|
|
1500
|
+
colspan: H === F ? q : 0
|
|
1489
1501
|
};
|
|
1490
|
-
|
|
1502
|
+
V = !0;
|
|
1491
1503
|
} else
|
|
1492
|
-
|
|
1504
|
+
j++;
|
|
1493
1505
|
}
|
|
1494
1506
|
});
|
|
1495
|
-
const
|
|
1496
|
-
|
|
1497
|
-
if (
|
|
1498
|
-
const
|
|
1499
|
-
for (let
|
|
1500
|
-
const
|
|
1501
|
-
|
|
1507
|
+
const O = [];
|
|
1508
|
+
T.forEach((b) => {
|
|
1509
|
+
if (b.some((j) => j !== null)) {
|
|
1510
|
+
const j = [];
|
|
1511
|
+
for (let V = 0; V < b.length; V++) {
|
|
1512
|
+
const F = b[V];
|
|
1513
|
+
F === null ? j.push({
|
|
1502
1514
|
colspan: 1,
|
|
1503
1515
|
rowspan: 1,
|
|
1504
1516
|
data: null
|
|
1505
|
-
}) :
|
|
1517
|
+
}) : F.isPlaceholder || j.push(F), F && (F.colspan = F.colspan || 1, F.colspan > 1 && (V += F.colspan - 1));
|
|
1506
1518
|
}
|
|
1507
|
-
|
|
1519
|
+
O.push(j);
|
|
1508
1520
|
}
|
|
1509
|
-
}),
|
|
1510
|
-
}),
|
|
1521
|
+
}), u.events = O;
|
|
1522
|
+
}), S;
|
|
1511
1523
|
}
|
|
1512
|
-
function
|
|
1513
|
-
const
|
|
1514
|
-
return
|
|
1524
|
+
function r(S, P) {
|
|
1525
|
+
const x = {};
|
|
1526
|
+
return P.forEach((g) => {
|
|
1515
1527
|
const {
|
|
1516
|
-
eventDateField:
|
|
1517
|
-
startDateField:
|
|
1518
|
-
} = e,
|
|
1519
|
-
if (!
|
|
1528
|
+
eventDateField: u,
|
|
1529
|
+
startDateField: T
|
|
1530
|
+
} = e, L = K(g, u) || K(g, T);
|
|
1531
|
+
if (!L)
|
|
1520
1532
|
return;
|
|
1521
|
-
const
|
|
1522
|
-
if (
|
|
1523
|
-
const
|
|
1524
|
-
|
|
1533
|
+
const O = C(f(L, "yyyy-MM-dd"));
|
|
1534
|
+
if (O.year === S) {
|
|
1535
|
+
const b = "" + O.month;
|
|
1536
|
+
x[b] = x[b] || [], x[b].push({
|
|
1525
1537
|
data: {
|
|
1526
|
-
...
|
|
1538
|
+
...g
|
|
1527
1539
|
},
|
|
1528
|
-
eventDate:
|
|
1540
|
+
eventDate: O
|
|
1529
1541
|
});
|
|
1530
1542
|
}
|
|
1531
|
-
}),
|
|
1543
|
+
}), x;
|
|
1532
1544
|
}
|
|
1533
|
-
function
|
|
1534
|
-
return
|
|
1545
|
+
function i() {
|
|
1546
|
+
return oe[w.value - 1];
|
|
1535
1547
|
}
|
|
1536
|
-
function
|
|
1537
|
-
|
|
1538
|
-
data:
|
|
1539
|
-
view:
|
|
1548
|
+
function v(S, P) {
|
|
1549
|
+
S.stopPropagation(), !e.disabled && m.emit("eventClick", {
|
|
1550
|
+
data: P.data,
|
|
1551
|
+
view: i()
|
|
1540
1552
|
});
|
|
1541
1553
|
}
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1554
|
+
const d = (S, P, x) => {
|
|
1555
|
+
const g = K(S, P);
|
|
1556
|
+
return typeof g == "string" ? g : g !== null && typeof g == "object" && !Array.isArray(g) && x ? g[x] || "" : g || "";
|
|
1557
|
+
};
|
|
1558
|
+
function E(S) {
|
|
1559
|
+
return Te(e.eventItemFormatter) ? e.eventItemFormatter(S.data, {
|
|
1560
|
+
parseToDate: f,
|
|
1561
|
+
formatTo: a,
|
|
1562
|
+
getValue: d,
|
|
1563
|
+
view: i(),
|
|
1564
|
+
locale: p
|
|
1565
|
+
}) : K(S.data, e.textField || "title");
|
|
1566
|
+
}
|
|
1567
|
+
function s(S) {
|
|
1568
|
+
return Te(e.eventItemFormatter) ? "" : d(S.data, e.textField || "title", p);
|
|
1569
|
+
}
|
|
1570
|
+
const h = (S) => {
|
|
1571
|
+
if (!S || !S.data)
|
|
1552
1572
|
return {};
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1573
|
+
if (!Te(e.customEventStyles))
|
|
1574
|
+
return {
|
|
1575
|
+
styles: {
|
|
1576
|
+
"background-color": "#f3f3f3"
|
|
1577
|
+
}
|
|
1578
|
+
};
|
|
1579
|
+
const P = e.customEventStyles(S.data, {
|
|
1580
|
+
parseToDate: f,
|
|
1581
|
+
formatTo: a,
|
|
1582
|
+
getValue: d,
|
|
1583
|
+
view: i(),
|
|
1584
|
+
locale: p
|
|
1558
1585
|
});
|
|
1559
|
-
return
|
|
1586
|
+
return P && Object.keys(P).length > 0 ? P : {};
|
|
1560
1587
|
};
|
|
1561
|
-
function
|
|
1588
|
+
function N(S) {
|
|
1562
1589
|
const {
|
|
1563
|
-
cls:
|
|
1564
|
-
styles:
|
|
1565
|
-
} =
|
|
1590
|
+
cls: P,
|
|
1591
|
+
styles: x
|
|
1592
|
+
} = h(S);
|
|
1566
1593
|
return l("a", {
|
|
1567
|
-
onClick: (
|
|
1568
|
-
style:
|
|
1569
|
-
class: "f-calendar-event p-0 mx-1 my-0 " +
|
|
1594
|
+
onClick: (g) => v(g, S),
|
|
1595
|
+
style: x || {},
|
|
1596
|
+
class: "f-calendar-event p-0 mx-1 my-0 " + (P || "")
|
|
1570
1597
|
}, [l("div", {
|
|
1571
1598
|
class: "event-title",
|
|
1572
|
-
innerHTML:
|
|
1599
|
+
innerHTML: E(S),
|
|
1600
|
+
title: s(S)
|
|
1573
1601
|
}, null)]);
|
|
1574
1602
|
}
|
|
1575
|
-
function
|
|
1576
|
-
return l("li", null, [
|
|
1603
|
+
function M(S) {
|
|
1604
|
+
return l("li", null, [se(" "), E(S)]);
|
|
1577
1605
|
}
|
|
1578
|
-
function
|
|
1606
|
+
function $(S) {
|
|
1579
1607
|
const {
|
|
1580
|
-
cls:
|
|
1581
|
-
styles:
|
|
1582
|
-
} =
|
|
1608
|
+
cls: P,
|
|
1609
|
+
styles: x
|
|
1610
|
+
} = h(S);
|
|
1583
1611
|
return l("li", {
|
|
1584
1612
|
style: {
|
|
1585
|
-
...
|
|
1613
|
+
...x || {},
|
|
1586
1614
|
"padding-bottom": "2px"
|
|
1587
1615
|
},
|
|
1588
|
-
class:
|
|
1589
|
-
onClick: (
|
|
1616
|
+
class: P,
|
|
1617
|
+
onClick: (g) => v(g, S)
|
|
1590
1618
|
}, [l("div", {
|
|
1591
1619
|
class: "event-title pb-0 text-truncate",
|
|
1592
|
-
innerHTML:
|
|
1620
|
+
innerHTML: E(S),
|
|
1621
|
+
title: s(S)
|
|
1593
1622
|
}, null)]);
|
|
1594
1623
|
}
|
|
1595
1624
|
return {
|
|
1596
|
-
assignEventsToDays:
|
|
1597
|
-
assignEventsToWeeks:
|
|
1598
|
-
renderEventItem:
|
|
1625
|
+
assignEventsToDays: c,
|
|
1626
|
+
assignEventsToWeeks: y,
|
|
1627
|
+
renderEventItem: N,
|
|
1599
1628
|
useCompareCompsition: o,
|
|
1600
1629
|
useDateComposition: t,
|
|
1601
1630
|
useDateFormatComposition: n,
|
|
1602
|
-
renderEventItemForMore:
|
|
1603
|
-
assignEventsToMonths:
|
|
1604
|
-
renderEventItemForMonths:
|
|
1605
|
-
getEventItemStyles:
|
|
1631
|
+
renderEventItemForMore: M,
|
|
1632
|
+
assignEventsToMonths: r,
|
|
1633
|
+
renderEventItemForMonths: $,
|
|
1634
|
+
getEventItemStyles: h
|
|
1606
1635
|
};
|
|
1607
1636
|
}
|
|
1608
|
-
const
|
|
1637
|
+
const ne = /* @__PURE__ */ ee({
|
|
1609
1638
|
name: "FCalendar",
|
|
1610
|
-
props:
|
|
1639
|
+
props: Ne,
|
|
1611
1640
|
emits: ["dayClick", "dateChange", "eventClick", "moreClick", "viewChange"],
|
|
1612
1641
|
setup(e, t) {
|
|
1613
1642
|
const {
|
|
1614
1643
|
titleFormat: n,
|
|
1615
1644
|
today: o,
|
|
1616
|
-
prevMonth:
|
|
1617
|
-
nextMonth:
|
|
1618
|
-
dayViewTitle:
|
|
1619
|
-
monthViewTitle:
|
|
1620
|
-
weekViewTitle:
|
|
1621
|
-
weekDayLabels:
|
|
1622
|
-
monthLabels:
|
|
1645
|
+
prevMonth: m,
|
|
1646
|
+
nextMonth: w,
|
|
1647
|
+
dayViewTitle: p,
|
|
1648
|
+
monthViewTitle: D,
|
|
1649
|
+
weekViewTitle: I,
|
|
1650
|
+
weekDayLabels: C,
|
|
1651
|
+
monthLabels: f,
|
|
1623
1652
|
prevWeek: a,
|
|
1624
|
-
nextWeek:
|
|
1625
|
-
prevDay:
|
|
1653
|
+
nextWeek: c,
|
|
1654
|
+
prevDay: y,
|
|
1626
1655
|
nextDay: r,
|
|
1627
1656
|
yearViewTitle: i,
|
|
1628
|
-
yearViewTitleFormat:
|
|
1629
|
-
thisYear:
|
|
1657
|
+
yearViewTitleFormat: v,
|
|
1658
|
+
thisYear: d,
|
|
1630
1659
|
prevYear: E,
|
|
1631
1660
|
nextYear: s,
|
|
1632
|
-
moreText:
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1661
|
+
moreText: h,
|
|
1662
|
+
locale: N
|
|
1663
|
+
} = on(), M = Oe(), $ = Wt(), S = de(), {
|
|
1664
|
+
sameDay: P
|
|
1665
|
+
} = M, {
|
|
1666
|
+
getToday: x,
|
|
1667
|
+
convertDateToDateObject: g
|
|
1668
|
+
} = S, {
|
|
1669
|
+
parseToDate: u
|
|
1670
|
+
} = $, T = B(e.firstDayOfTheWeek), L = B(e.events), O = B(e.enableCrossDay), b = x(), j = B(e.activeDate), V = B(0), F = B(e.visible), q = dn(e, S, $, M, t, V, N);
|
|
1671
|
+
Et("eventsComposition", q);
|
|
1672
|
+
const W = B({
|
|
1673
|
+
year: b.year || 1,
|
|
1674
|
+
month: b.month || 1,
|
|
1675
|
+
day: b.day || 1
|
|
1646
1676
|
});
|
|
1647
|
-
function
|
|
1648
|
-
typeof
|
|
1677
|
+
function H() {
|
|
1678
|
+
typeof j.value == "string" && (j.value = u(j.value, "yyyy-MM-dd")), cn(j.value) && (W.value = g(j.value));
|
|
1649
1679
|
}
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
}), Y(() => e.firstDayOfTheWeek, (
|
|
1653
|
-
|
|
1654
|
-
}), Y(() => e.enableCrossDay, (
|
|
1655
|
-
|
|
1680
|
+
H(), Y(() => e.activeDate, () => {
|
|
1681
|
+
j.value = e.activeDate, H();
|
|
1682
|
+
}), Y(() => e.firstDayOfTheWeek, (k, R) => {
|
|
1683
|
+
k !== R && (T.value = k);
|
|
1684
|
+
}), Y(() => e.enableCrossDay, (k, R) => {
|
|
1685
|
+
k !== R && (O.value = k);
|
|
1656
1686
|
});
|
|
1657
|
-
const
|
|
1687
|
+
const G = B(e.width), _ = B(e.height), J = B();
|
|
1658
1688
|
function z() {
|
|
1659
|
-
const
|
|
1660
|
-
|
|
1689
|
+
const k = oe.some((R) => R === e.defaultView) ? e.defaultView : "month";
|
|
1690
|
+
V.value = oe.indexOf(k) + 1;
|
|
1661
1691
|
}
|
|
1662
|
-
z(), Y(() => e.defaultView, (
|
|
1692
|
+
z(), Y(() => e.defaultView, (k, R) => {
|
|
1663
1693
|
z();
|
|
1664
1694
|
});
|
|
1665
1695
|
const {
|
|
1666
|
-
getMonthlyCalendar:
|
|
1667
|
-
getWeeklyCalendar:
|
|
1668
|
-
getPreviousDay:
|
|
1669
|
-
getNextDay:
|
|
1670
|
-
getDayInPreviousWeek:
|
|
1671
|
-
getDayInNextWeek:
|
|
1672
|
-
getDayInPreviousMonth:
|
|
1673
|
-
getDayInNextMonth:
|
|
1674
|
-
getNextYear:
|
|
1675
|
-
getPreviousYear:
|
|
1676
|
-
} =
|
|
1677
|
-
const
|
|
1678
|
-
if (
|
|
1679
|
-
let
|
|
1680
|
-
for (let
|
|
1681
|
-
|
|
1696
|
+
getMonthlyCalendar: Q,
|
|
1697
|
+
getWeeklyCalendar: ae,
|
|
1698
|
+
getPreviousDay: ue,
|
|
1699
|
+
getNextDay: fe,
|
|
1700
|
+
getDayInPreviousWeek: Je,
|
|
1701
|
+
getDayInNextWeek: Xe,
|
|
1702
|
+
getDayInPreviousMonth: Qe,
|
|
1703
|
+
getDayInNextMonth: Ze,
|
|
1704
|
+
getNextYear: Ke,
|
|
1705
|
+
getPreviousYear: et
|
|
1706
|
+
} = Zt(), tt = A(() => V.value === 1 ? v.replace("yyyy", "" + W.value.year) : n.replace("yyyy", "" + W.value.year).replace("MM", "" + W.value.month)), nt = A(() => V.value === 1 ? d : o), at = A(() => {
|
|
1707
|
+
const k = [], R = X.indexOf(T.value);
|
|
1708
|
+
if (R !== -1) {
|
|
1709
|
+
let U = R;
|
|
1710
|
+
for (let Z = 0; Z < X.length; Z++)
|
|
1711
|
+
k.push(C[X[U]]), U = X[U] === "Sat" ? 0 : U + 1;
|
|
1682
1712
|
}
|
|
1683
|
-
return
|
|
1684
|
-
}),
|
|
1685
|
-
const
|
|
1686
|
-
return
|
|
1687
|
-
}),
|
|
1713
|
+
return k;
|
|
1714
|
+
}), pe = A(() => Q(W.value.month || 1, W.value.year || 1, T.value, W.value)), me = A(() => ae(W.value.day || 1, W.value.month || 1, W.value.year || 1, T.value, W.value)), rt = A(() => me.value.days.find((k) => P(k.date, W.value)) || me.value.days[1]), ot = A(() => {
|
|
1715
|
+
const k = me.value.days.findIndex((U) => P(U.date, W.value)), R = k > -1 ? k : 1;
|
|
1716
|
+
return X[R];
|
|
1717
|
+
}), it = A(() => (V.value === 1 || W.value.month === b.month) && W.value.year === b.year), Pe = (k, R) => [{
|
|
1688
1718
|
filterField: e.eventDateField,
|
|
1689
|
-
value: `${
|
|
1719
|
+
value: `${k.year}-${k.month}-${k.day} 00:00:00`,
|
|
1690
1720
|
lbracket: "",
|
|
1691
1721
|
rbracket: "",
|
|
1692
|
-
relation:
|
|
1693
|
-
compare:
|
|
1722
|
+
relation: Se.And,
|
|
1723
|
+
compare: ke.GreaterOrEqual
|
|
1694
1724
|
}, {
|
|
1695
1725
|
filterField: e.eventDateField,
|
|
1696
|
-
value: `${
|
|
1726
|
+
value: `${R.year}-${R.month}-${R.day} 23:59:59`,
|
|
1697
1727
|
lbracket: "",
|
|
1698
1728
|
rbracket: "",
|
|
1699
|
-
relation:
|
|
1700
|
-
compare:
|
|
1701
|
-
}],
|
|
1702
|
-
const
|
|
1729
|
+
relation: Se.Empty,
|
|
1730
|
+
compare: ke.LessOrEqual
|
|
1731
|
+
}], ge = () => {
|
|
1732
|
+
const k = pe.value[0].days[0].date, R = pe.value[5].days[6].date;
|
|
1703
1733
|
t.emit("dateChange", {
|
|
1704
|
-
conditions:
|
|
1705
|
-
start:
|
|
1706
|
-
end:
|
|
1734
|
+
conditions: Pe(k, R),
|
|
1735
|
+
start: k,
|
|
1736
|
+
end: R,
|
|
1707
1737
|
view: "month"
|
|
1708
1738
|
});
|
|
1709
|
-
},
|
|
1710
|
-
const
|
|
1711
|
-
year:
|
|
1739
|
+
}, be = () => {
|
|
1740
|
+
const k = {
|
|
1741
|
+
year: W.value.year,
|
|
1712
1742
|
month: 1,
|
|
1713
1743
|
day: 1
|
|
1714
|
-
},
|
|
1715
|
-
year:
|
|
1744
|
+
}, R = {
|
|
1745
|
+
year: W.value.year,
|
|
1716
1746
|
month: 12,
|
|
1717
1747
|
day: 31
|
|
1718
1748
|
};
|
|
1719
1749
|
t.emit("dateChange", {
|
|
1720
|
-
conditions:
|
|
1721
|
-
start:
|
|
1722
|
-
end:
|
|
1750
|
+
conditions: Pe(k, R),
|
|
1751
|
+
start: k,
|
|
1752
|
+
end: R,
|
|
1723
1753
|
view: "year"
|
|
1724
1754
|
});
|
|
1725
1755
|
};
|
|
1726
|
-
function
|
|
1727
|
-
|
|
1756
|
+
function lt(k) {
|
|
1757
|
+
k === 1 && (W.value = et(W.value), be()), k === 2 && (W.value = Qe(W.value), ge()), k === 3 && (W.value = Je(W.value)), k === 4 && (W.value = ue(W.value));
|
|
1728
1758
|
}
|
|
1729
|
-
function
|
|
1730
|
-
|
|
1759
|
+
function st(k) {
|
|
1760
|
+
k === 1 && (W.value = Ke(W.value), be()), k === 2 && (W.value = Ze(W.value), ge()), k === 3 && (W.value = Xe(W.value)), k === 4 && (W.value = fe(W.value));
|
|
1731
1761
|
}
|
|
1732
|
-
const
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1762
|
+
const We = () => {
|
|
1763
|
+
oe[V.value - 1] === "year" ? be() : ge();
|
|
1764
|
+
}, ct = A(() => [E, m, a, y][V.value - 1]), dt = A(() => [s, w, c, r][V.value - 1]);
|
|
1765
|
+
function ut() {
|
|
1766
|
+
W.value = {
|
|
1767
|
+
year: b.year || 1,
|
|
1768
|
+
month: b.month || 1,
|
|
1769
|
+
day: b.day || 1
|
|
1770
|
+
}, We();
|
|
1739
1771
|
}
|
|
1740
|
-
const
|
|
1741
|
-
t.emit("dayClick",
|
|
1742
|
-
}
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1772
|
+
const ft = (k) => {
|
|
1773
|
+
t.emit("dayClick", k);
|
|
1774
|
+
};
|
|
1775
|
+
function mt(k) {
|
|
1776
|
+
if (!k)
|
|
1777
|
+
return {
|
|
1778
|
+
width: 0,
|
|
1779
|
+
height: 0
|
|
1780
|
+
};
|
|
1781
|
+
if (navigator.userAgent.toLowerCase().indexOf("firefox") > -1) {
|
|
1782
|
+
const R = window.getComputedStyle(k), U = k.getBoundingClientRect(), Z = parseInt(R.paddingLeft) || 0, Ce = parseInt(R.paddingRight) || 0, De = parseInt(R.paddingTop) || 0, ve = parseInt(R.paddingBottom) || 0, Ct = parseFloat(R.borderLeftWidth) || 0, Dt = parseFloat(R.borderRightWidth) || 0, Tt = parseFloat(R.borderTopWidth) || 0, Mt = parseFloat(R.borderBottomWidth) || 0, kt = U.width - Z - Ce - Ct - Dt, St = U.height - De - ve - Tt - Mt;
|
|
1783
|
+
return {
|
|
1784
|
+
width: kt,
|
|
1785
|
+
height: St
|
|
1786
|
+
};
|
|
1787
|
+
} else
|
|
1788
|
+
return {
|
|
1789
|
+
width: k.clientWidth,
|
|
1790
|
+
height: k.clientHeight
|
|
1791
|
+
};
|
|
1792
|
+
}
|
|
1793
|
+
const we = () => {
|
|
1794
|
+
if (e.fit && J.value) {
|
|
1795
|
+
const k = J.value, U = window.getComputedStyle(k).minHeight;
|
|
1796
|
+
let Z = 800;
|
|
1797
|
+
if (U && U.endsWith("px")) {
|
|
1798
|
+
const ve = parseInt(U.replace("px", ""), 10);
|
|
1799
|
+
isNaN(ve) || (Z = ve);
|
|
1759
1800
|
}
|
|
1801
|
+
const {
|
|
1802
|
+
width: Ce,
|
|
1803
|
+
height: De
|
|
1804
|
+
} = mt(k);
|
|
1805
|
+
G.value = Ce, _.value = De, navigator.userAgent.toLowerCase().indexOf("firefox") > -1 ? _.value -= 35 : _.value = _.value > Z ? _.value : Z;
|
|
1760
1806
|
}
|
|
1761
|
-
}, it = () => {
|
|
1762
|
-
ae[L.value - 1] === "year" ? me() : ue();
|
|
1763
1807
|
};
|
|
1764
|
-
function
|
|
1765
|
-
|
|
1766
|
-
|
|
1808
|
+
function vt(k) {
|
|
1809
|
+
V.value = k, We(), Ve(() => {
|
|
1810
|
+
we();
|
|
1767
1811
|
});
|
|
1768
1812
|
}
|
|
1769
|
-
let
|
|
1770
|
-
|
|
1813
|
+
let re = null;
|
|
1814
|
+
Y(() => e.visible, (k, R) => {
|
|
1815
|
+
k !== R && (F.value = k, k ? setTimeout(() => {
|
|
1816
|
+
re = Re(J.value, we);
|
|
1817
|
+
}) : re && re());
|
|
1818
|
+
}), ie(() => {
|
|
1771
1819
|
setTimeout(() => {
|
|
1772
|
-
|
|
1820
|
+
F.value && (re = Re(J.value, we));
|
|
1773
1821
|
});
|
|
1774
|
-
}),
|
|
1775
|
-
|
|
1822
|
+
}), It(() => {
|
|
1823
|
+
re && re();
|
|
1776
1824
|
});
|
|
1777
|
-
const
|
|
1778
|
-
"f-calendar-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1825
|
+
const yt = A(() => Lt({
|
|
1826
|
+
"f-calendar d-flex f-calendar-cross-day h-100 flex-column": !0,
|
|
1827
|
+
"f-calendar-highlight-weekend": e.highLightWeekend,
|
|
1828
|
+
["f-calendar-activeview-" + oe[V.value - 1]]: !0
|
|
1829
|
+
}, e.customClass));
|
|
1830
|
+
function ht(k) {
|
|
1831
|
+
L.value = k || [];
|
|
1782
1832
|
}
|
|
1783
|
-
const
|
|
1784
|
-
function
|
|
1785
|
-
|
|
1833
|
+
const Le = B([]), je = B();
|
|
1834
|
+
function pt(k) {
|
|
1835
|
+
Le.value = k.events || [], t.emit("moreClick", k);
|
|
1786
1836
|
}
|
|
1787
|
-
function
|
|
1788
|
-
t.emit("moreClick",
|
|
1837
|
+
function gt(k, R) {
|
|
1838
|
+
t.emit("moreClick", R);
|
|
1789
1839
|
}
|
|
1790
|
-
const
|
|
1791
|
-
var
|
|
1792
|
-
return (
|
|
1793
|
-
}),
|
|
1840
|
+
const bt = A(() => {
|
|
1841
|
+
var k;
|
|
1842
|
+
return (k = je.value) == null ? void 0 : k.popoverRef;
|
|
1843
|
+
}), wt = A(() => jt({
|
|
1794
1844
|
minHeight: "800px"
|
|
1795
1845
|
}, e == null ? void 0 : e.customStyle));
|
|
1796
1846
|
return t.expose({
|
|
1797
|
-
loadEvents:
|
|
1798
|
-
}), () => l("div", {
|
|
1799
|
-
class:
|
|
1800
|
-
ref:
|
|
1801
|
-
style:
|
|
1802
|
-
}, [l(
|
|
1803
|
-
activeView:
|
|
1804
|
-
isCurrent:
|
|
1805
|
-
todayText:
|
|
1806
|
-
title:
|
|
1847
|
+
loadEvents: ht
|
|
1848
|
+
}), () => F.value && l("div", {
|
|
1849
|
+
class: yt.value,
|
|
1850
|
+
ref: J,
|
|
1851
|
+
style: wt.value
|
|
1852
|
+
}, [l(xe, {
|
|
1853
|
+
activeView: V.value,
|
|
1854
|
+
isCurrent: it.value,
|
|
1855
|
+
todayText: nt.value,
|
|
1856
|
+
title: tt.value,
|
|
1807
1857
|
enableMoreView: e.enableMoreView,
|
|
1808
|
-
previousText:
|
|
1809
|
-
nextText:
|
|
1810
|
-
monthlyViewTitle:
|
|
1811
|
-
weeklyViewTitle:
|
|
1812
|
-
dailyViewTitle:
|
|
1858
|
+
previousText: ct.value,
|
|
1859
|
+
nextText: dt.value,
|
|
1860
|
+
monthlyViewTitle: D,
|
|
1861
|
+
weeklyViewTitle: I,
|
|
1862
|
+
dailyViewTitle: p,
|
|
1813
1863
|
yearViewTitle: i,
|
|
1814
|
-
onViewChange: (
|
|
1815
|
-
onPrevious: (
|
|
1816
|
-
onNext: (
|
|
1817
|
-
onResetToToday: () =>
|
|
1864
|
+
onViewChange: (k) => vt(k),
|
|
1865
|
+
onPrevious: (k) => lt(k),
|
|
1866
|
+
onNext: (k) => st(k),
|
|
1867
|
+
onResetToToday: () => ut()
|
|
1818
1868
|
}, null), l("div", {
|
|
1819
1869
|
class: "f-utils-fill"
|
|
1820
|
-
}, [
|
|
1821
|
-
day:
|
|
1822
|
-
dayInWeek:
|
|
1823
|
-
events:
|
|
1824
|
-
}, null),
|
|
1825
|
-
week:
|
|
1826
|
-
events:
|
|
1827
|
-
}, null),
|
|
1828
|
-
daysInWeek:
|
|
1829
|
-
monthLabels:
|
|
1830
|
-
activeDay:
|
|
1831
|
-
dates:
|
|
1832
|
-
events:
|
|
1833
|
-
width:
|
|
1834
|
-
height:
|
|
1870
|
+
}, [V.value === 4 && l(Ie, {
|
|
1871
|
+
day: rt.value,
|
|
1872
|
+
dayInWeek: ot.value,
|
|
1873
|
+
events: L.value
|
|
1874
|
+
}, null), V.value === 3 && l(Ee, {
|
|
1875
|
+
week: me.value,
|
|
1876
|
+
events: L.value
|
|
1877
|
+
}, null), V.value === 2 && l(Fe, {
|
|
1878
|
+
daysInWeek: at.value,
|
|
1879
|
+
monthLabels: f,
|
|
1880
|
+
activeDay: W.value,
|
|
1881
|
+
dates: pe.value,
|
|
1882
|
+
events: L.value,
|
|
1883
|
+
width: G.value,
|
|
1884
|
+
height: _.value - 60,
|
|
1835
1885
|
eventDateField: e.eventDateField,
|
|
1836
1886
|
startDateField: e.startDateField,
|
|
1837
1887
|
endDateField: e.endDateField,
|
|
1838
1888
|
customEventStyles: e.customEventStyles,
|
|
1839
|
-
enableCrossDay:
|
|
1889
|
+
enableCrossDay: O.value,
|
|
1840
1890
|
eventItemFormatter: e.eventItemFormatter,
|
|
1841
|
-
popoverRef:
|
|
1842
|
-
moreText:
|
|
1843
|
-
onClick:
|
|
1891
|
+
popoverRef: bt.value,
|
|
1892
|
+
moreText: h,
|
|
1893
|
+
onClick: ft,
|
|
1844
1894
|
showBorder: e.enableWeekdayBorder,
|
|
1845
|
-
onMoreClick:
|
|
1846
|
-
}, null),
|
|
1847
|
-
activeYear:
|
|
1848
|
-
monthLabels:
|
|
1849
|
-
events:
|
|
1850
|
-
height:
|
|
1851
|
-
moreText:
|
|
1852
|
-
onMoreClick: (
|
|
1853
|
-
}, null)]), l(
|
|
1854
|
-
ref:
|
|
1855
|
-
events:
|
|
1895
|
+
onMoreClick: pt
|
|
1896
|
+
}, null), V.value === 1 && l(an, {
|
|
1897
|
+
activeYear: W.value.year,
|
|
1898
|
+
monthLabels: f,
|
|
1899
|
+
events: L.value,
|
|
1900
|
+
height: _.value - 60,
|
|
1901
|
+
moreText: h,
|
|
1902
|
+
onMoreClick: (k, R) => gt(k, R)
|
|
1903
|
+
}, null)]), l(rn, {
|
|
1904
|
+
ref: je,
|
|
1905
|
+
events: Le.value
|
|
1856
1906
|
}, null)]);
|
|
1857
1907
|
}
|
|
1858
|
-
}),
|
|
1908
|
+
}), he = {
|
|
1859
1909
|
button: { type: "button", name: "按钮" },
|
|
1860
1910
|
"response-toolbar": { type: "response-toolbar", name: "工具栏" },
|
|
1861
1911
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮" },
|
|
@@ -1882,6 +1932,7 @@ const ee = /* @__PURE__ */ X({
|
|
|
1882
1932
|
tabs: { type: "tabs", name: "标签页" },
|
|
1883
1933
|
"tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
|
|
1884
1934
|
"tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮" },
|
|
1935
|
+
"drawer-toolbar-item": { type: "drawer-toolbar-item", name: "抽屉工具栏按钮" },
|
|
1885
1936
|
"html-template": { type: "html-template", name: "模板容器" },
|
|
1886
1937
|
"time-picker": { type: "time-picker", name: "时间选择" },
|
|
1887
1938
|
section: { type: "section", name: "分组面板" },
|
|
@@ -1894,6 +1945,7 @@ const ee = /* @__PURE__ */ X({
|
|
|
1894
1945
|
"page-header": { type: "page-header", name: "页头" },
|
|
1895
1946
|
"page-footer": { type: "page-footer", name: "页脚" },
|
|
1896
1947
|
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏" },
|
|
1948
|
+
"drawer-toolbar": { type: "drawer-toolbar", name: "抽屉工具栏" },
|
|
1897
1949
|
fieldset: { type: "fieldset", name: "分组" },
|
|
1898
1950
|
"query-solution": { type: "query-solution", name: "筛选方案" },
|
|
1899
1951
|
drawer: { type: "drawer", name: "抽屉" },
|
|
@@ -1906,21 +1958,40 @@ const ee = /* @__PURE__ */ X({
|
|
|
1906
1958
|
"discussion-editor": { type: "discussion-editor", name: "评论编辑区" },
|
|
1907
1959
|
"discussion-list": { type: "discussion-list", name: "评论列表" },
|
|
1908
1960
|
comment: { type: "comment", name: "评论区" },
|
|
1909
|
-
"rich-text-editor": { type: "rich-text-editor", name: "
|
|
1961
|
+
"rich-text-editor": { type: "rich-text-editor", name: "富文本", icon: "rich-text-box" },
|
|
1910
1962
|
calendar: { type: "calendar", name: "日历", icon: "date-picker" }
|
|
1911
1963
|
};
|
|
1912
|
-
function
|
|
1964
|
+
function ze(e, t) {
|
|
1913
1965
|
return l("h5", {
|
|
1914
1966
|
style: "display: flex;justify-content: space-between;align-items: center;"
|
|
1915
|
-
}, [
|
|
1967
|
+
}, [se("示例代码:"), l("button", {
|
|
1916
1968
|
class: "btn btn-link",
|
|
1917
1969
|
onClick: () => e.value.setValue(t)
|
|
1918
1970
|
}, [l("span", {
|
|
1919
1971
|
class: "f-icon f-icon-source-code mr-1"
|
|
1920
|
-
}, null),
|
|
1972
|
+
}, null), se("应用代码")])]);
|
|
1921
1973
|
}
|
|
1922
|
-
const
|
|
1974
|
+
const Ge = (e = !0) => `/*
|
|
1975
|
+
data: 日程数据
|
|
1976
|
+
context: 提供一些时间转换方法,以及获取日程数据的方法
|
|
1977
|
+
// 将日期转换为Date对象 parseToDate('2021-01-01', 'yyyy-MM-dd')
|
|
1978
|
+
parseToDate: (date: string, format: string) => Date,
|
|
1979
|
+
// 将日期转换为指定格式的字符串 fromatTo(new Date(), 'yyyy-MM-dd')
|
|
1980
|
+
formatTo: (date: Date, format: string) => string,
|
|
1981
|
+
// 获取日程数据的方法 getValue(data, 'name')
|
|
1982
|
+
// 如果字段为多语字段,需要指定语言编码 getValue(data, 'name', locale)
|
|
1983
|
+
getValue: (data: any, field: string, locale?:string) => string,
|
|
1984
|
+
// 当前视图
|
|
1985
|
+
view: 'year' | 'month' | 'week' | 'day',
|
|
1986
|
+
// 当前语言编码
|
|
1987
|
+
locale: string
|
|
1988
|
+
${e ? "此方法返回一个字符串,可包括HTML代码,如:<div>...</div>" : "此方法返回一个对象,包含cls和styles两个属性,cls为事件样式类名,styles为事件样式对象"}
|
|
1989
|
+
*/`, un = (e) => {
|
|
1923
1990
|
const t = `(data, context) => {
|
|
1991
|
+
/**
|
|
1992
|
+
* const {formatTo, view, locale, getValue} = context;
|
|
1993
|
+
* 多语字段需要指定语言编码,如 getValue(data, 'name', locale)
|
|
1994
|
+
*/
|
|
1924
1995
|
const clsNames = [
|
|
1925
1996
|
'red', 'yellow', 'green', 'blue', 'light-green'
|
|
1926
1997
|
];
|
|
@@ -1930,29 +2001,21 @@ const en = (e) => {
|
|
|
1930
2001
|
styles: { fontWeight: 'bold' }
|
|
1931
2002
|
}
|
|
1932
2003
|
}`;
|
|
1933
|
-
return l(
|
|
2004
|
+
return l(Ae, null, [ze(e, t), l("pre", {
|
|
1934
2005
|
style: "height: calc(100% - 35px);margin: 0;"
|
|
1935
|
-
}, [l("code", null, [
|
|
1936
|
-
data: 日程数据
|
|
1937
|
-
context: 提供一些时间转换方法,以及获取日程数据的方法
|
|
1938
|
-
// 将日期转换为Date对象 parseToDate('2021-01-01', 'yyyy-MM-dd')
|
|
1939
|
-
parseToDate: (date: string, format: string) => Date,
|
|
1940
|
-
// 将日期转换为指定格式的字符串 fromatTo(new Date(), 'yyyy-MM-dd')
|
|
1941
|
-
formatTo: (date: Date, format: string) => string,
|
|
1942
|
-
// 获取日程数据的方法 getValue('name', data)
|
|
1943
|
-
getValue: (field: string, data: any) => any,
|
|
1944
|
-
// 当前视图
|
|
1945
|
-
view: 'year' | 'month' | 'week' | 'day'
|
|
1946
|
-
此方法返回一个对象,包含cls和styles两个属性,cls为事件样式类名,styles为事件样式对象
|
|
1947
|
-
*/
|
|
2006
|
+
}, [l("code", null, [se(" "), `${Ge(!1)}
|
|
1948
2007
|
${t}
|
|
1949
2008
|
`])])]);
|
|
1950
|
-
},
|
|
2009
|
+
}, fn = (e) => {
|
|
1951
2010
|
const t = `(data, context) => {
|
|
1952
|
-
const {formatTo, view} = context;
|
|
2011
|
+
const {formatTo, view, locale, getValue} = context;
|
|
1953
2012
|
const timeFmt = view== 'year'? 'MM-dd HH:mm':'HH:mm';
|
|
1954
2013
|
const timeWidth = view == 'year'? '80px': '40px';
|
|
1955
2014
|
const styles = 'width:' + timeWidth + ';text-align: right;';
|
|
2015
|
+
|
|
2016
|
+
/*
|
|
2017
|
+
多语字段需要指定语言编码,如 getValue(data, 'name', locale)
|
|
2018
|
+
*/
|
|
1956
2019
|
// dotted: 展示日程前的圆点
|
|
1957
2020
|
return \`
|
|
1958
2021
|
<div class="d-flex" style="justify-content: space-between;">
|
|
@@ -1960,32 +2023,22 @@ ${t}
|
|
|
1960
2023
|
<div style="\${styles}">\${formatTo(data.beginTime, timeFmt)}</div>
|
|
1961
2024
|
</div>\`
|
|
1962
2025
|
}`;
|
|
1963
|
-
return l(
|
|
2026
|
+
return l(Ae, null, [ze(e, t), l("pre", {
|
|
1964
2027
|
style: "height: calc(100% - 35px);margin: 0;"
|
|
1965
|
-
}, [l("code", null, [
|
|
1966
|
-
data: 日程数据
|
|
1967
|
-
context: 提供一些时间转换方法,以及获取日程数据的方法
|
|
1968
|
-
// 将日期转换为Date对象 parseToDate('2021-01-01', 'yyyy-MM-dd')
|
|
1969
|
-
parseToDate: (date: string, format: string) => Date,
|
|
1970
|
-
// 将日期转换为指定格式的字符串 fromatTo(new Date(), 'yyyy-MM-dd')
|
|
1971
|
-
formatTo: (date: Date, format: string) => string,
|
|
1972
|
-
// 获取日程数据的方法 getValue('name', data)
|
|
1973
|
-
getValue: (field: string, data: any) => any,
|
|
1974
|
-
// 当前视图
|
|
1975
|
-
view: 'year' | 'month' | 'week' | 'day'
|
|
1976
|
-
*/
|
|
2028
|
+
}, [l("code", null, [se(" "), `${Ge()}
|
|
1977
2029
|
${t}
|
|
1978
2030
|
`])])]);
|
|
1979
2031
|
};
|
|
1980
|
-
class
|
|
2032
|
+
class mn extends Rt {
|
|
1981
2033
|
constructor(n, o) {
|
|
1982
2034
|
super(n, o);
|
|
1983
|
-
|
|
2035
|
+
Be(this, "treeNodeStatus", (n) => ((n.raw.$type !== "SimpleField" || n.raw.selectable === !1) && (n.disabled = !0), n));
|
|
1984
2036
|
}
|
|
1985
2037
|
getPropertyConfig(n) {
|
|
1986
2038
|
return this.getBasicPropConfig(n), this.propertyConfig.categories.appearance = this.getAppearanceConfig(n), this.propertyConfig.categories.behavior = this.getBehaviorConfig(n), this.propertyConfig.categories.calendar = this.getCalendarConfig(n), this.propertyConfig.categories.eventsEditor = this.getEventPropConfig(n), this.propertyConfig;
|
|
1987
2039
|
}
|
|
1988
2040
|
getBehaviorConfig(n) {
|
|
2041
|
+
const o = this;
|
|
1989
2042
|
return {
|
|
1990
2043
|
description: "Basic Infomation",
|
|
1991
2044
|
title: "行为",
|
|
@@ -1996,70 +2049,85 @@ class nn extends xt {
|
|
|
1996
2049
|
type: "boolean",
|
|
1997
2050
|
editor: this.getPropertyEditorParams(n, ["Const", "Variable"])
|
|
1998
2051
|
}
|
|
2052
|
+
},
|
|
2053
|
+
setPropertyRelates(m, w) {
|
|
2054
|
+
if (m)
|
|
2055
|
+
switch (m.propertyID) {
|
|
2056
|
+
case "visible":
|
|
2057
|
+
o.afterMutilEditorChanged(n, m);
|
|
2058
|
+
break;
|
|
2059
|
+
}
|
|
1999
2060
|
}
|
|
2000
2061
|
};
|
|
2001
2062
|
}
|
|
2002
2063
|
getBasicPropConfig(n) {
|
|
2003
|
-
var
|
|
2004
|
-
const o = (
|
|
2064
|
+
var D, I, C;
|
|
2065
|
+
const o = (C = (I = (D = this.formSchemaUtils.getFormSchema()) == null ? void 0 : D.module) == null ? void 0 : I.entity[0]) == null ? void 0 : C.entities[0], m = this.assembleSchemaEntityToTree(o, 0), w = this, p = super.getBasicPropConfig(n);
|
|
2005
2066
|
this.propertyConfig.categories.basic = {
|
|
2006
2067
|
description: "Basic Information",
|
|
2007
2068
|
title: "基本信息",
|
|
2008
2069
|
properties: {
|
|
2009
|
-
...
|
|
2070
|
+
...p.properties,
|
|
2010
2071
|
dataSource: {
|
|
2011
2072
|
description: "绑定数据源",
|
|
2012
2073
|
title: "绑定数据源",
|
|
2074
|
+
refreshPanelAfterChanged: !0,
|
|
2013
2075
|
editor: {
|
|
2014
2076
|
type: "combo-tree",
|
|
2015
2077
|
textField: "name",
|
|
2016
2078
|
valueField: "label",
|
|
2017
|
-
data:
|
|
2079
|
+
data: m,
|
|
2018
2080
|
editable: !1,
|
|
2081
|
+
idField: "label",
|
|
2019
2082
|
enableClear: !1
|
|
2020
2083
|
},
|
|
2021
2084
|
readonly: !1
|
|
2022
2085
|
}
|
|
2023
2086
|
},
|
|
2024
|
-
setPropertyRelates(
|
|
2025
|
-
switch (
|
|
2087
|
+
setPropertyRelates(f, a) {
|
|
2088
|
+
switch (f && f.propertyID) {
|
|
2026
2089
|
case "dataSource": {
|
|
2027
|
-
const
|
|
2028
|
-
if (
|
|
2029
|
-
const
|
|
2030
|
-
|
|
2090
|
+
const c = w.formSchemaUtils.getViewModelById(w.viewModelId);
|
|
2091
|
+
if (c) {
|
|
2092
|
+
const y = m.find((r) => r.label === f.propertyValue);
|
|
2093
|
+
c.bindTo = y.bindTo;
|
|
2031
2094
|
}
|
|
2032
|
-
|
|
2095
|
+
w.designViewModelUtils.assembleDesignViewModel();
|
|
2033
2096
|
break;
|
|
2034
2097
|
}
|
|
2035
2098
|
}
|
|
2036
2099
|
}
|
|
2037
2100
|
};
|
|
2038
2101
|
}
|
|
2039
|
-
assembleSchemaEntityToTree(n, o,
|
|
2040
|
-
const
|
|
2041
|
-
return
|
|
2102
|
+
assembleSchemaEntityToTree(n, o, m, w = "", p = []) {
|
|
2103
|
+
const D = w ? `${w}/${n.label}` : "/";
|
|
2104
|
+
return p.push({
|
|
2042
2105
|
id: n.id,
|
|
2043
2106
|
name: n.name,
|
|
2044
2107
|
label: n.label,
|
|
2045
2108
|
layer: o,
|
|
2046
|
-
parent:
|
|
2047
|
-
bindTo:
|
|
2048
|
-
}), n.type.entities && n.type.entities.length && n.type.entities.map((
|
|
2109
|
+
parent: m && m.id,
|
|
2110
|
+
bindTo: D.replace("//", "/")
|
|
2111
|
+
}), n.type.entities && n.type.entities.length && n.type.entities.map((I) => this.assembleSchemaEntityToTree(I, o + 1, n, D, p)), p;
|
|
2049
2112
|
}
|
|
2050
2113
|
onlySelectDateField(n) {
|
|
2051
2114
|
return n.filter((o) => {
|
|
2052
|
-
var
|
|
2053
|
-
((
|
|
2115
|
+
var m, w;
|
|
2116
|
+
((m = o.data.type) == null ? void 0 : m.$type) === "DateType" || ((w = o.data.type) == null ? void 0 : w.$type) === "DateTimeType" ? o.selectable = !0 : o.selectable = !1, o.children && o.children.length && this.onlySelectDateField(o.children);
|
|
2054
2117
|
}), n;
|
|
2055
2118
|
}
|
|
2119
|
+
showOptionsForMonth(n) {
|
|
2120
|
+
return n.enableMoreView == null && (n.enableMoreView = !1), n.defaultView === "month" || n.enableMoreView;
|
|
2121
|
+
}
|
|
2056
2122
|
getCalendarConfig(n) {
|
|
2057
|
-
const o = this,
|
|
2123
|
+
const o = this, m = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId), w = this.onlySelectDateField(ce(m));
|
|
2124
|
+
n.defaultView == null && (n.defaultView = "month");
|
|
2125
|
+
const p = {
|
|
2058
2126
|
idField: "bindingPath",
|
|
2059
2127
|
type: "combo-tree",
|
|
2060
2128
|
textField: "name",
|
|
2061
2129
|
valueField: "bindingPath",
|
|
2062
|
-
data:
|
|
2130
|
+
data: m,
|
|
2063
2131
|
editable: !1,
|
|
2064
2132
|
enableClear: !1
|
|
2065
2133
|
};
|
|
@@ -2091,7 +2159,10 @@ class nn extends xt {
|
|
|
2091
2159
|
description: "",
|
|
2092
2160
|
title: "默认显示日期",
|
|
2093
2161
|
type: "string",
|
|
2094
|
-
editor:
|
|
2162
|
+
editor: {
|
|
2163
|
+
...this.getPropertyEditorParams(n, ["Variable", "Expression"], "", {}, { newVariablePrefix: "", newVariableType: "Date" }, "compute"),
|
|
2164
|
+
enableClear: !1
|
|
2165
|
+
}
|
|
2095
2166
|
},
|
|
2096
2167
|
enableMoreView: {
|
|
2097
2168
|
description: "",
|
|
@@ -2120,7 +2191,7 @@ class nn extends xt {
|
|
|
2120
2191
|
description: "是否高亮周末",
|
|
2121
2192
|
title: "高亮周六日",
|
|
2122
2193
|
type: "boolean",
|
|
2123
|
-
visible:
|
|
2194
|
+
visible: this.showOptionsForMonth(n)
|
|
2124
2195
|
},
|
|
2125
2196
|
firstDayOfTheWeek: {
|
|
2126
2197
|
description: "",
|
|
@@ -2136,47 +2207,47 @@ class nn extends xt {
|
|
|
2136
2207
|
{ label: "星期一", value: "Mon" }
|
|
2137
2208
|
]
|
|
2138
2209
|
},
|
|
2139
|
-
visible:
|
|
2210
|
+
visible: this.showOptionsForMonth(n)
|
|
2140
2211
|
},
|
|
2141
2212
|
enableCrossDay: {
|
|
2142
2213
|
description: "",
|
|
2143
2214
|
title: "允许跨天",
|
|
2144
2215
|
type: "boolean",
|
|
2145
2216
|
refreshPanelAfterChanged: !0,
|
|
2146
|
-
visible:
|
|
2217
|
+
visible: this.showOptionsForMonth(n)
|
|
2147
2218
|
},
|
|
2148
2219
|
eventDateField: {
|
|
2149
2220
|
description: "",
|
|
2150
2221
|
title: "日期字段",
|
|
2151
2222
|
type: "string",
|
|
2152
|
-
editor: { ...
|
|
2223
|
+
editor: { ...p, data: w, customRowStatus: this.treeNodeStatus },
|
|
2153
2224
|
visible: !n.enableCrossDay
|
|
2154
2225
|
},
|
|
2155
2226
|
startDateField: {
|
|
2156
2227
|
description: "",
|
|
2157
2228
|
title: "开始日期字段",
|
|
2158
2229
|
type: "string",
|
|
2159
|
-
editor: { ...
|
|
2230
|
+
editor: { ...p, data: w, customRowStatus: this.treeNodeStatus },
|
|
2160
2231
|
visible: !!n.enableCrossDay
|
|
2161
2232
|
},
|
|
2162
2233
|
endDateField: {
|
|
2163
2234
|
description: "",
|
|
2164
2235
|
title: "结束日期字段",
|
|
2165
2236
|
type: "string",
|
|
2166
|
-
editor: { ...
|
|
2237
|
+
editor: { ...p, data: w, customRowStatus: this.treeNodeStatus },
|
|
2167
2238
|
visible: !!n.enableCrossDay
|
|
2168
2239
|
},
|
|
2169
2240
|
idField: {
|
|
2170
2241
|
description: "",
|
|
2171
2242
|
title: "标识字段",
|
|
2172
2243
|
type: "string",
|
|
2173
|
-
editor: { ...
|
|
2244
|
+
editor: { ...p }
|
|
2174
2245
|
},
|
|
2175
2246
|
textField: {
|
|
2176
2247
|
description: "",
|
|
2177
2248
|
title: "文本字段",
|
|
2178
2249
|
type: "string",
|
|
2179
|
-
editor: { ...
|
|
2250
|
+
editor: { ...p }
|
|
2180
2251
|
},
|
|
2181
2252
|
eventItemFormatter: {
|
|
2182
2253
|
description: "",
|
|
@@ -2185,7 +2256,7 @@ class nn extends xt {
|
|
|
2185
2256
|
editor: {
|
|
2186
2257
|
type: "code-editor",
|
|
2187
2258
|
language: "javascript",
|
|
2188
|
-
leftTemplate:
|
|
2259
|
+
leftTemplate: fn
|
|
2189
2260
|
}
|
|
2190
2261
|
},
|
|
2191
2262
|
customEventStyles: {
|
|
@@ -2195,26 +2266,26 @@ class nn extends xt {
|
|
|
2195
2266
|
editor: {
|
|
2196
2267
|
type: "code-editor",
|
|
2197
2268
|
language: "javascript",
|
|
2198
|
-
leftTemplate:
|
|
2269
|
+
leftTemplate: un
|
|
2199
2270
|
}
|
|
2200
2271
|
}
|
|
2201
2272
|
},
|
|
2202
|
-
setPropertyRelates(
|
|
2203
|
-
if (
|
|
2204
|
-
switch (
|
|
2273
|
+
setPropertyRelates(D, I) {
|
|
2274
|
+
if (D)
|
|
2275
|
+
switch (D.propertyID) {
|
|
2205
2276
|
case "activeDate":
|
|
2206
|
-
o.afterMutilEditorChanged(n,
|
|
2277
|
+
o.afterMutilEditorChanged(n, D);
|
|
2207
2278
|
break;
|
|
2208
2279
|
case "enableMoreView":
|
|
2209
2280
|
case "defaultView":
|
|
2210
|
-
|
|
2281
|
+
n.enableMoreView && D.defaultView === "year" && (n.enableCrossDay = !1);
|
|
2211
2282
|
break;
|
|
2212
2283
|
}
|
|
2213
2284
|
}
|
|
2214
2285
|
};
|
|
2215
2286
|
}
|
|
2216
2287
|
getEventPropConfig(n) {
|
|
2217
|
-
const o = this,
|
|
2288
|
+
const o = this, m = [
|
|
2218
2289
|
// {
|
|
2219
2290
|
// label: 'onDayClick',
|
|
2220
2291
|
// name: '点击事件'
|
|
@@ -2235,251 +2306,175 @@ class nn extends xt {
|
|
|
2235
2306
|
label: "onViewChange",
|
|
2236
2307
|
name: "视图切换事件"
|
|
2237
2308
|
}
|
|
2238
|
-
],
|
|
2309
|
+
], w = o.eventsEditorUtils.formProperties(n, o.viewModelId, m);
|
|
2239
2310
|
return {
|
|
2240
2311
|
title: "事件",
|
|
2241
2312
|
hideTitle: !0,
|
|
2242
|
-
properties: o.createBaseEventProperty(
|
|
2313
|
+
properties: o.createBaseEventProperty(w),
|
|
2243
2314
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
2244
2315
|
refreshPanelAfterChanged: !0,
|
|
2245
2316
|
tabId: "commands",
|
|
2246
2317
|
tabName: "交互",
|
|
2247
|
-
setPropertyRelates(
|
|
2248
|
-
const
|
|
2249
|
-
delete
|
|
2250
|
-
const
|
|
2251
|
-
|
|
2318
|
+
setPropertyRelates(D, I) {
|
|
2319
|
+
const C = D.propertyValue;
|
|
2320
|
+
delete I[o.viewModelId], C && o.eventsEditorUtils.saveRelatedParameters(I, o.viewModelId, C.events, C);
|
|
2321
|
+
const f = o.designViewModelUtils.getDgViewModel(o.viewModelId);
|
|
2322
|
+
f && o.designViewModelField && f.changeField(o.designViewModelField.id, { valueChanging: I.fieldValueChanging, valueChanged: I.fieldValueChanged });
|
|
2252
2323
|
}
|
|
2253
2324
|
};
|
|
2254
2325
|
}
|
|
2255
2326
|
}
|
|
2256
|
-
function
|
|
2257
|
-
const n = e.schema, o =
|
|
2258
|
-
function
|
|
2327
|
+
function vn(e, t) {
|
|
2328
|
+
const n = e.schema, o = B(!0), m = B(!0);
|
|
2329
|
+
function w(a) {
|
|
2259
2330
|
return !1;
|
|
2260
2331
|
}
|
|
2261
|
-
function
|
|
2332
|
+
function p() {
|
|
2262
2333
|
return !1;
|
|
2263
2334
|
}
|
|
2264
|
-
function
|
|
2335
|
+
function D() {
|
|
2265
2336
|
return !1;
|
|
2266
2337
|
}
|
|
2267
|
-
function
|
|
2338
|
+
function I() {
|
|
2268
2339
|
return !0;
|
|
2269
2340
|
}
|
|
2270
|
-
function
|
|
2271
|
-
return new
|
|
2341
|
+
function C(a) {
|
|
2342
|
+
return new mn(a, t).getPropertyConfig(n);
|
|
2272
2343
|
}
|
|
2273
|
-
function
|
|
2274
|
-
var a,
|
|
2344
|
+
function f() {
|
|
2345
|
+
var a, c, y, r;
|
|
2275
2346
|
if (e && t) {
|
|
2276
2347
|
const i = (a = e == null ? void 0 : e.componentInstance) == null ? void 0 : a.value.belongedComponentId;
|
|
2277
|
-
let
|
|
2348
|
+
let v = "", d = "";
|
|
2278
2349
|
const { formSchemaUtils: E } = t;
|
|
2279
2350
|
if (i) {
|
|
2280
|
-
const
|
|
2281
|
-
(
|
|
2351
|
+
const h = E.getRootViewModelId(), N = E.getComponentByViewModelId(h), M = E.selectNode(N, ($) => $.contents && $.contents.find((S) => S.component === i));
|
|
2352
|
+
(M == null ? void 0 : M.type) === ((c = he["tab-page"]) == null ? void 0 : c.type) && ((y = M == null ? void 0 : M.contents) != null && y.length) && (v = M.title || ""), (M == null ? void 0 : M.type) === ((r = he.section) == null ? void 0 : r.type) && (M == null ? void 0 : M.showHeader) !== !1 && (v = M.mainTitle || ""), v = v ? `${v} > ` : "", d = v ? M.id : "";
|
|
2282
2353
|
}
|
|
2283
|
-
const s =
|
|
2354
|
+
const s = he.calendar.name;
|
|
2284
2355
|
t == null || t.formSchemaUtils.getControlBasicInfoMap().set(e.schema.id, {
|
|
2285
2356
|
componentTitle: s,
|
|
2286
|
-
parentPathName: `${
|
|
2287
|
-
reliedComponentId:
|
|
2357
|
+
parentPathName: `${v}${s}`,
|
|
2358
|
+
reliedComponentId: d
|
|
2288
2359
|
});
|
|
2289
2360
|
}
|
|
2290
2361
|
}
|
|
2291
2362
|
return {
|
|
2292
|
-
canAccepts:
|
|
2293
|
-
checkCanDeleteComponent:
|
|
2294
|
-
checkCanMoveComponent:
|
|
2295
|
-
hideNestedPaddingInDesginerView:
|
|
2363
|
+
canAccepts: w,
|
|
2364
|
+
checkCanDeleteComponent: p,
|
|
2365
|
+
checkCanMoveComponent: D,
|
|
2366
|
+
hideNestedPaddingInDesginerView: I,
|
|
2296
2367
|
triggerBelongedComponentToMoveWhenMoved: o,
|
|
2297
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
2298
|
-
getPropsConfig:
|
|
2299
|
-
setComponentBasicInfoMap:
|
|
2368
|
+
triggerBelongedComponentToDeleteWhenDeleted: m,
|
|
2369
|
+
getPropsConfig: C,
|
|
2370
|
+
setComponentBasicInfoMap: f
|
|
2300
2371
|
};
|
|
2301
2372
|
}
|
|
2302
|
-
const
|
|
2373
|
+
const yn = /* @__PURE__ */ ee({
|
|
2303
2374
|
name: "FCalendarDesign",
|
|
2304
|
-
props:
|
|
2375
|
+
props: Ne,
|
|
2305
2376
|
emits: [],
|
|
2306
2377
|
setup(e, t) {
|
|
2307
|
-
const n =
|
|
2308
|
-
|
|
2309
|
-
n.value.componentInstance =
|
|
2310
|
-
}), t.expose(
|
|
2311
|
-
const
|
|
2378
|
+
const n = B(), o = le("design-item-context"), m = le("designer-host-service"), w = vn(o, m), p = Pt(n, o, w);
|
|
2379
|
+
ie(() => {
|
|
2380
|
+
n.value.componentInstance = p;
|
|
2381
|
+
}), t.expose(p.value);
|
|
2382
|
+
const D = A(() => ({
|
|
2312
2383
|
minHeight: "800px"
|
|
2313
|
-
}
|
|
2384
|
+
}));
|
|
2314
2385
|
return () => l("div", {
|
|
2315
2386
|
ref: n,
|
|
2316
2387
|
class: "h-100",
|
|
2317
|
-
style:
|
|
2318
|
-
}, [l(
|
|
2388
|
+
style: D.value
|
|
2389
|
+
}, [l(ne, {
|
|
2319
2390
|
style: "pointer-events: none;",
|
|
2320
2391
|
enableMoreView: e.enableMoreView,
|
|
2321
2392
|
defaultView: e.defaultView,
|
|
2322
2393
|
firstDayOfTheWeek: e.firstDayOfTheWeek,
|
|
2323
|
-
highLightWeekend: e.highLightWeekend
|
|
2394
|
+
highLightWeekend: e.highLightWeekend,
|
|
2395
|
+
customStyle: e.customStyle,
|
|
2396
|
+
customClass: e.customClass
|
|
2324
2397
|
}, null)]);
|
|
2325
2398
|
}
|
|
2326
2399
|
});
|
|
2327
|
-
function
|
|
2328
|
-
|
|
2329
|
-
function o(a) {
|
|
2330
|
-
const { properties: u, title: w, ignore: r } = a, i = r && Array.isArray(r), y = Object.keys(u).reduce((f, E) => ((!i || !r.find((s) => s === E)) && (f[E] = u[E].type === "object" && u[E].properties ? o(u[E]) : le(u[E].default)), f), {});
|
|
2331
|
-
if (w && (!i || !r.find((f) => f === "id"))) {
|
|
2332
|
-
const f = w.toLowerCase().replace(/-/g, "_");
|
|
2333
|
-
y.id = `${f}_${Math.random().toString().slice(2, 6)}`;
|
|
2334
|
-
}
|
|
2335
|
-
return y;
|
|
2336
|
-
}
|
|
2337
|
-
function p(a) {
|
|
2338
|
-
const { properties: u, title: w, required: r } = a;
|
|
2339
|
-
if (r && Array.isArray(r)) {
|
|
2340
|
-
const i = r.reduce((y, f) => (y[f] = u[f].type === "object" && u[f].properties ? o(u[f]) : le(u[f].default), y), {});
|
|
2341
|
-
if (w && r.find((y) => y === "id")) {
|
|
2342
|
-
const y = w.toLowerCase().replace(/-/g, "_");
|
|
2343
|
-
i.id = `${y}_${Math.random().toString().slice(2, 6)}`;
|
|
2344
|
-
}
|
|
2345
|
-
return i;
|
|
2346
|
-
}
|
|
2347
|
-
return {
|
|
2348
|
-
type: w
|
|
2349
|
-
};
|
|
2350
|
-
}
|
|
2351
|
-
function M(a, u = {}, w) {
|
|
2352
|
-
const r = e[a];
|
|
2353
|
-
if (r) {
|
|
2354
|
-
let i = p(r);
|
|
2355
|
-
const y = t[a];
|
|
2356
|
-
return i = y ? y({ getSchemaByType: M }, i, u, w) : i, n != null && n.appendIdentifyForNewControl && n.appendIdentifyForNewControl(i), i;
|
|
2357
|
-
}
|
|
2358
|
-
return null;
|
|
2359
|
-
}
|
|
2360
|
-
function g(a, u) {
|
|
2361
|
-
const w = o(u);
|
|
2362
|
-
return Object.keys(w).reduce((r, i) => (Object.prototype.hasOwnProperty.call(a, i) && (r[i] && Pe(r[i]) && Pe(a[i] || !a[i]) ? Object.assign(r[i], a[i] || {}) : r[i] = a[i]), r), w), w;
|
|
2363
|
-
}
|
|
2364
|
-
function b(a, u) {
|
|
2365
|
-
return Object.keys(a).filter((r) => a[r] != null).reduce((r, i) => {
|
|
2366
|
-
if (u.has(i)) {
|
|
2367
|
-
const y = u.get(i);
|
|
2368
|
-
if (typeof y == "string")
|
|
2369
|
-
r[y] = a[i];
|
|
2370
|
-
else {
|
|
2371
|
-
const f = y(i, a[i], a);
|
|
2372
|
-
Object.assign(r, f);
|
|
2373
|
-
}
|
|
2374
|
-
} else
|
|
2375
|
-
r[i] = a[i];
|
|
2376
|
-
return r;
|
|
2377
|
-
}, {});
|
|
2378
|
-
}
|
|
2379
|
-
function O(a, u, w = /* @__PURE__ */ new Map()) {
|
|
2380
|
-
const r = g(a, u);
|
|
2381
|
-
return b(r, w);
|
|
2382
|
-
}
|
|
2383
|
-
function T(a) {
|
|
2384
|
-
var w;
|
|
2385
|
-
const u = a.type;
|
|
2386
|
-
if (u) {
|
|
2387
|
-
const r = e[u];
|
|
2388
|
-
if (!r)
|
|
2389
|
-
return a;
|
|
2390
|
-
const i = g(a, r), y = ((w = a.editor) == null ? void 0 : w.type) || "";
|
|
2391
|
-
if (y) {
|
|
2392
|
-
const f = e[y], E = g(a.editor, f);
|
|
2393
|
-
i.editor = E;
|
|
2394
|
-
}
|
|
2395
|
-
return i;
|
|
2396
|
-
}
|
|
2397
|
-
return a;
|
|
2398
|
-
}
|
|
2399
|
-
function v(a) {
|
|
2400
|
-
n = a;
|
|
2401
|
-
}
|
|
2402
|
-
return { getSchemaByType: M, resolveSchemaWithDefaultValue: T, resolveSchemaToProps: O, mappingSchemaToProps: b, setDesignerContext: v };
|
|
2403
|
-
}
|
|
2404
|
-
const on = {}, ln = {}, { resolveSchemaWithDefaultValue: sn } = $e(on, ln);
|
|
2405
|
-
function cn(e = {}) {
|
|
2406
|
-
function t(T, v, a, u) {
|
|
2400
|
+
function hn(e = {}) {
|
|
2401
|
+
function t(C, f, a, c) {
|
|
2407
2402
|
if (typeof a == "number")
|
|
2408
|
-
return
|
|
2403
|
+
return c[C].length === a;
|
|
2409
2404
|
if (typeof a == "object") {
|
|
2410
|
-
const
|
|
2411
|
-
if (
|
|
2412
|
-
return Number(
|
|
2413
|
-
if (
|
|
2414
|
-
return Number(
|
|
2415
|
-
if (
|
|
2416
|
-
return Number(
|
|
2405
|
+
const y = Object.keys(a)[0], r = a[y];
|
|
2406
|
+
if (y === "not")
|
|
2407
|
+
return Number(c[C].length) !== Number(r);
|
|
2408
|
+
if (y === "moreThan")
|
|
2409
|
+
return Number(c[C].length) >= Number(r);
|
|
2410
|
+
if (y === "lessThan")
|
|
2411
|
+
return Number(c[C].length) <= Number(r);
|
|
2417
2412
|
}
|
|
2418
2413
|
return !1;
|
|
2419
2414
|
}
|
|
2420
|
-
function n(
|
|
2421
|
-
return
|
|
2415
|
+
function n(C, f, a, c) {
|
|
2416
|
+
return c[C] && c[C].propertyValue && String(c[C].propertyValue.value) === String(a);
|
|
2422
2417
|
}
|
|
2423
2418
|
const o = /* @__PURE__ */ new Map([
|
|
2424
2419
|
["length", t],
|
|
2425
2420
|
["getProperty", n]
|
|
2426
2421
|
]);
|
|
2427
|
-
Object.keys(e).reduce((
|
|
2428
|
-
function
|
|
2429
|
-
const a =
|
|
2430
|
-
return typeof
|
|
2431
|
-
if (
|
|
2432
|
-
return { target: a, operator: "length", param: null, value:
|
|
2433
|
-
const
|
|
2434
|
-
return { target: a, operator: "getProperty", param:
|
|
2422
|
+
Object.keys(e).reduce((C, f) => (C.set(f, e[f]), C), o);
|
|
2423
|
+
function m(C, f) {
|
|
2424
|
+
const a = C;
|
|
2425
|
+
return typeof f == "number" ? [{ target: a, operator: "length", param: null, value: Number(f) }] : typeof f == "boolean" ? [{ target: a, operator: "getProperty", param: C, value: !!f }] : typeof f == "object" ? Object.keys(f).map((c) => {
|
|
2426
|
+
if (c === "length")
|
|
2427
|
+
return { target: a, operator: "length", param: null, value: f[c] };
|
|
2428
|
+
const y = c, r = f[c];
|
|
2429
|
+
return { target: a, operator: "getProperty", param: y, value: r };
|
|
2435
2430
|
}) : [];
|
|
2436
2431
|
}
|
|
2437
|
-
function
|
|
2438
|
-
return Object.keys(
|
|
2439
|
-
const
|
|
2440
|
-
return a.push(...
|
|
2432
|
+
function w(C) {
|
|
2433
|
+
return Object.keys(C).reduce((a, c) => {
|
|
2434
|
+
const y = m(c, C[c]);
|
|
2435
|
+
return a.push(...y), a;
|
|
2441
2436
|
}, []);
|
|
2442
2437
|
}
|
|
2443
|
-
function
|
|
2444
|
-
if (o.has(
|
|
2445
|
-
const a = o.get(
|
|
2446
|
-
return a && a(
|
|
2438
|
+
function p(C, f) {
|
|
2439
|
+
if (o.has(C.operator)) {
|
|
2440
|
+
const a = o.get(C.operator);
|
|
2441
|
+
return a && a(C.target, C.param, C.value, f) || !1;
|
|
2447
2442
|
}
|
|
2448
2443
|
return !1;
|
|
2449
2444
|
}
|
|
2450
|
-
function
|
|
2451
|
-
return
|
|
2445
|
+
function D(C, f) {
|
|
2446
|
+
return w(C).reduce((y, r) => y && p(r, f), !0);
|
|
2452
2447
|
}
|
|
2453
|
-
function
|
|
2454
|
-
const a = Object.keys(
|
|
2455
|
-
return
|
|
2448
|
+
function I(C, f) {
|
|
2449
|
+
const a = Object.keys(C), c = a.includes("allOf"), y = a.includes("anyOf"), r = c || y, d = (r ? C[r ? c ? "allOf" : "anyOf" : "allOf"] : [C]).map((s) => D(s, f));
|
|
2450
|
+
return c ? !d.includes(!1) : d.includes(!0);
|
|
2456
2451
|
}
|
|
2457
|
-
return { parseValueSchema:
|
|
2452
|
+
return { parseValueSchema: I };
|
|
2458
2453
|
}
|
|
2459
|
-
const
|
|
2454
|
+
const pn = {
|
|
2460
2455
|
convertTo: (e, t, n, o) => {
|
|
2461
2456
|
e.appearance || (e.appearance = {}), e.appearance[t] = n;
|
|
2462
2457
|
},
|
|
2463
2458
|
convertFrom: (e, t, n) => e.appearance ? e.appearance[t] : e[t]
|
|
2464
|
-
},
|
|
2459
|
+
}, gn = {
|
|
2465
2460
|
convertFrom: (e, t, n) => e.buttons && e.buttons.length ? `共 ${e.buttons.length} 项` : "无"
|
|
2466
|
-
},
|
|
2461
|
+
}, bn = {
|
|
2467
2462
|
convertTo: (e, t, n, o) => {
|
|
2468
2463
|
e.editor && (e.editor[t] = n);
|
|
2469
2464
|
},
|
|
2470
2465
|
convertFrom: (e, t, n) => e.editor && Object.prototype.hasOwnProperty.call(e.editor, t) ? e.editor[t] : e[t]
|
|
2471
|
-
},
|
|
2466
|
+
}, wn = {
|
|
2472
2467
|
convertFrom: (e, t, n) => {
|
|
2473
|
-
var
|
|
2468
|
+
var m;
|
|
2474
2469
|
const o = e.editor && e.editor[t] ? e.editor[t] : e[t];
|
|
2475
|
-
return ((
|
|
2470
|
+
return ((m = he[o]) == null ? void 0 : m.name) || o;
|
|
2476
2471
|
}
|
|
2477
|
-
},
|
|
2472
|
+
}, Cn = {
|
|
2478
2473
|
convertTo: (e, t, n, o) => {
|
|
2479
2474
|
e[t] = e[t];
|
|
2480
2475
|
},
|
|
2481
2476
|
convertFrom: (e, t, n) => e.editor ? n.getRealEditorType(e.editor.type) : ""
|
|
2482
|
-
},
|
|
2477
|
+
}, Dn = {
|
|
2483
2478
|
convertTo: (e, t, n, o) => {
|
|
2484
2479
|
(e.type === "data-grid-column" || e.type === "tree-grid-column") && (e.formatter ? e.formatter[t] = n : e.formatter = {
|
|
2485
2480
|
[t]: n
|
|
@@ -2510,7 +2505,7 @@ const un = {
|
|
|
2510
2505
|
}
|
|
2511
2506
|
return "none";
|
|
2512
2507
|
}
|
|
2513
|
-
},
|
|
2508
|
+
}, Tn = {
|
|
2514
2509
|
convertTo: (e, t, n, o) => {
|
|
2515
2510
|
e.command ? e.command[t] = n : e.command = {
|
|
2516
2511
|
[t]: n
|
|
@@ -2528,36 +2523,50 @@ const un = {
|
|
|
2528
2523
|
]), t === "enableType" && n === "custom" && (e.command.enable = !0, e.command.commands = [
|
|
2529
2524
|
{
|
|
2530
2525
|
value: "add",
|
|
2531
|
-
text:
|
|
2526
|
+
text: {
|
|
2527
|
+
en: "add",
|
|
2528
|
+
"zh-CHS": "增加",
|
|
2529
|
+
"zh-CHT": "增加"
|
|
2530
|
+
},
|
|
2532
2531
|
type: "link"
|
|
2533
2532
|
},
|
|
2534
2533
|
{
|
|
2535
2534
|
value: "edit",
|
|
2536
|
-
text:
|
|
2535
|
+
text: {
|
|
2536
|
+
en: "edit",
|
|
2537
|
+
"zh-CHS": "编辑",
|
|
2538
|
+
"zh-CHT": "編輯"
|
|
2539
|
+
},
|
|
2537
2540
|
type: "danger"
|
|
2538
2541
|
},
|
|
2539
2542
|
{
|
|
2540
2543
|
value: "remove",
|
|
2541
|
-
text:
|
|
2544
|
+
text: {
|
|
2545
|
+
en: "remove",
|
|
2546
|
+
"zh-CHS": "删除",
|
|
2547
|
+
"zh-CHT": "刪除"
|
|
2548
|
+
},
|
|
2542
2549
|
type: "remove"
|
|
2543
2550
|
}
|
|
2544
2551
|
]), t === "enableType" && n === "unable" && (e.command.enable = !1);
|
|
2545
2552
|
},
|
|
2546
2553
|
convertFrom: (e, t, n) => {
|
|
2547
|
-
var o,
|
|
2554
|
+
var o, m;
|
|
2548
2555
|
if (e.command) {
|
|
2549
2556
|
if (t === "enableType") {
|
|
2550
|
-
const
|
|
2551
|
-
return e.command.enable ?
|
|
2557
|
+
const w = (m = (o = e.command) == null ? void 0 : o.commands) == null ? void 0 : m.find((p) => p.command === "edit" && p.type === "primary");
|
|
2558
|
+
return e.command.enable ? w ? "default" : "custom" : "unable";
|
|
2552
2559
|
}
|
|
2553
2560
|
if (t === "commands")
|
|
2554
2561
|
return e.command.enableType === "custom" ? e.command.commands : [];
|
|
2555
2562
|
if (t === "formatter")
|
|
2556
2563
|
return e.command.formatter;
|
|
2564
|
+
if (t === "count")
|
|
2565
|
+
return e.command.count;
|
|
2557
2566
|
}
|
|
2558
2567
|
return "";
|
|
2559
2568
|
}
|
|
2560
|
-
},
|
|
2569
|
+
}, Mn = {
|
|
2561
2570
|
convertTo: (e, t, n, o) => {
|
|
2562
2571
|
e.column ? e.column[t] = n : e.column = {
|
|
2563
2572
|
[t]: n
|
|
@@ -2572,7 +2581,7 @@ const un = {
|
|
|
2572
2581
|
}
|
|
2573
2582
|
return "";
|
|
2574
2583
|
}
|
|
2575
|
-
},
|
|
2584
|
+
}, kn = {
|
|
2576
2585
|
convertTo: (e, t, n, o) => {
|
|
2577
2586
|
e.summary ? e.summary[t] = n : e.summary = {
|
|
2578
2587
|
[t]: n
|
|
@@ -2582,7 +2591,7 @@ const un = {
|
|
|
2582
2591
|
});
|
|
2583
2592
|
},
|
|
2584
2593
|
convertFrom: (e, t, n) => e.summary && t === "enable" ? e.summary.enable : e.type === "data-grid-column" ? e.enableSummary === void 0 ? !1 : e.enableSummary : ""
|
|
2585
|
-
},
|
|
2594
|
+
}, Sn = {
|
|
2586
2595
|
convertTo: (e, t, n, o) => {
|
|
2587
2596
|
e.group ? e.group[t] = n : e.group = {
|
|
2588
2597
|
[t]: n
|
|
@@ -2600,7 +2609,7 @@ const un = {
|
|
|
2600
2609
|
return e.group.showSummary;
|
|
2601
2610
|
}
|
|
2602
2611
|
}
|
|
2603
|
-
},
|
|
2612
|
+
}, xn = {
|
|
2604
2613
|
convertFrom: (e, t) => e.binding ? e.binding.path : "",
|
|
2605
2614
|
convertTo: (e, t, n) => {
|
|
2606
2615
|
if (n && n.length > 0) {
|
|
@@ -2608,53 +2617,53 @@ const un = {
|
|
|
2608
2617
|
e.binding || (e.binding = {}), e.binding.type = "Form", e.binding.path = o.bindingField, e.binding.field = o.id, e.binding.fullPath = o.path, e.path = o.bindingPath;
|
|
2609
2618
|
}
|
|
2610
2619
|
}
|
|
2611
|
-
},
|
|
2620
|
+
}, Fn = {
|
|
2612
2621
|
convertTo: (e, t, n, o) => {
|
|
2613
2622
|
e.pagination || (e.pagination = {}), e.pagination[t] = n;
|
|
2614
2623
|
},
|
|
2615
2624
|
convertFrom: (e, t, n) => e.pagination ? e.pagination[t] : e[t]
|
|
2616
|
-
},
|
|
2625
|
+
}, En = {
|
|
2617
2626
|
convertTo: (e, t, n, o) => {
|
|
2618
2627
|
e.rowNumber || (e.rowNumber = {}), e.rowNumber[t] = n;
|
|
2619
2628
|
},
|
|
2620
2629
|
convertFrom: (e, t, n) => e.rowNumber ? e.rowNumber[t] : e[t]
|
|
2621
|
-
},
|
|
2630
|
+
}, In = {
|
|
2622
2631
|
convertTo: (e, t, n, o) => {
|
|
2623
2632
|
e.selection || (e.selection = {}), e.selection[t] = n;
|
|
2624
2633
|
},
|
|
2625
2634
|
convertFrom: (e, t, n) => {
|
|
2626
|
-
var o,
|
|
2627
|
-
return t === "showCheckbox" ? (o = e.selection) != null && o.multiSelect ? !0 : (
|
|
2635
|
+
var o, m;
|
|
2636
|
+
return t === "showCheckbox" ? (o = e.selection) != null && o.multiSelect ? !0 : (m = e.selection) == null ? void 0 : m.showCheckbox : e.selection ? e.selection[t] : e[t];
|
|
2628
2637
|
}
|
|
2629
|
-
},
|
|
2638
|
+
}, Vn = {
|
|
2630
2639
|
convertFrom: (e, t, n) => e[t] && e[t].length ? `共 ${e[t].length} 项` : ""
|
|
2631
|
-
},
|
|
2640
|
+
}, Nn = {
|
|
2632
2641
|
convertFrom: (e, t) => e[t] || "",
|
|
2633
2642
|
convertTo: (e, t, n) => {
|
|
2634
2643
|
e[t] = n;
|
|
2635
2644
|
}
|
|
2636
|
-
},
|
|
2645
|
+
}, On = {
|
|
2637
2646
|
convertTo: (e, t, n, o) => {
|
|
2638
2647
|
e.size || (e.size = {}), e.size[t] = n;
|
|
2639
2648
|
},
|
|
2640
2649
|
convertFrom: (e, t, n) => e.size ? e.size[t] : e[t]
|
|
2641
|
-
},
|
|
2650
|
+
}, Pn = {
|
|
2642
2651
|
convertFrom: (e, t, n) => {
|
|
2643
|
-
var o,
|
|
2644
|
-
return (o = e.formatter) != null && o.data && t === "formatterEnumData" && !e.formatterEnumData ? (
|
|
2652
|
+
var o, m;
|
|
2653
|
+
return (o = e.formatter) != null && o.data && t === "formatterEnumData" && !e.formatterEnumData ? (m = e.formatter) == null ? void 0 : m.data : e.formatterEnumData;
|
|
2645
2654
|
}
|
|
2646
|
-
},
|
|
2655
|
+
}, Wn = {
|
|
2647
2656
|
convertTo: (e, t, n, o) => {
|
|
2648
2657
|
e.sort || (e.sort = {}), e.sort[t] = n;
|
|
2649
2658
|
},
|
|
2650
2659
|
convertFrom: (e, t, n) => {
|
|
2651
|
-
var o,
|
|
2660
|
+
var o, m;
|
|
2652
2661
|
if (t === "mode")
|
|
2653
2662
|
return ((o = e.sort) == null ? void 0 : o.mode) || "client";
|
|
2654
2663
|
if (t === "multiSort")
|
|
2655
|
-
return !!((
|
|
2664
|
+
return !!((m = e.sort) != null && m.multiSort);
|
|
2656
2665
|
}
|
|
2657
|
-
},
|
|
2666
|
+
}, Ln = {
|
|
2658
2667
|
convertTo: (e, t, n, o) => {
|
|
2659
2668
|
e.filter || (e.filter = {}), e.filter[t] = n;
|
|
2660
2669
|
},
|
|
@@ -2663,7 +2672,7 @@ const un = {
|
|
|
2663
2672
|
if (t === "mode")
|
|
2664
2673
|
return ((o = e.filter) == null ? void 0 : o.mode) || "client";
|
|
2665
2674
|
}
|
|
2666
|
-
},
|
|
2675
|
+
}, jn = {
|
|
2667
2676
|
convertTo: (e, t, n, o) => {
|
|
2668
2677
|
e.rowOption ? e.rowOption[t] = n : e.rowOption = {
|
|
2669
2678
|
[t]: n
|
|
@@ -2678,7 +2687,7 @@ const un = {
|
|
|
2678
2687
|
}
|
|
2679
2688
|
return "";
|
|
2680
2689
|
}
|
|
2681
|
-
},
|
|
2690
|
+
}, Bn = {
|
|
2682
2691
|
convertTo: (e, t, n, o) => {
|
|
2683
2692
|
(e.type === "data-grid-column" || e.type === "tree-grid-column") && (e[t] = n, t === "columnTemplateType" && n === "hyperlink" && (e.onClickLinkCommand ? e.columnTemplate = `
|
|
2684
2693
|
<span class="f-pretend-link f-cursor-pointer"
|
|
@@ -2691,31 +2700,31 @@ const un = {
|
|
|
2691
2700
|
},
|
|
2692
2701
|
convertFrom: (e, t, n) => t === "columnTemplate" ? e.columnTemplate : t === "columnTemplateType" ? e.columnTemplateType ? e.columnTemplateType || "default" : e.columnTemplate && !e.onClickLinkCommand ? "custom" : e.columnTemplate && e.onClickLinkCommand ? "hyperlink" : "default" : ""
|
|
2693
2702
|
};
|
|
2694
|
-
function
|
|
2703
|
+
function Ue(e, t, n) {
|
|
2695
2704
|
const o = /* @__PURE__ */ new Map([
|
|
2696
|
-
["/converter/appearance.converter",
|
|
2697
|
-
["/converter/buttons.converter",
|
|
2698
|
-
["/converter/property-editor.converter",
|
|
2699
|
-
["/converter/items-count.converter",
|
|
2700
|
-
["/converter/type.converter",
|
|
2701
|
-
["/converter/change-editor.converter",
|
|
2702
|
-
["/converter/change-formatter.converter",
|
|
2703
|
-
["/converter/column-command.converter",
|
|
2704
|
-
["/converter/column-option.converter",
|
|
2705
|
-
["/converter/summary.converter",
|
|
2706
|
-
["/converter/group.converter",
|
|
2707
|
-
["/converter/form-group-label.converter",
|
|
2708
|
-
["/converter/field-selector.converter",
|
|
2709
|
-
["/converter/pagination.converter",
|
|
2710
|
-
["/converter/row-number.converter",
|
|
2711
|
-
["/converter/grid-selection.converter",
|
|
2712
|
-
["/converter/size.converter",
|
|
2713
|
-
["/converter/change-formatter-enum.converter",
|
|
2714
|
-
["/converter/grid-sort.converter",
|
|
2715
|
-
["/converter/grid-filter.converter",
|
|
2716
|
-
["/converter/row-option.converter",
|
|
2717
|
-
["/converter/change-formatter-type.converter",
|
|
2718
|
-
]),
|
|
2705
|
+
["/converter/appearance.converter", pn],
|
|
2706
|
+
["/converter/buttons.converter", gn],
|
|
2707
|
+
["/converter/property-editor.converter", bn],
|
|
2708
|
+
["/converter/items-count.converter", Vn],
|
|
2709
|
+
["/converter/type.converter", wn],
|
|
2710
|
+
["/converter/change-editor.converter", Cn],
|
|
2711
|
+
["/converter/change-formatter.converter", Dn],
|
|
2712
|
+
["/converter/column-command.converter", Tn],
|
|
2713
|
+
["/converter/column-option.converter", Mn],
|
|
2714
|
+
["/converter/summary.converter", kn],
|
|
2715
|
+
["/converter/group.converter", Sn],
|
|
2716
|
+
["/converter/form-group-label.converter", Nn],
|
|
2717
|
+
["/converter/field-selector.converter", xn],
|
|
2718
|
+
["/converter/pagination.converter", Fn],
|
|
2719
|
+
["/converter/row-number.converter", En],
|
|
2720
|
+
["/converter/grid-selection.converter", In],
|
|
2721
|
+
["/converter/size.converter", On],
|
|
2722
|
+
["/converter/change-formatter-enum.converter", Pn],
|
|
2723
|
+
["/converter/grid-sort.converter", Wn],
|
|
2724
|
+
["/converter/grid-filter.converter", Ln],
|
|
2725
|
+
["/converter/row-option.converter", jn],
|
|
2726
|
+
["/converter/change-formatter-type.converter", Bn]
|
|
2727
|
+
]), m = /* @__PURE__ */ new Map([
|
|
2719
2728
|
["string", { type: "input-group", enableClear: !1 }],
|
|
2720
2729
|
["boolean", {
|
|
2721
2730
|
type: "combo-list",
|
|
@@ -2739,93 +2748,170 @@ function Re(e, t, n) {
|
|
|
2739
2748
|
["array", { type: "button-edit" }],
|
|
2740
2749
|
["number", { type: "number-spinner", placeholder: "" }],
|
|
2741
2750
|
["events-editor", { type: "events-editor", hide: !0 }]
|
|
2742
|
-
]),
|
|
2743
|
-
function
|
|
2744
|
-
return () =>
|
|
2745
|
-
}
|
|
2746
|
-
function
|
|
2747
|
-
return r.includes("visible") && i.visible !== void 0 ? typeof i.visible == "boolean" ? () => !!i.visible : i.visible === void 0 ? !0 :
|
|
2748
|
-
}
|
|
2749
|
-
function
|
|
2750
|
-
return r.includes("readonly") && i.readonly !== void 0 ? typeof i.readonly == "boolean" ? () => !!i.readonly :
|
|
2751
|
-
}
|
|
2752
|
-
function
|
|
2753
|
-
const
|
|
2754
|
-
return typeof
|
|
2755
|
-
}
|
|
2756
|
-
function
|
|
2757
|
-
return Object.keys(r).map((
|
|
2758
|
-
const
|
|
2759
|
-
|
|
2760
|
-
const
|
|
2761
|
-
let F =
|
|
2762
|
-
const
|
|
2751
|
+
]), w = hn();
|
|
2752
|
+
function p(r, i) {
|
|
2753
|
+
return () => w.parseValueSchema(r, i);
|
|
2754
|
+
}
|
|
2755
|
+
function D(r, i, v) {
|
|
2756
|
+
return r.includes("visible") && i.visible !== void 0 ? typeof i.visible == "boolean" ? () => !!i.visible : i.visible === void 0 ? !0 : p(i.visible, v) : () => !0;
|
|
2757
|
+
}
|
|
2758
|
+
function I(r, i, v) {
|
|
2759
|
+
return r.includes("readonly") && i.readonly !== void 0 ? typeof i.readonly == "boolean" ? () => !!i.readonly : p(i.readonly, v) : () => !1;
|
|
2760
|
+
}
|
|
2761
|
+
function C(r, i) {
|
|
2762
|
+
const v = r.$converter || i;
|
|
2763
|
+
return typeof v == "string" && v && o.has(v) ? o.get(v) || null : v || null;
|
|
2764
|
+
}
|
|
2765
|
+
function f(r, i, v, d, E, s = "", h = "") {
|
|
2766
|
+
return Object.keys(r).map((M) => {
|
|
2767
|
+
const $ = B(1), S = M, P = r[M], x = Object.keys(P), g = P.title, u = P.type, T = m.get(u) || { type: "input-group", enableClear: !1 }, L = P.editor ? Object.assign({}, T, P.editor) : Object.assign({}, T), O = D(x, P, i), b = I(x, P, i);
|
|
2768
|
+
L.readonly = L.readonly === void 0 ? b() : L.readonly;
|
|
2769
|
+
const j = P.type === "cascade" ? f(P.properties, i, v, d, E, s, h) : [], V = !0;
|
|
2770
|
+
let F = C(P, h);
|
|
2771
|
+
const q = A({
|
|
2763
2772
|
get() {
|
|
2764
|
-
if (
|
|
2765
|
-
if (["class", "style"].find((
|
|
2766
|
-
return F.convertFrom(
|
|
2767
|
-
const
|
|
2768
|
-
return Object.prototype.hasOwnProperty.call(
|
|
2773
|
+
if ($.value) {
|
|
2774
|
+
if (["class", "style"].find((Q) => Q === S) && !F && (F = o.get("/converter/appearance.converter") || null), F && F.convertFrom)
|
|
2775
|
+
return F.convertFrom(v, M, E, s);
|
|
2776
|
+
const z = v[M];
|
|
2777
|
+
return Object.prototype.hasOwnProperty.call(P, "defaultValue") && (z === void 0 || typeof z == "string" && z === "") ? P.type === "boolean" ? P.defaultValue : P.defaultValue || "" : z;
|
|
2769
2778
|
}
|
|
2770
2779
|
return null;
|
|
2771
2780
|
},
|
|
2772
|
-
set(
|
|
2773
|
-
|
|
2781
|
+
set(z) {
|
|
2782
|
+
$.value += 1, F && F.convertTo ? (F.convertTo(d, M, z, E, s), F.convertTo(v, M, z, E, s)) : (d[M] = z, v[M] = z);
|
|
2774
2783
|
}
|
|
2775
|
-
}), { refreshPanelAfterChanged:
|
|
2776
|
-
return i[
|
|
2784
|
+
}), { refreshPanelAfterChanged: W, description: H, isExpand: G, parentPropertyID: _ } = P, J = { propertyID: S, propertyName: g, propertyType: u, propertyValue: q, editor: L, visible: O, readonly: b, cascadeConfig: j, hideCascadeTitle: V, refreshPanelAfterChanged: W, description: H, isExpand: G, parentPropertyID: _ };
|
|
2785
|
+
return i[S] = J, J;
|
|
2777
2786
|
});
|
|
2778
2787
|
}
|
|
2779
|
-
function a(r, i,
|
|
2780
|
-
const
|
|
2781
|
-
return E && E.categories ? Object.keys(E.categories).map((
|
|
2782
|
-
const
|
|
2783
|
-
return { categoryId:
|
|
2788
|
+
function a(r, i, v = {}) {
|
|
2789
|
+
const d = {}, E = e[r];
|
|
2790
|
+
return E && E.categories ? Object.keys(E.categories).map((h) => {
|
|
2791
|
+
const N = E.categories[h], M = N == null ? void 0 : N.title, $ = f(N.properties || {}, d, {}, v, i);
|
|
2792
|
+
return { categoryId: h, categoryName: M, properties: $ };
|
|
2784
2793
|
}) : [];
|
|
2785
2794
|
}
|
|
2786
|
-
function
|
|
2787
|
-
const s = i.$ref.schema,
|
|
2788
|
-
if (
|
|
2789
|
-
const
|
|
2790
|
-
|
|
2791
|
-
|
|
2795
|
+
function c(r, i, v, d, E = "") {
|
|
2796
|
+
const s = i.$ref.schema, h = i.$ref.converter, N = v[s], M = N.type, $ = n(N), S = {}, P = e[M];
|
|
2797
|
+
if (P && P.categories) {
|
|
2798
|
+
const x = P.categories[r], g = x == null ? void 0 : x.title;
|
|
2799
|
+
h && Object.keys(x.properties).forEach((L) => {
|
|
2800
|
+
x.properties[L].$converter = h;
|
|
2792
2801
|
});
|
|
2793
|
-
const
|
|
2794
|
-
return { categoryId: r, categoryName:
|
|
2802
|
+
const u = (x == null ? void 0 : x.properties) || {}, T = f(u, S, $, N, d, E);
|
|
2803
|
+
return { categoryId: r, categoryName: g, properties: T };
|
|
2795
2804
|
}
|
|
2796
2805
|
return { categoryId: r, categoryName: "", properties: [] };
|
|
2797
2806
|
}
|
|
2798
|
-
function
|
|
2799
|
-
const s = r.type,
|
|
2800
|
-
let
|
|
2801
|
-
if (
|
|
2802
|
-
const
|
|
2803
|
-
return Object.keys(
|
|
2804
|
-
const
|
|
2805
|
-
if (
|
|
2806
|
-
|
|
2807
|
+
function y(r, i, v, d, E) {
|
|
2808
|
+
const s = r.type, h = n(r), N = {};
|
|
2809
|
+
let M = E || e[s];
|
|
2810
|
+
if (!(M && Object.keys(M).length > 0) && v && v.getPropConfig && (M = v.getPropConfig(d)), M && M.categories) {
|
|
2811
|
+
const S = [];
|
|
2812
|
+
return Object.keys(M.categories).map((P) => {
|
|
2813
|
+
const x = M.categories[P];
|
|
2814
|
+
if (x.$ref) {
|
|
2815
|
+
S.push(c(P, x, r, i, d));
|
|
2807
2816
|
return;
|
|
2808
2817
|
}
|
|
2809
|
-
const
|
|
2810
|
-
|
|
2811
|
-
}),
|
|
2818
|
+
const g = x == null ? void 0 : x.title, u = x == null ? void 0 : x.tabId, T = x == null ? void 0 : x.tabName, L = x == null ? void 0 : x.hide, O = x == null ? void 0 : x.hideTitle, b = f(x.properties || {}, N, h, r, i, d, x.$converter), { setPropertyRelates: j } = x, V = x == null ? void 0 : x.parentPropertyID;
|
|
2819
|
+
S.push({ categoryId: P, categoryName: g, tabId: u, tabName: T, hide: L, properties: b, hideTitle: O, setPropertyRelates: j, parentPropertyID: V });
|
|
2820
|
+
}), S;
|
|
2812
2821
|
}
|
|
2813
2822
|
return [];
|
|
2814
2823
|
}
|
|
2815
2824
|
return {
|
|
2816
|
-
getPropertyConfigBySchema:
|
|
2825
|
+
getPropertyConfigBySchema: y,
|
|
2817
2826
|
getPropertyConfigByType: a,
|
|
2818
2827
|
propertyConverterMap: o
|
|
2819
2828
|
};
|
|
2820
2829
|
}
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2830
|
+
function _e(e, t) {
|
|
2831
|
+
let n;
|
|
2832
|
+
function o(a) {
|
|
2833
|
+
const { properties: c, title: y, ignore: r } = a, i = r && Array.isArray(r), v = Object.keys(c).reduce((d, E) => ((!i || !r.find((s) => s === E)) && (d[E] = c[E].type === "object" && c[E].properties ? o(c[E]) : ce(c[E].default)), d), {});
|
|
2834
|
+
if (y && (!i || !r.find((d) => d === "id"))) {
|
|
2835
|
+
const d = y.toLowerCase().replace(/-/g, "_");
|
|
2836
|
+
v.id = `${d}_${Math.random().toString().slice(2, 6)}`;
|
|
2837
|
+
}
|
|
2838
|
+
return v;
|
|
2839
|
+
}
|
|
2840
|
+
function m(a) {
|
|
2841
|
+
const { properties: c, title: y, required: r } = a;
|
|
2842
|
+
if (r && Array.isArray(r)) {
|
|
2843
|
+
const i = r.reduce((v, d) => (v[d] = c[d].type === "object" && c[d].properties ? o(c[d]) : ce(c[d].default), v), {});
|
|
2844
|
+
if (y && r.find((v) => v === "id")) {
|
|
2845
|
+
const v = y.toLowerCase().replace(/-/g, "_");
|
|
2846
|
+
i.id = `${v}_${Math.random().toString().slice(2, 6)}`;
|
|
2847
|
+
}
|
|
2848
|
+
return i;
|
|
2849
|
+
}
|
|
2850
|
+
return {
|
|
2851
|
+
type: y
|
|
2852
|
+
};
|
|
2853
|
+
}
|
|
2854
|
+
function w(a, c = {}, y) {
|
|
2855
|
+
const r = e[a];
|
|
2856
|
+
if (r) {
|
|
2857
|
+
let i = m(r);
|
|
2858
|
+
const v = t[a];
|
|
2859
|
+
return i = v ? v({ getSchemaByType: w }, i, c, y) : i, n != null && n.appendIdentifyForNewControl && n.appendIdentifyForNewControl(i), i;
|
|
2860
|
+
}
|
|
2861
|
+
return null;
|
|
2862
|
+
}
|
|
2863
|
+
function p(a, c) {
|
|
2864
|
+
const y = o(c);
|
|
2865
|
+
return Object.keys(y).reduce((r, i) => (Object.prototype.hasOwnProperty.call(a, i) && (r[i] && $e(r[i]) && $e(a[i] || !a[i]) ? Object.assign(r[i], a[i] || {}) : r[i] = a[i]), r), y), y;
|
|
2866
|
+
}
|
|
2867
|
+
function D(a, c) {
|
|
2868
|
+
return Object.keys(a).filter((r) => a[r] != null).reduce((r, i) => {
|
|
2869
|
+
if (c.has(i)) {
|
|
2870
|
+
const v = c.get(i);
|
|
2871
|
+
if (typeof v == "string")
|
|
2872
|
+
r[v] = a[i];
|
|
2873
|
+
else {
|
|
2874
|
+
const d = v(i, a[i], a);
|
|
2875
|
+
Object.assign(r, d);
|
|
2876
|
+
}
|
|
2877
|
+
} else
|
|
2878
|
+
r[i] = a[i];
|
|
2879
|
+
return r;
|
|
2880
|
+
}, {});
|
|
2881
|
+
}
|
|
2882
|
+
function I(a, c, y = /* @__PURE__ */ new Map()) {
|
|
2883
|
+
const r = p(a, c);
|
|
2884
|
+
return D(r, y);
|
|
2885
|
+
}
|
|
2886
|
+
function C(a) {
|
|
2887
|
+
var y;
|
|
2888
|
+
const c = a.type;
|
|
2889
|
+
if (c) {
|
|
2890
|
+
const r = e[c];
|
|
2891
|
+
if (!r)
|
|
2892
|
+
return a;
|
|
2893
|
+
const i = p(a, r), v = ((y = a.editor) == null ? void 0 : y.type) || "";
|
|
2894
|
+
if (v) {
|
|
2895
|
+
const d = e[v], E = p(a.editor, d);
|
|
2896
|
+
i.editor = E;
|
|
2897
|
+
}
|
|
2898
|
+
return i;
|
|
2899
|
+
}
|
|
2900
|
+
return a;
|
|
2901
|
+
}
|
|
2902
|
+
function f(a) {
|
|
2903
|
+
n = a;
|
|
2904
|
+
}
|
|
2905
|
+
return { getSchemaByType: w, resolveSchemaWithDefaultValue: C, resolveSchemaToProps: I, mappingSchemaToProps: D, setDesignerContext: f };
|
|
2906
|
+
}
|
|
2907
|
+
const $n = {}, Rn = {}, { resolveSchemaWithDefaultValue: An } = _e($n, Rn), Hn = {}, Yn = {};
|
|
2908
|
+
Ue(Hn, Yn, An);
|
|
2909
|
+
const qn = {}, zn = {}, { resolveSchemaWithDefaultValue: Gn } = _e(qn, zn), Un = {}, _n = {};
|
|
2910
|
+
Ue(Un, _n, Gn);
|
|
2911
|
+
function Jn() {
|
|
2826
2912
|
function e(t, n) {
|
|
2827
|
-
const { id: o } = t || {}, { dataSource:
|
|
2828
|
-
return
|
|
2913
|
+
const { id: o } = t || {}, { dataSource: m } = t || {};
|
|
2914
|
+
return m === void 0 ? {} : {
|
|
2829
2915
|
events: n.getValue(o)
|
|
2830
2916
|
};
|
|
2831
2917
|
}
|
|
@@ -2833,7 +2919,7 @@ function $n() {
|
|
|
2833
2919
|
resolve: e
|
|
2834
2920
|
};
|
|
2835
2921
|
}
|
|
2836
|
-
const
|
|
2922
|
+
const la = {
|
|
2837
2923
|
1: "Jan",
|
|
2838
2924
|
2: "Feb",
|
|
2839
2925
|
3: "Mar",
|
|
@@ -2846,33 +2932,34 @@ const Xn = {
|
|
|
2846
2932
|
10: "Oct",
|
|
2847
2933
|
11: "Nov",
|
|
2848
2934
|
12: "Dec"
|
|
2849
|
-
},
|
|
2850
|
-
|
|
2851
|
-
e.component(
|
|
2935
|
+
}, Xn = Jn();
|
|
2936
|
+
ne.install = (e) => {
|
|
2937
|
+
e.component(ne.name, ne).component(Ie.name, Ie).component(xe.name, xe).component(Fe.name, Fe).component(Ee.name, Ee);
|
|
2852
2938
|
};
|
|
2853
|
-
|
|
2854
|
-
e.calendar =
|
|
2939
|
+
ne.register = (e, t, n, o, m) => {
|
|
2940
|
+
e.calendar = ne, t.calendar = qe(m), o.calendar = { bindingResolver: Xn };
|
|
2855
2941
|
};
|
|
2856
|
-
|
|
2857
|
-
e.calendar =
|
|
2942
|
+
ne.registerDesigner = (e, t, n, o) => {
|
|
2943
|
+
e.calendar = yn, t.calendar = qe(o);
|
|
2858
2944
|
};
|
|
2859
2945
|
export {
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2946
|
+
oe as CalendarViews,
|
|
2947
|
+
ke as Compare,
|
|
2948
|
+
ne as FCalendar,
|
|
2949
|
+
Ie as FCalendarDayView,
|
|
2950
|
+
xe as FCalendarHeader,
|
|
2951
|
+
Fe as FCalendarMonthView,
|
|
2952
|
+
Ee as FCalendarWeekView,
|
|
2953
|
+
Se as FilterRelation,
|
|
2954
|
+
te as MonthTag,
|
|
2955
|
+
Ne as calendarProps,
|
|
2956
|
+
nn as dayViewProps,
|
|
2957
|
+
ne as default,
|
|
2958
|
+
la as defaultNameOfMonths,
|
|
2959
|
+
Kt as headerProps,
|
|
2960
|
+
en as monthViewProps,
|
|
2961
|
+
ia as propsResolver,
|
|
2962
|
+
qe as propsResolverGenerator,
|
|
2963
|
+
X as weekDays,
|
|
2964
|
+
tn as weekViewProps
|
|
2878
2965
|
};
|