@giteeteam/apps-team-components 0.3.13 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/{common → components/common}/EmptyField.d.ts +2 -1
- package/dist/components/common/EmptyField.js +8 -0
- package/dist/components/common/overflow-tooltip/BaseOverflowTooltip.d.ts +11 -0
- package/dist/components/common/overflow-tooltip/BaseOverflowTooltip.js +25 -0
- package/dist/components/common/overflow-tooltip/SimpleOverflowToolTip.d.ts +9 -0
- package/dist/components/common/overflow-tooltip/SimpleOverflowToolTip.js +14 -0
- package/dist/components/common/overflow-tooltip/style/index.d.ts +3 -0
- package/dist/components/common/overflow-tooltip/style/index.js +19 -0
- package/dist/components/common/style/global.d.ts +1 -0
- package/dist/components/common/style/global.js +4 -0
- package/dist/{common → components/common}/user-field/UserAvatar.d.ts +3 -3
- package/dist/components/common/user-field/UserAvatar.js +13 -0
- package/dist/components/common/user-field/style/index.d.ts +3 -0
- package/dist/components/common/user-field/style/index.js +26 -0
- package/dist/components/common/utils.d.ts +6 -0
- package/dist/components/common/utils.js +39 -0
- package/dist/components/field-behavior/fields/type.d.ts +1 -0
- package/dist/components/field-behavior/fields/type.js +6 -0
- package/dist/components/fields/actors/BaseField.d.ts +1 -0
- package/dist/components/fields/actors/BaseField.js +7 -0
- package/dist/components/fields/actors/ReadView.d.ts +4 -0
- package/dist/components/fields/actors/ReadView.js +29 -0
- package/dist/components/fields/assignee/ReadView.d.ts +7 -0
- package/dist/components/fields/assignee/ReadView.js +21 -0
- package/dist/components/fields/base-component/types.d.ts +7 -0
- package/dist/components/fields/base-component/types.js +1 -0
- package/dist/components/fields/bind-workspace/ReadView.d.ts +4 -0
- package/dist/components/fields/bind-workspace/ReadView.js +18 -0
- package/dist/components/fields/bind-workspace/hooks.d.ts +3 -0
- package/dist/components/fields/bind-workspace/hooks.js +16 -0
- package/dist/components/fields/bind-workspace/style/index.d.ts +1 -0
- package/dist/components/fields/bind-workspace/style/index.js +5 -0
- package/dist/components/fields/checkbox/ReadView.d.ts +5 -0
- package/dist/components/fields/checkbox/ReadView.js +21 -0
- package/dist/components/fields/created-at/ReadView.d.ts +5 -0
- package/dist/components/fields/created-at/ReadView.js +21 -0
- package/dist/components/fields/created-by/ReadView.d.ts +6 -0
- package/dist/components/fields/created-by/ReadView.js +25 -0
- package/dist/components/fields/data-quote/ReadView.d.ts +7 -0
- package/dist/components/fields/data-quote/ReadView.js +22 -0
- package/dist/components/fields/data-quote/utils.d.ts +3 -0
- package/dist/components/fields/data-quote/utils.js +25 -0
- package/dist/components/fields/date/ReadView.d.ts +8 -0
- package/dist/components/fields/date/ReadView.js +14 -0
- package/dist/components/fields/dropdown/BaseField.d.ts +6 -0
- package/dist/components/fields/dropdown/BaseField.js +4 -0
- package/dist/components/fields/dropdown/ReadView.d.ts +4 -0
- package/dist/components/fields/dropdown/ReadView.js +22 -0
- package/dist/components/fields/file/ReadView.d.ts +4 -0
- package/dist/components/fields/file/ReadView.js +14 -0
- package/dist/components/fields/formula/ReadView.d.ts +9 -0
- package/dist/components/fields/formula/ReadView.js +14 -0
- package/dist/components/fields/hooks/useParamsAdapter.d.ts +11 -0
- package/dist/components/fields/hooks/useParamsAdapter.js +1 -0
- package/dist/components/fields/hyper-link/ReadView.d.ts +12 -0
- package/dist/components/fields/hyper-link/ReadView.js +16 -0
- package/dist/components/fields/hyper-link/style/index.d.ts +3 -0
- package/dist/components/fields/hyper-link/style/index.js +19 -0
- package/dist/components/fields/item-group/ReadView.d.ts +5 -0
- package/dist/components/fields/item-group/ReadView.js +6 -0
- package/dist/components/fields/item-type/ReadView.d.ts +4 -0
- package/dist/components/fields/item-type/ReadView.js +9 -0
- package/dist/components/fields/key/ReadView.d.ts +4 -0
- package/dist/components/fields/key/ReadView.js +9 -0
- package/dist/components/fields/long-text/ReadView.d.ts +4 -0
- package/dist/components/fields/long-text/ReadView.js +10 -0
- package/dist/components/fields/long-text/style/index.d.ts +1 -0
- package/dist/components/fields/long-text/style/index.js +7 -0
- package/dist/{cells → components/fields}/number/BaseField.d.ts +4 -5
- package/dist/components/fields/number/BaseField.js +4 -0
- package/dist/components/fields/number/ReadView.d.ts +4 -0
- package/dist/components/fields/number/ReadView.js +21 -0
- package/dist/components/fields/priority/ReadView.d.ts +15 -0
- package/dist/components/fields/priority/ReadView.js +17 -0
- package/dist/components/fields/priority/style/index.d.ts +3 -0
- package/dist/components/fields/priority/style/index.js +30 -0
- package/dist/components/fields/radio/BaseField.d.ts +13 -0
- package/dist/components/fields/radio/BaseField.js +1 -0
- package/dist/components/fields/radio/ReadView.d.ts +5 -0
- package/dist/components/fields/radio/ReadView.js +19 -0
- package/dist/components/fields/reporter/ReadView.d.ts +7 -0
- package/dist/components/fields/reporter/ReadView.js +25 -0
- package/dist/components/fields/script/BaseField.d.ts +10 -0
- package/dist/components/fields/script/BaseField.js +12 -0
- package/dist/components/fields/script/ReadView.d.ts +4 -0
- package/dist/components/fields/script/ReadView.js +21 -0
- package/dist/components/fields/sprint/ReadView.d.ts +4 -0
- package/dist/components/fields/sprint/ReadView.js +12 -0
- package/dist/{cells/status/index.d.ts → components/fields/status/Cell.d.ts} +1 -1
- package/dist/components/fields/status/Cell.js +19 -0
- package/dist/{cells → components/fields}/status/Field.d.ts +8 -8
- package/dist/components/fields/status/Field.js +1 -0
- package/dist/components/fields/status/ReadView.d.ts +4 -0
- package/dist/components/fields/status/ReadView.js +22 -0
- package/dist/{cells → components/fields}/status/Transition.d.ts +4 -3
- package/dist/components/fields/status/Transition.js +44 -0
- package/dist/{cells → components/fields}/status/TransitionButton.d.ts +9 -2
- package/dist/components/fields/status/TransitionButton.js +122 -0
- package/dist/{cells → components/fields}/status/TransitionPanel.d.ts +4 -1
- package/dist/components/fields/status/TransitionPanel.js +245 -0
- package/dist/{cells → components/fields}/status/View.d.ts +2 -2
- package/dist/components/fields/status/View.js +20 -0
- package/dist/components/fields/status/style/index.d.ts +20 -0
- package/dist/components/fields/status/style/index.js +155 -0
- package/dist/components/fields/story-point/ReadView.d.ts +4 -0
- package/dist/components/fields/story-point/ReadView.js +10 -0
- package/dist/{cells → components/fields}/tag/BaseField.d.ts +6 -7
- package/dist/components/fields/tag/BaseField.js +1 -0
- package/dist/components/fields/tag/ReadView.d.ts +6 -0
- package/dist/components/fields/tag/ReadView.js +20 -0
- package/dist/components/fields/tag/style/index.d.ts +1 -0
- package/dist/components/fields/tag/style/index.js +7 -0
- package/dist/components/fields/team/ReadView.d.ts +5 -0
- package/dist/components/fields/team/ReadView.js +17 -0
- package/dist/components/fields/team/style/index.d.ts +2 -0
- package/dist/components/fields/team/style/index.js +5 -0
- package/dist/{cells → components/fields}/text/BaseField.d.ts +5 -5
- package/dist/components/fields/text/BaseField.js +1 -0
- package/dist/components/fields/text/ReadView.d.ts +4 -0
- package/dist/components/fields/text/ReadView.js +18 -0
- package/dist/{cells → components/fields}/tree/BaseField.d.ts +4 -6
- package/dist/components/fields/tree/BaseField.js +1 -0
- package/dist/components/fields/tree/ReadView.d.ts +4 -0
- package/dist/components/fields/tree/ReadView.js +56 -0
- package/dist/components/fields/tree/utils.js +22 -0
- package/dist/components/fields/types.d.ts +6 -0
- package/dist/components/fields/types.js +1 -0
- package/dist/components/fields/updated-at/ReadView.d.ts +5 -0
- package/dist/components/fields/updated-at/ReadView.js +21 -0
- package/dist/components/fields/updated-by/ReadView.d.ts +6 -0
- package/dist/components/fields/updated-by/ReadView.js +25 -0
- package/dist/components/fields/user/ReadView.d.ts +4 -0
- package/dist/components/fields/user/ReadView.js +22 -0
- package/dist/components/fields/user/style/index.d.ts +3 -0
- package/dist/components/fields/user/style/index.js +13 -0
- package/dist/components/fields/user-group/ActionCell.d.ts +7 -0
- package/dist/components/fields/user-group/ActionCell.js +1 -0
- package/dist/components/fields/user-group/BaseField.d.ts +16 -0
- package/dist/components/fields/user-group/BaseField.js +1 -0
- package/dist/components/fields/user-group/ReadView.d.ts +5 -0
- package/dist/components/fields/user-group/ReadView.js +55 -0
- package/dist/components/fields/version/ReadView.d.ts +5 -0
- package/dist/components/fields/version/ReadView.js +12 -0
- package/dist/components/fields/workspace/ReadView.d.ts +8 -0
- package/dist/components/fields/workspace/ReadView.js +9 -0
- package/dist/components/item/hooks.d.ts +1 -0
- package/dist/components/item/hooks.js +5 -0
- package/dist/components/table-components/EditTableCell.d.ts +16 -0
- package/dist/components/table-components/EditTableCell.js +17 -0
- package/dist/components/table-components/index.d.ts +12 -0
- package/dist/components/table-components/index.js +67 -0
- package/dist/components/table-components/style/index.d.ts +1 -0
- package/dist/components/table-components/style/index.js +9 -0
- package/dist/components/table-components/utils.d.ts +4 -0
- package/dist/components/table-components/utils.js +88 -0
- package/dist/icons/index.d.ts +7 -48
- package/dist/icons/index.js +10 -0
- package/dist/icons/svg/HollowCircle.svg +6 -0
- package/dist/icons/svg/Workflow.svg +12 -0
- package/dist/index.d.ts +41 -47
- package/dist/index.js +43 -3
- package/dist/lib/array.d.ts +10 -0
- package/dist/lib/array.js +44 -0
- package/dist/lib/contexts/antdConfig.d.ts +9 -0
- package/dist/lib/contexts/antdConfig.js +11 -0
- package/dist/lib/contexts/currentUser.d.ts +17 -0
- package/dist/lib/contexts/currentUser.js +9 -0
- package/dist/lib/contexts/currentWorkspace.d.ts +8 -0
- package/dist/lib/contexts/currentWorkspace.js +9 -0
- package/dist/lib/contexts/datetimeFormat.d.ts +9 -0
- package/dist/lib/contexts/datetimeFormat.js +9 -0
- package/dist/lib/contexts/index.d.ts +13 -7
- package/dist/lib/contexts/index.js +17 -0
- package/dist/lib/contexts/itemConfig.d.ts +11 -0
- package/dist/lib/contexts/itemConfig.js +9 -0
- package/dist/lib/contexts/teamConfig.d.ts +9 -0
- package/dist/lib/contexts/teamConfig.js +10 -0
- package/dist/lib/contexts/tenant.d.ts +8 -0
- package/dist/lib/contexts/tenant.js +9 -0
- package/dist/lib/contexts/workflowConfig.d.ts +15 -0
- package/dist/lib/contexts/workflowConfig.js +9 -0
- package/dist/lib/dataType.d.ts +2 -0
- package/dist/lib/dataType.js +16 -0
- package/dist/lib/date.d.ts +7 -1
- package/dist/lib/date.js +87 -0
- package/dist/lib/dayjs.d.ts +0 -1
- package/dist/lib/dayjs.js +4 -0
- package/dist/lib/global.d.ts +42 -1053
- package/dist/lib/global.js +97 -0
- package/dist/lib/hooks/useAntdConfig.d.ts +3 -0
- package/dist/lib/hooks/useAntdConfig.js +7 -0
- package/dist/lib/hooks/useCurrentUser.d.ts +2 -2
- package/dist/lib/hooks/useCurrentUser.js +7 -0
- package/dist/lib/hooks/useCurrentWorkspace.d.ts +3 -0
- package/dist/lib/hooks/useCurrentWorkspace.js +7 -0
- package/dist/lib/hooks/useDataQuoteStore.d.ts +4 -3
- package/dist/lib/hooks/useDataQuoteStore.js +65 -0
- package/dist/lib/hooks/useDateTimeFormatType.d.ts +3 -0
- package/dist/lib/hooks/useDateTimeFormatType.js +7 -0
- package/dist/lib/hooks/useI18n.d.ts +4 -1
- package/dist/lib/hooks/useI18n.js +7 -0
- package/dist/lib/hooks/useItemConfig.d.ts +3 -0
- package/dist/lib/hooks/useItemConfig.js +7 -0
- package/dist/lib/hooks/useTeamConfig.d.ts +3 -0
- package/dist/lib/hooks/useTeamConfig.js +7 -0
- package/dist/lib/hooks/useTenant.d.ts +2 -0
- package/dist/lib/hooks/useTenant.js +7 -0
- package/dist/lib/hooks/useWorkflowConfig.d.ts +3 -0
- package/dist/lib/hooks/useWorkflowConfig.js +7 -0
- package/dist/lib/i18n.d.ts +4 -22
- package/dist/lib/i18n.js +34 -0
- package/dist/lib/isInOne.d.ts +2 -0
- package/dist/lib/isInOne.js +12 -0
- package/dist/lib/number.d.ts +1 -0
- package/dist/lib/number.js +3 -0
- package/dist/lib/regExp.d.ts +1 -11
- package/dist/lib/regExp.js +1 -0
- package/dist/lib/store/dataQuoteStore.js +9 -0
- package/dist/lib/swr/constants.d.ts +30 -0
- package/dist/lib/swr/constants.js +32 -0
- package/dist/lib/swr/hooks.d.ts +7 -0
- package/dist/lib/swr/hooks.js +14 -0
- package/dist/lib/useUser.d.ts +4 -50
- package/dist/lib/useUser.js +33 -0
- package/dist/lib/users.d.ts +6 -3
- package/dist/lib/users.js +8 -0
- package/dist/lib/workflow.d.ts +31 -31
- package/dist/lib/workflow.js +371 -0
- package/dist/locales/index.d.ts +117 -0
- package/dist/locales/index.js +117 -0
- package/dist/style/common.d.ts +23 -0
- package/dist/style/common.js +23 -0
- package/package.json +37 -93
- package/dist/cells/actors/BaseField.d.ts +0 -17
- package/dist/cells/actors/index.d.ts +0 -4
- package/dist/cells/annex/index.d.ts +0 -7
- package/dist/cells/assignee/index.d.ts +0 -23
- package/dist/cells/bind-workspace/BaseField.d.ts +0 -15
- package/dist/cells/bind-workspace/index.d.ts +0 -12
- package/dist/cells/board/index.d.ts +0 -22
- package/dist/cells/card-type/index.d.ts +0 -6
- package/dist/cells/checkbox/BaseField.d.ts +0 -14
- package/dist/cells/created-at/index.d.ts +0 -7
- package/dist/cells/created-by/index.d.ts +0 -9
- package/dist/cells/data-quote/index.d.ts +0 -8
- package/dist/cells/data-quote/util.d.ts +0 -9
- package/dist/cells/date/BaseField.d.ts +0 -21
- package/dist/cells/date/index.d.ts +0 -6
- package/dist/cells/date-range/BaseField.d.ts +0 -19
- package/dist/cells/date-range/index.d.ts +0 -6
- package/dist/cells/dropdown/BaseField.d.ts +0 -30
- package/dist/cells/dropdown/index.d.ts +0 -22
- package/dist/cells/editor/BaseField.d.ts +0 -29
- package/dist/cells/editor/Field.d.ts +0 -16
- package/dist/cells/editor/config/autoformatRules.d.ts +0 -3
- package/dist/cells/editor/config/index.d.ts +0 -5
- package/dist/cells/editor/config/pluginOptions.d.ts +0 -10
- package/dist/cells/editor/config/withDeserializeHTML.d.ts +0 -64
- package/dist/cells/editor/config/withStyledDraggables.d.ts +0 -2
- package/dist/cells/editor/config/withStyledPlaceHolders.d.ts +0 -2
- package/dist/cells/editor/elements/ImageElement.d.ts +0 -3
- package/dist/cells/editor/elements/MentionElement.d.ts +0 -3
- package/dist/cells/editor/elements/index.d.ts +0 -2
- package/dist/cells/editor/hooks.d.ts +0 -11
- package/dist/cells/editor/index.d.ts +0 -15
- package/dist/cells/editor/plugins/Fullscreen.d.ts +0 -7
- package/dist/cells/editor/plugins/ToolbarButton.d.ts +0 -3
- package/dist/cells/editor/plugins/ToolbarFont.d.ts +0 -12
- package/dist/cells/editor/plugins/ToolbarFontColor.d.ts +0 -7
- package/dist/cells/editor/plugins/ToolbarHistory.d.ts +0 -7
- package/dist/cells/editor/plugins/ToolbarLink.d.ts +0 -4
- package/dist/cells/editor/plugins/ToolbarTable.d.ts +0 -4
- package/dist/cells/editor/plugins/ToolbarUpload.d.ts +0 -4
- package/dist/cells/editor/plugins/Toolbars.d.ts +0 -11
- package/dist/cells/editor/plugins/font-bg-color/createFontBgColorPlugin.d.ts +0 -3
- package/dist/cells/editor/plugins/font-bg-color/defaults.d.ts +0 -2
- package/dist/cells/editor/plugins/font-bg-color/getFontDeserialize.d.ts +0 -2
- package/dist/cells/editor/plugins/font-bg-color/index.d.ts +0 -3
- package/dist/cells/editor/plugins/font-color/createFontColorPlugin.d.ts +0 -3
- package/dist/cells/editor/plugins/font-color/defaults.d.ts +0 -2
- package/dist/cells/editor/plugins/font-color/getFontDeserialize.d.ts +0 -2
- package/dist/cells/editor/plugins/font-color/index.d.ts +0 -3
- package/dist/cells/editor/plugins/font-family/createFontFamilyPlugin.d.ts +0 -3
- package/dist/cells/editor/plugins/font-family/defaults.d.ts +0 -2
- package/dist/cells/editor/plugins/font-family/getFontDeserialize.d.ts +0 -2
- package/dist/cells/editor/plugins/font-family/index.d.ts +0 -3
- package/dist/cells/editor/plugins/font-line-height/createFontLineHeightPlugin.d.ts +0 -3
- package/dist/cells/editor/plugins/font-line-height/defaults.d.ts +0 -2
- package/dist/cells/editor/plugins/font-line-height/getFontDeserialize.d.ts +0 -2
- package/dist/cells/editor/plugins/font-line-height/index.d.ts +0 -3
- package/dist/cells/editor/plugins/font-size/createFontSizePlugin.d.ts +0 -3
- package/dist/cells/editor/plugins/font-size/defaults.d.ts +0 -2
- package/dist/cells/editor/plugins/font-size/getFontDeserialize.d.ts +0 -2
- package/dist/cells/editor/plugins/font-size/index.d.ts +0 -3
- package/dist/cells/editor/plugins/image/createImagePlugin.d.ts +0 -3
- package/dist/cells/editor/plugins/image/getImageDeserialize.d.ts +0 -2
- package/dist/cells/editor/plugins/image/index.d.ts +0 -3
- package/dist/cells/editor/plugins/image/insertImage.d.ts +0 -2
- package/dist/cells/editor/plugins/image/withImageUpload.d.ts +0 -3
- package/dist/cells/editor/plugins/index.d.ts +0 -6
- package/dist/cells/editor/utils.d.ts +0 -13
- package/dist/cells/file/BaseField.d.ts +0 -15
- package/dist/cells/file/UploadFile.d.ts +0 -19
- package/dist/cells/file/index.d.ts +0 -13
- package/dist/cells/formula/BaseField.d.ts +0 -10
- package/dist/cells/formula/index.d.ts +0 -9
- package/dist/cells/item-group/index.d.ts +0 -22
- package/dist/cells/item-type/index.d.ts +0 -23
- package/dist/cells/key/index.d.ts +0 -6
- package/dist/cells/long-text/BaseField.d.ts +0 -17
- package/dist/cells/long-text/index.d.ts +0 -15
- package/dist/cells/name/index.d.ts +0 -14
- package/dist/cells/number/index.d.ts +0 -23
- package/dist/cells/priority/index.d.ts +0 -16
- package/dist/cells/radio/BaseField.d.ts +0 -14
- package/dist/cells/script/BaseField.d.ts +0 -8
- package/dist/cells/script/index.d.ts +0 -7
- package/dist/cells/security-level/BaseField.d.ts +0 -19
- package/dist/cells/sprint/index.d.ts +0 -22
- package/dist/cells/status/hooks.d.ts +0 -3
- package/dist/cells/story-point/index.d.ts +0 -23
- package/dist/cells/tableCellMapping.d.ts +0 -23
- package/dist/cells/tag/tag-multiple-select/PopoverPanel.d.ts +0 -4
- package/dist/cells/tag/tag-multiple-select/TagPopoverSelect.d.ts +0 -4
- package/dist/cells/text/index.d.ts +0 -16
- package/dist/cells/time/BaseField.d.ts +0 -15
- package/dist/cells/time/index.d.ts +0 -6
- package/dist/cells/time-range/BaseField.d.ts +0 -20
- package/dist/cells/time-range/index.d.ts +0 -7
- package/dist/cells/updated-at/index.d.ts +0 -7
- package/dist/cells/updated-by/index.d.ts +0 -9
- package/dist/cells/user/BaseField.d.ts +0 -27
- package/dist/cells/user/index.d.ts +0 -21
- package/dist/cells/version/index.d.ts +0 -22
- package/dist/cells/workspace/index.d.ts +0 -22
- package/dist/common/FieldErrorBoundary.d.ts +0 -14
- package/dist/common/OverflowTooltip.d.ts +0 -23
- package/dist/common/UploadFile.d.ts +0 -19
- package/dist/common/base-table/ChildCardInlineCreator.d.ts +0 -9
- package/dist/common/base-table/index.d.ts +0 -16
- package/dist/common/columns-settings/ColumnsSettings.d.ts +0 -5
- package/dist/common/columns-settings/ColumnsSettingsItem.d.ts +0 -4
- package/dist/common/data-source/context.d.ts +0 -2
- package/dist/common/date/DatePicker.d.ts +0 -11
- package/dist/common/date/TimePicker.d.ts +0 -19
- package/dist/common/filters/filter-query/FilterPanel.d.ts +0 -4
- package/dist/common/filters/filter-query/IqlExpression.d.ts +0 -6
- package/dist/common/filters/filter-query/QuerySelector.d.ts +0 -4
- package/dist/common/filters/filter-query/utils.d.ts +0 -18
- package/dist/common/form-field/FormField.d.ts +0 -15
- package/dist/common/form-field/pure-field/FieldLayout.d.ts +0 -5
- package/dist/common/form-field/pure-field/FormikEnhance.d.ts +0 -1
- package/dist/common/form-field/pure-field/PureField.d.ts +0 -8
- package/dist/common/formik-field-touched/FormikFieldTouched.d.ts +0 -2
- package/dist/common/index.d.ts +0 -16
- package/dist/common/item/IssueActionDropdown.d.ts +0 -18
- package/dist/common/item-icon/ItemIcon.d.ts +0 -8
- package/dist/common/plugin/PluginComponents.d.ts +0 -17
- package/dist/common/plugin/PluginErrorContainer.d.ts +0 -15
- package/dist/common/plugin/PluginLoadComponent.d.ts +0 -27
- package/dist/common/search-select/PopoverPanel.d.ts +0 -4
- package/dist/common/search-select/SearchPopoverSelect.d.ts +0 -4
- package/dist/common/status-selector/index.d.ts +0 -9
- package/dist/common/structure/hooks.d.ts +0 -30
- package/dist/common/structure/index.d.ts +0 -11
- package/dist/common/structure/table-components/TableActionMenu.d.ts +0 -18
- package/dist/common/structure/table-components/TableColumnSettings.d.ts +0 -13
- package/dist/common/structure/table-components/TableEmpty.d.ts +0 -6
- package/dist/common/structure/table-components/TableTitleCell.d.ts +0 -16
- package/dist/common/structure/table-components/index.d.ts +0 -11
- package/dist/common/structure/table-components/tableCellMapping.d.ts +0 -23
- package/dist/common/structure/table-components/useCacheColumns.d.ts +0 -13
- package/dist/common/structure/table-components/useTableColumns.d.ts +0 -22
- package/dist/common/structure/table-components/useTableMenu.d.ts +0 -42
- package/dist/common/structure-table/Table.d.ts +0 -4
- package/dist/common/structure-table/components/Action.d.ts +0 -15
- package/dist/common/structure-table/components/Collapse.d.ts +0 -12
- package/dist/common/structure-table/components/CollapseIcon.d.ts +0 -6
- package/dist/common/structure-table/components/DraggableRow.d.ts +0 -5
- package/dist/common/structure-table/components/Handle.d.ts +0 -3
- package/dist/common/structure-table/components/Row.d.ts +0 -25
- package/dist/common/structure-table/components/index.d.ts +0 -6
- package/dist/common/structure-table/index.d.ts +0 -1
- package/dist/common/user-field/UserField.d.ts +0 -15
- package/dist/common/user-field/index.d.ts +0 -2
- package/dist/common/utils.d.ts +0 -41
- package/dist/common/workflow/View.d.ts +0 -11
- package/dist/common/workflow/config.d.ts +0 -87
- package/dist/common/workflow/nodes/StartNode.d.ts +0 -10
- package/dist/common/workflow/nodes/TaskNode.d.ts +0 -12
- package/dist/common/workflow/nodes/index.d.ts +0 -2
- package/dist/fields/base-component/BaseLabel.d.ts +0 -10
- package/dist/fields/base-component/utils.d.ts +0 -4
- package/dist/fields/data-quote/util.d.ts +0 -9
- package/dist/fields/item-activity/BaseField.d.ts +0 -7
- package/dist/fields/item-activity/Comment.d.ts +0 -7
- package/dist/fields/item-level/hooks.d.ts +0 -15
- package/dist/fields/item-level/utils.d.ts +0 -25
- package/dist/index.js.LICENSE.txt +0 -40
- package/dist/index.js.map +0 -1
- package/dist/lib/ParentMessage.d.ts +0 -7
- package/dist/lib/apis/filter/iql.d.ts +0 -6
- package/dist/lib/apis/forest.d.ts +0 -2
- package/dist/lib/apis/groups/index.d.ts +0 -21
- package/dist/lib/apis/roles/index.d.ts +0 -11
- package/dist/lib/apis/screen/fields.d.ts +0 -21
- package/dist/lib/apis/screen/fieldsBehavior.d.ts +0 -10
- package/dist/lib/apis/screen/index.d.ts +0 -20
- package/dist/lib/contexts/LibraryProvider.d.ts +0 -18
- package/dist/lib/contexts/currentUserAndRoles.d.ts +0 -15
- package/dist/lib/contexts/token.d.ts +0 -13
- package/dist/lib/contexts/users.d.ts +0 -11
- package/dist/lib/contexts/values.d.ts +0 -6
- package/dist/lib/customFields/hooks.d.ts +0 -24
- package/dist/lib/env.d.ts +0 -2
- package/dist/lib/error/index.d.ts +0 -2
- package/dist/lib/error/log.d.ts +0 -13
- package/dist/lib/error/utils.d.ts +0 -13
- package/dist/lib/events.d.ts +0 -11
- package/dist/lib/fetch.d.ts +0 -49
- package/dist/lib/filters/filter-query/utils.d.ts +0 -18
- package/dist/lib/forest.d.ts +0 -60
- package/dist/lib/hooks/index.d.ts +0 -13
- package/dist/lib/hooks/useCustomFields.d.ts +0 -9
- package/dist/lib/hooks/useFieldTypes.d.ts +0 -9
- package/dist/lib/hooks/useFields.d.ts +0 -12
- package/dist/lib/hooks/useItemsInfinite.d.ts +0 -48
- package/dist/lib/hooks/useRemoteComponents.d.ts +0 -25
- package/dist/lib/hooks/useTenants.d.ts +0 -7
- package/dist/lib/hooks/useToken.d.ts +0 -3
- package/dist/lib/hooks/useUsers.d.ts +0 -8
- package/dist/lib/hooks/useWatchItemUpdate.d.ts +0 -32
- package/dist/lib/hooks/useWorkspaces.d.ts +0 -8
- package/dist/lib/iql.d.ts +0 -31
- package/dist/lib/item/hooks.d.ts +0 -31
- package/dist/lib/item/utils.d.ts +0 -34
- package/dist/lib/kanban/hooks.d.ts +0 -8
- package/dist/lib/locales.d.ts +0 -4
- package/dist/lib/models.d.ts +0 -59
- package/dist/lib/parse.d.ts +0 -3
- package/dist/lib/path.d.ts +0 -4
- package/dist/lib/proxima-sdk/components/index.d.ts +0 -2
- package/dist/lib/proxima-sdk/hooks/index.d.ts +0 -4
- package/dist/lib/proxima-sdk/index.d.ts +0 -5
- package/dist/lib/proxima-sdk/lib/index.d.ts +0 -9
- package/dist/lib/proxima-sdk/schema/index.d.ts +0 -2
- package/dist/lib/storage.d.ts +0 -7
- package/dist/lib/store.d.ts +0 -14
- package/dist/lib/types/index.d.ts +0 -3
- package/dist/lib/types/parse-models.d.ts +0 -6
- package/dist/lib/useInitialRecoilState.d.ts +0 -3
- package/dist/lib/useParseQuery.d.ts +0 -53
- package/dist/lib/usePluginManifest.d.ts +0 -33
- package/dist/lib/useWatchApp.d.ts +0 -4
- package/dist/lib/useWorkspace.d.ts +0 -1
- package/dist/lib/workspace.d.ts +0 -2
- package/dist/locales/en/en_US.d.ts +0 -45
- package/dist/locales/en/package/application.d.ts +0 -73
- package/dist/locales/en/package/automation.d.ts +0 -303
- package/dist/locales/en/package/date.d.ts +0 -54
- package/dist/locales/en/package/fields.d.ts +0 -409
- package/dist/locales/en/package/filters.d.ts +0 -89
- package/dist/locales/en/package/formField.d.ts +0 -157
- package/dist/locales/en/package/global.d.ts +0 -318
- package/dist/locales/en/package/item.d.ts +0 -488
- package/dist/locales/en/package/itemTypes.d.ts +0 -154
- package/dist/locales/en/package/lib.d.ts +0 -127
- package/dist/locales/en/package/message.d.ts +0 -251
- package/dist/locales/en/package/pages.d.ts +0 -67
- package/dist/locales/en/package/permission.d.ts +0 -471
- package/dist/locales/en/package/placeholder.d.ts +0 -179
- package/dist/locales/en/package/plugin.d.ts +0 -20
- package/dist/locales/en/package/report.d.ts +0 -150
- package/dist/locales/en/package/reportPlugin.d.ts +0 -183
- package/dist/locales/en/package/screen.d.ts +0 -121
- package/dist/locales/en/package/sections.d.ts +0 -60
- package/dist/locales/en/package/settings.d.ts +0 -194
- package/dist/locales/en/package/sprint.d.ts +0 -52
- package/dist/locales/en/package/users.d.ts +0 -58
- package/dist/locales/en/package/validate.d.ts +0 -138
- package/dist/locales/en/package/views.d.ts +0 -383
- package/dist/locales/en/package/workflow.d.ts +0 -245
- package/dist/locales/en/package/workspace.d.ts +0 -342
- package/dist/locales/zh/package/application.d.ts +0 -73
- package/dist/locales/zh/package/automation.d.ts +0 -303
- package/dist/locales/zh/package/date.d.ts +0 -54
- package/dist/locales/zh/package/fields.d.ts +0 -409
- package/dist/locales/zh/package/filters.d.ts +0 -89
- package/dist/locales/zh/package/formField.d.ts +0 -162
- package/dist/locales/zh/package/global.d.ts +0 -318
- package/dist/locales/zh/package/item.d.ts +0 -489
- package/dist/locales/zh/package/itemTypes.d.ts +0 -153
- package/dist/locales/zh/package/lib.d.ts +0 -127
- package/dist/locales/zh/package/message.d.ts +0 -251
- package/dist/locales/zh/package/pages.d.ts +0 -67
- package/dist/locales/zh/package/permission.d.ts +0 -470
- package/dist/locales/zh/package/placeholder.d.ts +0 -172
- package/dist/locales/zh/package/plugin.d.ts +0 -20
- package/dist/locales/zh/package/report.d.ts +0 -150
- package/dist/locales/zh/package/reportPlugin.d.ts +0 -183
- package/dist/locales/zh/package/screen.d.ts +0 -116
- package/dist/locales/zh/package/sections.d.ts +0 -63
- package/dist/locales/zh/package/settings.d.ts +0 -192
- package/dist/locales/zh/package/sprint.d.ts +0 -52
- package/dist/locales/zh/package/users.d.ts +0 -58
- package/dist/locales/zh/package/validate.d.ts +0 -138
- package/dist/locales/zh/package/views.d.ts +0 -380
- package/dist/locales/zh/package/workflow.d.ts +0 -245
- package/dist/locales/zh/package/workspace.d.ts +0 -344
- package/dist/locales/zh/zh_CN.d.ts +0 -46
- package/dist/main.css +0 -28488
- package/dist/main.css.map +0 -1
- package/dist/osui/index.d.ts +0 -8
- /package/dist/{cells → components/fields}/tree/utils.d.ts +0 -0
- /package/dist/lib/{dataQuoteStore.d.ts → store/dataQuoteStore.d.ts} +0 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { memo, useCallback, useEffect, useRef, useState } from 'react';
|
|
3
|
+
import { CaretDownOutlined } from '@ant-design/icons';
|
|
4
|
+
import { cx } from '@emotion/css';
|
|
5
|
+
import { Button, Popover } from 'antd';
|
|
6
|
+
import { WorkFlowStatusColor } from '../../../lib/global';
|
|
7
|
+
import useAntdConfig from '../../../lib/hooks/useAntdConfig';
|
|
8
|
+
import { i18n } from '../../../lib/i18n';
|
|
9
|
+
import EmptyField from '../../common/EmptyField';
|
|
10
|
+
import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip';
|
|
11
|
+
import { caretDownStyle, flowStateButtonStyle, flowStateInWorkflowStyle, flowStateStyle, noStateStyle, stateBtnStyle, statePopoverStyle, workflowContentStyle, } from './style';
|
|
12
|
+
import TransitionPanel from './TransitionPanel';
|
|
13
|
+
const Transition = props => {
|
|
14
|
+
var _a, _b, _c;
|
|
15
|
+
const { itemId, itemType, workspace, objectId, onTransitionSuccess, name, type, readonly, apply } = props;
|
|
16
|
+
const [popoverVisible, setPopoverVisible] = useState(false);
|
|
17
|
+
const [flowing, setFlowing] = useState(false);
|
|
18
|
+
const isProcessing = useRef(false);
|
|
19
|
+
const [showData, setShowData] = useState({ objectId, name, type });
|
|
20
|
+
const { antPrefix } = useAntdConfig();
|
|
21
|
+
const transitionSuccess = useCallback(({ objectId, name, type }) => {
|
|
22
|
+
setShowData(data => {
|
|
23
|
+
return { ...data, objectId, name, type };
|
|
24
|
+
});
|
|
25
|
+
onTransitionSuccess({ objectId, name, type });
|
|
26
|
+
}, [onTransitionSuccess]);
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
setShowData(data => {
|
|
29
|
+
return { ...data, objectId, name, type };
|
|
30
|
+
});
|
|
31
|
+
}, [objectId, name, type]);
|
|
32
|
+
return (_jsx("div", { className: workflowContentStyle, children: _jsx(Popover, { overlayClassName: statePopoverStyle(antPrefix), destroyTooltipOnHide: true, open: popoverVisible, onOpenChange: visible => {
|
|
33
|
+
if (isProcessing.current || flowing) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
setPopoverVisible(visible);
|
|
37
|
+
}, getPopupContainer: () => document.body, trigger: "click", placement: "bottomLeft", content: _jsx(TransitionPanel, { itemId: itemId, itemType: itemType, workspace: workspace, objectId: showData.objectId, onTransitionSuccess: transitionSuccess, name: name, readonly: readonly, setPopoverVisible: setPopoverVisible, isProcessing: isProcessing, flowing: flowing, setFlowing: setFlowing }), children: _jsxs(Button, { type: "link", className: cx(flowStateStyle, flowStateInWorkflowStyle, flowStateButtonStyle, stateBtnStyle, {
|
|
38
|
+
[noStateStyle]: !showData.name,
|
|
39
|
+
}), style: {
|
|
40
|
+
backgroundColor: (_a = WorkFlowStatusColor[showData.type]) === null || _a === void 0 ? void 0 : _a.bgColor,
|
|
41
|
+
color: (_b = WorkFlowStatusColor[showData.type]) === null || _b === void 0 ? void 0 : _b.color,
|
|
42
|
+
}, children: [_jsx(BaseOverflowTooltip, { title: showData.name, children: showData.name || (apply === 'cell' ? _jsx(EmptyField, { readonly: readonly }) : i18n.t('global.stateless')) }), apply !== 'cell' && (_jsx(CaretDownOutlined, { className: caretDownStyle, style: { color: (_c = WorkFlowStatusColor[showData.type]) === null || _c === void 0 ? void 0 : _c.color, marginLeft: 0 } }))] }) }) }));
|
|
43
|
+
};
|
|
44
|
+
export default memo(Transition);
|
|
@@ -1,27 +1,34 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ItemResultProps } from '
|
|
3
|
-
import { ConditionType, ListItemType, NodeItemProps } from '
|
|
2
|
+
import { ItemResultProps } from '../../../lib/types/item';
|
|
3
|
+
import { ApprovalData, CheckInData, ConditionType, ListItemType, NodeItemProps } from '../../../lib/types/workflow';
|
|
4
4
|
interface FlowButtonProps {
|
|
5
5
|
itemId: string;
|
|
6
6
|
loading: boolean;
|
|
7
7
|
text: string;
|
|
8
8
|
screenId: string;
|
|
9
9
|
item: ItemResultProps;
|
|
10
|
+
workspace: string;
|
|
10
11
|
authRoles: ListItemType[] | undefined;
|
|
11
12
|
authUsers: ListItemType[] | undefined;
|
|
12
13
|
authGroups: ListItemType[] | undefined;
|
|
13
14
|
authUserFields: ListItemType[] | undefined;
|
|
15
|
+
authWorkSpaceRoles: ListItemType[] | undefined;
|
|
16
|
+
creatorAuth: boolean | undefined;
|
|
14
17
|
scriptValidator: string;
|
|
15
18
|
userId: string;
|
|
16
19
|
roleIds: string[];
|
|
17
20
|
groupIds: string[];
|
|
21
|
+
workspaceRoleIds: string[];
|
|
18
22
|
currentTaskId: string;
|
|
19
23
|
conditions?: ConditionType[];
|
|
24
|
+
approval: ApprovalData;
|
|
25
|
+
checkIn: CheckInData;
|
|
20
26
|
handleTransition: (updateTask: string, screenId: string, script: string) => void;
|
|
21
27
|
target: NodeItemProps & {
|
|
22
28
|
type?: string;
|
|
23
29
|
};
|
|
24
30
|
hiddenPopover?: () => void;
|
|
31
|
+
readonly?: boolean;
|
|
25
32
|
}
|
|
26
33
|
declare const _default: React.NamedExoticComponent<FlowButtonProps>;
|
|
27
34
|
export default _default;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { memo, useCallback, useEffect, useMemo, useState } from 'react';
|
|
3
|
+
import { cx } from '@emotion/css';
|
|
4
|
+
import { Tooltip } from 'antd';
|
|
5
|
+
import { WorkFlowStatusColor } from '../../../lib/global';
|
|
6
|
+
import { i18n } from '../../../lib/i18n';
|
|
7
|
+
import { checkTransition } from '../../../lib/workflow';
|
|
8
|
+
import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip';
|
|
9
|
+
import { flowBtnStyle, flowStateStyle, iconStyle, notAllowedStyle, pointerStyle, stateBoxStyle, tipLineStyle, tooltipStyle, } from './style';
|
|
10
|
+
const ApprovalStatus = {
|
|
11
|
+
approved: 'approved',
|
|
12
|
+
rejected: 'rejected',
|
|
13
|
+
};
|
|
14
|
+
const CheckInStatus = {
|
|
15
|
+
closed: 'closed',
|
|
16
|
+
pending: 'pending',
|
|
17
|
+
};
|
|
18
|
+
const FlowButton = ({ loading, screenId, text, item, userId, roleIds, groupIds, workspaceRoleIds, authRoles, authUsers, authGroups, creatorAuth, authUserFields, authWorkSpaceRoles, scriptValidator, approval, checkIn, conditions = [], handleTransition, target, readonly, }) => {
|
|
19
|
+
const [isCheck, setIsCheck] = useState(true);
|
|
20
|
+
const [tip, setTip] = useState('');
|
|
21
|
+
const checkApproval = useCallback(() => {
|
|
22
|
+
var _a;
|
|
23
|
+
if (!approval.requireApproval)
|
|
24
|
+
return true;
|
|
25
|
+
const approvedTransitions = approval.transition.approved.map(approved => approved.label);
|
|
26
|
+
const rejectedTransitions = approval.transition.rejected.map(rejected => rejected.label);
|
|
27
|
+
const unrestrictedTransitions = ((_a = approval.transition.unrestricted) === null || _a === void 0 ? void 0 : _a.map(unrestricted => unrestricted.label)) || [];
|
|
28
|
+
if ((ApprovalStatus.approved === approval.approvalStatus && approvedTransitions.includes(text)) ||
|
|
29
|
+
(ApprovalStatus.rejected === approval.approvalStatus && rejectedTransitions.includes(text))) {
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
if (![ApprovalStatus.approved, ApprovalStatus.rejected].includes(approval.approvalStatus) &&
|
|
33
|
+
(unrestrictedTransitions === null || unrestrictedTransitions === void 0 ? void 0 : unrestrictedTransitions.includes(text))) {
|
|
34
|
+
if (!approval.startApproval) {
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
setTip(i18n.t('pages.fields.view.unrestrictedStatus'));
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
setTip(i18n.t('pages.fields.view.approvalStatus'));
|
|
43
|
+
return false;
|
|
44
|
+
}, [approval, text]);
|
|
45
|
+
const validateCheckIn = useCallback(() => {
|
|
46
|
+
if (!checkIn.requireCheckIn)
|
|
47
|
+
return true;
|
|
48
|
+
if (checkIn.checkInStatus !== CheckInStatus.pending) {
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
return false;
|
|
52
|
+
}, [checkIn]);
|
|
53
|
+
const checkAuth = useCallback(async () => {
|
|
54
|
+
setIsCheck(true);
|
|
55
|
+
if (!checkApproval()) {
|
|
56
|
+
setIsCheck(false);
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (!validateCheckIn()) {
|
|
60
|
+
setTip(i18n.t('pages.fields.view.checkInStatus'));
|
|
61
|
+
setIsCheck(false);
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
const transition = {
|
|
65
|
+
parameters: {
|
|
66
|
+
fieldType: conditions,
|
|
67
|
+
permissionType: {
|
|
68
|
+
users: authUsers,
|
|
69
|
+
roles: authRoles,
|
|
70
|
+
groups: authGroups,
|
|
71
|
+
workspaceRoles: authWorkSpaceRoles,
|
|
72
|
+
customFields: authUserFields,
|
|
73
|
+
creatorAuth,
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
const checkResult = checkTransition(item, transition, { userId, roleIds, groupIds, workspaceRoleIds });
|
|
78
|
+
if (!checkResult.result) {
|
|
79
|
+
setTip(checkResult.message);
|
|
80
|
+
setIsCheck(false);
|
|
81
|
+
}
|
|
82
|
+
}, [
|
|
83
|
+
checkApproval,
|
|
84
|
+
validateCheckIn,
|
|
85
|
+
conditions,
|
|
86
|
+
authUsers,
|
|
87
|
+
authRoles,
|
|
88
|
+
authGroups,
|
|
89
|
+
authWorkSpaceRoles,
|
|
90
|
+
authUserFields,
|
|
91
|
+
creatorAuth,
|
|
92
|
+
item,
|
|
93
|
+
userId,
|
|
94
|
+
roleIds,
|
|
95
|
+
groupIds,
|
|
96
|
+
workspaceRoleIds,
|
|
97
|
+
]);
|
|
98
|
+
useEffect(() => {
|
|
99
|
+
checkAuth();
|
|
100
|
+
}, [checkAuth]);
|
|
101
|
+
const tipContent = useMemo(() => {
|
|
102
|
+
if (readonly)
|
|
103
|
+
return i18n.t('pages.fields.view.readonlyStatus');
|
|
104
|
+
if (!tip)
|
|
105
|
+
return '';
|
|
106
|
+
const contents = tip.split('--');
|
|
107
|
+
return (_jsx("div", { children: contents.map((text, index) => (_jsx("p", { className: tipLineStyle, children: text }, String(index)))) }));
|
|
108
|
+
}, [tip, readonly]);
|
|
109
|
+
const OverflowText = ({ text, target }) => {
|
|
110
|
+
var _a, _b;
|
|
111
|
+
return (_jsxs(_Fragment, { children: [_jsx(BaseOverflowTooltip, { className: tooltipStyle, title: text, children: text }), _jsx("span", { className: iconStyle, children: " \u2192 " }), _jsx("div", { className: stateBoxStyle, children: _jsx(BaseOverflowTooltip, { className: flowStateStyle, style: {
|
|
112
|
+
backgroundColor: (_a = WorkFlowStatusColor[target.type]) === null || _a === void 0 ? void 0 : _a.bgColor,
|
|
113
|
+
color: (_b = WorkFlowStatusColor[target.type]) === null || _b === void 0 ? void 0 : _b.color,
|
|
114
|
+
}, title: target.name, children: target.name }) })] }));
|
|
115
|
+
};
|
|
116
|
+
return isCheck && !readonly ? (_jsx("div", { className: cx(flowBtnStyle, loading ? notAllowedStyle : pointerStyle), onClick: () => {
|
|
117
|
+
if (!loading) {
|
|
118
|
+
handleTransition(text, screenId, scriptValidator);
|
|
119
|
+
}
|
|
120
|
+
}, children: _jsx(OverflowText, { text: text, target: target }) })) : (_jsx(Tooltip, { title: tipContent, placement: "right", children: _jsx("div", { className: cx(flowBtnStyle, notAllowedStyle), children: _jsx(OverflowText, { text: text, target: target }) }) }));
|
|
121
|
+
};
|
|
122
|
+
export default memo(FlowButton);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Status } from '
|
|
2
|
+
import { Status } from '../../../lib/types/models';
|
|
3
3
|
interface TransitionPanelProps {
|
|
4
4
|
objectId: string;
|
|
5
5
|
itemType: string;
|
|
@@ -10,6 +10,9 @@ interface TransitionPanelProps {
|
|
|
10
10
|
readonly?: boolean;
|
|
11
11
|
onTransitionSuccess?: (status: Status) => void;
|
|
12
12
|
setPopoverVisible?: (value: boolean) => void;
|
|
13
|
+
isProcessing: React.MutableRefObject<boolean>;
|
|
14
|
+
flowing: boolean;
|
|
15
|
+
setFlowing: (flowing: boolean) => void;
|
|
13
16
|
}
|
|
14
17
|
declare const _default: React.NamedExoticComponent<TransitionPanelProps>;
|
|
15
18
|
export default _default;
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { memo, useCallback, useEffect, useRef, useState } from 'react';
|
|
3
|
+
import { cx } from '@emotion/css';
|
|
4
|
+
import { proximaSdk, useListener } from '@giteeteam/proxima-sdk-js';
|
|
5
|
+
import { message, Spin } from 'antd';
|
|
6
|
+
import debug from 'debug';
|
|
7
|
+
import { cloneDeep } from 'lodash-es';
|
|
8
|
+
import useCurrentUser from '../../../lib/hooks/useCurrentUser';
|
|
9
|
+
import useWorkflowConfig from '../../../lib/hooks/useWorkflowConfig';
|
|
10
|
+
import { i18n } from '../../../lib/i18n';
|
|
11
|
+
import { getScriptUser, useWorkflowPermission } from '../../../lib/workflow';
|
|
12
|
+
import { useItem } from '../../item/hooks';
|
|
13
|
+
import { flowNextStyle, noPermissionStyle, spinStyle } from './style';
|
|
14
|
+
import TransitionButton from './TransitionButton';
|
|
15
|
+
import View from './View';
|
|
16
|
+
const logger = debug('TransitionPanel');
|
|
17
|
+
const PROPERTY_ACTION_SORT_KEY = 'opsbar-sequence';
|
|
18
|
+
const DEFAULT_APPROVAL_DATA = {
|
|
19
|
+
requireApproval: false,
|
|
20
|
+
approvalStatus: '',
|
|
21
|
+
transition: null,
|
|
22
|
+
startApproval: false,
|
|
23
|
+
};
|
|
24
|
+
const DEFAULT_CHECK_IN_DATA = { requireCheckIn: false, checkInStatus: '', transition: null };
|
|
25
|
+
const TransitionPanel = ({ itemId, itemType, workspace, objectId, onTransitionSuccess, name, readonly, setPopoverVisible, isProcessing, flowing, setFlowing, }) => {
|
|
26
|
+
var _a;
|
|
27
|
+
const [updateTransitionText, setUpdateTransitionText] = useState('');
|
|
28
|
+
const { itemData, mutate: itemMutate } = useItem(itemId, true);
|
|
29
|
+
const refreshFlag = useRef(1);
|
|
30
|
+
const [statusId, setStatusId] = useState(objectId);
|
|
31
|
+
const [fetching, setFetching] = useState(true);
|
|
32
|
+
const [approval, setApproval] = useState(cloneDeep(DEFAULT_APPROVAL_DATA));
|
|
33
|
+
const [checkIn, setCheckIn] = useState(cloneDeep(DEFAULT_CHECK_IN_DATA));
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
setStatusId(objectId);
|
|
36
|
+
}, [objectId]);
|
|
37
|
+
const { checkTransitionScript, getWorkflowData, getItemStatus, runTransition } = useWorkflowConfig();
|
|
38
|
+
const { currentUser } = useCurrentUser();
|
|
39
|
+
const [groupIds, roleIds, workspaceRoleIds] = useWorkflowPermission((_a = itemData === null || itemData === void 0 ? void 0 : itemData.workspace) === null || _a === void 0 ? void 0 : _a.objectId);
|
|
40
|
+
const [tasks, setTasks] = useState([]);
|
|
41
|
+
const [workflowData, setWorkflowData] = useState({ nodes: [], transitions: [] });
|
|
42
|
+
const updateWorkflowMessage = useCallback((workflowData, statusId) => {
|
|
43
|
+
var _a;
|
|
44
|
+
if (workflowData && statusId) {
|
|
45
|
+
const transitions = workflowData.transitions || [];
|
|
46
|
+
const nodes = workflowData.nodes || [];
|
|
47
|
+
const arr = transitions.filter(transition => transition.source.key === statusId);
|
|
48
|
+
for (let i = 0; i < arr.length; i++) {
|
|
49
|
+
const index = nodes.findIndex(v => {
|
|
50
|
+
return v.statusId === arr[i].target.key;
|
|
51
|
+
});
|
|
52
|
+
arr[i].target.name = nodes[index].name;
|
|
53
|
+
arr[i].target.type = nodes[index].key || nodes[index].statusType;
|
|
54
|
+
}
|
|
55
|
+
const list = ((_a = workflowData.transitions) === null || _a === void 0 ? void 0 : _a.filter(transition => transition.source.key === statusId)) || [];
|
|
56
|
+
const sortList = list.map(item => {
|
|
57
|
+
var _a;
|
|
58
|
+
const propertiesListItem = (_a = item.properties) === null || _a === void 0 ? void 0 : _a.find(v => v.key === PROPERTY_ACTION_SORT_KEY);
|
|
59
|
+
if (propertiesListItem && propertiesListItem.value.trim() != '' && !isNaN(propertiesListItem.value)) {
|
|
60
|
+
item.orderNumber = Number(propertiesListItem.value);
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
item.orderNumber = Number.MAX_SAFE_INTEGER;
|
|
64
|
+
}
|
|
65
|
+
return item;
|
|
66
|
+
});
|
|
67
|
+
sortList.sort((item1, item2) => item1.orderNumber - item2.orderNumber);
|
|
68
|
+
setTasks(sortList);
|
|
69
|
+
const { approval, checkIn } = getWorkflowConfig(workflowData, statusId);
|
|
70
|
+
setApproval(approval);
|
|
71
|
+
setCheckIn(checkIn);
|
|
72
|
+
}
|
|
73
|
+
}, []);
|
|
74
|
+
const refresh = useCallback(async () => {
|
|
75
|
+
try {
|
|
76
|
+
if (!itemId) {
|
|
77
|
+
logger('workflow item', itemId, statusId);
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
const workflowData = await (getWorkflowData === null || getWorkflowData === void 0 ? void 0 : getWorkflowData(itemId));
|
|
81
|
+
if (workflowData) {
|
|
82
|
+
setWorkflowData(workflowData);
|
|
83
|
+
updateWorkflowMessage(workflowData, statusId);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
finally {
|
|
87
|
+
setFetching(false);
|
|
88
|
+
}
|
|
89
|
+
}, [itemId, statusId, updateWorkflowMessage, getWorkflowData]);
|
|
90
|
+
useEffect(() => {
|
|
91
|
+
logger('refresh workflow');
|
|
92
|
+
refresh();
|
|
93
|
+
}, []);
|
|
94
|
+
useEffect(() => {
|
|
95
|
+
logger('updateWorkflowMessage', statusId);
|
|
96
|
+
updateWorkflowMessage(workflowData, statusId);
|
|
97
|
+
}, [statusId]);
|
|
98
|
+
const refreshItem = (status) => {
|
|
99
|
+
setStatusId(status.objectId);
|
|
100
|
+
onTransitionSuccess === null || onTransitionSuccess === void 0 ? void 0 : onTransitionSuccess(status);
|
|
101
|
+
itemMutate();
|
|
102
|
+
proximaSdk.execute('updateStatusLog');
|
|
103
|
+
proximaSdk.execute('updateApprovalInfo', status.objectId);
|
|
104
|
+
proximaSdk.execute('updateCheckInInfo', status.objectId);
|
|
105
|
+
};
|
|
106
|
+
const submitHandle = useCallback(async (transitionText, itemDetail = null) => {
|
|
107
|
+
const params = {
|
|
108
|
+
workflowId: workflowData.objectId,
|
|
109
|
+
currentState: statusId,
|
|
110
|
+
transition: transitionText,
|
|
111
|
+
itemId,
|
|
112
|
+
name: itemDetail === null || itemDetail === void 0 ? void 0 : itemDetail.name,
|
|
113
|
+
values: itemDetail === null || itemDetail === void 0 ? void 0 : itemDetail.values,
|
|
114
|
+
};
|
|
115
|
+
try {
|
|
116
|
+
setFlowing(true);
|
|
117
|
+
const newStatus = await (runTransition === null || runTransition === void 0 ? void 0 : runTransition(params));
|
|
118
|
+
if (newStatus) {
|
|
119
|
+
proximaSdk.execute('updateItemLinkList');
|
|
120
|
+
message.success(i18n.t('message.fields.stateFlowSuccess'));
|
|
121
|
+
refreshItem(newStatus);
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
message.error(i18n.t('message.fields.stateFlowFailure', { messageText: '' }));
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
catch (e) {
|
|
128
|
+
let messageText = '';
|
|
129
|
+
try {
|
|
130
|
+
const data = JSON.parse(e.message);
|
|
131
|
+
Object.keys(data).forEach(k => (messageText += `, ${data[k]}`));
|
|
132
|
+
}
|
|
133
|
+
catch (pe) {
|
|
134
|
+
messageText = ', ' + e.message;
|
|
135
|
+
}
|
|
136
|
+
message.error(i18n.t('message.fields.stateFlowFailure', { messageText }));
|
|
137
|
+
const newStatus = await (getItemStatus === null || getItemStatus === void 0 ? void 0 : getItemStatus(itemId));
|
|
138
|
+
if (newStatus === null || newStatus === void 0 ? void 0 : newStatus.name) {
|
|
139
|
+
refreshItem(newStatus);
|
|
140
|
+
}
|
|
141
|
+
refresh();
|
|
142
|
+
}
|
|
143
|
+
finally {
|
|
144
|
+
setFlowing(false);
|
|
145
|
+
setPopoverVisible(false);
|
|
146
|
+
}
|
|
147
|
+
}, [itemId, workflowData.objectId, statusId, onTransitionSuccess, runTransition, getItemStatus]);
|
|
148
|
+
const submitTransition = useCallback(async (itemDetail) => {
|
|
149
|
+
await submitHandle(updateTransitionText, itemDetail);
|
|
150
|
+
}, [submitHandle, updateTransitionText]);
|
|
151
|
+
const handleTransition = useCallback(async (transitionText, screenId, scriptValidator) => {
|
|
152
|
+
setFlowing(true);
|
|
153
|
+
try {
|
|
154
|
+
const params = {
|
|
155
|
+
itemId,
|
|
156
|
+
itemType,
|
|
157
|
+
workspace,
|
|
158
|
+
status: statusId,
|
|
159
|
+
user: getScriptUser(currentUser),
|
|
160
|
+
item: itemData,
|
|
161
|
+
userWorkspaceRoles: workspaceRoleIds,
|
|
162
|
+
userGroups: groupIds,
|
|
163
|
+
};
|
|
164
|
+
const checkResult = await (checkTransitionScript === null || checkTransitionScript === void 0 ? void 0 : checkTransitionScript(scriptValidator, params));
|
|
165
|
+
if (!(checkResult === null || checkResult === void 0 ? void 0 : checkResult.result)) {
|
|
166
|
+
checkResult.message && message.error(checkResult.message);
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
finally {
|
|
171
|
+
setFlowing(false);
|
|
172
|
+
}
|
|
173
|
+
if (!screenId) {
|
|
174
|
+
submitHandle(transitionText);
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
isProcessing.current = true;
|
|
178
|
+
proximaSdk.execute('openTransitionStatusScreen', {
|
|
179
|
+
screenId: screenId,
|
|
180
|
+
transition: transitionText,
|
|
181
|
+
itemId: itemId,
|
|
182
|
+
currentState: statusId,
|
|
183
|
+
});
|
|
184
|
+
setUpdateTransitionText(transitionText);
|
|
185
|
+
}
|
|
186
|
+
}, [
|
|
187
|
+
setFlowing,
|
|
188
|
+
itemId,
|
|
189
|
+
itemType,
|
|
190
|
+
workspace,
|
|
191
|
+
statusId,
|
|
192
|
+
currentUser,
|
|
193
|
+
itemData,
|
|
194
|
+
workspaceRoleIds,
|
|
195
|
+
groupIds,
|
|
196
|
+
isProcessing,
|
|
197
|
+
submitHandle,
|
|
198
|
+
checkTransitionScript,
|
|
199
|
+
]);
|
|
200
|
+
useListener('itemTransitionSuccess', async ({ itemId: editItemId, transition: editTransition, itemData }) => {
|
|
201
|
+
if (editItemId === itemId && editTransition === updateTransitionText && isProcessing.current) {
|
|
202
|
+
isProcessing.current = false;
|
|
203
|
+
await submitTransition(itemData);
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
useListener('createOrUpdateItemModalCancel', () => {
|
|
207
|
+
isProcessing.current = false;
|
|
208
|
+
});
|
|
209
|
+
useListener('createOrUpdateModalCancel', () => {
|
|
210
|
+
isProcessing.current = false;
|
|
211
|
+
});
|
|
212
|
+
useListener('startApproval', () => {
|
|
213
|
+
refreshFlag.current++;
|
|
214
|
+
refresh();
|
|
215
|
+
});
|
|
216
|
+
useListener('startCheckIn', () => {
|
|
217
|
+
refreshFlag.current++;
|
|
218
|
+
refresh();
|
|
219
|
+
});
|
|
220
|
+
return (_jsxs(_Fragment, { children: [fetching ? (_jsx(Spin, { className: spinStyle })) : tasks.length ? (_jsx("div", { className: cx(flowNextStyle, `flow-next-global`), children: _jsx("div", { children: tasks.map(task => {
|
|
221
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
222
|
+
return (_jsx(TransitionButton, { itemId: itemId, loading: flowing, text: task.name, item: itemData, workspace: workspace, userId: currentUser.id, groupIds: groupIds, roleIds: roleIds, workspaceRoleIds: workspaceRoleIds, currentTaskId: task.id, authUsers: (_b = (_a = task.parameters) === null || _a === void 0 ? void 0 : _a.permissionType) === null || _b === void 0 ? void 0 : _b.users, authRoles: (_d = (_c = task.parameters) === null || _c === void 0 ? void 0 : _c.permissionType) === null || _d === void 0 ? void 0 : _d.roles, authGroups: (_f = (_e = task.parameters) === null || _e === void 0 ? void 0 : _e.permissionType) === null || _f === void 0 ? void 0 : _f.groups, authUserFields: (_h = (_g = task.parameters) === null || _g === void 0 ? void 0 : _g.permissionType) === null || _h === void 0 ? void 0 : _h.customFields, authWorkSpaceRoles: (_k = (_j = task.parameters) === null || _j === void 0 ? void 0 : _j.permissionType) === null || _k === void 0 ? void 0 : _k.workspaceRoles, creatorAuth: (_m = (_l = task.parameters) === null || _l === void 0 ? void 0 : _l.permissionType) === null || _m === void 0 ? void 0 : _m.creatorAuth, scriptValidator: (_o = task.parameters) === null || _o === void 0 ? void 0 : _o.scriptValidator, conditions: (_p = task.parameters) === null || _p === void 0 ? void 0 : _p.fieldType, screenId: (_r = (_q = task.parameters) === null || _q === void 0 ? void 0 : _q.screen) === null || _r === void 0 ? void 0 : _r.key, target: task.target, approval: approval, checkIn: checkIn, handleTransition: handleTransition, hiddenPopover: () => setPopoverVisible(false), readonly: readonly }, task.id));
|
|
223
|
+
}) }) })) : (_jsx("span", { onClick: () => {
|
|
224
|
+
setPopoverVisible(false);
|
|
225
|
+
}, className: noPermissionStyle, children: i18n.t('pages.fields.view.noWorkflowOrAuth') })), _jsx(View, { workflowData: workflowData, hiddenPopover: () => setPopoverVisible(false), name: name, objectId: objectId })] }));
|
|
226
|
+
};
|
|
227
|
+
function getWorkflowConfig(workflow, statusId) {
|
|
228
|
+
var _a, _b, _c, _d, _e;
|
|
229
|
+
const currentNode = workflow.nodes.find(node => node.statusId === statusId);
|
|
230
|
+
const approval = cloneDeep(DEFAULT_APPROVAL_DATA);
|
|
231
|
+
const checkIn = cloneDeep(DEFAULT_CHECK_IN_DATA);
|
|
232
|
+
if ((_a = currentNode === null || currentNode === void 0 ? void 0 : currentNode.approval) === null || _a === void 0 ? void 0 : _a.active) {
|
|
233
|
+
approval.requireApproval = true;
|
|
234
|
+
approval.transition = currentNode.approval.transition;
|
|
235
|
+
approval.approvalStatus = (_b = workflow.approvalResult) === null || _b === void 0 ? void 0 : _b.status;
|
|
236
|
+
approval.startApproval = (_c = workflow.approvalResult) === null || _c === void 0 ? void 0 : _c.startApproval;
|
|
237
|
+
}
|
|
238
|
+
if ((_d = currentNode === null || currentNode === void 0 ? void 0 : currentNode.checkIn) === null || _d === void 0 ? void 0 : _d.active) {
|
|
239
|
+
checkIn.requireCheckIn = true;
|
|
240
|
+
checkIn.transition = currentNode.checkIn.transition;
|
|
241
|
+
checkIn.checkInStatus = (_e = workflow.checkInResult) === null || _e === void 0 ? void 0 : _e.status;
|
|
242
|
+
}
|
|
243
|
+
return { approval, checkIn };
|
|
244
|
+
}
|
|
245
|
+
export default memo(TransitionPanel);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { WorkflowDataProps } from '../../../lib/types/workflow';
|
|
3
3
|
interface ViewProps {
|
|
4
4
|
name: string;
|
|
5
5
|
objectId: string;
|
|
6
|
-
workflowData:
|
|
6
|
+
workflowData: WorkflowDataProps;
|
|
7
7
|
hiddenPopover?: () => void;
|
|
8
8
|
}
|
|
9
9
|
declare const _default: React.NamedExoticComponent<ViewProps>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { memo, useCallback, useEffect } from 'react';
|
|
3
|
+
import { cx } from '@emotion/css';
|
|
4
|
+
import { proximaSdk } from '@giteeteam/proxima-sdk-js';
|
|
5
|
+
import { WorkflowIcon } from '../../../icons';
|
|
6
|
+
import { i18n } from '../../../lib/i18n';
|
|
7
|
+
import { injectStatusViewGlobalStyle } from './style';
|
|
8
|
+
const View = ({ name, objectId, hiddenPopover, workflowData }) => {
|
|
9
|
+
const viewClickHandle = useCallback(e => {
|
|
10
|
+
e.stopPropagation();
|
|
11
|
+
}, []);
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
injectStatusViewGlobalStyle();
|
|
14
|
+
}, []);
|
|
15
|
+
return (_jsx("div", { className: cx('field-layout', 'status-view'), onClick: viewClickHandle, children: _jsxs("span", { onClick: () => {
|
|
16
|
+
hiddenPopover === null || hiddenPopover === void 0 ? void 0 : hiddenPopover();
|
|
17
|
+
proximaSdk.execute('openItemWorkflowViewerModal', { name, objectId, workflowData });
|
|
18
|
+
}, children: [_jsx(WorkflowIcon, { className: 'status-view-watch' }), i18n.t('pages.fields.view.viewWorkflow')] }) }));
|
|
19
|
+
};
|
|
20
|
+
export default memo(View);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const readViewWrapper: string;
|
|
2
|
+
export declare const workflowContentStyle: string;
|
|
3
|
+
export declare const statePopoverStyle: (antPrefix: string) => string;
|
|
4
|
+
export declare const flowNextStyle: string;
|
|
5
|
+
export declare const flowStateStyle: string;
|
|
6
|
+
export declare const flowStateInWorkflowStyle: string;
|
|
7
|
+
export declare const flowStateButtonStyle: string;
|
|
8
|
+
export declare const stateBtnStyle: string;
|
|
9
|
+
export declare const noStateStyle: string;
|
|
10
|
+
export declare const caretDownStyle: string;
|
|
11
|
+
export declare const injectStatusViewGlobalStyle: () => void;
|
|
12
|
+
export declare const tipLineStyle: string;
|
|
13
|
+
export declare const tooltipStyle: string;
|
|
14
|
+
export declare const iconStyle: string;
|
|
15
|
+
export declare const stateBoxStyle: string;
|
|
16
|
+
export declare const flowBtnStyle: string;
|
|
17
|
+
export declare const notAllowedStyle: string;
|
|
18
|
+
export declare const pointerStyle: string;
|
|
19
|
+
export declare const spinStyle: string;
|
|
20
|
+
export declare const noPermissionStyle: string;
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { css, injectGlobal } from '@emotion/css';
|
|
2
|
+
import { fieldLabelColor, gray7, statusCellMinWidth, themeBgColorBase } from '../../../../style/common';
|
|
3
|
+
export const readViewWrapper = css `
|
|
4
|
+
display: -webkit-box;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
min-width: 62px;
|
|
8
|
+
height: 22px;
|
|
9
|
+
padding: 0 8px;
|
|
10
|
+
font-size: 12px;
|
|
11
|
+
font-weight: 600;
|
|
12
|
+
line-height: 22px;
|
|
13
|
+
text-align: center;
|
|
14
|
+
border-radius: 4px;
|
|
15
|
+
`;
|
|
16
|
+
export const workflowContentStyle = css `
|
|
17
|
+
max-width: 200px;
|
|
18
|
+
text-align: left;
|
|
19
|
+
`;
|
|
20
|
+
export const statePopoverStyle = (antPrefix) => css `
|
|
21
|
+
z-index: 1000 !important;
|
|
22
|
+
|
|
23
|
+
div.${antPrefix}-popover-inner-content, div.${antPrefix}-popover-inner {
|
|
24
|
+
padding: 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
div.${antPrefix}-popover-arrow {
|
|
28
|
+
background: transparent;
|
|
29
|
+
border-style: none;
|
|
30
|
+
border-width: 0;
|
|
31
|
+
}
|
|
32
|
+
`;
|
|
33
|
+
export const flowNextStyle = css `
|
|
34
|
+
max-height: 260px;
|
|
35
|
+
padding-top: 10px;
|
|
36
|
+
overflow: auto;
|
|
37
|
+
`;
|
|
38
|
+
export const flowStateStyle = css `
|
|
39
|
+
min-width: ${statusCellMinWidth};
|
|
40
|
+
height: 24px;
|
|
41
|
+
padding: 0 18px 0 8px;
|
|
42
|
+
font-size: 12px;
|
|
43
|
+
font-weight: 600;
|
|
44
|
+
line-height: 24px;
|
|
45
|
+
color: #fff;
|
|
46
|
+
text-align: center;
|
|
47
|
+
background: #cdcdcd;
|
|
48
|
+
border-radius: 4px;
|
|
49
|
+
box-shadow: none !important;
|
|
50
|
+
|
|
51
|
+
span {
|
|
52
|
+
text-decoration: none !important;
|
|
53
|
+
}
|
|
54
|
+
`;
|
|
55
|
+
export const flowStateInWorkflowStyle = css `
|
|
56
|
+
:not(.add-weights) {
|
|
57
|
+
min-width: ${statusCellMinWidth};
|
|
58
|
+
height: 22px;
|
|
59
|
+
padding: 0 8px;
|
|
60
|
+
font-size: 12px;
|
|
61
|
+
font-weight: 600;
|
|
62
|
+
line-height: 22px;
|
|
63
|
+
color: #fff;
|
|
64
|
+
text-align: center;
|
|
65
|
+
background: #cdcdcd;
|
|
66
|
+
border-radius: 4px;
|
|
67
|
+
|
|
68
|
+
display: flex;
|
|
69
|
+
align-items: center;
|
|
70
|
+
justify-content: center;
|
|
71
|
+
}
|
|
72
|
+
`;
|
|
73
|
+
export const flowStateButtonStyle = css `
|
|
74
|
+
&:not(.add-weights) > span {
|
|
75
|
+
display: -webkit-box;
|
|
76
|
+
}
|
|
77
|
+
`;
|
|
78
|
+
export const stateBtnStyle = css `
|
|
79
|
+
height: 22px;
|
|
80
|
+
line-height: 22px;
|
|
81
|
+
`;
|
|
82
|
+
export const noStateStyle = css `
|
|
83
|
+
color: ${fieldLabelColor};
|
|
84
|
+
background: ${themeBgColorBase};
|
|
85
|
+
`;
|
|
86
|
+
export const caretDownStyle = css `
|
|
87
|
+
padding-left: 2px;
|
|
88
|
+
margin-left: 0;
|
|
89
|
+
line-height: 10px;
|
|
90
|
+
`;
|
|
91
|
+
export const injectStatusViewGlobalStyle = () => {
|
|
92
|
+
injectGlobal `
|
|
93
|
+
.field-layout.status-view {
|
|
94
|
+
position: relative;
|
|
95
|
+
padding: 10px;
|
|
96
|
+
margin-top: 10px;
|
|
97
|
+
font-size: 12px;
|
|
98
|
+
cursor: pointer;
|
|
99
|
+
border-top: 1px solid #ddd;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.field-layout.status-view .status-view-watch {
|
|
103
|
+
width: 12px;
|
|
104
|
+
height: 12px;
|
|
105
|
+
margin-right: 5px;
|
|
106
|
+
font-size: 12px;
|
|
107
|
+
vertical-align: middle;
|
|
108
|
+
}
|
|
109
|
+
`;
|
|
110
|
+
};
|
|
111
|
+
export const tipLineStyle = css `
|
|
112
|
+
margin-bottom: 0;
|
|
113
|
+
`;
|
|
114
|
+
export const tooltipStyle = css `
|
|
115
|
+
width: 80px;
|
|
116
|
+
`;
|
|
117
|
+
export const iconStyle = css `
|
|
118
|
+
padding: 0 6px;
|
|
119
|
+
color: ${gray7};
|
|
120
|
+
`;
|
|
121
|
+
export const stateBoxStyle = css `
|
|
122
|
+
display: flex;
|
|
123
|
+
width: 80px;
|
|
124
|
+
|
|
125
|
+
span {
|
|
126
|
+
padding-right: 8px;
|
|
127
|
+
}
|
|
128
|
+
`;
|
|
129
|
+
export const flowBtnStyle = css `
|
|
130
|
+
display: flex;
|
|
131
|
+
padding: 5px 10px;
|
|
132
|
+
margin: 0;
|
|
133
|
+
|
|
134
|
+
&:hover {
|
|
135
|
+
background-color: var(--select-item-selected-bg, #e6f3ff);
|
|
136
|
+
}
|
|
137
|
+
`;
|
|
138
|
+
export const notAllowedStyle = css `
|
|
139
|
+
cursor: not-allowed;
|
|
140
|
+
opacity: 0.3;
|
|
141
|
+
`;
|
|
142
|
+
export const pointerStyle = css `
|
|
143
|
+
cursor: pointer;
|
|
144
|
+
`;
|
|
145
|
+
export const spinStyle = css `
|
|
146
|
+
width: 150px;
|
|
147
|
+
height: 50px;
|
|
148
|
+
`;
|
|
149
|
+
export const noPermissionStyle = css `
|
|
150
|
+
display: block;
|
|
151
|
+
width: 120px;
|
|
152
|
+
padding: 20px 10px 10px;
|
|
153
|
+
font-size: 12px;
|
|
154
|
+
color: #2e405e;
|
|
155
|
+
`;
|