dinocollab-core 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_rollupPluginBabelHelpers.js +67 -10
- package/dist/_virtual/_rollupPluginBabelHelpers.js.map +1 -1
- package/dist/{src/api-context → api-context}/alert-global.js +49 -34
- package/dist/api-context/alert-global.js.map +1 -0
- package/dist/{src/api-context → api-context}/drawer-global.js +40 -33
- package/dist/api-context/drawer-global.js.map +1 -0
- package/dist/{src/api-context → api-context}/global-modal.js +40 -32
- package/dist/api-context/global-modal.js.map +1 -0
- package/dist/{src/api-context → api-context}/popover-global.js +44 -36
- package/dist/api-context/popover-global.js.map +1 -0
- package/dist/api-context/popover.js +94 -0
- package/dist/api-context/popover.js.map +1 -0
- package/dist/{src/api-context → api-context}/ui.units.js +12 -10
- package/dist/api-context/ui.units.js.map +1 -0
- package/dist/components/breadcrumbs.js +65 -0
- package/dist/components/breadcrumbs.js.map +1 -0
- package/dist/{src/components → components}/copy-to-clipboard.js +39 -32
- package/dist/components/copy-to-clipboard.js.map +1 -0
- package/dist/components/help-tooltip.js +104 -0
- package/dist/components/help-tooltip.js.map +1 -0
- package/dist/components/image-with-fallback.js +51 -0
- package/dist/components/image-with-fallback.js.map +1 -0
- package/dist/{src/components → components}/text-editor.js +24 -23
- package/dist/components/text-editor.js.map +1 -0
- package/dist/components/text-editor.preview.js +27 -0
- package/dist/components/text-editor.preview.js.map +1 -0
- package/dist/form/create.autocomplete.chips.js +228 -0
- package/dist/form/create.autocomplete.chips.js.map +1 -0
- package/dist/{src/form → form}/create.date-expired.js +71 -61
- package/dist/form/create.date-expired.js.map +1 -0
- package/dist/{src/form → form}/create.date-picker.js +40 -37
- package/dist/form/create.date-picker.js.map +1 -0
- package/dist/{src/form → form}/create.form-base.js +47 -41
- package/dist/form/create.form-base.js.map +1 -0
- package/dist/form/create.form-comfirm.js +131 -0
- package/dist/form/create.form-comfirm.js.map +1 -0
- package/dist/form/create.form-grid-layout.js +188 -0
- package/dist/form/create.form-grid-layout.js.map +1 -0
- package/dist/{src/form → form}/create.form-grid-layout.units.js +17 -14
- package/dist/form/create.form-grid-layout.units.js.map +1 -0
- package/dist/form/create.input.file.js +79 -0
- package/dist/form/create.input.file.js.map +1 -0
- package/dist/form/create.input.js +276 -0
- package/dist/form/create.input.js.map +1 -0
- package/dist/form/create.select-simple.js +114 -0
- package/dist/form/create.select-simple.js.map +1 -0
- package/dist/form/create.select-with-api.js +277 -0
- package/dist/form/create.select-with-api.js.map +1 -0
- package/dist/form/create.text-editor.js +181 -0
- package/dist/form/create.text-editor.js.map +1 -0
- package/dist/{src/form → form}/dino-form.js +17 -18
- package/dist/form/dino-form.js.map +1 -0
- package/dist/{src/form → form}/helper.js +14 -14
- package/dist/form/helper.js.map +1 -0
- package/dist/{src/form → form}/modal-wrapper.js +32 -25
- package/dist/form/modal-wrapper.js.map +1 -0
- package/dist/{src/form → form}/validator.js +47 -43
- package/dist/form/validator.js.map +1 -0
- package/dist/{src/hooks → hooks}/index.js +1 -1
- package/dist/hooks/index.js.map +1 -0
- package/dist/index.d.ts +928 -0
- package/dist/{src/index.js → index.js} +10 -3
- package/dist/{src/index.js.map → index.js.map} +1 -1
- package/dist/redux/create.hoc-lazy.js +71 -0
- package/dist/redux/create.hoc-lazy.js.map +1 -0
- package/dist/{src/redux → redux}/dino.js +2 -2
- package/dist/redux/dino.js.map +1 -0
- package/dist/redux/types.js.map +1 -0
- package/dist/redux/ui.error-page.js +89 -0
- package/dist/redux/ui.error-page.js.map +1 -0
- package/dist/redux/vector-404.webp.js.map +1 -0
- package/dist/{src/table → table}/context.js +5 -2
- package/dist/table/context.js.map +1 -0
- package/dist/table/create.action-row.js +144 -0
- package/dist/table/create.action-row.js.map +1 -0
- package/dist/table/create.table.js +246 -0
- package/dist/table/create.table.js.map +1 -0
- package/dist/{src/table → table}/custom.filter-operators.js +2 -2
- package/dist/table/custom.filter-operators.js.map +1 -0
- package/dist/table/dino.js +136 -0
- package/dist/table/dino.js.map +1 -0
- package/dist/{src/table → table}/helpers.js +31 -32
- package/dist/table/helpers.js.map +1 -0
- package/dist/table/model-filter.js.map +1 -0
- package/dist/table/toolbar-pannel.js +143 -0
- package/dist/table/toolbar-pannel.js.map +1 -0
- package/dist/table/ui.buttons.js +67 -0
- package/dist/table/ui.buttons.js.map +1 -0
- package/dist/table/ui.units.js +248 -0
- package/dist/table/ui.units.js.map +1 -0
- package/dist/types/api-context/alert-global.d.ts +29 -0
- package/dist/types/api-context/drawer-global.d.ts +32 -0
- package/dist/types/api-context/global-modal.d.ts +37 -0
- package/dist/types/api-context/index.d.ts +9 -0
- package/dist/types/api-context/popover-global.d.ts +37 -0
- package/dist/types/api-context/popover.d.ts +32 -0
- package/dist/types/api-context/ui.units.d.ts +2 -0
- package/dist/types/components/breadcrumbs.d.ts +13 -0
- package/dist/types/components/copy-to-clipboard.d.ts +26 -0
- package/dist/types/components/help-tooltip.d.ts +15 -0
- package/dist/types/components/image-with-fallback.d.ts +13 -0
- package/dist/types/components/index.d.ts +11 -0
- package/dist/types/components/input-debounce-timer.d.ts +9 -0
- package/dist/types/components/loading-buttons.d.ts +6 -0
- package/dist/types/components/text-editor.d.ts +26 -0
- package/dist/types/components/text-editor.preview.d.ts +5 -0
- package/dist/types/form/create.autocomplete.chips.d.ts +16 -0
- package/dist/types/form/create.date-expired.d.ts +19 -0
- package/dist/types/form/create.date-picker.d.ts +19 -0
- package/dist/types/form/create.form-base.d.ts +30 -0
- package/dist/types/form/create.form-comfirm.d.ts +20 -0
- package/dist/types/form/create.form-grid-layout.d.ts +44 -0
- package/dist/types/form/create.form-grid-layout.units.d.ts +8 -0
- package/dist/types/form/create.input.d.ts +29 -0
- package/dist/types/form/create.input.file.d.ts +16 -0
- package/dist/types/form/create.select-simple.d.ts +24 -0
- package/dist/types/form/create.select-with-api.d.ts +29 -0
- package/dist/types/form/create.text-editor.d.ts +42 -0
- package/dist/types/form/dino-form.d.ts +26 -0
- package/dist/types/form/helper.d.ts +14 -0
- package/dist/types/form/index.d.ts +7 -0
- package/dist/types/form/modal-wrapper.d.ts +14 -0
- package/dist/types/form/types.d.ts +15 -0
- package/dist/types/form/validator.d.ts +64 -0
- package/dist/types/hooks/index.d.ts +4 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/lab/create.autocomplete.simple.d.ts +19 -0
- package/dist/types/lab/create.dino-store.d.ts +1 -0
- package/dist/types/lab/create.multi-select-dropdown.d.ts +23 -0
- package/dist/types/lab/create.select-mul-with-api/index.d.ts +26 -0
- package/dist/types/lab/create.select-mul-with-api/table-custom.d.ts +43 -0
- package/dist/types/lab/create.select-mul-with-api/types.d.ts +21 -0
- package/dist/types/lab/create.select-mul-with-api/ui.units.d.ts +29 -0
- package/dist/types/lab/filter-bar/base.d.ts +34 -0
- package/dist/types/lab/filter-bar/create.filter-bar.d.ts +92 -0
- package/dist/types/lab/filter-bar/create.filter-menu.d.ts +66 -0
- package/dist/types/lab/filter-bar/create.filter-panel.d.ts +117 -0
- package/dist/types/lab/filter-bar/create.filtered.d.ts +59 -0
- package/dist/types/lab/filter-bar/create.sort-menu.d.ts +7 -0
- package/dist/types/lab/filter-bar/demo.d.ts +3 -0
- package/dist/types/lab/filter-bar/index.d.ts +4 -0
- package/dist/types/lab/filter-bar/types.d.ts +81 -0
- package/dist/types/lab/filter-bar/ui.units.d.ts +13 -0
- package/dist/types/lab/grafana-dashboard/configs.d.ts +4 -0
- package/dist/types/lab/grafana-dashboard/date-time-range/absolute-time-rage.d.ts +14 -0
- package/dist/types/lab/grafana-dashboard/date-time-range/helpers.d.ts +36 -0
- package/dist/types/lab/grafana-dashboard/date-time-range/index.d.ts +24 -0
- package/dist/types/lab/grafana-dashboard/date-time-range/menu-wrap.d.ts +19 -0
- package/dist/types/lab/grafana-dashboard/date-time-range/quick-ranges.d.ts +20 -0
- package/dist/types/lab/grafana-dashboard/date-time-range/types.d.ts +8 -0
- package/dist/types/lab/grafana-dashboard/date-time-range/units.d.ts +2 -0
- package/dist/types/lab/grafana-dashboard/helper.d.ts +7 -0
- package/dist/types/lab/grafana-dashboard/hooks.d.ts +10 -0
- package/dist/types/lab/grafana-dashboard/icons.d.ts +5 -0
- package/dist/types/lab/grafana-dashboard/index.d.ts +12 -0
- package/dist/types/lab/grafana-dashboard/top-bar.d.ts +19 -0
- package/dist/types/lab/grafana-dashboard/top-bar.types.d.ts +4 -0
- package/dist/types/lab/grafana-dashboard/types.d.ts +8 -0
- package/dist/types/lab/media-player.core1.d.ts +14 -0
- package/dist/types/lab/media-player.muted.d.ts +10 -0
- package/dist/types/lab/media-player.units.d.ts +36 -0
- package/dist/types/lab/table-grid/create.table-grid.d.ts +4 -0
- package/dist/types/lab/table-grid/demo.d.ts +3 -0
- package/dist/types/lab/table-grid/dino.d.ts +6 -0
- package/dist/types/lab/table-grid/helpers.d.ts +11 -0
- package/dist/types/lab/table-grid/index.d.ts +2 -0
- package/dist/types/lab/table-grid/item-actions.d.ts +93 -0
- package/dist/types/lab/table-grid/toolbar-pannel.d.ts +27 -0
- package/dist/types/lab/table-grid/types.d.ts +56 -0
- package/dist/types/redux/create.hoc-lazy.d.ts +19 -0
- package/dist/types/redux/dino.d.ts +6 -0
- package/dist/types/redux/index.d.ts +4 -0
- package/dist/types/redux/types.d.ts +22 -0
- package/dist/types/redux/ui.error-page.d.ts +3 -0
- package/dist/types/redux/ui.units.d.ts +9 -0
- package/dist/types/table/context.d.ts +8 -0
- package/dist/types/table/create.action-row.d.ts +16 -0
- package/dist/types/table/create.table.d.ts +33 -0
- package/dist/types/table/custom.filter-operators.d.ts +2 -0
- package/dist/types/table/dino.d.ts +41 -0
- package/dist/types/table/helpers.d.ts +23 -0
- package/dist/types/table/index.d.ts +7 -0
- package/dist/types/table/model-filter.d.ts +38 -0
- package/dist/types/table/toolbar-pannel.d.ts +18 -0
- package/dist/types/table/types.d.ts +40 -0
- package/dist/types/table/ui.buttons.d.ts +16 -0
- package/dist/types/table/ui.units.d.ts +62 -0
- package/dist/types/utils/dayjs-config.d.ts +2 -0
- package/dist/types/utils/helpers.d.ts +35 -0
- package/dist/types/utils/index.d.ts +4 -0
- package/dist/types/utils/json-object.d.ts +9 -0
- package/dist/types/utils/mfe-events.d.ts +12 -0
- package/dist/types/utils/query-param.d.ts +25 -0
- package/dist/utils/dayjs-config.js.map +1 -0
- package/dist/{src/utils → utils}/helpers.js +11 -9
- package/dist/utils/helpers.js.map +1 -0
- package/dist/{src/utils → utils}/json-object.js +13 -13
- package/dist/utils/json-object.js.map +1 -0
- package/dist/{src/utils → utils}/query-param.js +17 -17
- package/dist/utils/query-param.js.map +1 -0
- package/package.json +18 -5
- package/dist/node_modules/.pnpm/@rollup_plugin-typescript@1_d0d2002d9033600b6738d939bd598bc6/node_modules/tslib/tslib.es6.js +0 -46
- package/dist/node_modules/.pnpm/@rollup_plugin-typescript@1_d0d2002d9033600b6738d939bd598bc6/node_modules/tslib/tslib.es6.js.map +0 -1
- package/dist/src/api-context/alert-global.js.map +0 -1
- package/dist/src/api-context/drawer-global.js.map +0 -1
- package/dist/src/api-context/global-modal.js.map +0 -1
- package/dist/src/api-context/popover-global.js.map +0 -1
- package/dist/src/api-context/popover.js +0 -86
- package/dist/src/api-context/popover.js.map +0 -1
- package/dist/src/api-context/ui.units.js.map +0 -1
- package/dist/src/components/copy-to-clipboard.js.map +0 -1
- package/dist/src/components/custom.breadcrumbs.js +0 -61
- package/dist/src/components/custom.breadcrumbs.js.map +0 -1
- package/dist/src/components/help-tooltip.js +0 -91
- package/dist/src/components/help-tooltip.js.map +0 -1
- package/dist/src/components/image-with-fallback.js +0 -48
- package/dist/src/components/image-with-fallback.js.map +0 -1
- package/dist/src/components/text-editor.js.map +0 -1
- package/dist/src/form/create.autocomplete.chips.js +0 -218
- package/dist/src/form/create.autocomplete.chips.js.map +0 -1
- package/dist/src/form/create.date-expired.js.map +0 -1
- package/dist/src/form/create.date-picker.js.map +0 -1
- package/dist/src/form/create.form-base.js.map +0 -1
- package/dist/src/form/create.form-comfirm.js +0 -119
- package/dist/src/form/create.form-comfirm.js.map +0 -1
- package/dist/src/form/create.form-grid-layout.js +0 -177
- package/dist/src/form/create.form-grid-layout.js.map +0 -1
- package/dist/src/form/create.form-grid-layout.units.js.map +0 -1
- package/dist/src/form/create.input-base.js +0 -260
- package/dist/src/form/create.input-base.js.map +0 -1
- package/dist/src/form/create.input.file.js +0 -74
- package/dist/src/form/create.input.file.js.map +0 -1
- package/dist/src/form/create.select-simple.js +0 -104
- package/dist/src/form/create.select-simple.js.map +0 -1
- package/dist/src/form/create.select-with-api.js +0 -271
- package/dist/src/form/create.select-with-api.js.map +0 -1
- package/dist/src/form/create.text-editor.js +0 -156
- package/dist/src/form/create.text-editor.js.map +0 -1
- package/dist/src/form/dino-form.js.map +0 -1
- package/dist/src/form/helper.js.map +0 -1
- package/dist/src/form/modal-wrapper.js.map +0 -1
- package/dist/src/form/validator.js.map +0 -1
- package/dist/src/hooks/index.js.map +0 -1
- package/dist/src/redux/create.hoc-lazy.js +0 -67
- package/dist/src/redux/create.hoc-lazy.js.map +0 -1
- package/dist/src/redux/dino.js.map +0 -1
- package/dist/src/redux/types.js.map +0 -1
- package/dist/src/redux/ui.error-page.js +0 -80
- package/dist/src/redux/ui.error-page.js.map +0 -1
- package/dist/src/redux/vector-404.webp.js.map +0 -1
- package/dist/src/table/context.js.map +0 -1
- package/dist/src/table/create.action-row.js +0 -135
- package/dist/src/table/create.action-row.js.map +0 -1
- package/dist/src/table/create.status-cell.js +0 -49
- package/dist/src/table/create.status-cell.js.map +0 -1
- package/dist/src/table/create.table.js +0 -233
- package/dist/src/table/create.table.js.map +0 -1
- package/dist/src/table/custom.filter-operators.js.map +0 -1
- package/dist/src/table/dino.js +0 -129
- package/dist/src/table/dino.js.map +0 -1
- package/dist/src/table/helpers.js.map +0 -1
- package/dist/src/table/model-filter.js.map +0 -1
- package/dist/src/table/toolbar-pannel.js +0 -134
- package/dist/src/table/toolbar-pannel.js.map +0 -1
- package/dist/src/table/ui.buttons.js +0 -60
- package/dist/src/table/ui.buttons.js.map +0 -1
- package/dist/src/table/ui.units.js +0 -201
- package/dist/src/table/ui.units.js.map +0 -1
- package/dist/src/utils/dayjs-config.js.map +0 -1
- package/dist/src/utils/helpers.js.map +0 -1
- package/dist/src/utils/json-object.js.map +0 -1
- package/dist/src/utils/query-param.js.map +0 -1
- package/rollup.config.js +0 -39
- package/src/@types/global.d.ts +0 -5
- package/src/api-context/alert-global.tsx +0 -174
- package/src/api-context/drawer-global.tsx +0 -116
- package/src/api-context/global-modal.tsx +0 -109
- package/src/api-context/index.ts +0 -13
- package/src/api-context/popover-global.tsx +0 -107
- package/src/api-context/popover.tsx +0 -89
- package/src/api-context/ui.units.tsx +0 -10
- package/src/components/copy-to-clipboard.tsx +0 -86
- package/src/components/custom.breadcrumbs.tsx +0 -67
- package/src/components/help-tooltip.tsx +0 -75
- package/src/components/image-with-fallback.tsx +0 -51
- package/src/components/index.tsx +0 -1
- package/src/components/input-debounce-timer.tsx +0 -138
- package/src/components/loading-buttons.tsx +0 -35
- package/src/components/text-editor.preview.tsx +0 -30
- package/src/components/text-editor.tsx +0 -125
- package/src/form/README.md +0 -55
- package/src/form/create.autocomplete.chips.tsx +0 -199
- package/src/form/create.date-expired.tsx +0 -195
- package/src/form/create.date-picker.tsx +0 -122
- package/src/form/create.form-base.tsx +0 -102
- package/src/form/create.form-comfirm.tsx +0 -83
- package/src/form/create.form-grid-layout.tsx +0 -170
- package/src/form/create.form-grid-layout.units.tsx +0 -37
- package/src/form/create.input-base.tsx +0 -222
- package/src/form/create.input.file.tsx +0 -76
- package/src/form/create.select-simple.tsx +0 -101
- package/src/form/create.select-with-api.tsx +0 -213
- package/src/form/create.text-editor.tsx +0 -161
- package/src/form/dino-form.tsx +0 -40
- package/src/form/helper.ts +0 -132
- package/src/form/index.ts +0 -12
- package/src/form/modal-wrapper.tsx +0 -75
- package/src/form/types.ts +0 -16
- package/src/form/validator.ts +0 -202
- package/src/hooks/index.ts +0 -44
- package/src/index.ts +0 -7
- package/src/lab/create.autocomplete.simple.tsx +0 -57
- package/src/lab/create.dino-store.ts +0 -59
- package/src/lab/create.multi-select-dropdown.tsx +0 -189
- package/src/lab/create.select-mul-with-api/index.tsx +0 -271
- package/src/lab/create.select-mul-with-api/table-custom.tsx +0 -194
- package/src/lab/create.select-mul-with-api/types.ts +0 -26
- package/src/lab/create.select-mul-with-api/ui.units.tsx +0 -163
- package/src/lab/filter-bar/base.tsx +0 -162
- package/src/lab/filter-bar/create.filter-bar.tsx +0 -190
- package/src/lab/filter-bar/create.filter-menu.tsx +0 -156
- package/src/lab/filter-bar/create.filter-panel.tsx +0 -95
- package/src/lab/filter-bar/create.filtered.tsx +0 -41
- package/src/lab/filter-bar/create.sort-menu.tsx +0 -43
- package/src/lab/filter-bar/demo.tsx +0 -50
- package/src/lab/filter-bar/index.ts +0 -6
- package/src/lab/filter-bar/types.ts +0 -105
- package/src/lab/filter-bar/ui.units.tsx +0 -70
- package/src/lab/grafana-dashboard/configs.ts +0 -43
- package/src/lab/grafana-dashboard/date-time-range/absolute-time-rage.tsx +0 -137
- package/src/lab/grafana-dashboard/date-time-range/helpers.ts +0 -126
- package/src/lab/grafana-dashboard/date-time-range/index.tsx +0 -62
- package/src/lab/grafana-dashboard/date-time-range/menu-wrap.tsx +0 -101
- package/src/lab/grafana-dashboard/date-time-range/quick-ranges.tsx +0 -161
- package/src/lab/grafana-dashboard/date-time-range/types.ts +0 -9
- package/src/lab/grafana-dashboard/date-time-range/units.tsx +0 -18
- package/src/lab/grafana-dashboard/helper.ts +0 -25
- package/src/lab/grafana-dashboard/hooks.tsx +0 -79
- package/src/lab/grafana-dashboard/icons.tsx +0 -67
- package/src/lab/grafana-dashboard/index.tsx +0 -120
- package/src/lab/grafana-dashboard/top-bar.tsx +0 -62
- package/src/lab/grafana-dashboard/top-bar.types.ts +0 -5
- package/src/lab/grafana-dashboard/types.ts +0 -8
- package/src/lab/media-player.core1.tsx +0 -273
- package/src/lab/media-player.muted.tsx +0 -62
- package/src/lab/media-player.units.ts +0 -80
- package/src/lab/table-grid/create.table-grid.tsx +0 -183
- package/src/lab/table-grid/demo.tsx +0 -53
- package/src/lab/table-grid/dino.tsx +0 -8
- package/src/lab/table-grid/helpers.tsx +0 -11
- package/src/lab/table-grid/index.ts +0 -3
- package/src/lab/table-grid/item-actions.tsx +0 -138
- package/src/lab/table-grid/toolbar-pannel.tsx +0 -98
- package/src/lab/table-grid/types.ts +0 -68
- package/src/redux/create.hoc-lazy.tsx +0 -80
- package/src/redux/dino.ts +0 -9
- package/src/redux/index.ts +0 -6
- package/src/redux/types.ts +0 -27
- package/src/redux/ui.error-page.tsx +0 -62
- package/src/redux/ui.units.tsx +0 -41
- package/src/redux/vector-404.webp +0 -0
- package/src/table/context.tsx +0 -16
- package/src/table/create.action-row.tsx +0 -91
- package/src/table/create.status-cell.tsx +0 -51
- package/src/table/create.table.tsx +0 -239
- package/src/table/custom.filter-operators.ts +0 -94
- package/src/table/dino.tsx +0 -120
- package/src/table/helpers.ts +0 -94
- package/src/table/index.ts +0 -13
- package/src/table/model-filter.ts +0 -43
- package/src/table/toolbar-pannel.tsx +0 -106
- package/src/table/types.ts +0 -50
- package/src/table/ui.buttons.tsx +0 -54
- package/src/table/ui.units.tsx +0 -189
- package/src/utils/dayjs-config.ts +0 -13
- package/src/utils/helpers.ts +0 -171
- package/src/utils/index.ts +0 -7
- package/src/utils/json-object.ts +0 -29
- package/src/utils/mfe-events.tsx +0 -34
- package/src/utils/query-param.ts +0 -129
- package/tsconfig.json +0 -20
- /package/dist/{src/redux → redux}/types.js +0 -0
- /package/dist/{src/redux → redux}/vector-404.webp.js +0 -0
- /package/dist/{src/table → table}/model-filter.js +0 -0
- /package/dist/{src/utils → utils}/dayjs-config.js +0 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,928 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React$1 from 'react';
|
|
3
|
+
import React__default, { Component, ReactNode, PropsWithChildren, FC, ComponentType } from 'react';
|
|
4
|
+
import { PopoverVirtualElement, PopoverProps, DrawerProps, SxProps, TypographyProps, TooltipProps, ButtonProps, Theme, TextFieldProps, BoxProps, RegularBreakpoints, Breakpoint, SelectProps, IconButtonProps } from '@mui/material';
|
|
5
|
+
import { AlertColor } from '@mui/material/Alert';
|
|
6
|
+
import { Dayjs } from 'dayjs';
|
|
7
|
+
export { default as dayjsCustom } from 'dayjs';
|
|
8
|
+
import { DatePickerProps } from '@mui/x-date-pickers';
|
|
9
|
+
import { GridValidRowModel, GridColDef, GridPaginationModel, GridLogicOperator, GridSortDirection, GridDensity, DataGridProps, GridFeatureMode, GridRowIdGetter, GridFilterOperator, GridValueFormatterParams, GridRenderCellParams, GridTreeNodeWithRender } from '@mui/x-data-grid';
|
|
10
|
+
import queryString from 'query-string';
|
|
11
|
+
|
|
12
|
+
interface IPopoverOptions {
|
|
13
|
+
anchorEl?: Element | (() => Element) | PopoverVirtualElement | (() => PopoverVirtualElement) | null;
|
|
14
|
+
popoverProps?: Omit<PopoverProps, 'open'>;
|
|
15
|
+
content: React__default.ReactNode;
|
|
16
|
+
}
|
|
17
|
+
type TShowPopover = (option: IPopoverOptions) => void;
|
|
18
|
+
type TClosePopover = (reason?: 'backdropClick' | 'escapeKeyDown') => void;
|
|
19
|
+
interface IApiPopoverContext {
|
|
20
|
+
showPopover: TShowPopover;
|
|
21
|
+
closePopover: TClosePopover;
|
|
22
|
+
}
|
|
23
|
+
declare const ApiPopoverContext: React__default.Context<IApiPopoverContext>;
|
|
24
|
+
declare const MapApiPopoverContext: (context: (state: IApiPopoverContext) => React__default.ReactNode) => react_jsx_runtime.JSX.Element;
|
|
25
|
+
interface IProps$2 {
|
|
26
|
+
}
|
|
27
|
+
interface IState$1 extends IPopoverOptions {
|
|
28
|
+
}
|
|
29
|
+
type TProps = React__default.PropsWithChildren<IProps$2>;
|
|
30
|
+
declare class ApiPopover extends Component<TProps, IState$1> implements IApiPopoverContext {
|
|
31
|
+
constructor(props: any);
|
|
32
|
+
render(): react_jsx_runtime.JSX.Element;
|
|
33
|
+
showPopover: (option: IPopoverOptions) => void;
|
|
34
|
+
timer: any;
|
|
35
|
+
closePopover: TClosePopover;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
interface IApiPopoverContextProps {
|
|
39
|
+
contextPopover: IApiPopoverContext;
|
|
40
|
+
}
|
|
41
|
+
declare const withApiPopoverContext: <P extends IApiPopoverContextProps>(Component: React__default.ComponentType<P>) => (props: Omit<P, "contextPopover">) => react_jsx_runtime.JSX.Element;
|
|
42
|
+
|
|
43
|
+
interface MessageData {
|
|
44
|
+
id: string;
|
|
45
|
+
text: string;
|
|
46
|
+
type: AlertColor;
|
|
47
|
+
duration?: number;
|
|
48
|
+
}
|
|
49
|
+
interface IApiAlert {
|
|
50
|
+
PushMessage: (data: MessageData) => void;
|
|
51
|
+
PushInfo: (data: string) => void;
|
|
52
|
+
PushError: (data: string) => void;
|
|
53
|
+
PushWarning: (data: string) => void;
|
|
54
|
+
PushSuccess: (data: string) => void;
|
|
55
|
+
}
|
|
56
|
+
interface IApiContext {
|
|
57
|
+
ApiAlert?: IApiAlert;
|
|
58
|
+
}
|
|
59
|
+
declare const ApiAlertContext: IApiContext;
|
|
60
|
+
declare function AlertGlobal(): react_jsx_runtime.JSX.Element;
|
|
61
|
+
|
|
62
|
+
interface AlertDialogProps {
|
|
63
|
+
IsOpen: boolean;
|
|
64
|
+
onClose?: () => void;
|
|
65
|
+
onAccept?: () => void;
|
|
66
|
+
Title: string;
|
|
67
|
+
Message: string;
|
|
68
|
+
}
|
|
69
|
+
declare const AlertDialog: React__default.FC<AlertDialogProps>;
|
|
70
|
+
|
|
71
|
+
interface IProps$1 {
|
|
72
|
+
}
|
|
73
|
+
interface IState {
|
|
74
|
+
title?: ReactNode;
|
|
75
|
+
icon?: ReactNode;
|
|
76
|
+
fullHeight?: boolean;
|
|
77
|
+
anchor?: DrawerProps['anchor'];
|
|
78
|
+
/** @default true */
|
|
79
|
+
backdropClickeable?: boolean;
|
|
80
|
+
renderContent?: () => ReactNode;
|
|
81
|
+
}
|
|
82
|
+
type TReason = 'backdropClick' | 'escapeKeyDown';
|
|
83
|
+
interface DrawerGlobalApiType {
|
|
84
|
+
open: (state: IState) => void;
|
|
85
|
+
close: (reason?: TReason) => void;
|
|
86
|
+
}
|
|
87
|
+
declare class DrawerGlobalProvider extends Component<IProps$1, IState> {
|
|
88
|
+
constructor(props: IProps$1);
|
|
89
|
+
close: (reason?: TReason) => void;
|
|
90
|
+
open: (state: IState) => void;
|
|
91
|
+
componentDidMount(): void;
|
|
92
|
+
render(): react_jsx_runtime.JSX.Element;
|
|
93
|
+
renderTitle: () => number | boolean | Iterable<React__default.ReactNode> | react_jsx_runtime.JSX.Element | null | undefined;
|
|
94
|
+
getClasses: () => string;
|
|
95
|
+
}
|
|
96
|
+
declare const DrawerGlobal: {
|
|
97
|
+
Provider: typeof DrawerGlobalProvider;
|
|
98
|
+
Api: DrawerGlobalApiType;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
interface GlobalModalState {
|
|
102
|
+
sx?: SxProps;
|
|
103
|
+
sxWrap?: SxProps;
|
|
104
|
+
/** @default true */
|
|
105
|
+
backdropActivated?: boolean;
|
|
106
|
+
onClose?: (reason?: TModalReason) => void;
|
|
107
|
+
renderContent?: () => React__default.ReactNode;
|
|
108
|
+
}
|
|
109
|
+
type TModalReason = 'backdropClick' | 'escapeKeyDown';
|
|
110
|
+
interface GlobalModalProps {
|
|
111
|
+
}
|
|
112
|
+
type TShowModal = (value: GlobalModalState) => void;
|
|
113
|
+
type TCloseModal = (event?: {}, reason?: TModalReason) => void;
|
|
114
|
+
interface IGlobalModalContext {
|
|
115
|
+
show: TShowModal;
|
|
116
|
+
close: TCloseModal;
|
|
117
|
+
}
|
|
118
|
+
declare const GlobalModalContext: React__default.Context<IGlobalModalContext>;
|
|
119
|
+
interface IMapGlobalModal {
|
|
120
|
+
context: IGlobalModalContext;
|
|
121
|
+
}
|
|
122
|
+
declare const MapGlobalModalContext: (context: (state: IGlobalModalContext) => React__default.ReactNode) => react_jsx_runtime.JSX.Element;
|
|
123
|
+
declare class GlobalModal extends Component<React__default.PropsWithChildren<GlobalModalProps>, GlobalModalState> implements IGlobalModalContext {
|
|
124
|
+
constructor(props: any);
|
|
125
|
+
show: TShowModal;
|
|
126
|
+
close: TCloseModal;
|
|
127
|
+
render(): react_jsx_runtime.JSX.Element;
|
|
128
|
+
renderContent: () => React__default.ReactNode;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
interface IApiGlobalModalContextProps {
|
|
132
|
+
contextGlobalModal: IGlobalModalContext;
|
|
133
|
+
}
|
|
134
|
+
declare const withApiGlobalModalContext: <P extends IApiGlobalModalContextProps>(Component: React__default.ComponentType<P>) => (props: Omit<P, "contextGlobalModal">) => react_jsx_runtime.JSX.Element;
|
|
135
|
+
declare const withApiGlobalModalConsumerContext: <P extends IApiGlobalModalContextProps>(Component: React__default.ComponentType<P>) => (props: Omit<P, "contextGlobalModal">) => react_jsx_runtime.JSX.Element;
|
|
136
|
+
|
|
137
|
+
interface PopoverGlobalState {
|
|
138
|
+
anchorEl?: Element | (() => Element) | PopoverVirtualElement | (() => PopoverVirtualElement) | null;
|
|
139
|
+
popoverProps?: Omit<PopoverProps, 'open'>;
|
|
140
|
+
content: React__default.ReactNode;
|
|
141
|
+
}
|
|
142
|
+
type OpenPopover = (value: PopoverGlobalState) => void;
|
|
143
|
+
type ClosePopover = (reason?: 'backdropClick' | 'escapeKeyDown') => void;
|
|
144
|
+
declare const PopoverGlobalApi: PopoverGlobalContext;
|
|
145
|
+
interface PopoverGlobalContext {
|
|
146
|
+
open: OpenPopover;
|
|
147
|
+
close: ClosePopover;
|
|
148
|
+
}
|
|
149
|
+
declare const PopoverGlobalContext: React__default.Context<PopoverGlobalContext>;
|
|
150
|
+
declare const MapPopoverGlobalContext: (context: (state: PopoverGlobalContext) => React__default.ReactNode) => react_jsx_runtime.JSX.Element;
|
|
151
|
+
interface IProps extends PropsWithChildren {
|
|
152
|
+
}
|
|
153
|
+
declare class PopoverGlobalProvider extends Component<IProps, PopoverGlobalState> {
|
|
154
|
+
constructor(props: any);
|
|
155
|
+
componentDidMount(): void;
|
|
156
|
+
render(): react_jsx_runtime.JSX.Element;
|
|
157
|
+
openPopover: OpenPopover;
|
|
158
|
+
timer: any;
|
|
159
|
+
closePopover: ClosePopover;
|
|
160
|
+
}
|
|
161
|
+
interface IPopoverGlobalContextProps {
|
|
162
|
+
contextPopover: PopoverGlobalContext;
|
|
163
|
+
}
|
|
164
|
+
declare const withPopoverGlobalContext: <P extends IPopoverGlobalContextProps>(Component: React__default.ComponentType<P>) => (props: Omit<P, "contextPopover">) => react_jsx_runtime.JSX.Element;
|
|
165
|
+
declare const PopoverGlobal: {
|
|
166
|
+
Provider: typeof PopoverGlobalProvider;
|
|
167
|
+
Api: PopoverGlobalContext;
|
|
168
|
+
Context: React__default.Context<PopoverGlobalContext>;
|
|
169
|
+
mapContext: (context: (state: PopoverGlobalContext) => React__default.ReactNode) => react_jsx_runtime.JSX.Element;
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
interface IBreadcrumbConfig {
|
|
173
|
+
label: string;
|
|
174
|
+
url?: string;
|
|
175
|
+
propsGetter?: () => TypographyProps;
|
|
176
|
+
onClick?: (event: React__default.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
177
|
+
}
|
|
178
|
+
interface IBreadcrumbsProps {
|
|
179
|
+
value?: IBreadcrumbConfig[];
|
|
180
|
+
}
|
|
181
|
+
declare const Breadcrumbs: FC<IBreadcrumbsProps>;
|
|
182
|
+
|
|
183
|
+
interface ICopyToClipboardProps {
|
|
184
|
+
value: string;
|
|
185
|
+
slots?: {
|
|
186
|
+
tooltipProps?: Partial<TooltipProps>;
|
|
187
|
+
button?: ComponentType<{
|
|
188
|
+
onClick: () => void;
|
|
189
|
+
copied?: boolean;
|
|
190
|
+
}>;
|
|
191
|
+
buttonProps?: ButtonProps;
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
interface ICopyToClipboardState {
|
|
195
|
+
showTooltip: boolean;
|
|
196
|
+
copied: boolean;
|
|
197
|
+
}
|
|
198
|
+
declare class CopyToClipboard extends Component<ICopyToClipboardProps, ICopyToClipboardState> {
|
|
199
|
+
constructor(props: ICopyToClipboardProps);
|
|
200
|
+
render(): react_jsx_runtime.JSX.Element;
|
|
201
|
+
renderIcon: () => react_jsx_runtime.JSX.Element;
|
|
202
|
+
handleClickCopy: () => void;
|
|
203
|
+
private debounceTime;
|
|
204
|
+
private onCopy;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
interface IImageWithFallbackPropsOwner {
|
|
208
|
+
src?: string;
|
|
209
|
+
alt?: string;
|
|
210
|
+
fallbackSrc: string;
|
|
211
|
+
loading?: ReactNode;
|
|
212
|
+
debounceDelay?: number;
|
|
213
|
+
}
|
|
214
|
+
type IImageProps = Omit<React__default.ImgHTMLAttributes<HTMLImageElement>, keyof IImageWithFallbackPropsOwner>;
|
|
215
|
+
interface IImageWithFallbackProps extends IImageProps, IImageWithFallbackPropsOwner {
|
|
216
|
+
}
|
|
217
|
+
declare const ImageWithFallback: FC<IImageWithFallbackProps>;
|
|
218
|
+
|
|
219
|
+
interface IHelpTooltipProps {
|
|
220
|
+
title: string;
|
|
221
|
+
small?: boolean;
|
|
222
|
+
sxIcon?: SxProps<Theme>;
|
|
223
|
+
}
|
|
224
|
+
declare const HelpTooltip: FC<PropsWithChildren<IHelpTooltipProps>>;
|
|
225
|
+
|
|
226
|
+
interface IHelpTooltipWrapProps {
|
|
227
|
+
content: ReactNode;
|
|
228
|
+
title: string;
|
|
229
|
+
children: React__default.ReactNode;
|
|
230
|
+
}
|
|
231
|
+
declare const HelpTooltipWrap: FC<IHelpTooltipWrapProps>;
|
|
232
|
+
|
|
233
|
+
declare const TextEditorPreview: FC<{
|
|
234
|
+
children: string;
|
|
235
|
+
}>;
|
|
236
|
+
|
|
237
|
+
declare const textEditorClasses: {
|
|
238
|
+
root: string;
|
|
239
|
+
fullscreen: string;
|
|
240
|
+
};
|
|
241
|
+
interface ITextEditorProps$1 {
|
|
242
|
+
id?: string;
|
|
243
|
+
name: string;
|
|
244
|
+
sx?: SxProps<Theme>;
|
|
245
|
+
readOnly?: boolean;
|
|
246
|
+
defautValue?: string;
|
|
247
|
+
error?: boolean;
|
|
248
|
+
onBlur?: () => void;
|
|
249
|
+
}
|
|
250
|
+
interface ITextEditorState$1 {
|
|
251
|
+
value: string;
|
|
252
|
+
}
|
|
253
|
+
declare class TextEditor extends Component<ITextEditorProps$1, ITextEditorState$1> {
|
|
254
|
+
constructor(props: ITextEditorProps$1);
|
|
255
|
+
handleChange: (value: string) => void;
|
|
256
|
+
id: number;
|
|
257
|
+
render(): react_jsx_runtime.JSX.Element;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
type IModelBase = {
|
|
261
|
+
[key: string]: any;
|
|
262
|
+
};
|
|
263
|
+
declare enum SingleRuleValidate {
|
|
264
|
+
Required = "Required",
|
|
265
|
+
Regex = "Regex",
|
|
266
|
+
RequiredValue = "RequiredValue",
|
|
267
|
+
Array = "Array",
|
|
268
|
+
Number = "Number",
|
|
269
|
+
Email = "Email",
|
|
270
|
+
PhoneNumber = "PhoneNumber",
|
|
271
|
+
Url = "Url",
|
|
272
|
+
File = "File",
|
|
273
|
+
FileRequired = "FileRequired",
|
|
274
|
+
Custom = "Custom"
|
|
275
|
+
}
|
|
276
|
+
interface IRuleOptions {
|
|
277
|
+
File: {
|
|
278
|
+
maxSize: number;
|
|
279
|
+
all?: boolean;
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
declare const mapRuleOptions: <TK extends "File">(key: TK, options?: IRuleOptions[TK] | undefined) => IRuleOptions[TK] | undefined;
|
|
283
|
+
interface IRuleOption<TModel = any> {
|
|
284
|
+
rule: SingleRuleValidate;
|
|
285
|
+
message?: string;
|
|
286
|
+
Value?: RegExp | ((value: any, model: TModel) => boolean) | number | Array<any> | boolean;
|
|
287
|
+
options?: any;
|
|
288
|
+
}
|
|
289
|
+
interface IConfigValue<TModel = any> {
|
|
290
|
+
Rules: IRuleOption<TModel>[];
|
|
291
|
+
label?: string;
|
|
292
|
+
}
|
|
293
|
+
interface IModelError {
|
|
294
|
+
message: string;
|
|
295
|
+
error: boolean;
|
|
296
|
+
}
|
|
297
|
+
type IFormValidatorConfig<TModel> = {
|
|
298
|
+
[key in keyof Extract<TModel, IModelBase>]?: IConfigValue<TModel>;
|
|
299
|
+
};
|
|
300
|
+
type IPartialError<TModel> = {
|
|
301
|
+
[key in keyof TModel]?: IRuleOption<TModel>[];
|
|
302
|
+
};
|
|
303
|
+
declare class FormValidator<TModel> {
|
|
304
|
+
configs: IFormValidatorConfig<TModel>;
|
|
305
|
+
constructor(configs: IFormValidatorConfig<TModel>);
|
|
306
|
+
static initial: <T>(configs: IFormValidatorConfig<T>) => FormValidator<T>;
|
|
307
|
+
AddRules: (key: keyof TModel, ...rule: IRuleOption<TModel>[]) => this;
|
|
308
|
+
Required: (RuleOption: IRuleOption, value: any) => boolean;
|
|
309
|
+
Regex: (RuleOption: IRuleOption, value: string, Regex: RegExp) => boolean;
|
|
310
|
+
RequiredValue: (RuleOption: IRuleOption, value: any) => boolean;
|
|
311
|
+
Custom: (RuleOption: IRuleOption, value: any, model: any) => boolean;
|
|
312
|
+
Array: (RuleOption: IRuleOption, value: any) => boolean;
|
|
313
|
+
Number: (RuleOption: IRuleOption, value: any) => boolean;
|
|
314
|
+
Email: (RuleOption: IRuleOption, value: any) => boolean;
|
|
315
|
+
PhoneNumber: (RuleOption: IRuleOption, value: any) => boolean;
|
|
316
|
+
Url: (RuleOption: IRuleOption, value: any) => boolean;
|
|
317
|
+
File: (RuleOption: IRuleOption, value: any) => boolean;
|
|
318
|
+
FileRequired: (RuleOption: IRuleOption, value: any) => boolean;
|
|
319
|
+
RenderMessage: (RuleOption: IRuleOption, key: string, label?: string) => IRuleOption<any>;
|
|
320
|
+
run: (model: TModel) => IPartialError<TModel>;
|
|
321
|
+
Executed: (Config: IConfigValue, valueField: any, model: any) => IRuleOption<any>[];
|
|
322
|
+
}
|
|
323
|
+
declare const createFormValidator: <TModel>() => FormValidator<Partial<TModel>>;
|
|
324
|
+
|
|
325
|
+
interface IFormBase<TModel> {
|
|
326
|
+
data?: Partial<TModel>;
|
|
327
|
+
messageErrors: IPartialError<TModel>;
|
|
328
|
+
onBlur: (keyName: keyof TModel) => void;
|
|
329
|
+
disabled?: boolean;
|
|
330
|
+
}
|
|
331
|
+
interface IFormInputBase<TModel, TSlots = any> extends Partial<IFormBase<TModel>> {
|
|
332
|
+
name?: keyof TModel;
|
|
333
|
+
label?: React.ReactNode;
|
|
334
|
+
placeholder?: string;
|
|
335
|
+
defaultValue?: any;
|
|
336
|
+
slots?: TSlots;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
interface ISelectWithApiOption<TOther = any> {
|
|
340
|
+
Id: string;
|
|
341
|
+
Name?: string;
|
|
342
|
+
Other?: TOther;
|
|
343
|
+
}
|
|
344
|
+
interface ISelectWithApiPropsSlots {
|
|
345
|
+
textFieldProps: TextFieldProps;
|
|
346
|
+
}
|
|
347
|
+
type ISelectWithApiFetchData<O extends ISelectWithApiOption> = (value?: string, signal?: AbortSignal) => Promise<O[]>;
|
|
348
|
+
interface ISelectWithApiProps<T, O extends ISelectWithApiOption> extends IFormInputBase<T>, ISelectWithApiParams<O> {
|
|
349
|
+
onChange?: (value: O | null) => void;
|
|
350
|
+
existedIds?: string[];
|
|
351
|
+
slots?: ISelectWithApiPropsSlots;
|
|
352
|
+
}
|
|
353
|
+
interface ISelectWithApiParams<O extends ISelectWithApiOption> {
|
|
354
|
+
fetchData?: ISelectWithApiFetchData<O>;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
interface InputBaseImage<T> extends Partial<IImageWithFallbackPropsOwner> {
|
|
358
|
+
srcValue?: (value: any, model?: Partial<T>) => string;
|
|
359
|
+
element?: React__default.ComponentType<{
|
|
360
|
+
value: any;
|
|
361
|
+
model?: Partial<T>;
|
|
362
|
+
}>;
|
|
363
|
+
mirror?: boolean;
|
|
364
|
+
}
|
|
365
|
+
interface IInputSlots<T> {
|
|
366
|
+
maxLength?: number;
|
|
367
|
+
textFieldProps?: TextFieldProps;
|
|
368
|
+
pastenable?: boolean;
|
|
369
|
+
imageLeft?: InputBaseImage<T>;
|
|
370
|
+
imageRight?: InputBaseImage<T>;
|
|
371
|
+
}
|
|
372
|
+
interface IInputProps<T> extends IFormInputBase<T> {
|
|
373
|
+
slots?: IInputSlots<T>;
|
|
374
|
+
}
|
|
375
|
+
interface IInputParams<T> extends IInputSlots<T> {
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
interface IDatePickerSlots {
|
|
379
|
+
defaultValue?: string;
|
|
380
|
+
minDate?: Dayjs;
|
|
381
|
+
minDateOffset?: number;
|
|
382
|
+
datePickerProps?: DatePickerProps<Dayjs>;
|
|
383
|
+
}
|
|
384
|
+
interface IDatePickerProps<T> extends IFormInputBase<T> {
|
|
385
|
+
format?: string;
|
|
386
|
+
slots?: Omit<IDatePickerSlots, 'defaultValue'>;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
interface IFormGridLayoutConfig<T> {
|
|
390
|
+
key: keyof T;
|
|
391
|
+
label?: string;
|
|
392
|
+
placeholder?: string;
|
|
393
|
+
reponsives?: RegularBreakpoints;
|
|
394
|
+
defaultValue?: any;
|
|
395
|
+
inputElement?: React__default.ComponentType<IFormInputBase<T>>;
|
|
396
|
+
}
|
|
397
|
+
type SubmitMappingEvent<T> = (value: Partial<T>, oldValue?: T) => Partial<T>;
|
|
398
|
+
interface IFormGridLayoutSlots<T> {
|
|
399
|
+
action?: React__default.ComponentType<IFormBase<T>>;
|
|
400
|
+
actionBefore?: JSX.Element;
|
|
401
|
+
contentBefore?: JSX.Element;
|
|
402
|
+
contentAfter?: JSX.Element;
|
|
403
|
+
inputVisibility?: Partial<Record<keyof T, boolean>>;
|
|
404
|
+
inputDisabled?: Partial<Record<keyof T, boolean>>;
|
|
405
|
+
closeState?: {
|
|
406
|
+
Success?: boolean;
|
|
407
|
+
Fail?: boolean;
|
|
408
|
+
};
|
|
409
|
+
contentProps?: BoxProps;
|
|
410
|
+
}
|
|
411
|
+
interface IFormGridLayoutParams<T> extends IFormGridLayoutSlots<T> {
|
|
412
|
+
configs: IFormGridLayoutConfig<T>[];
|
|
413
|
+
validate: FormValidator<Partial<T>>;
|
|
414
|
+
submitMapping?: SubmitMappingEvent<T>;
|
|
415
|
+
}
|
|
416
|
+
interface IFormGridLayoutProps<T> {
|
|
417
|
+
data?: T;
|
|
418
|
+
onSubmit: (value: Partial<T>, signal?: AbortSignal) => Promise<void>;
|
|
419
|
+
onError?: (error: any) => void;
|
|
420
|
+
onClose?: () => void;
|
|
421
|
+
sx?: SxProps<Theme>;
|
|
422
|
+
slots?: IFormGridLayoutSlots<T>;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
interface IFormComfirmParam<T> {
|
|
426
|
+
title?: string;
|
|
427
|
+
content: (value?: T) => JSX.Element;
|
|
428
|
+
colors?: {
|
|
429
|
+
yes?: 'inherit' | 'error' | 'primary' | 'secondary' | 'success' | 'info' | 'warning';
|
|
430
|
+
no?: 'inherit' | 'error' | 'primary' | 'secondary' | 'success' | 'info' | 'warning';
|
|
431
|
+
};
|
|
432
|
+
}
|
|
433
|
+
interface IFormComfirmProps<T> {
|
|
434
|
+
data?: T;
|
|
435
|
+
title?: string;
|
|
436
|
+
onSubmit: (value?: T) => Promise<void>;
|
|
437
|
+
onCancel?: () => void;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
interface FormBaseParam<TModel> {
|
|
441
|
+
validate?: FormValidator<Partial<TModel>>;
|
|
442
|
+
}
|
|
443
|
+
interface FormBaseProps<TModel> extends PropsWithChildren {
|
|
444
|
+
sx?: SxProps<Theme>;
|
|
445
|
+
validate?: FormValidator<Partial<TModel>>;
|
|
446
|
+
onSubmit: (data: Partial<TModel>, e: React__default.FormEvent<HTMLFormElement>) => Promise<void>;
|
|
447
|
+
}
|
|
448
|
+
interface IFormContextBase<TModel> {
|
|
449
|
+
modelState?: Partial<TModel>;
|
|
450
|
+
messageErrors: IPartialError<TModel>;
|
|
451
|
+
onBlur: (keyName: keyof TModel) => void;
|
|
452
|
+
setError: (keyName: keyof TModel, message: string) => void;
|
|
453
|
+
clearErrorAll: (keyName: keyof TModel) => void;
|
|
454
|
+
}
|
|
455
|
+
interface FormBaseResult<TModel> {
|
|
456
|
+
Form: ComponentType<FormBaseProps<TModel>>;
|
|
457
|
+
Validator?: FormValidator<Partial<TModel>>;
|
|
458
|
+
Context: React__default.Context<IFormContextBase<TModel>>;
|
|
459
|
+
contextMapping: (params: (context: IFormContextBase<TModel>) => JSX.Element) => JSX.Element;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
interface IFormModalWrapperProps extends PropsWithChildren {
|
|
463
|
+
title: string;
|
|
464
|
+
size?: Breakpoint;
|
|
465
|
+
fullHeight?: boolean;
|
|
466
|
+
onCloseClick?: () => void;
|
|
467
|
+
slots?: {
|
|
468
|
+
sxTopbarProps?: SxProps<Theme>;
|
|
469
|
+
beforeTitle?: JSX.Element;
|
|
470
|
+
};
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
interface IInputFileParams {
|
|
474
|
+
accept?: string;
|
|
475
|
+
multiple?: boolean;
|
|
476
|
+
}
|
|
477
|
+
declare function CreateInputFile<T>(params?: IInputFileParams): ComponentType<IFormInputBase<T>>;
|
|
478
|
+
|
|
479
|
+
interface ITextEditorParams {
|
|
480
|
+
id: string;
|
|
481
|
+
title: string;
|
|
482
|
+
}
|
|
483
|
+
interface ITextEditorProps<T> extends IFormInputBase<T> {
|
|
484
|
+
}
|
|
485
|
+
interface ITextEditorState {
|
|
486
|
+
isFullscreen: boolean;
|
|
487
|
+
}
|
|
488
|
+
declare function CreateTextEditor<T>(params: ITextEditorParams): {
|
|
489
|
+
new (props: ITextEditorProps<T>): {
|
|
490
|
+
contentRef: React__default.RefObject<HTMLDivElement | null>;
|
|
491
|
+
componentDidMount(): void;
|
|
492
|
+
componentWillUnmount(): void;
|
|
493
|
+
handleFullscreenChange: () => void;
|
|
494
|
+
handleFullscreenToggle: () => void;
|
|
495
|
+
getWrapClasses: () => string;
|
|
496
|
+
render(): react_jsx_runtime.JSX.Element;
|
|
497
|
+
context: unknown;
|
|
498
|
+
setState<K extends "isFullscreen">(state: ITextEditorState | ((prevState: Readonly<ITextEditorState>, props: Readonly<ITextEditorProps<T>>) => ITextEditorState | Pick<ITextEditorState, K> | null) | Pick<ITextEditorState, K> | null, callback?: (() => void) | undefined): void;
|
|
499
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
500
|
+
readonly props: Readonly<ITextEditorProps<T>>;
|
|
501
|
+
state: Readonly<ITextEditorState>;
|
|
502
|
+
refs: {
|
|
503
|
+
[key: string]: React__default.ReactInstance;
|
|
504
|
+
};
|
|
505
|
+
shouldComponentUpdate?(nextProps: Readonly<ITextEditorProps<T>>, nextState: Readonly<ITextEditorState>, nextContext: any): boolean;
|
|
506
|
+
componentDidCatch?(error: Error, errorInfo: React__default.ErrorInfo): void;
|
|
507
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<ITextEditorProps<T>>, prevState: Readonly<ITextEditorState>): any;
|
|
508
|
+
componentDidUpdate?(prevProps: Readonly<ITextEditorProps<T>>, prevState: Readonly<ITextEditorState>, snapshot?: any): void;
|
|
509
|
+
componentWillMount?(): void;
|
|
510
|
+
UNSAFE_componentWillMount?(): void;
|
|
511
|
+
componentWillReceiveProps?(nextProps: Readonly<ITextEditorProps<T>>, nextContext: any): void;
|
|
512
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<ITextEditorProps<T>>, nextContext: any): void;
|
|
513
|
+
componentWillUpdate?(nextProps: Readonly<ITextEditorProps<T>>, nextState: Readonly<ITextEditorState>, nextContext: any): void;
|
|
514
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<ITextEditorProps<T>>, nextState: Readonly<ITextEditorState>, nextContext: any): void;
|
|
515
|
+
};
|
|
516
|
+
contextType?: React__default.Context<any> | undefined;
|
|
517
|
+
};
|
|
518
|
+
|
|
519
|
+
interface IDateExpiredSlots<T> {
|
|
520
|
+
/** @default string */
|
|
521
|
+
type?: 'number' | 'string';
|
|
522
|
+
textFieldProps?: Partial<TextFieldProps>;
|
|
523
|
+
switchChecked?: boolean;
|
|
524
|
+
switchCheckedGetter?: (value: any, model?: Partial<T>) => boolean;
|
|
525
|
+
}
|
|
526
|
+
interface IDateExpiredProps<T> extends IFormInputBase<T> {
|
|
527
|
+
slots?: IDateExpiredSlots<T>;
|
|
528
|
+
}
|
|
529
|
+
declare function CreateDateExpired<T>(params?: IDateExpiredSlots<T>): React__default.ComponentType<IDateExpiredProps<T>>;
|
|
530
|
+
|
|
531
|
+
interface ISelectSimpleOption<T extends string = string> {
|
|
532
|
+
name: string;
|
|
533
|
+
value: T;
|
|
534
|
+
}
|
|
535
|
+
interface ISelectSimpleSlots {
|
|
536
|
+
selectProps?: Omit<SelectProps, 'variant'>;
|
|
537
|
+
}
|
|
538
|
+
interface ISelectSimpleProps<T> extends Partial<IFormInputBase<T>> {
|
|
539
|
+
options?: ISelectSimpleOption[];
|
|
540
|
+
onChange?: (value: ISelectSimpleOption) => void;
|
|
541
|
+
slots?: ISelectSimpleSlots;
|
|
542
|
+
fullWidth?: boolean;
|
|
543
|
+
}
|
|
544
|
+
interface ISelectSimpleParams extends ISelectSimpleSlots {
|
|
545
|
+
options?: ISelectSimpleOption[];
|
|
546
|
+
}
|
|
547
|
+
declare function CreateSelectSimple<T>(args?: ISelectSimpleParams): ComponentType<ISelectSimpleProps<T>>;
|
|
548
|
+
|
|
549
|
+
interface IAutocompleteChipParams {
|
|
550
|
+
optionItems?: string[];
|
|
551
|
+
limitTags?: number;
|
|
552
|
+
separator?: string;
|
|
553
|
+
saveLocalStorageByKey?: string;
|
|
554
|
+
}
|
|
555
|
+
interface IAutocompleteChipProps<T> extends IFormInputBase<T, IAutocompleteChipParams> {
|
|
556
|
+
}
|
|
557
|
+
declare function CreateAutocompleteChip<T>(params?: IAutocompleteChipParams): ComponentType<IAutocompleteChipProps<T>>;
|
|
558
|
+
|
|
559
|
+
declare class DinoFormBase {
|
|
560
|
+
ModalWrap: React$1.FC<IFormModalWrapperProps>;
|
|
561
|
+
BottomBarWrap: any;
|
|
562
|
+
FormValidator: typeof FormValidator;
|
|
563
|
+
validator: <T>(configs: IFormValidatorConfig<T>) => FormValidator<T>;
|
|
564
|
+
createFormBase: <TModel>(param?: FormBaseParam<TModel> | undefined) => FormBaseResult<TModel>;
|
|
565
|
+
createFormComfirm: <T = any>(param?: IFormComfirmParam<T> | undefined) => React$1.ComponentType<React$1.PropsWithChildren<IFormComfirmProps<T>>>;
|
|
566
|
+
createFormGridLayout: <T>(params: IFormGridLayoutParams<T>) => React$1.ComponentType<IFormGridLayoutProps<T>>;
|
|
567
|
+
createDateExpired: typeof CreateDateExpired;
|
|
568
|
+
createDatePicker: <T extends Object>(params?: IDatePickerSlots | undefined) => React$1.ComponentType<IDatePickerProps<T>>;
|
|
569
|
+
createAutocompleteChip: typeof CreateAutocompleteChip;
|
|
570
|
+
createInput: <T>(params?: IInputParams<T> | undefined) => React$1.ComponentType<IInputProps<T>>;
|
|
571
|
+
createInputFile: typeof CreateInputFile;
|
|
572
|
+
createSelectSimple: typeof CreateSelectSimple;
|
|
573
|
+
createSelectWithApi: <T, O extends ISelectWithApiOption<any> = ISelectWithApiOption<any>>(params?: ISelectWithApiParams<O> | undefined) => React$1.ComponentType<ISelectWithApiProps<T, O>>;
|
|
574
|
+
createTextEditor: typeof CreateTextEditor;
|
|
575
|
+
}
|
|
576
|
+
declare const DinoForm: DinoFormBase;
|
|
577
|
+
|
|
578
|
+
declare const getErrorMessage: <TModel>(MessageErrors: IPartialError<TModel> | undefined, key?: keyof TModel | undefined) => IModelError;
|
|
579
|
+
declare const convertFormDataToJson: <TModel>(form: FormData) => Partial<TModel>;
|
|
580
|
+
|
|
581
|
+
declare const useCheckScrolled: () => {
|
|
582
|
+
isScrolled: boolean;
|
|
583
|
+
};
|
|
584
|
+
declare const useDebounce: <T>(value: T, delay: number) => T;
|
|
585
|
+
|
|
586
|
+
declare enum ELazyStatus {
|
|
587
|
+
Loading = "Loading",
|
|
588
|
+
Loaded = "Loaded",
|
|
589
|
+
Error = "Error"
|
|
590
|
+
}
|
|
591
|
+
interface IDinoReduxState {
|
|
592
|
+
status: ELazyStatus;
|
|
593
|
+
requestedId?: string;
|
|
594
|
+
}
|
|
595
|
+
interface IReturnDispatch {
|
|
596
|
+
abort?: () => void;
|
|
597
|
+
}
|
|
598
|
+
interface IDinoReduxDispatch<P = any> {
|
|
599
|
+
fetchData?: (params?: P, signal?: AbortSignal) => IReturnDispatch;
|
|
600
|
+
setStatus: (status: ELazyStatus) => void;
|
|
601
|
+
}
|
|
602
|
+
interface IBaseActions<T, Id extends keyof T> {
|
|
603
|
+
create: (value: Partial<T>, signal?: AbortSignal) => Promise<void>;
|
|
604
|
+
update: (id: T[Id], value: Partial<T>, signal?: AbortSignal) => Promise<void>;
|
|
605
|
+
delete: (id: T[Id], value?: Partial<T>, signal?: AbortSignal) => Promise<void>;
|
|
606
|
+
}
|
|
607
|
+
type IDinoReduxActions<T, Id extends keyof T, K extends keyof IBaseActions<T, Id> = keyof IBaseActions<T, Id>> = Pick<IBaseActions<T, Id>, K>;
|
|
608
|
+
|
|
609
|
+
interface IErrorViewDefaultProps {
|
|
610
|
+
}
|
|
611
|
+
interface IHocLazyWrapperProps extends PropsWithChildren {
|
|
612
|
+
loading?: boolean;
|
|
613
|
+
backdrop?: boolean;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
interface IHocLazyBase<T> extends IDinoReduxState, IDinoReduxDispatch<T> {
|
|
617
|
+
}
|
|
618
|
+
interface IHocLazyBaseOptions {
|
|
619
|
+
ErrorScreen?: React__default.ComponentType<IErrorViewDefaultProps>;
|
|
620
|
+
LazySpinner: React__default.ComponentType<PropsWithChildren<IHocLazyWrapperProps>>;
|
|
621
|
+
}
|
|
622
|
+
interface IHocLazyOtherProps<T> {
|
|
623
|
+
param?: T;
|
|
624
|
+
}
|
|
625
|
+
interface IHocLazyOptions<T> extends IHocLazyOtherProps<T>, Omit<IHocLazyBaseOptions, 'LazySpinner'> {
|
|
626
|
+
LazySpinner?: React__default.ComponentType<PropsWithChildren<IHocLazyWrapperProps>>;
|
|
627
|
+
}
|
|
628
|
+
declare const EmptyComponent: React__default.FC<React__default.PropsWithChildren<any>>;
|
|
629
|
+
declare const defaultOptionHocLazy: IHocLazyBaseOptions;
|
|
630
|
+
declare const CreateHocLazy: <P extends IHocLazyBase<T>, T = any>(ChildComponent: React__default.ComponentType<P>, options?: IHocLazyOptions<T> | undefined) => React__default.ComponentType<P>;
|
|
631
|
+
|
|
632
|
+
declare class DinoReduxBase {
|
|
633
|
+
createHocLazy: <P extends IHocLazyBase<T>, T = any>(ChildComponent: React$1.ComponentType<P>, options?: IHocLazyOptions<T> | undefined) => React$1.ComponentType<P>;
|
|
634
|
+
}
|
|
635
|
+
declare const DinoRedux: DinoReduxBase;
|
|
636
|
+
|
|
637
|
+
type ICustomGridColDef<T extends GridValidRowModel> = {
|
|
638
|
+
[key in keyof T]?: Omit<GridColDef, 'field'>;
|
|
639
|
+
};
|
|
640
|
+
type ITableQueryDetail = 'filter' | 'quickSearch' | 'sort' | 'pagination' | undefined;
|
|
641
|
+
interface ICustomGridSortItem<T> {
|
|
642
|
+
field: keyof T;
|
|
643
|
+
sort: GridSortDirection;
|
|
644
|
+
}
|
|
645
|
+
type ICustomGridSortModel<T> = ICustomGridSortItem<T>[];
|
|
646
|
+
interface ICustomGridFilterItem<T> {
|
|
647
|
+
id?: number | string;
|
|
648
|
+
field: keyof T;
|
|
649
|
+
value?: any;
|
|
650
|
+
operator: GridLogicOperator;
|
|
651
|
+
}
|
|
652
|
+
interface ICustomGridFilterModel<T> {
|
|
653
|
+
items: ICustomGridFilterItem<T>[];
|
|
654
|
+
logicOperator?: GridLogicOperator;
|
|
655
|
+
quickFilterValues?: any[];
|
|
656
|
+
quickFilterLogicOperator?: GridLogicOperator;
|
|
657
|
+
quickFilterExcludeHiddenColumns?: boolean;
|
|
658
|
+
}
|
|
659
|
+
interface ITableQueryParams<T> {
|
|
660
|
+
pagination?: GridPaginationModel;
|
|
661
|
+
filter?: ICustomGridFilterModel<T>;
|
|
662
|
+
sort?: ICustomGridSortModel<T>;
|
|
663
|
+
loading?: boolean;
|
|
664
|
+
detail?: ITableQueryDetail;
|
|
665
|
+
}
|
|
666
|
+
interface ITableData<T> {
|
|
667
|
+
items?: T[];
|
|
668
|
+
rowTotal?: number;
|
|
669
|
+
}
|
|
670
|
+
interface ITableState<T> {
|
|
671
|
+
tableData: ITableData<T>;
|
|
672
|
+
tableQueryParams: ITableQueryParams<T>;
|
|
673
|
+
tableQueryThunk: ITableQueryParams<T>;
|
|
674
|
+
}
|
|
675
|
+
type ITableStateRedux<T, K extends keyof ITableState<T> = keyof ITableState<T>> = Pick<ITableState<T>, K>;
|
|
676
|
+
|
|
677
|
+
declare enum ELogic {
|
|
678
|
+
And = 0,
|
|
679
|
+
Or = 1
|
|
680
|
+
}
|
|
681
|
+
declare enum EOperator {
|
|
682
|
+
GreaterThan = 0,
|
|
683
|
+
LessThan = 1,
|
|
684
|
+
GreaterThanOrEqual = 2,
|
|
685
|
+
LessThanOrEqual = 3,
|
|
686
|
+
NotEqual = 4,
|
|
687
|
+
Equal = 5,
|
|
688
|
+
Contains = 6
|
|
689
|
+
}
|
|
690
|
+
declare enum EOrder {
|
|
691
|
+
Ascending = 0,
|
|
692
|
+
Descending = 1
|
|
693
|
+
}
|
|
694
|
+
interface IFieldFilter<T> {
|
|
695
|
+
Logic?: ELogic;
|
|
696
|
+
Operator?: EOperator;
|
|
697
|
+
FieldName: keyof T;
|
|
698
|
+
Value: string;
|
|
699
|
+
}
|
|
700
|
+
interface IScopeFilter<T> {
|
|
701
|
+
Logic?: ELogic;
|
|
702
|
+
Scopes: IPropFilter<T>[];
|
|
703
|
+
}
|
|
704
|
+
type IPropFilter<T> = IFieldFilter<T> | IScopeFilter<T>;
|
|
705
|
+
interface IPropOrderBy<T> {
|
|
706
|
+
Type: EOrder;
|
|
707
|
+
FieldName: keyof T;
|
|
708
|
+
}
|
|
709
|
+
interface IModelFilter<T> {
|
|
710
|
+
Page?: number;
|
|
711
|
+
Amount?: number;
|
|
712
|
+
PropFilters?: IPropFilter<T>[];
|
|
713
|
+
PropOrders?: IPropOrderBy<T>[];
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
interface ITableBaseContext {
|
|
717
|
+
showModal: TShowModal;
|
|
718
|
+
closeModal: TCloseModal;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
interface IActionRowProps<T> {
|
|
722
|
+
value: T;
|
|
723
|
+
formEdit?: (value: T, tableContext: ITableBaseContext) => React__default.ReactNode;
|
|
724
|
+
formDelete?: (value: T, tableContext: ITableBaseContext) => React__default.ReactNode;
|
|
725
|
+
after?: (value: T, tableContext: ITableBaseContext) => React__default.ReactNode;
|
|
726
|
+
before?: (value: T, tableContext: ITableBaseContext) => React__default.ReactNode;
|
|
727
|
+
wrapProps?: BoxProps;
|
|
728
|
+
buttonEditConfig?: GlobalModalState;
|
|
729
|
+
buttonDeleteConfig?: GlobalModalState;
|
|
730
|
+
}
|
|
731
|
+
declare function CreateActionRow<T>(params?: Omit<IActionRowProps<T>, 'value'>): ComponentType<IActionRowProps<T>>;
|
|
732
|
+
|
|
733
|
+
interface IToolbarPannelOptions {
|
|
734
|
+
searchInclude?: string[];
|
|
735
|
+
formCreate?: React__default.ReactNode;
|
|
736
|
+
afterAction?: React__default.ReactNode;
|
|
737
|
+
breadcrumbs?: IBreadcrumbConfig[];
|
|
738
|
+
}
|
|
739
|
+
interface IToolbarPannelProps extends IToolbarPannelOptions {
|
|
740
|
+
title?: React__default.ReactNode;
|
|
741
|
+
afterTitle?: React__default.ReactNode;
|
|
742
|
+
}
|
|
743
|
+
declare class ToolbarPannel extends Component<React__default.PropsWithChildren<IToolbarPannelProps>> {
|
|
744
|
+
render(): react_jsx_runtime.JSX.Element;
|
|
745
|
+
renderTitle: () => react_jsx_runtime.JSX.Element;
|
|
746
|
+
renderEndAdornment: () => react_jsx_runtime.JSX.Element;
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
interface ITableSlots<T> {
|
|
750
|
+
maxSelection?: number;
|
|
751
|
+
density?: GridDensity;
|
|
752
|
+
toolbar?: React__default.ComponentType<IToolbarPannelProps>;
|
|
753
|
+
actionRow?: React__default.ComponentType<IActionRowProps<T>>;
|
|
754
|
+
toolbarProps?: IToolbarPannelProps;
|
|
755
|
+
dataGridProps?: DataGridProps;
|
|
756
|
+
}
|
|
757
|
+
type ITableParamsSlots<T> = Pick<ITableSlots<T>, 'maxSelection' | 'toolbarProps' | 'dataGridProps'>;
|
|
758
|
+
interface ITableProps<T> {
|
|
759
|
+
data?: ITableData<T>;
|
|
760
|
+
query?: ITableQueryParams<T>;
|
|
761
|
+
onChange?: (query: ITableQueryParams<T>) => void;
|
|
762
|
+
onRowSelectionChange?: DataGridProps['onRowSelectionModelChange'];
|
|
763
|
+
slots?: ITableSlots<T>;
|
|
764
|
+
}
|
|
765
|
+
interface ITableParams<T extends GridValidRowModel> extends ITableParamsSlots<T> {
|
|
766
|
+
featureMode?: GridFeatureMode;
|
|
767
|
+
getRowId: GridRowIdGetter<T>;
|
|
768
|
+
columns: ICustomGridColDef<T>;
|
|
769
|
+
filterOperators?: (config: GridColDef) => GridFilterOperator[];
|
|
770
|
+
columnVisibilityModel?: Partial<Record<keyof T, boolean>>;
|
|
771
|
+
actionRow?: Omit<GridColDef, 'field'>;
|
|
772
|
+
}
|
|
773
|
+
declare function CreateTable<T extends GridValidRowModel>(params: ITableParams<T>): ComponentType<ITableProps<T>>;
|
|
774
|
+
|
|
775
|
+
type IStatusCellConfig<T extends string> = {
|
|
776
|
+
[key in T]: SxProps<Theme>;
|
|
777
|
+
};
|
|
778
|
+
interface IStatusCellOptions {
|
|
779
|
+
sx?: SxProps<Theme>;
|
|
780
|
+
}
|
|
781
|
+
interface IStatusCellProps<T extends string> extends PropsWithChildren {
|
|
782
|
+
value?: T;
|
|
783
|
+
title?: string;
|
|
784
|
+
sx?: SxProps<Theme>;
|
|
785
|
+
onClick?: TypographyProps['onClick'];
|
|
786
|
+
slots?: {
|
|
787
|
+
typographyProps?: TypographyProps;
|
|
788
|
+
};
|
|
789
|
+
}
|
|
790
|
+
interface CellBaseOptions {
|
|
791
|
+
openInNewTab?: boolean;
|
|
792
|
+
beforeLine?: boolean;
|
|
793
|
+
copyToClipboard?: boolean;
|
|
794
|
+
imageUrl?: string;
|
|
795
|
+
imageFallbackSrc?: string;
|
|
796
|
+
valueFormatter?: (value?: string) => string;
|
|
797
|
+
wrapProps?: BoxProps;
|
|
798
|
+
typographyProps?: TypographyProps;
|
|
799
|
+
}
|
|
800
|
+
interface CellChipsProps {
|
|
801
|
+
value?: string;
|
|
802
|
+
separator?: string;
|
|
803
|
+
maximum?: number;
|
|
804
|
+
}
|
|
805
|
+
interface CellDatePropsOwner {
|
|
806
|
+
formatString?: string;
|
|
807
|
+
showRelative?: boolean;
|
|
808
|
+
typographyProps?: TypographyProps;
|
|
809
|
+
styledGetter?: (value: any) => SxProps<Theme>;
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
interface IBtnFormDetailProps {
|
|
813
|
+
formDetail: React__default.ReactNode;
|
|
814
|
+
onOpenModal?: (event: React__default.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
815
|
+
onCloseModal?: (reason?: TModalReason) => void;
|
|
816
|
+
}
|
|
817
|
+
interface IBtnDetailProps {
|
|
818
|
+
onClick?: IconButtonProps['onClick'];
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
type RenderCellBaseParams<T> = Omit<CellBaseOptions, 'imageUrl'> & {
|
|
822
|
+
imageUrl?: (value: any, model: T) => string;
|
|
823
|
+
valueFormatter?: (value: any, model: T) => string;
|
|
824
|
+
};
|
|
825
|
+
interface FormatterDateOptions {
|
|
826
|
+
formatString?: string;
|
|
827
|
+
showRelative?: boolean;
|
|
828
|
+
}
|
|
829
|
+
declare class DinoTableBase {
|
|
830
|
+
createTable: typeof CreateTable;
|
|
831
|
+
createActionRow: typeof CreateActionRow;
|
|
832
|
+
setUrlQuery: <TModel>(tableInfo: Partial<ITableQueryParams<TModel>>, defaultValue: ITableQueryParams<TModel>) => void;
|
|
833
|
+
getUrlQuery: <TModel>(defaultValue: ITableQueryParams<TModel>) => ITableQueryParams<TModel>;
|
|
834
|
+
mapContext: (context: (context: ITableBaseContext) => React$1.ReactNode) => react_jsx_runtime.JSX.Element;
|
|
835
|
+
ToolbarPannel: typeof ToolbarPannel;
|
|
836
|
+
createToolbar: (props: IToolbarPannelProps) => FC<IToolbarPannelProps>;
|
|
837
|
+
BtnFormDetail: FC<IBtnFormDetailProps>;
|
|
838
|
+
BtnDetail: FC<IBtnDetailProps>;
|
|
839
|
+
createBreadcrumbConfigs: (value: IBreadcrumbConfig[]) => IBreadcrumbConfig[];
|
|
840
|
+
createBreadcrumbs: (value: IBreadcrumbConfig[]) => FC;
|
|
841
|
+
createStatusCell: <T extends string>(config: IStatusCellConfig<T>, options?: IStatusCellOptions | undefined) => React$1.ComponentType<IStatusCellProps<T>>;
|
|
842
|
+
formatterDate: (value: any, options?: FormatterDateOptions) => string;
|
|
843
|
+
valueFormatterDate: (options?: FormatterDateOptions) => (params: GridValueFormatterParams<any>) => string;
|
|
844
|
+
renderCellChips: (params?: CellChipsProps) => (tableRow: GridRenderCellParams<any, any, any, GridTreeNodeWithRender>) => react_jsx_runtime.JSX.Element;
|
|
845
|
+
renderCellStatus: <E extends string>(config: IStatusCellConfig<E>, options?: IStatusCellOptions) => (tableRow: GridRenderCellParams<any, any, any, GridTreeNodeWithRender>) => react_jsx_runtime.JSX.Element;
|
|
846
|
+
renderCellBase: <T = any>(options?: RenderCellBaseParams<T> | undefined) => (tableRow: GridRenderCellParams<any, any, any, GridTreeNodeWithRender>) => react_jsx_runtime.JSX.Element;
|
|
847
|
+
renderCellImage: <T>(selectImage: (value: T) => T[keyof T], options?: {
|
|
848
|
+
fallbackSrc?: string;
|
|
849
|
+
}) => (tableRow: GridRenderCellParams<any, any, any, GridTreeNodeWithRender>) => react_jsx_runtime.JSX.Element;
|
|
850
|
+
renderCellDate: (params?: CellDatePropsOwner) => (tableRow: GridRenderCellParams<any, any, any, GridTreeNodeWithRender>) => react_jsx_runtime.JSX.Element;
|
|
851
|
+
}
|
|
852
|
+
declare const DinoTable: DinoTableBase;
|
|
853
|
+
|
|
854
|
+
declare const dinoTableClasses: {
|
|
855
|
+
whiteSpacePre: string;
|
|
856
|
+
};
|
|
857
|
+
|
|
858
|
+
declare const sleep: (sec: number) => Promise<unknown>;
|
|
859
|
+
declare const fetchDelay: <TModel>(action: () => Promise<TModel>, sec: number) => Promise<TModel>;
|
|
860
|
+
declare const windowScrollToTop: (options?: ScrollToOptions, delay?: number) => void;
|
|
861
|
+
declare const mergeClasses: (...classes: string[]) => string;
|
|
862
|
+
declare const encodeBase64: (input: string) => string;
|
|
863
|
+
declare const decodeBase64: (encoded: string) => string | undefined;
|
|
864
|
+
declare const tryParseObject: <T>(value: any, defaultValue: T) => T;
|
|
865
|
+
declare const tryParseArray: <T>(value: any, defaultValue?: T[]) => T[];
|
|
866
|
+
declare const tryParseIntRequired: (value: any, defaultValue: number) => number;
|
|
867
|
+
type DeepPartial<T> = {
|
|
868
|
+
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
869
|
+
} | undefined;
|
|
870
|
+
declare const mergeObjects: <T>(...objects: DeepPartial<T>[]) => T;
|
|
871
|
+
declare const formatFileSize: (sizeInKb: number) => string;
|
|
872
|
+
declare const formatCurrency: (value?: any, prefix?: string, suffix?: string) => string;
|
|
873
|
+
declare const formatNumberWithCommas: (number: number) => string;
|
|
874
|
+
declare const formatCapitalizeFirstText: (value?: string) => string;
|
|
875
|
+
declare const formatDatetimeStyle: {
|
|
876
|
+
style1: string;
|
|
877
|
+
style2: string;
|
|
878
|
+
style3: string;
|
|
879
|
+
};
|
|
880
|
+
/**
|
|
881
|
+
* Formats a datetime string using one of the predefined styles.
|
|
882
|
+
*
|
|
883
|
+
* Available format styles:
|
|
884
|
+
* - style1: DD/MM/YYYY HH:mm → e.g., '25/04/2025 14:30'
|
|
885
|
+
* - style2: 'MMMM D, YYYY' → e.g., 'April 25, 2025'
|
|
886
|
+
* - style2: 'MM-DD-YYYY' → e.g., '04-25-2025'
|
|
887
|
+
* @param value - A datetime string (ISO format or any format parsable by dayjs).
|
|
888
|
+
* @param format - Format style key: 'style1' or 'style2'. Defaults to 'style1'.
|
|
889
|
+
* @returns A formatted datetime string, or 'unknown' if the input is invalid or unparsable.
|
|
890
|
+
*/
|
|
891
|
+
declare const formatDatetime: (value: string, format?: keyof typeof formatDatetimeStyle) => string;
|
|
892
|
+
|
|
893
|
+
declare class JObject {
|
|
894
|
+
private value;
|
|
895
|
+
constructor(value?: any);
|
|
896
|
+
static fromJson(value?: any): JObject;
|
|
897
|
+
toValue: <T extends Record<string, any>, TK extends keyof T = keyof T>(key: TK) => T[TK] | undefined;
|
|
898
|
+
toJObject: <T extends Record<string, any>, TK extends keyof T = keyof T>(key: TK) => JObject;
|
|
899
|
+
setValue: <T extends Record<string, any>, TK extends keyof T = keyof T>(key: TK, value: any) => void;
|
|
900
|
+
toObject: <T>() => Partial<T>;
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
declare class QueryParamBase {
|
|
904
|
+
private _GetValues;
|
|
905
|
+
private _GetValuesMap;
|
|
906
|
+
private _GetkeysMap;
|
|
907
|
+
private getPath;
|
|
908
|
+
stringify: <TParam extends Record<string, any> = any>(param: TParam) => string;
|
|
909
|
+
Replace<TParam extends {} = any, TState = any>(param: TParam, state?: TState): void;
|
|
910
|
+
Patch<TParam extends {
|
|
911
|
+
[key: string]: any;
|
|
912
|
+
} = any, TState = any>(param: TParam, state?: TState): void;
|
|
913
|
+
ReplacePatch<TParam extends {
|
|
914
|
+
[key: string]: any;
|
|
915
|
+
} = any, TState = any>(param: TParam, state?: TState): void;
|
|
916
|
+
Put<TParam extends {} = any, TState = any>(param: TParam, state?: TState): void;
|
|
917
|
+
Deletes<TValue extends {} = any>(...keys: (keyof TValue)[]): void;
|
|
918
|
+
ReplaceDeletes<TValue extends {} = any>(...keys: (keyof TValue)[]): void;
|
|
919
|
+
ReplaceDeletesWithState<TValue extends {} = any, TState = any>(keys: (keyof TValue)[], state?: TState): void;
|
|
920
|
+
DeletesWithState<TValue extends {} = any, TState = any>(keys: (keyof TValue)[], state?: TState): void;
|
|
921
|
+
DeleteAll(): void;
|
|
922
|
+
GetAll: () => queryString.ParsedQuery<string>;
|
|
923
|
+
Gets<TValue extends {} = any>(...keys: (keyof TValue)[]): Partial<TValue>;
|
|
924
|
+
}
|
|
925
|
+
declare const QueryParam: QueryParamBase;
|
|
926
|
+
|
|
927
|
+
export { AlertDialog, AlertGlobal, ApiAlertContext, ApiPopover, ApiPopoverContext, Breadcrumbs, CopyToClipboard, CreateHocLazy, CreateTable, DinoForm, DinoRedux, DinoTable, DrawerGlobal, ELazyStatus, ELogic, EOperator, EOrder, EmptyComponent, FormValidator, GlobalModal, GlobalModalContext, HelpTooltip, HelpTooltipWrap, ImageWithFallback, JObject, MapApiPopoverContext, MapGlobalModalContext, MapPopoverGlobalContext, PopoverGlobal, PopoverGlobalApi, PopoverGlobalContext, PopoverGlobalProvider, QueryParam, SingleRuleValidate, TextEditor, TextEditorPreview, convertFormDataToJson, createFormValidator, decodeBase64, defaultOptionHocLazy, dinoTableClasses, encodeBase64, fetchDelay, formatCapitalizeFirstText, formatCurrency, formatDatetime, formatFileSize, formatNumberWithCommas, getErrorMessage, mapRuleOptions, mergeClasses, mergeObjects, sleep, textEditorClasses, tryParseArray, tryParseIntRequired, tryParseObject, useCheckScrolled, useDebounce, windowScrollToTop, withApiGlobalModalConsumerContext, withApiGlobalModalContext, withApiPopoverContext, withPopoverGlobalContext };
|
|
928
|
+
export type { ClosePopover, GlobalModalState, IActionRowProps, IApiContext, IApiGlobalModalContextProps, IApiPopoverContext, IApiPopoverContextProps, IBaseActions, IBreadcrumbConfig, IBreadcrumbsProps, IConfigValue, ICopyToClipboardProps, ICopyToClipboardState, ICustomGridColDef, ICustomGridFilterItem, ICustomGridFilterModel, ICustomGridSortItem, ICustomGridSortModel, IDinoReduxActions, IDinoReduxDispatch, IDinoReduxState, IFieldFilter, IFormBase, IFormInputBase, IFormValidatorConfig, IGlobalModalContext, IHelpTooltipProps, IHelpTooltipWrapProps, IHocLazyBase, IHocLazyBaseOptions, IHocLazyOptions, IHocLazyOtherProps, IImageProps, IImageWithFallbackProps, IImageWithFallbackPropsOwner, IMapGlobalModal, IModelBase, IModelError, IModelFilter, IPartialError, IPopoverGlobalContextProps, IPopoverOptions, IPropFilter, IPropOrderBy, IReturnDispatch, IRuleOption, IRuleOptions, IScopeFilter, ISelectWithApiOption, IStatusCellConfig, ITableData, ITableQueryDetail, ITableQueryParams, ITableState, ITableStateRedux, ITextEditorProps$1 as ITextEditorProps, ITextEditorState$1 as ITextEditorState, InputBaseImage, OpenPopover, PopoverGlobalState, TCloseModal, TClosePopover, TModalReason, TShowModal, TShowPopover };
|