@things-factory/meta-ui 9.0.0-beta.27 → 9.0.0-beta.29
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-client/bootstrap.d.ts +7 -0
- package/dist-client/bootstrap.js +142 -0
- package/dist-client/bootstrap.js.map +1 -0
- package/dist-client/component/filter/filter-form-meta-code-select.d.ts +4 -0
- package/dist-client/component/filter/filter-form-meta-code-select.js +80 -0
- package/dist-client/component/filter/filter-form-meta-code-select.js.map +1 -0
- package/dist-client/component/filter/filter-form-meta-object-select.d.ts +4 -0
- package/dist-client/component/filter/filter-form-meta-object-select.js +82 -0
- package/dist-client/component/filter/filter-form-meta-object-select.js.map +1 -0
- package/dist-client/component/filter/filter-grist-meta-code-select.d.ts +3 -0
- package/dist-client/component/filter/filter-grist-meta-code-select.js +76 -0
- package/dist-client/component/filter/filter-grist-meta-code-select.js.map +1 -0
- package/dist-client/component/filter/filter-grist-meta-object-select.d.ts +3 -0
- package/dist-client/component/filter/filter-grist-meta-object-select.js +81 -0
- package/dist-client/component/filter/filter-grist-meta-object-select.js.map +1 -0
- package/dist-client/component/grist/editor/grist-editor-code-input.d.ts +15 -0
- package/dist-client/component/grist/editor/grist-editor-code-input.js +81 -0
- package/dist-client/component/grist/editor/grist-editor-code-input.js.map +1 -0
- package/dist-client/component/grist/editor/grist-editor-meta-code-selector.d.ts +15 -0
- package/dist-client/component/grist/editor/grist-editor-meta-code-selector.js +130 -0
- package/dist-client/component/grist/editor/grist-editor-meta-code-selector.js.map +1 -0
- package/dist-client/component/grist/editor/grist-editor-meta-object-selector.d.ts +15 -0
- package/dist-client/component/grist/editor/grist-editor-meta-object-selector.js +98 -0
- package/dist-client/component/grist/editor/grist-editor-meta-object-selector.js.map +1 -0
- package/dist-client/component/grist/renderer/grist-renderer-code-input.d.ts +1 -0
- package/dist-client/component/grist/renderer/grist-renderer-code-input.js +19 -0
- package/dist-client/component/grist/renderer/grist-renderer-code-input.js.map +1 -0
- package/dist-client/component/grist/renderer/grist-renderer-meta-code-selector.d.ts +1 -0
- package/dist-client/component/grist/renderer/grist-renderer-meta-code-selector.js +29 -0
- package/dist-client/component/grist/renderer/grist-renderer-meta-code-selector.js.map +1 -0
- package/dist-client/component/grist/renderer/grist-renderer-meta-object-selector.d.ts +1 -0
- package/dist-client/component/grist/renderer/grist-renderer-meta-object-selector.js +23 -0
- package/dist-client/component/grist/renderer/grist-renderer-meta-object-selector.js.map +1 -0
- package/dist-client/component/popup/code-input-editor-popup.d.ts +36 -0
- package/dist-client/component/popup/code-input-editor-popup.js +103 -0
- package/dist-client/component/popup/code-input-editor-popup.js.map +1 -0
- package/dist-client/component/popup/file-upload-popup.d.ts +1 -0
- package/dist-client/component/popup/file-upload-popup.js +118 -0
- package/dist-client/component/popup/file-upload-popup.js.map +1 -0
- package/dist-client/component/popup/meta-object-selector-popup.d.ts +60 -0
- package/dist-client/component/popup/meta-object-selector-popup.js +300 -0
- package/dist-client/component/popup/meta-object-selector-popup.js.map +1 -0
- package/dist-client/component/popup/record-based-code-editor-popup.d.ts +52 -0
- package/dist-client/component/popup/record-based-code-editor-popup.js +174 -0
- package/dist-client/component/popup/record-based-code-editor-popup.js.map +1 -0
- package/dist-client/dynamic-menus.d.ts +1 -0
- package/dist-client/dynamic-menus.js +16 -0
- package/dist-client/dynamic-menus.js.map +1 -0
- package/dist-client/index.d.ts +17 -0
- package/dist-client/index.js +18 -0
- package/dist-client/index.js.map +1 -0
- package/dist-client/load-components.d.ts +15 -0
- package/dist-client/load-components.js +17 -0
- package/dist-client/load-components.js.map +1 -0
- package/dist-client/mixin/meta-base-mixin.d.ts +89 -0
- package/dist-client/mixin/meta-base-mixin.js +287 -0
- package/dist-client/mixin/meta-base-mixin.js.map +1 -0
- package/dist-client/mixin/meta-basic-grist-mixin.d.ts +108 -0
- package/dist-client/mixin/meta-basic-grist-mixin.js +253 -0
- package/dist-client/mixin/meta-basic-grist-mixin.js.map +1 -0
- package/dist-client/mixin/meta-button-mixin.d.ts +106 -0
- package/dist-client/mixin/meta-button-mixin.js +106 -0
- package/dist-client/mixin/meta-button-mixin.js.map +1 -0
- package/dist-client/mixin/meta-form-mixin.d.ts +153 -0
- package/dist-client/mixin/meta-form-mixin.js +373 -0
- package/dist-client/mixin/meta-form-mixin.js.map +1 -0
- package/dist-client/mixin/meta-grist-tab-mixin.d.ts +132 -0
- package/dist-client/mixin/meta-grist-tab-mixin.js +301 -0
- package/dist-client/mixin/meta-grist-tab-mixin.js.map +1 -0
- package/dist-client/mixin/meta-main-tab-mixin.d.ts +109 -0
- package/dist-client/mixin/meta-main-tab-mixin.js +242 -0
- package/dist-client/mixin/meta-main-tab-mixin.js.map +1 -0
- package/dist-client/mixin/meta-master-detail-mixin.d.ts +172 -0
- package/dist-client/mixin/meta-master-detail-mixin.js +359 -0
- package/dist-client/mixin/meta-master-detail-mixin.js.map +1 -0
- package/dist-client/mixin/meta-service-mixin.d.ts +66 -0
- package/dist-client/mixin/meta-service-mixin.js +268 -0
- package/dist-client/mixin/meta-service-mixin.js.map +1 -0
- package/dist-client/mixin/meta-tab-detail-mixin.d.ts +110 -0
- package/dist-client/mixin/meta-tab-detail-mixin.js +255 -0
- package/dist-client/mixin/meta-tab-detail-mixin.js.map +1 -0
- package/dist-client/mixin/meta-tab-mixin.d.ts +108 -0
- package/dist-client/mixin/meta-tab-mixin.js +168 -0
- package/dist-client/mixin/meta-tab-mixin.js.map +1 -0
- package/dist-client/pages/activity/meta-activity-define-page.d.ts +1 -0
- package/dist-client/pages/activity/meta-activity-define-page.js +398 -0
- package/dist-client/pages/activity/meta-activity-define-page.js.map +1 -0
- package/dist-client/pages/activity/meta-activity-list-page.d.ts +1 -0
- package/dist-client/pages/activity/meta-activity-list-page.js +223 -0
- package/dist-client/pages/activity/meta-activity-list-page.js.map +1 -0
- package/dist-client/pages/activity/meta-activity-viewer-element.d.ts +25 -0
- package/dist-client/pages/activity/meta-activity-viewer-element.js +29 -0
- package/dist-client/pages/activity/meta-activity-viewer-element.js.map +1 -0
- package/dist-client/pages/activity/meta-activity-writer-element.d.ts +27 -0
- package/dist-client/pages/activity/meta-activity-writer-element.js +38 -0
- package/dist-client/pages/activity/meta-activity-writer-element.js.map +1 -0
- package/dist-client/pages/activity/meta-activiy-mixin.d.ts +17 -0
- package/dist-client/pages/activity/meta-activiy-mixin.js +70 -0
- package/dist-client/pages/activity/meta-activiy-mixin.js.map +1 -0
- package/dist-client/pages/button-role/button-role-detail.d.ts +74 -0
- package/dist-client/pages/button-role/button-role-detail.js +39 -0
- package/dist-client/pages/button-role/button-role-detail.js.map +1 -0
- package/dist-client/pages/button-role/button-role-page.d.ts +82 -0
- package/dist-client/pages/button-role/button-role-page.js +21 -0
- package/dist-client/pages/button-role/button-role-page.js.map +1 -0
- package/dist-client/pages/doc-number/doc-number-page.d.ts +1 -0
- package/dist-client/pages/doc-number/doc-number-page.js +20 -0
- package/dist-client/pages/doc-number/doc-number-page.js.map +1 -0
- package/dist-client/pages/doc-number/next-doc-number-popup.d.ts +1 -0
- package/dist-client/pages/doc-number/next-doc-number-popup.js +21 -0
- package/dist-client/pages/doc-number/next-doc-number-popup.js.map +1 -0
- package/dist-client/pages/entity/config-entity.d.ts +1 -0
- package/dist-client/pages/entity/config-entity.js +801 -0
- package/dist-client/pages/entity/config-entity.js.map +1 -0
- package/dist-client/pages/entity/main-menu-selector.d.ts +61 -0
- package/dist-client/pages/entity/main-menu-selector.js +233 -0
- package/dist-client/pages/entity/main-menu-selector.js.map +1 -0
- package/dist-client/pages/history/history-copy-list-popup.d.ts +50 -0
- package/dist-client/pages/history/history-copy-list-popup.js +122 -0
- package/dist-client/pages/history/history-copy-list-popup.js.map +1 -0
- package/dist-client/pages/history/history-json-list-popup.d.ts +50 -0
- package/dist-client/pages/history/history-json-list-popup.js +132 -0
- package/dist-client/pages/history/history-json-list-popup.js.map +1 -0
- package/dist-client/pages/menu/dynamic-menu-template.d.ts +1 -0
- package/dist-client/pages/menu/dynamic-menu-template.js +80 -0
- package/dist-client/pages/menu/dynamic-menu-template.js.map +1 -0
- package/dist-client/pages/menu/dynamic-menu.d.ts +83 -0
- package/dist-client/pages/menu/dynamic-menu.js +663 -0
- package/dist-client/pages/menu/dynamic-menu.js.map +1 -0
- package/dist-client/pages/menu/export-menu-popup.d.ts +55 -0
- package/dist-client/pages/menu/export-menu-popup.js +392 -0
- package/dist-client/pages/menu/export-menu-popup.js.map +1 -0
- package/dist-client/pages/meta-form-element.d.ts +63 -0
- package/dist-client/pages/meta-form-element.js +8 -0
- package/dist-client/pages/meta-form-element.js.map +1 -0
- package/dist-client/pages/meta-grist-element.d.ts +70 -0
- package/dist-client/pages/meta-grist-element.js +11 -0
- package/dist-client/pages/meta-grist-element.js.map +1 -0
- package/dist-client/pages/meta-grist-page.d.ts +70 -0
- package/dist-client/pages/meta-grist-page.js +14 -0
- package/dist-client/pages/meta-grist-page.js.map +1 -0
- package/dist-client/pages/meta-grist-tab-element.d.ts +82 -0
- package/dist-client/pages/meta-grist-tab-element.js +14 -0
- package/dist-client/pages/meta-grist-tab-element.js.map +1 -0
- package/dist-client/pages/meta-grist-tab-page.d.ts +82 -0
- package/dist-client/pages/meta-grist-tab-page.js +14 -0
- package/dist-client/pages/meta-grist-tab-page.js.map +1 -0
- package/dist-client/pages/meta-main-tab-element.d.ts +75 -0
- package/dist-client/pages/meta-main-tab-element.js +11 -0
- package/dist-client/pages/meta-main-tab-element.js.map +1 -0
- package/dist-client/pages/meta-main-tab-page.d.ts +75 -0
- package/dist-client/pages/meta-main-tab-page.js +14 -0
- package/dist-client/pages/meta-main-tab-page.js.map +1 -0
- package/dist-client/pages/meta-master-detail-element.d.ts +80 -0
- package/dist-client/pages/meta-master-detail-element.js +11 -0
- package/dist-client/pages/meta-master-detail-element.js.map +1 -0
- package/dist-client/pages/meta-master-detail-page.d.ts +80 -0
- package/dist-client/pages/meta-master-detail-page.js +14 -0
- package/dist-client/pages/meta-master-detail-page.js.map +1 -0
- package/dist-client/pages/meta-tab-detail-element.d.ts +76 -0
- package/dist-client/pages/meta-tab-detail-element.js +11 -0
- package/dist-client/pages/meta-tab-detail-element.js.map +1 -0
- package/dist-client/pages/meta-tab-detail-page.d.ts +76 -0
- package/dist-client/pages/meta-tab-detail-page.js +14 -0
- package/dist-client/pages/meta-tab-detail-page.js.map +1 -0
- package/dist-client/pages/meta-tab-element.d.ts +57 -0
- package/dist-client/pages/meta-tab-element.js +13 -0
- package/dist-client/pages/meta-tab-element.js.map +1 -0
- package/dist-client/pages/printer-device/printer-device-page.d.ts +1 -0
- package/dist-client/pages/printer-device/printer-device-page.js +20 -0
- package/dist-client/pages/printer-device/printer-device-page.js.map +1 -0
- package/dist-client/pages/template/doc-template-page.d.ts +1 -0
- package/dist-client/pages/template/doc-template-page.js +20 -0
- package/dist-client/pages/template/doc-template-page.js.map +1 -0
- package/dist-client/pages/template/template-file-page.d.ts +1 -0
- package/dist-client/pages/template/template-file-page.js +20 -0
- package/dist-client/pages/template/template-file-page.js.map +1 -0
- package/dist-client/pages/terms/config-terminology.d.ts +1 -0
- package/dist-client/pages/terms/config-terminology.js +188 -0
- package/dist-client/pages/terms/config-terminology.js.map +1 -0
- package/dist-client/pages/work-code/work-code-detail-popup.d.ts +69 -0
- package/dist-client/pages/work-code/work-code-detail-popup.js +13 -0
- package/dist-client/pages/work-code/work-code-detail-popup.js.map +1 -0
- package/dist-client/pages/work-code/work-code-page.d.ts +1 -0
- package/dist-client/pages/work-code/work-code-page.js +19 -0
- package/dist-client/pages/work-code/work-code-page.js.map +1 -0
- package/dist-client/route.d.ts +1 -0
- package/dist-client/route.js +30 -0
- package/dist-client/route.js.map +1 -0
- package/dist-client/tsconfig.tsbuildinfo +1 -0
- package/dist-client/utils/grist-default-value.d.ts +8 -0
- package/dist-client/utils/grist-default-value.js +33 -0
- package/dist-client/utils/grist-default-value.js.map +1 -0
- package/dist-client/utils/meta-api.d.ts +572 -0
- package/dist-client/utils/meta-api.js +728 -0
- package/dist-client/utils/meta-api.js.map +1 -0
- package/dist-client/utils/meta-crypto.d.ts +4 -0
- package/dist-client/utils/meta-crypto.js +45 -0
- package/dist-client/utils/meta-crypto.js.map +1 -0
- package/dist-client/utils/meta-ui-util.d.ts +566 -0
- package/dist-client/utils/meta-ui-util.js +2985 -0
- package/dist-client/utils/meta-ui-util.js.map +1 -0
- package/dist-client/utils/rest-service-util.d.ts +120 -0
- package/dist-client/utils/rest-service-util.js +291 -0
- package/dist-client/utils/rest-service-util.js.map +1 -0
- package/dist-client/utils/service-util.d.ts +286 -0
- package/dist-client/utils/service-util.js +1204 -0
- package/dist-client/utils/service-util.js.map +1 -0
- package/dist-client/utils/terms-util.d.ts +81 -0
- package/dist-client/utils/terms-util.js +105 -0
- package/dist-client/utils/terms-util.js.map +1 -0
- package/dist-client/utils/ui-util.d.ts +153 -0
- package/dist-client/utils/ui-util.js +307 -0
- package/dist-client/utils/ui-util.js.map +1 -0
- package/dist-client/utils/value-util.d.ts +99 -0
- package/dist-client/utils/value-util.js +214 -0
- package/dist-client/utils/value-util.js.map +1 -0
- package/dist-server/activity/CommonActivity.d.ts +2 -0
- package/dist-server/activity/CommonActivity.js +58 -0
- package/dist-server/activity/CommonActivity.js.map +1 -0
- package/dist-server/index.d.ts +2 -0
- package/dist-server/index.js +6 -0
- package/dist-server/index.js.map +1 -0
- package/dist-server/routes.d.ts +1 -0
- package/dist-server/routes.js +58 -0
- package/dist-server/routes.js.map +1 -0
- package/dist-server/service/button-role/button-role-mutation.d.ts +9 -0
- package/dist-server/service/button-role/button-role-mutation.js +112 -0
- package/dist-server/service/button-role/button-role-mutation.js.map +1 -0
- package/dist-server/service/button-role/button-role-query.d.ts +11 -0
- package/dist-server/service/button-role/button-role-query.js +79 -0
- package/dist-server/service/button-role/button-role-query.js.map +1 -0
- package/dist-server/service/button-role/button-role-type.d.ts +15 -0
- package/dist-server/service/button-role/button-role-type.js +57 -0
- package/dist-server/service/button-role/button-role-type.js.map +1 -0
- package/dist-server/service/button-role/button-role.d.ts +15 -0
- package/dist-server/service/button-role/button-role.js +69 -0
- package/dist-server/service/button-role/button-role.js.map +1 -0
- package/dist-server/service/button-role/index.d.ts +5 -0
- package/dist-server/service/button-role/index.js +9 -0
- package/dist-server/service/button-role/index.js.map +1 -0
- package/dist-server/service/dynamic-menu/dynamic-menu-query.d.ts +11 -0
- package/dist-server/service/dynamic-menu/dynamic-menu-query.js +244 -0
- package/dist-server/service/dynamic-menu/dynamic-menu-query.js.map +1 -0
- package/dist-server/service/dynamic-menu/dynamic-menu-type.d.ts +30 -0
- package/dist-server/service/dynamic-menu/dynamic-menu-type.js +109 -0
- package/dist-server/service/dynamic-menu/dynamic-menu-type.js.map +1 -0
- package/dist-server/service/dynamic-menu/index.d.ts +2 -0
- package/dist-server/service/dynamic-menu/index.js +6 -0
- package/dist-server/service/dynamic-menu/index.js.map +1 -0
- package/dist-server/service/entity-event-subscriber/entity-event-subscriber.d.ts +6 -0
- package/dist-server/service/entity-event-subscriber/entity-event-subscriber.js +71 -0
- package/dist-server/service/entity-event-subscriber/entity-event-subscriber.js.map +1 -0
- package/dist-server/service/entity-event-subscriber/index.d.ts +2 -0
- package/dist-server/service/entity-event-subscriber/index.js +6 -0
- package/dist-server/service/entity-event-subscriber/index.js.map +1 -0
- package/dist-server/service/index.d.ts +9 -0
- package/dist-server/service/index.js +42 -0
- package/dist-server/service/index.js.map +1 -0
- package/dist-server/service/menu-button-auth/index.d.ts +5 -0
- package/dist-server/service/menu-button-auth/index.js +9 -0
- package/dist-server/service/menu-button-auth/index.js.map +1 -0
- package/dist-server/service/menu-button-auth/menu-button-auth-mutation.d.ts +10 -0
- package/dist-server/service/menu-button-auth/menu-button-auth-mutation.js +127 -0
- package/dist-server/service/menu-button-auth/menu-button-auth-mutation.js.map +1 -0
- package/dist-server/service/menu-button-auth/menu-button-auth-query.d.ts +16 -0
- package/dist-server/service/menu-button-auth/menu-button-auth-query.js +167 -0
- package/dist-server/service/menu-button-auth/menu-button-auth-query.js.map +1 -0
- package/dist-server/service/menu-button-auth/menu-button-auth-type.d.ts +24 -0
- package/dist-server/service/menu-button-auth/menu-button-auth-type.js +90 -0
- package/dist-server/service/menu-button-auth/menu-button-auth-type.js.map +1 -0
- package/dist-server/service/menu-button-auth/menu-button-auth.d.ts +23 -0
- package/dist-server/service/menu-button-auth/menu-button-auth.js +102 -0
- package/dist-server/service/menu-button-auth/menu-button-auth.js.map +1 -0
- package/dist-server/service/meta-activity/index.d.ts +3 -0
- package/dist-server/service/meta-activity/index.js +7 -0
- package/dist-server/service/meta-activity/index.js.map +1 -0
- package/dist-server/service/meta-activity/meta-activity-mutation.d.ts +18 -0
- package/dist-server/service/meta-activity/meta-activity-mutation.js +183 -0
- package/dist-server/service/meta-activity/meta-activity-mutation.js.map +1 -0
- package/dist-server/service/meta-activity/meta-activity-query.d.ts +10 -0
- package/dist-server/service/meta-activity/meta-activity-query.js +66 -0
- package/dist-server/service/meta-activity/meta-activity-query.js.map +1 -0
- package/dist-server/service/meta-activity/meta-activity-type.d.ts +21 -0
- package/dist-server/service/meta-activity/meta-activity-type.js +80 -0
- package/dist-server/service/meta-activity/meta-activity-type.js.map +1 -0
- package/dist-server/service/set-translations/index.d.ts +2 -0
- package/dist-server/service/set-translations/index.js +6 -0
- package/dist-server/service/set-translations/index.js.map +1 -0
- package/dist-server/service/set-translations/set-translation-resolver.d.ts +4 -0
- package/dist-server/service/set-translations/set-translation-resolver.js +67 -0
- package/dist-server/service/set-translations/set-translation-resolver.js.map +1 -0
- package/dist-server/service/work-code/index.d.ts +5 -0
- package/dist-server/service/work-code/index.js +9 -0
- package/dist-server/service/work-code/index.js.map +1 -0
- package/dist-server/service/work-code/work-code-mutation.d.ts +10 -0
- package/dist-server/service/work-code/work-code-mutation.js +136 -0
- package/dist-server/service/work-code/work-code-mutation.js.map +1 -0
- package/dist-server/service/work-code/work-code-query.d.ts +14 -0
- package/dist-server/service/work-code/work-code-query.js +106 -0
- package/dist-server/service/work-code/work-code-query.js.map +1 -0
- package/dist-server/service/work-code/work-code-type.d.ts +23 -0
- package/dist-server/service/work-code/work-code-type.js +89 -0
- package/dist-server/service/work-code/work-code-type.js.map +1 -0
- package/dist-server/service/work-code/work-code.d.ts +20 -0
- package/dist-server/service/work-code/work-code.js +94 -0
- package/dist-server/service/work-code/work-code.js.map +1 -0
- package/dist-server/service/work-code-detail/index.d.ts +5 -0
- package/dist-server/service/work-code-detail/index.js +9 -0
- package/dist-server/service/work-code-detail/index.js.map +1 -0
- package/dist-server/service/work-code-detail/work-code-detail-mutation.d.ts +10 -0
- package/dist-server/service/work-code-detail/work-code-detail-mutation.js +138 -0
- package/dist-server/service/work-code-detail/work-code-detail-mutation.js.map +1 -0
- package/dist-server/service/work-code-detail/work-code-detail-query.d.ts +13 -0
- package/dist-server/service/work-code-detail/work-code-detail-query.js +89 -0
- package/dist-server/service/work-code-detail/work-code-detail-query.js.map +1 -0
- package/dist-server/service/work-code-detail/work-code-detail-type.d.ts +20 -0
- package/dist-server/service/work-code-detail/work-code-detail-type.js +74 -0
- package/dist-server/service/work-code-detail/work-code-detail-type.js.map +1 -0
- package/dist-server/service/work-code-detail/work-code-detail.d.ts +19 -0
- package/dist-server/service/work-code-detail/work-code-detail.js +93 -0
- package/dist-server/service/work-code-detail/work-code-detail.js.map +1 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -0
- package/package.json +10 -10
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { MenuButtonAuth } from './menu-button-auth';
|
|
2
|
+
import { MenuButtonAuthQuery } from './menu-button-auth-query';
|
|
3
|
+
import { MenuButtonAuthMutation } from './menu-button-auth-mutation';
|
|
4
|
+
export declare const entities: (typeof MenuButtonAuth)[];
|
|
5
|
+
export declare const resolvers: (typeof MenuButtonAuthQuery | typeof MenuButtonAuthMutation)[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolvers = exports.entities = void 0;
|
|
4
|
+
const menu_button_auth_1 = require("./menu-button-auth");
|
|
5
|
+
const menu_button_auth_query_1 = require("./menu-button-auth-query");
|
|
6
|
+
const menu_button_auth_mutation_1 = require("./menu-button-auth-mutation");
|
|
7
|
+
exports.entities = [menu_button_auth_1.MenuButtonAuth];
|
|
8
|
+
exports.resolvers = [menu_button_auth_query_1.MenuButtonAuthQuery, menu_button_auth_mutation_1.MenuButtonAuthMutation];
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/menu-button-auth/index.ts"],"names":[],"mappings":";;;AACA,yDAAmD;AACnD,qEAA8D;AAC9D,2EAAoE;AAEvD,QAAA,QAAQ,GAAG,CAAC,iCAAc,CAAC,CAAA;AAC3B,QAAA,SAAS,GAAG,CAAC,4CAAmB,EAAE,kDAAsB,CAAC,CAAA","sourcesContent":["\nimport { MenuButtonAuth } from './menu-button-auth'\nimport { MenuButtonAuthQuery } from './menu-button-auth-query'\nimport { MenuButtonAuthMutation } from './menu-button-auth-mutation'\n\nexport const entities = [MenuButtonAuth]\nexport const resolvers = [MenuButtonAuthQuery, MenuButtonAuthMutation]\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MenuButtonAuth } from './menu-button-auth';
|
|
2
|
+
import { NewMenuButtonAuth, MenuButtonAuthPatch } from './menu-button-auth-type';
|
|
3
|
+
export declare class MenuButtonAuthMutation {
|
|
4
|
+
createMenuButtonAuth(menuButtonAuth: NewMenuButtonAuth, context: any): Promise<MenuButtonAuth>;
|
|
5
|
+
updateMenuButtonAuth(id: string, patch: MenuButtonAuthPatch, context: any): Promise<MenuButtonAuth>;
|
|
6
|
+
updateMultipleMenuButtonAuth(patches: MenuButtonAuthPatch[], context: any): Promise<MenuButtonAuth[]>;
|
|
7
|
+
updateMultipleMenuButtonAuths(patches: any, context: any): Promise<MenuButtonAuth[]>;
|
|
8
|
+
deleteMenuButtonAuth(id: string, context: any): Promise<boolean>;
|
|
9
|
+
deleteMenuButtonAuths(ids: string[], context: any): Promise<boolean>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MenuButtonAuthMutation = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const type_graphql_1 = require("type-graphql");
|
|
6
|
+
const menu_button_auth_1 = require("./menu-button-auth");
|
|
7
|
+
const menu_button_auth_type_1 = require("./menu-button-auth-type");
|
|
8
|
+
const shell_1 = require("@things-factory/shell");
|
|
9
|
+
let MenuButtonAuthMutation = class MenuButtonAuthMutation {
|
|
10
|
+
async createMenuButtonAuth(menuButtonAuth, context) {
|
|
11
|
+
const { domain, user, tx } = context.state;
|
|
12
|
+
return await tx.getRepository(menu_button_auth_1.MenuButtonAuth).save(Object.assign(Object.assign({}, menuButtonAuth), { domain, creator: user, updater: user }));
|
|
13
|
+
}
|
|
14
|
+
async updateMenuButtonAuth(id, patch, context) {
|
|
15
|
+
const { domain, user, tx } = context.state;
|
|
16
|
+
const repository = tx.getRepository(menu_button_auth_1.MenuButtonAuth);
|
|
17
|
+
const menuButtonAuth = await repository.findOne({
|
|
18
|
+
where: { domain: { id: domain.id }, id },
|
|
19
|
+
relations: ['domain', 'updater', 'creator']
|
|
20
|
+
});
|
|
21
|
+
return await repository.save(Object.assign(Object.assign(Object.assign({}, menuButtonAuth), patch), { updater: user }));
|
|
22
|
+
}
|
|
23
|
+
async updateMultipleMenuButtonAuth(patches, context) {
|
|
24
|
+
const { domain, user, tx } = context.state;
|
|
25
|
+
let results = [];
|
|
26
|
+
const _createRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === '+');
|
|
27
|
+
const _updateRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === 'M');
|
|
28
|
+
const menuButtonAuthRepo = tx.getRepository(menu_button_auth_1.MenuButtonAuth);
|
|
29
|
+
if (_createRecords.length > 0) {
|
|
30
|
+
for (let i = 0; i < _createRecords.length; i++) {
|
|
31
|
+
const newRecord = _createRecords[i];
|
|
32
|
+
const result = await menuButtonAuthRepo.save(Object.assign(Object.assign({}, newRecord), { domain, creator: user, updater: user }));
|
|
33
|
+
results.push(Object.assign(Object.assign({}, result), { cuFlag: '+' }));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
if (_updateRecords.length > 0) {
|
|
37
|
+
for (let i = 0; i < _updateRecords.length; i++) {
|
|
38
|
+
const updRecord = _updateRecords[i];
|
|
39
|
+
const menuButtonAuth = await menuButtonAuthRepo.findOne({
|
|
40
|
+
where: { domain: { id: domain.id }, id: updRecord.id },
|
|
41
|
+
relations: ['domain', 'updater', 'creator']
|
|
42
|
+
});
|
|
43
|
+
const result = await menuButtonAuthRepo.save(Object.assign(Object.assign(Object.assign({}, menuButtonAuth), updRecord), { updater: user }));
|
|
44
|
+
results.push(Object.assign(Object.assign({}, result), { cuFlag: 'M' }));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return results;
|
|
48
|
+
}
|
|
49
|
+
async updateMultipleMenuButtonAuths(patches, context) {
|
|
50
|
+
const { domain, user, tx } = context.state;
|
|
51
|
+
console.log(patches);
|
|
52
|
+
return [];
|
|
53
|
+
}
|
|
54
|
+
async deleteMenuButtonAuth(id, context) {
|
|
55
|
+
const { domain, tx, user } = context.state;
|
|
56
|
+
await tx.getRepository(menu_button_auth_1.MenuButtonAuth).remove({ domain, id, updater: user });
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
async deleteMenuButtonAuths(ids, context) {
|
|
60
|
+
const { domain, tx, user } = context.state;
|
|
61
|
+
let delEntitis = ids.map(id => {
|
|
62
|
+
return { domain, id, updater: user };
|
|
63
|
+
});
|
|
64
|
+
await tx.getRepository(menu_button_auth_1.MenuButtonAuth).remove(delEntitis);
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
exports.MenuButtonAuthMutation = MenuButtonAuthMutation;
|
|
69
|
+
tslib_1.__decorate([
|
|
70
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
71
|
+
(0, type_graphql_1.Mutation)(returns => menu_button_auth_1.MenuButtonAuth, { description: 'To create new MenuButtonAuth' }),
|
|
72
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('menuButtonAuth')),
|
|
73
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
74
|
+
tslib_1.__metadata("design:type", Function),
|
|
75
|
+
tslib_1.__metadata("design:paramtypes", [menu_button_auth_type_1.NewMenuButtonAuth, Object]),
|
|
76
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
77
|
+
], MenuButtonAuthMutation.prototype, "createMenuButtonAuth", null);
|
|
78
|
+
tslib_1.__decorate([
|
|
79
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
80
|
+
(0, type_graphql_1.Mutation)(returns => menu_button_auth_1.MenuButtonAuth, { description: 'To modify MenuButtonAuth information' }),
|
|
81
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
82
|
+
tslib_1.__param(1, (0, type_graphql_1.Arg)('patch')),
|
|
83
|
+
tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
|
|
84
|
+
tslib_1.__metadata("design:type", Function),
|
|
85
|
+
tslib_1.__metadata("design:paramtypes", [String, menu_button_auth_type_1.MenuButtonAuthPatch, Object]),
|
|
86
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
87
|
+
], MenuButtonAuthMutation.prototype, "updateMenuButtonAuth", null);
|
|
88
|
+
tslib_1.__decorate([
|
|
89
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
90
|
+
(0, type_graphql_1.Mutation)(returns => [menu_button_auth_1.MenuButtonAuth], { description: "To modify multiple MenuButtonAuths' information" }),
|
|
91
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('patches', type => [menu_button_auth_type_1.MenuButtonAuthPatch])),
|
|
92
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
93
|
+
tslib_1.__metadata("design:type", Function),
|
|
94
|
+
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
95
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
96
|
+
], MenuButtonAuthMutation.prototype, "updateMultipleMenuButtonAuth", null);
|
|
97
|
+
tslib_1.__decorate([
|
|
98
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
99
|
+
(0, type_graphql_1.Mutation)(returns => [menu_button_auth_1.MenuButtonAuth], { description: "To modify multiple MenuButtonAuths' information" }),
|
|
100
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('patches', type => shell_1.ScalarObject)),
|
|
101
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
102
|
+
tslib_1.__metadata("design:type", Function),
|
|
103
|
+
tslib_1.__metadata("design:paramtypes", [Object, Object]),
|
|
104
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
105
|
+
], MenuButtonAuthMutation.prototype, "updateMultipleMenuButtonAuths", null);
|
|
106
|
+
tslib_1.__decorate([
|
|
107
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
108
|
+
(0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete MenuButtonAuth' }),
|
|
109
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
110
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
111
|
+
tslib_1.__metadata("design:type", Function),
|
|
112
|
+
tslib_1.__metadata("design:paramtypes", [String, Object]),
|
|
113
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
114
|
+
], MenuButtonAuthMutation.prototype, "deleteMenuButtonAuth", null);
|
|
115
|
+
tslib_1.__decorate([
|
|
116
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
117
|
+
(0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete multiple MenuButtonAuths' }),
|
|
118
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
|
|
119
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
120
|
+
tslib_1.__metadata("design:type", Function),
|
|
121
|
+
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
122
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
123
|
+
], MenuButtonAuthMutation.prototype, "deleteMenuButtonAuths", null);
|
|
124
|
+
exports.MenuButtonAuthMutation = MenuButtonAuthMutation = tslib_1.__decorate([
|
|
125
|
+
(0, type_graphql_1.Resolver)(menu_button_auth_1.MenuButtonAuth)
|
|
126
|
+
], MenuButtonAuthMutation);
|
|
127
|
+
//# sourceMappingURL=menu-button-auth-mutation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu-button-auth-mutation.js","sourceRoot":"","sources":["../../../server/service/menu-button-auth/menu-button-auth-mutation.ts"],"names":[],"mappings":";;;;AACA,+CAAsE;AAEtE,yDAAmD;AACnD,mEAAgF;AAChF,iDAA2E;AAIpE,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAG3B,AAAN,KAAK,CAAC,oBAAoB,CAAwB,cAAiC,EAAS,OAAY;QACtG,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,OAAO,MAAM,EAAE,CAAC,aAAa,CAAC,iCAAc,CAAC,CAAC,IAAI,iCAC7C,cAAc,KACjB,MAAM,EACN,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,IACb,CAAA;IACJ,CAAC;IAIK,AAAN,KAAK,CAAC,oBAAoB,CACb,EAAU,EACP,KAA0B,EACjC,OAAY;QAEnB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,MAAM,UAAU,GAAG,EAAE,CAAC,aAAa,CAAC,iCAAc,CAAC,CAAA;QACn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port { NewMenuButtonAuth, MenuButtonAuthPatch } from './menu-button-auth-type'\nimport { Domain, getRepository, ScalarObject } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\n\n@Resolver(MenuButtonAuth)\nexport class MenuButtonAuthMutation {\n @Directive('@transaction')\n @Mutation(returns => MenuButtonAuth, { description: 'To create new MenuButtonAuth' })\n async createMenuButtonAuth(@Arg('menuButtonAuth') menuButtonAuth: NewMenuButtonAuth, @Ctx() context: any): Promise<MenuButtonAuth> {\n const { domain, user, tx } = context.state\n\n return await tx.getRepository(MenuButtonAuth).save({\n ...menuButtonAuth,\n domain,\n creator: user,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => MenuButtonAuth, { description: 'To modify MenuButtonAuth information' })\n async updateMenuButtonAuth(\n @Arg('id') id: string,\n @Arg('patch') patch: MenuButtonAuthPatch,\n @Ctx() context: any\n ): Promise<MenuButtonAuth> {\n const { domain, user, tx } = context.state\n\n const repository = tx.getRepository(MenuButtonAuth)\n const menuButtonAuth = await repository.findOne(\n {\n where: { domain: { id: domain.id }, id },\n relations: ['domain','updater','creator']\n }\n )\n\n return await repository.save({\n ...menuButtonAuth,\n ...patch,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => [MenuButtonAuth], { description: \"To modify multiple MenuButtonAuths' information\" })\n async updateMultipleMenuButtonAuth(\n @Arg('patches', type => [MenuButtonAuthPatch]) patches: MenuButtonAuthPatch[],\n @Ctx() context: any\n ): Promise<MenuButtonAuth[]> {\n const { domain, user, tx } = context.state\n\n let results = []\n const _createRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === '+')\n const _updateRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === 'M')\n const menuButtonAuthRepo = tx.getRepository(MenuButtonAuth)\n\n if (_createRecords.length > 0) {\n for (let i = 0; i < _createRecords.length; i++) {\n const newRecord = _createRecords[i]\n\n const result = await menuButtonAuthRepo.save({\n ...newRecord,\n domain,\n creator: user,\n updater: user\n })\n\n results.push({ ...result, cuFlag: '+' })\n }\n }\n\n if (_updateRecords.length > 0) {\n for (let i = 0; i < _updateRecords.length; i++) {\n const updRecord = _updateRecords[i]\n const menuButtonAuth = await menuButtonAuthRepo.findOne({\n where: { domain: { id: domain.id }, id:updRecord.id },\n relations: ['domain','updater','creator']\n })\n \n const result = await menuButtonAuthRepo.save({\n ...menuButtonAuth,\n ...updRecord,\n updater: user\n })\n\n results.push({ ...result, cuFlag: 'M' })\n }\n }\n\n return results\n }\n\n @Directive('@transaction')\n @Mutation(returns => [MenuButtonAuth], { description: \"To modify multiple MenuButtonAuths' information\" })\n async updateMultipleMenuButtonAuths(\n @Arg('patches', type => ScalarObject ) patches: any,\n @Ctx() context: any\n ): Promise<MenuButtonAuth[]> {\n const { domain, user, tx } = context.state\n\n console.log(patches)\n return []\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete MenuButtonAuth' })\n async deleteMenuButtonAuth(@Arg('id') id: string, @Ctx() context: any): Promise<boolean> {\n const { domain, tx, user } = context.state\n await tx.getRepository(MenuButtonAuth).remove({ domain, id, updater:user })\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple MenuButtonAuths' })\n async deleteMenuButtonAuths(\n @Arg('ids', type => [String]) ids: string[],\n @Ctx() context: any\n ): Promise<boolean> {\n const { domain, tx, user } = context.state\n\n let delEntitis = ids.map(id=>{\n return {domain,id,updater:user}\n })\n\n await tx.getRepository(MenuButtonAuth).remove(delEntitis)\n\n return true\n }\n}\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Domain, ListParam } from '@things-factory/shell';
|
|
2
|
+
import { User } from '@things-factory/auth-base';
|
|
3
|
+
import { MenuButtonAuth } from './menu-button-auth';
|
|
4
|
+
import { MenuButtonAuthList } from './menu-button-auth-type';
|
|
5
|
+
import { Menu } from '@things-factory/menu-base';
|
|
6
|
+
import { ButtonRole } from './../button-role/button-role';
|
|
7
|
+
export declare class MenuButtonAuthQuery {
|
|
8
|
+
menuButtonAuth(id: string, context: any): Promise<MenuButtonAuth>;
|
|
9
|
+
menuButtonAuths(params: ListParam, context: any): Promise<MenuButtonAuthList>;
|
|
10
|
+
roleMenuButtonAuths(params: ListParam, context: any): Promise<MenuButtonAuthList>;
|
|
11
|
+
role(menuButtonAuth: MenuButtonAuth): Promise<ButtonRole>;
|
|
12
|
+
menu(menuButtonAuth: MenuButtonAuth): Promise<Menu>;
|
|
13
|
+
domain(menuButtonAuth: MenuButtonAuth): Promise<Domain>;
|
|
14
|
+
updater(menuButtonAuth: MenuButtonAuth): Promise<User>;
|
|
15
|
+
creator(menuButtonAuth: MenuButtonAuth): Promise<User>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MenuButtonAuthQuery = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const type_graphql_1 = require("type-graphql");
|
|
6
|
+
const typeorm_1 = require("typeorm");
|
|
7
|
+
const shell_1 = require("@things-factory/shell");
|
|
8
|
+
const auth_base_1 = require("@things-factory/auth-base");
|
|
9
|
+
const menu_button_auth_1 = require("./menu-button-auth");
|
|
10
|
+
const menu_button_auth_type_1 = require("./menu-button-auth-type");
|
|
11
|
+
const menu_base_1 = require("@things-factory/menu-base");
|
|
12
|
+
const button_role_1 = require("./../button-role/button-role");
|
|
13
|
+
let MenuButtonAuthQuery = class MenuButtonAuthQuery {
|
|
14
|
+
async menuButtonAuth(id, context) {
|
|
15
|
+
const { domain } = context.state;
|
|
16
|
+
return await (0, shell_1.getRepository)(menu_button_auth_1.MenuButtonAuth).findOne({
|
|
17
|
+
where: { domain: { id: domain.id }, id }
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
async menuButtonAuths(params, context) {
|
|
21
|
+
const { domain } = context.state;
|
|
22
|
+
const queryBuilder = (0, shell_1.getQueryBuilderFromListParams)({
|
|
23
|
+
domain,
|
|
24
|
+
params,
|
|
25
|
+
repository: await (0, shell_1.getRepository)(menu_button_auth_1.MenuButtonAuth)
|
|
26
|
+
});
|
|
27
|
+
const [items, total] = await queryBuilder.getManyAndCount();
|
|
28
|
+
return { items, total };
|
|
29
|
+
}
|
|
30
|
+
async roleMenuButtonAuths(params, context) {
|
|
31
|
+
const { domain } = context.state;
|
|
32
|
+
const roleId = params.filters.find(x => x.name == 'roleId').value;
|
|
33
|
+
const parentMenuId = params.filters.some(x => x.name == 'menuId')
|
|
34
|
+
? params.filters.find(x => x.name == 'menuId').value
|
|
35
|
+
: undefined;
|
|
36
|
+
// 기존 role 권한 조회
|
|
37
|
+
const queryBuilder = (0, shell_1.getQueryBuilderFromListParams)({
|
|
38
|
+
domain,
|
|
39
|
+
params,
|
|
40
|
+
repository: await (0, shell_1.getRepository)(menu_button_auth_1.MenuButtonAuth)
|
|
41
|
+
});
|
|
42
|
+
const [items, total] = await queryBuilder.getManyAndCount();
|
|
43
|
+
// 메뉴 리스트 조회
|
|
44
|
+
let menuParams = {
|
|
45
|
+
where: {
|
|
46
|
+
domain: {
|
|
47
|
+
id: domain.id
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
order: { rank: 'ASC' }
|
|
51
|
+
};
|
|
52
|
+
if (parentMenuId) {
|
|
53
|
+
menuParams.where['parent'] = {
|
|
54
|
+
id: parentMenuId
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
menuParams.where['parent'] = (0, typeorm_1.Not)((0, typeorm_1.IsNull)());
|
|
59
|
+
}
|
|
60
|
+
const menus = await (0, shell_1.getRepository)(menu_base_1.Menu).find(menuParams);
|
|
61
|
+
let results = [];
|
|
62
|
+
menus.forEach(menu => {
|
|
63
|
+
let menuRole = {
|
|
64
|
+
id: menu.id,
|
|
65
|
+
menu: menu,
|
|
66
|
+
menuId: menu.id,
|
|
67
|
+
roleId: roleId,
|
|
68
|
+
role: { id: roleId, name: '', description: '', domain: domain, domainId: domain.id },
|
|
69
|
+
domain: domain,
|
|
70
|
+
domainId: domain.id,
|
|
71
|
+
selectAuth: false,
|
|
72
|
+
createAuth: false,
|
|
73
|
+
updateAuth: false,
|
|
74
|
+
deleteAuth: false
|
|
75
|
+
};
|
|
76
|
+
if (items.some(x => x.menuId == menu.id)) {
|
|
77
|
+
let menuAuth = items.find(x => x.menuId == menu.id);
|
|
78
|
+
menuRole.id = menuAuth.id;
|
|
79
|
+
menuRole.selectAuth = menuAuth.selectAuth;
|
|
80
|
+
menuRole.updateAuth = menuAuth.updateAuth;
|
|
81
|
+
menuRole.createAuth = menuAuth.createAuth;
|
|
82
|
+
menuRole.deleteAuth = menuAuth.deleteAuth;
|
|
83
|
+
}
|
|
84
|
+
results.push(menuRole);
|
|
85
|
+
});
|
|
86
|
+
return { items: results, total: 0 };
|
|
87
|
+
}
|
|
88
|
+
async role(menuButtonAuth) {
|
|
89
|
+
return await (0, shell_1.getRepository)(button_role_1.ButtonRole).findOneBy({ id: menuButtonAuth.roleId });
|
|
90
|
+
}
|
|
91
|
+
async menu(menuButtonAuth) {
|
|
92
|
+
return await (0, shell_1.getRepository)(menu_base_1.Menu).findOneBy({ id: menuButtonAuth.menuId });
|
|
93
|
+
}
|
|
94
|
+
async domain(menuButtonAuth) {
|
|
95
|
+
return await (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: menuButtonAuth.domainId });
|
|
96
|
+
}
|
|
97
|
+
async updater(menuButtonAuth) {
|
|
98
|
+
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: menuButtonAuth.updaterId });
|
|
99
|
+
}
|
|
100
|
+
async creator(menuButtonAuth) {
|
|
101
|
+
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: menuButtonAuth.creatorId });
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
exports.MenuButtonAuthQuery = MenuButtonAuthQuery;
|
|
105
|
+
tslib_1.__decorate([
|
|
106
|
+
(0, type_graphql_1.Query)(returns => menu_button_auth_1.MenuButtonAuth, { description: 'To fetch a MenuButtonAuth' }),
|
|
107
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
108
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
109
|
+
tslib_1.__metadata("design:type", Function),
|
|
110
|
+
tslib_1.__metadata("design:paramtypes", [String, Object]),
|
|
111
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
112
|
+
], MenuButtonAuthQuery.prototype, "menuButtonAuth", null);
|
|
113
|
+
tslib_1.__decorate([
|
|
114
|
+
(0, type_graphql_1.Query)(returns => menu_button_auth_type_1.MenuButtonAuthList, { description: 'To fetch a multiple MenuButtonAuth' }),
|
|
115
|
+
tslib_1.__param(0, (0, type_graphql_1.Args)(type => shell_1.ListParam)),
|
|
116
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
117
|
+
tslib_1.__metadata("design:type", Function),
|
|
118
|
+
tslib_1.__metadata("design:paramtypes", [shell_1.ListParam, Object]),
|
|
119
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
120
|
+
], MenuButtonAuthQuery.prototype, "menuButtonAuths", null);
|
|
121
|
+
tslib_1.__decorate([
|
|
122
|
+
(0, type_graphql_1.Query)(returns => menu_button_auth_type_1.MenuButtonAuthList, { description: 'To fetch a multiple RoleMenuButtonAuth' }),
|
|
123
|
+
tslib_1.__param(0, (0, type_graphql_1.Args)(type => shell_1.ListParam)),
|
|
124
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
125
|
+
tslib_1.__metadata("design:type", Function),
|
|
126
|
+
tslib_1.__metadata("design:paramtypes", [shell_1.ListParam, Object]),
|
|
127
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
128
|
+
], MenuButtonAuthQuery.prototype, "roleMenuButtonAuths", null);
|
|
129
|
+
tslib_1.__decorate([
|
|
130
|
+
(0, type_graphql_1.FieldResolver)(type => button_role_1.ButtonRole),
|
|
131
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
132
|
+
tslib_1.__metadata("design:type", Function),
|
|
133
|
+
tslib_1.__metadata("design:paramtypes", [menu_button_auth_1.MenuButtonAuth]),
|
|
134
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
135
|
+
], MenuButtonAuthQuery.prototype, "role", null);
|
|
136
|
+
tslib_1.__decorate([
|
|
137
|
+
(0, type_graphql_1.FieldResolver)(type => menu_base_1.Menu),
|
|
138
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
139
|
+
tslib_1.__metadata("design:type", Function),
|
|
140
|
+
tslib_1.__metadata("design:paramtypes", [menu_button_auth_1.MenuButtonAuth]),
|
|
141
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
142
|
+
], MenuButtonAuthQuery.prototype, "menu", null);
|
|
143
|
+
tslib_1.__decorate([
|
|
144
|
+
(0, type_graphql_1.FieldResolver)(type => shell_1.Domain),
|
|
145
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
146
|
+
tslib_1.__metadata("design:type", Function),
|
|
147
|
+
tslib_1.__metadata("design:paramtypes", [menu_button_auth_1.MenuButtonAuth]),
|
|
148
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
149
|
+
], MenuButtonAuthQuery.prototype, "domain", null);
|
|
150
|
+
tslib_1.__decorate([
|
|
151
|
+
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
|
152
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
153
|
+
tslib_1.__metadata("design:type", Function),
|
|
154
|
+
tslib_1.__metadata("design:paramtypes", [menu_button_auth_1.MenuButtonAuth]),
|
|
155
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
156
|
+
], MenuButtonAuthQuery.prototype, "updater", null);
|
|
157
|
+
tslib_1.__decorate([
|
|
158
|
+
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
|
159
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
160
|
+
tslib_1.__metadata("design:type", Function),
|
|
161
|
+
tslib_1.__metadata("design:paramtypes", [menu_button_auth_1.MenuButtonAuth]),
|
|
162
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
163
|
+
], MenuButtonAuthQuery.prototype, "creator", null);
|
|
164
|
+
exports.MenuButtonAuthQuery = MenuButtonAuthQuery = tslib_1.__decorate([
|
|
165
|
+
(0, type_graphql_1.Resolver)(menu_button_auth_1.MenuButtonAuth)
|
|
166
|
+
], MenuButtonAuthQuery);
|
|
167
|
+
//# sourceMappingURL=menu-button-auth-query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu-button-auth-query.js","sourceRoot":"","sources":["../../../server/service/menu-button-auth/menu-button-auth-query.ts"],"names":[],"mappings":";;;;AAAA,+CAA8F;AAC9F,qCAAqC;AACrC,iDAM8B;AAC9B,yDAAgD;AAChD,yDAAmD;AACnD,mEAA4D;AAC5D,yDAAgD;AAChD,8DAAyD;AAGlD,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAExB,AAAN,KAAK,CAAC,cAAc,CAAY,EAAU,EAAS,OAAY;QAC7D,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAChC,OAAO,MAAM,IAAA,qBAAa,EAAC,iCAAc,CAAC,CAAC,OAAO,CAAC;YACjD,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;SACzC,CAAC,CAAA;IACJ,CAAC;IAGK,AAAN,KAAK,CAAC,eAAe,CAA0B,MAAiB,EAAS,OAAY;QACnF,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,MAAM,YAAY,GAAG,IAAA,qCAA6B,EAAC;YACjD,MAAM;YACN,MAAM;YACN,UAAU,EAAE,MAAM,IAAA,qBAAa,EAAC,iCAA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,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAiB,iCAAc;;kDAEnD;8BAxHU,mBAAmB;IAD/B,IAAA,uBAAQ,EAAC,iCAAc,CAAC;GACZ,mBAAmB,CAyH/B","sourcesContent":["import { Resolver, Query, FieldResolver, Root, Args, Arg, Ctx, Directive } from 'type-graphql'\nimport { IsNull, Not } from 'typeorm'\nimport {\n Domain,\n ListParam,\n convertListParams,\n getRepository,\n getQueryBuilderFromListParams\n} from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { MenuButtonAuth } from './menu-button-auth'\nimport { MenuButtonAuthList } from './menu-button-auth-type'\nimport { Menu } from '@things-factory/menu-base'\nimport { ButtonRole } from './../button-role/button-role'\n\n@Resolver(MenuButtonAuth)\nexport class MenuButtonAuthQuery {\n @Query(returns => MenuButtonAuth, { description: 'To fetch a MenuButtonAuth' })\n async menuButtonAuth(@Arg('id') id: string, @Ctx() context: any): Promise<MenuButtonAuth> {\n const { domain } = context.state\n return await getRepository(MenuButtonAuth).findOne({\n where: { domain: { id: domain.id }, id }\n })\n }\n\n @Query(returns => MenuButtonAuthList, { description: 'To fetch a multiple MenuButtonAuth' })\n async menuButtonAuths(@Args(type => ListParam) params: ListParam, @Ctx() context: any): Promise<MenuButtonAuthList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n domain,\n params,\n repository: await getRepository(MenuButtonAuth)\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @Query(returns => MenuButtonAuthList, { description: 'To fetch a multiple RoleMenuButtonAuth' })\n async roleMenuButtonAuths(\n @Args(type => ListParam) params: ListParam,\n @Ctx() context: any\n ): Promise<MenuButtonAuthList> {\n const { domain } = context.state\n const roleId = params.filters.find(x => x.name == 'roleId').value\n const parentMenuId = params.filters.some(x => x.name == 'menuId')\n ? params.filters.find(x => x.name == 'menuId').value\n : undefined\n\n // 기존 role 권한 조회\n const queryBuilder = getQueryBuilderFromListParams({\n domain,\n params,\n repository: await getRepository(MenuButtonAuth)\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n // 메뉴 리스트 조회\n let menuParams = {\n where: {\n domain: {\n id: domain.id\n }\n },\n order: { rank: 'ASC' }\n }\n\n if (parentMenuId) {\n menuParams.where['parent'] = {\n id: parentMenuId\n }\n } else {\n menuParams.where['parent'] = Not(IsNull())\n }\n\n const menus: Menu[] = await getRepository(Menu).find(menuParams as any)\n\n let results: MenuButtonAuth[] = []\n\n menus.forEach(menu => {\n let menuRole = {\n id: menu.id,\n menu: menu,\n menuId: menu.id,\n roleId: roleId,\n role: { id: roleId, name: '', description: '', domain: domain, domainId: domain.id },\n domain: domain,\n domainId: domain.id,\n selectAuth: false,\n createAuth: false,\n updateAuth: false,\n deleteAuth: false\n }\n\n if (items.some(x => x.menuId == menu.id)) {\n let menuAuth = items.find(x => x.menuId == menu.id)\n\n menuRole.id = menuAuth.id\n menuRole.selectAuth = menuAuth.selectAuth\n menuRole.updateAuth = menuAuth.updateAuth\n menuRole.createAuth = menuAuth.createAuth\n menuRole.deleteAuth = menuAuth.deleteAuth\n }\n\n results.push(menuRole)\n })\n\n return { items: results, total: 0 }\n }\n\n @FieldResolver(type => ButtonRole)\n async role(@Root() menuButtonAuth: MenuButtonAuth): Promise<ButtonRole> {\n return await getRepository(ButtonRole).findOneBy({ id: menuButtonAuth.roleId })\n }\n\n @FieldResolver(type => Menu)\n async menu(@Root() menuButtonAuth: MenuButtonAuth): Promise<Menu> {\n return await getRepository(Menu).findOneBy({ id: menuButtonAuth.menuId })\n }\n\n @FieldResolver(type => Domain)\n async domain(@Root() menuButtonAuth: MenuButtonAuth): Promise<Domain> {\n return await getRepository(Domain).findOneBy({ id: menuButtonAuth.domainId })\n }\n\n @FieldResolver(type => User)\n async updater(@Root() menuButtonAuth: MenuButtonAuth): Promise<User> {\n return await getRepository(User).findOneBy({ id: menuButtonAuth.updaterId })\n }\n\n @FieldResolver(type => User)\n async creator(@Root() menuButtonAuth: MenuButtonAuth): Promise<User> {\n return await getRepository(User).findOneBy({ id: menuButtonAuth.creatorId })\n }\n}\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ObjectRef } from '@things-factory/shell';
|
|
2
|
+
import { MenuButtonAuth } from './menu-button-auth';
|
|
3
|
+
export declare class NewMenuButtonAuth {
|
|
4
|
+
role: ObjectRef;
|
|
5
|
+
menu: ObjectRef;
|
|
6
|
+
selectAuth?: boolean;
|
|
7
|
+
createAuth?: boolean;
|
|
8
|
+
updateAuth?: boolean;
|
|
9
|
+
deleteAuth?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare class MenuButtonAuthPatch {
|
|
12
|
+
id?: string;
|
|
13
|
+
role: ObjectRef;
|
|
14
|
+
menu: ObjectRef;
|
|
15
|
+
selectAuth?: boolean;
|
|
16
|
+
createAuth?: boolean;
|
|
17
|
+
updateAuth?: boolean;
|
|
18
|
+
deleteAuth?: boolean;
|
|
19
|
+
cuFlag: string;
|
|
20
|
+
}
|
|
21
|
+
export declare class MenuButtonAuthList {
|
|
22
|
+
items: MenuButtonAuth[];
|
|
23
|
+
total: number;
|
|
24
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MenuButtonAuthList = exports.MenuButtonAuthPatch = exports.NewMenuButtonAuth = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const type_graphql_1 = require("type-graphql");
|
|
6
|
+
const shell_1 = require("@things-factory/shell");
|
|
7
|
+
const menu_button_auth_1 = require("./menu-button-auth");
|
|
8
|
+
let NewMenuButtonAuth = class NewMenuButtonAuth {
|
|
9
|
+
};
|
|
10
|
+
exports.NewMenuButtonAuth = NewMenuButtonAuth;
|
|
11
|
+
tslib_1.__decorate([
|
|
12
|
+
(0, type_graphql_1.Field)(type => shell_1.ObjectRef),
|
|
13
|
+
tslib_1.__metadata("design:type", shell_1.ObjectRef)
|
|
14
|
+
], NewMenuButtonAuth.prototype, "role", void 0);
|
|
15
|
+
tslib_1.__decorate([
|
|
16
|
+
(0, type_graphql_1.Field)(type => shell_1.ObjectRef),
|
|
17
|
+
tslib_1.__metadata("design:type", shell_1.ObjectRef)
|
|
18
|
+
], NewMenuButtonAuth.prototype, "menu", void 0);
|
|
19
|
+
tslib_1.__decorate([
|
|
20
|
+
(0, type_graphql_1.Field)({ nullable: false }),
|
|
21
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
22
|
+
], NewMenuButtonAuth.prototype, "selectAuth", void 0);
|
|
23
|
+
tslib_1.__decorate([
|
|
24
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
25
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
26
|
+
], NewMenuButtonAuth.prototype, "createAuth", void 0);
|
|
27
|
+
tslib_1.__decorate([
|
|
28
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
29
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
30
|
+
], NewMenuButtonAuth.prototype, "updateAuth", void 0);
|
|
31
|
+
tslib_1.__decorate([
|
|
32
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
33
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
34
|
+
], NewMenuButtonAuth.prototype, "deleteAuth", void 0);
|
|
35
|
+
exports.NewMenuButtonAuth = NewMenuButtonAuth = tslib_1.__decorate([
|
|
36
|
+
(0, type_graphql_1.InputType)()
|
|
37
|
+
], NewMenuButtonAuth);
|
|
38
|
+
let MenuButtonAuthPatch = class MenuButtonAuthPatch {
|
|
39
|
+
};
|
|
40
|
+
exports.MenuButtonAuthPatch = MenuButtonAuthPatch;
|
|
41
|
+
tslib_1.__decorate([
|
|
42
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
|
|
43
|
+
tslib_1.__metadata("design:type", String)
|
|
44
|
+
], MenuButtonAuthPatch.prototype, "id", void 0);
|
|
45
|
+
tslib_1.__decorate([
|
|
46
|
+
(0, type_graphql_1.Field)(type => shell_1.ObjectRef),
|
|
47
|
+
tslib_1.__metadata("design:type", shell_1.ObjectRef)
|
|
48
|
+
], MenuButtonAuthPatch.prototype, "role", void 0);
|
|
49
|
+
tslib_1.__decorate([
|
|
50
|
+
(0, type_graphql_1.Field)(type => shell_1.ObjectRef),
|
|
51
|
+
tslib_1.__metadata("design:type", shell_1.ObjectRef)
|
|
52
|
+
], MenuButtonAuthPatch.prototype, "menu", void 0);
|
|
53
|
+
tslib_1.__decorate([
|
|
54
|
+
(0, type_graphql_1.Field)({ nullable: false }),
|
|
55
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
56
|
+
], MenuButtonAuthPatch.prototype, "selectAuth", void 0);
|
|
57
|
+
tslib_1.__decorate([
|
|
58
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
59
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
60
|
+
], MenuButtonAuthPatch.prototype, "createAuth", void 0);
|
|
61
|
+
tslib_1.__decorate([
|
|
62
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
63
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
64
|
+
], MenuButtonAuthPatch.prototype, "updateAuth", void 0);
|
|
65
|
+
tslib_1.__decorate([
|
|
66
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
67
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
68
|
+
], MenuButtonAuthPatch.prototype, "deleteAuth", void 0);
|
|
69
|
+
tslib_1.__decorate([
|
|
70
|
+
(0, type_graphql_1.Field)(),
|
|
71
|
+
tslib_1.__metadata("design:type", String)
|
|
72
|
+
], MenuButtonAuthPatch.prototype, "cuFlag", void 0);
|
|
73
|
+
exports.MenuButtonAuthPatch = MenuButtonAuthPatch = tslib_1.__decorate([
|
|
74
|
+
(0, type_graphql_1.InputType)()
|
|
75
|
+
], MenuButtonAuthPatch);
|
|
76
|
+
let MenuButtonAuthList = class MenuButtonAuthList {
|
|
77
|
+
};
|
|
78
|
+
exports.MenuButtonAuthList = MenuButtonAuthList;
|
|
79
|
+
tslib_1.__decorate([
|
|
80
|
+
(0, type_graphql_1.Field)(type => [menu_button_auth_1.MenuButtonAuth]),
|
|
81
|
+
tslib_1.__metadata("design:type", Array)
|
|
82
|
+
], MenuButtonAuthList.prototype, "items", void 0);
|
|
83
|
+
tslib_1.__decorate([
|
|
84
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int),
|
|
85
|
+
tslib_1.__metadata("design:type", Number)
|
|
86
|
+
], MenuButtonAuthList.prototype, "total", void 0);
|
|
87
|
+
exports.MenuButtonAuthList = MenuButtonAuthList = tslib_1.__decorate([
|
|
88
|
+
(0, type_graphql_1.ObjectType)()
|
|
89
|
+
], MenuButtonAuthList);
|
|
90
|
+
//# sourceMappingURL=menu-button-auth-type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu-button-auth-type.js","sourceRoot":"","sources":["../../../server/service/menu-button-auth/menu-button-auth-type.ts"],"names":[],"mappings":";;;;AACA,+CAA6F;AAC7F,iDAAiD;AAEjD,yDAAmD;AAG5C,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;CAmB7B,CAAA;AAnBY,8CAAiB;AAG5B;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAS,CAAC;sCACnB,iBAAS;+CAAA;AAGf;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAS,CAAC;sCACnB,iBAAS;+CAAA;AAGf;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;qDACP;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACN;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACN;AAG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, Int, ID, Float, registerEnumType } from 'type-graphql'\nimport { ObjectRef } from '@things-factory/shell'\n\nimport { MenuButtonAuth } from './menu-button-auth'\n\n@InputType()\nexport class NewMenuButtonAuth {\n\n @Field(type => ObjectRef)\n role: ObjectRef\n\n @Field(type => ObjectRef)\n menu: ObjectRef\n\n @Field({ nullable: false })\n selectAuth?: boolean\n\n @Field({ nullable: true })\n createAuth?: boolean\n\n @Field({ nullable: true })\n updateAuth?: boolean\n\n @Field({ nullable: true })\n deleteAuth?: boolean\n}\n\n@InputType()\nexport class MenuButtonAuthPatch {\n @Field(type => ID, { nullable: true })\n id?: string\n\n @Field(type => ObjectRef)\n role: ObjectRef\n\n @Field(type => ObjectRef)\n menu: ObjectRef\n\n @Field({ nullable: false })\n selectAuth?: boolean\n\n @Field({ nullable: true })\n createAuth?: boolean\n\n @Field({ nullable: true })\n updateAuth?: boolean\n\n @Field({ nullable: true })\n deleteAuth?: boolean\n\n @Field()\n cuFlag: string\n}\n\n@ObjectType()\nexport class MenuButtonAuthList {\n @Field(type => [MenuButtonAuth])\n items: MenuButtonAuth[]\n\n @Field(type => Int)\n total: number\n}\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Domain } from '@things-factory/shell';
|
|
2
|
+
import { User } from '@things-factory/auth-base';
|
|
3
|
+
import { Menu } from '@things-factory/menu-base';
|
|
4
|
+
import { ButtonRole } from './../button-role/button-role';
|
|
5
|
+
export declare class MenuButtonAuth {
|
|
6
|
+
readonly id: string;
|
|
7
|
+
role: ButtonRole;
|
|
8
|
+
roleId: string;
|
|
9
|
+
menu: Menu;
|
|
10
|
+
menuId: string;
|
|
11
|
+
selectAuth?: boolean;
|
|
12
|
+
createAuth?: boolean;
|
|
13
|
+
updateAuth?: boolean;
|
|
14
|
+
deleteAuth?: boolean;
|
|
15
|
+
domain: Domain;
|
|
16
|
+
domainId: string;
|
|
17
|
+
createdAt?: Date;
|
|
18
|
+
updatedAt?: Date;
|
|
19
|
+
creator?: User;
|
|
20
|
+
creatorId?: string;
|
|
21
|
+
updater?: User;
|
|
22
|
+
updaterId?: string;
|
|
23
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MenuButtonAuth = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const typeorm_1 = require("typeorm");
|
|
6
|
+
const type_graphql_1 = require("type-graphql");
|
|
7
|
+
const shell_1 = require("@things-factory/shell");
|
|
8
|
+
const auth_base_1 = require("@things-factory/auth-base");
|
|
9
|
+
const menu_base_1 = require("@things-factory/menu-base");
|
|
10
|
+
const button_role_1 = require("./../button-role/button-role");
|
|
11
|
+
let MenuButtonAuth = class MenuButtonAuth {
|
|
12
|
+
};
|
|
13
|
+
exports.MenuButtonAuth = MenuButtonAuth;
|
|
14
|
+
tslib_1.__decorate([
|
|
15
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
16
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
17
|
+
tslib_1.__metadata("design:type", String)
|
|
18
|
+
], MenuButtonAuth.prototype, "id", void 0);
|
|
19
|
+
tslib_1.__decorate([
|
|
20
|
+
(0, typeorm_1.ManyToOne)(type => button_role_1.ButtonRole, { createForeignKeyConstraints: false, nullable: false }),
|
|
21
|
+
(0, type_graphql_1.Field)({ nullable: false }),
|
|
22
|
+
tslib_1.__metadata("design:type", button_role_1.ButtonRole)
|
|
23
|
+
], MenuButtonAuth.prototype, "role", void 0);
|
|
24
|
+
tslib_1.__decorate([
|
|
25
|
+
(0, typeorm_1.RelationId)((menuButtonAuth) => menuButtonAuth.role),
|
|
26
|
+
tslib_1.__metadata("design:type", String)
|
|
27
|
+
], MenuButtonAuth.prototype, "roleId", void 0);
|
|
28
|
+
tslib_1.__decorate([
|
|
29
|
+
(0, typeorm_1.ManyToOne)(type => menu_base_1.Menu, { createForeignKeyConstraints: false, nullable: false }),
|
|
30
|
+
(0, type_graphql_1.Field)({ nullable: false }),
|
|
31
|
+
tslib_1.__metadata("design:type", menu_base_1.Menu)
|
|
32
|
+
], MenuButtonAuth.prototype, "menu", void 0);
|
|
33
|
+
tslib_1.__decorate([
|
|
34
|
+
(0, typeorm_1.RelationId)((menuButtonAuth) => menuButtonAuth.menu),
|
|
35
|
+
tslib_1.__metadata("design:type", String)
|
|
36
|
+
], MenuButtonAuth.prototype, "menuId", void 0);
|
|
37
|
+
tslib_1.__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({ name: 'select_auth', type: 'boolean', nullable: true, default: false }),
|
|
39
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
40
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
41
|
+
], MenuButtonAuth.prototype, "selectAuth", void 0);
|
|
42
|
+
tslib_1.__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({ name: 'create_auth', type: 'boolean', nullable: true, default: false }),
|
|
44
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
45
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
46
|
+
], MenuButtonAuth.prototype, "createAuth", void 0);
|
|
47
|
+
tslib_1.__decorate([
|
|
48
|
+
(0, typeorm_1.Column)({ name: 'update_auth', type: 'boolean', nullable: true, default: false }),
|
|
49
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
50
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
51
|
+
], MenuButtonAuth.prototype, "updateAuth", void 0);
|
|
52
|
+
tslib_1.__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ name: 'delete_auth', type: 'boolean', nullable: true, default: false }),
|
|
54
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
55
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
56
|
+
], MenuButtonAuth.prototype, "deleteAuth", void 0);
|
|
57
|
+
tslib_1.__decorate([
|
|
58
|
+
(0, typeorm_1.ManyToOne)(type => shell_1.Domain),
|
|
59
|
+
(0, type_graphql_1.Field)(type => shell_1.Domain, { nullable: false }),
|
|
60
|
+
tslib_1.__metadata("design:type", shell_1.Domain)
|
|
61
|
+
], MenuButtonAuth.prototype, "domain", void 0);
|
|
62
|
+
tslib_1.__decorate([
|
|
63
|
+
(0, typeorm_1.RelationId)((menuButtonAuth) => menuButtonAuth.domain),
|
|
64
|
+
tslib_1.__metadata("design:type", String)
|
|
65
|
+
], MenuButtonAuth.prototype, "domainId", void 0);
|
|
66
|
+
tslib_1.__decorate([
|
|
67
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
68
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
69
|
+
tslib_1.__metadata("design:type", Date)
|
|
70
|
+
], MenuButtonAuth.prototype, "createdAt", void 0);
|
|
71
|
+
tslib_1.__decorate([
|
|
72
|
+
(0, typeorm_1.UpdateDateColumn)(),
|
|
73
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
74
|
+
tslib_1.__metadata("design:type", Date)
|
|
75
|
+
], MenuButtonAuth.prototype, "updatedAt", void 0);
|
|
76
|
+
tslib_1.__decorate([
|
|
77
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { createForeignKeyConstraints: false, nullable: true }),
|
|
78
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
|
|
79
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
80
|
+
], MenuButtonAuth.prototype, "creator", void 0);
|
|
81
|
+
tslib_1.__decorate([
|
|
82
|
+
(0, typeorm_1.RelationId)((menuButtonAuth) => menuButtonAuth.creator),
|
|
83
|
+
tslib_1.__metadata("design:type", String)
|
|
84
|
+
], MenuButtonAuth.prototype, "creatorId", void 0);
|
|
85
|
+
tslib_1.__decorate([
|
|
86
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { createForeignKeyConstraints: false, nullable: true }),
|
|
87
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
|
|
88
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
89
|
+
], MenuButtonAuth.prototype, "updater", void 0);
|
|
90
|
+
tslib_1.__decorate([
|
|
91
|
+
(0, typeorm_1.RelationId)((menuButtonAuth) => menuButtonAuth.updater),
|
|
92
|
+
tslib_1.__metadata("design:type", String)
|
|
93
|
+
], MenuButtonAuth.prototype, "updaterId", void 0);
|
|
94
|
+
exports.MenuButtonAuth = MenuButtonAuth = tslib_1.__decorate([
|
|
95
|
+
(0, typeorm_1.Entity)('menu_button_auth'),
|
|
96
|
+
(0, typeorm_1.Index)('ix_menu_button_auth_0', (menuButtonAuth) => [menuButtonAuth.domain, menuButtonAuth.role, menuButtonAuth.menu], { unique: true }),
|
|
97
|
+
(0, typeorm_1.Index)('ix_menu_button_auth_1', (menuButtonAuth) => [menuButtonAuth.domain, menuButtonAuth.role], {
|
|
98
|
+
unique: false
|
|
99
|
+
}),
|
|
100
|
+
(0, type_graphql_1.ObjectType)({ description: 'Entity for MenuButtonAuth' })
|
|
101
|
+
], MenuButtonAuth);
|
|
102
|
+
//# sourceMappingURL=menu-button-auth.js.map
|