Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-23 18:00:29 +01:00
Linting
Dieser Commit ist enthalten in:
Ursprung
c54602a9ce
Commit
ce55b4671e
105 geänderte Dateien mit 4275 neuen und 8679 gelöschten Zeilen
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"extends": "eslint-config-discourse"
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
{}
|
1
.prettierrc.cjs
Normale Datei
1
.prettierrc.cjs
Normale Datei
|
@ -0,0 +1 @@
|
|||
module.exports = require("@discourse/lint-configs/prettier");
|
1
.template-lintrc.cjs
Normale Datei
1
.template-lintrc.cjs
Normale Datei
|
@ -0,0 +1 @@
|
|||
module.exports = require("@discourse/lint-configs/template-lint");
|
|
@ -1,4 +0,0 @@
|
|||
module.exports = {
|
||||
plugins: ["ember-template-lint-plugin-discourse"],
|
||||
extends: "discourse:recommended",
|
||||
};
|
10
.travis.yml
10
.travis.yml
|
@ -1,10 +0,0 @@
|
|||
services:
|
||||
- docker
|
||||
|
||||
before_install:
|
||||
- git clone --depth=1 https://github.com/discourse/discourse-plugin-ci
|
||||
|
||||
install: true
|
||||
|
||||
script:
|
||||
- discourse-plugin-ci/script.sh
|
|
@ -1,6 +1,6 @@
|
|||
import Component from "@ember/component";
|
||||
import discourseComputed, { observes } from "discourse-common/utils/decorators";
|
||||
import { alias, equal, or } from "@ember/object/computed";
|
||||
import discourseComputed, { observes } from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
|
||||
export default Component.extend({
|
||||
|
@ -17,6 +17,7 @@ export default Component.extend({
|
|||
isExternal: equal("field.id", "external"),
|
||||
|
||||
didInsertElement() {
|
||||
this._super(...arguments);
|
||||
this.set("originalField", JSON.parse(JSON.stringify(this.field)));
|
||||
},
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import CategorySelector from "select-kit/components/category-selector";
|
||||
import { computed } from "@ember/object";
|
||||
import { makeArray } from "discourse-common/lib/helpers";
|
||||
import CategorySelector from "select-kit/components/category-selector";
|
||||
|
||||
export default CategorySelector.extend({
|
||||
classNames: ["category-selector", "wizard-category-selector"],
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import ComposerEditor from "discourse/components/composer-editor";
|
||||
import discourseComputed, { bind } from "discourse-common/utils/decorators";
|
||||
import { alias } from "@ember/object/computed";
|
||||
import { uploadIcon } from "discourse/lib/uploads";
|
||||
import { dasherize } from "@ember/string";
|
||||
import InsertHyperlink from "discourse/components/modal/insert-hyperlink";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { action } from "@ember/object";
|
||||
import { alias } from "@ember/object/computed";
|
||||
import { service } from "@ember/service";
|
||||
import { dasherize } from "@ember/string";
|
||||
import ComposerEditor from "discourse/components/composer-editor";
|
||||
import InsertHyperlink from "discourse/components/modal/insert-hyperlink";
|
||||
import { uploadIcon } from "discourse/lib/uploads";
|
||||
import discourseComputed, { bind } from "discourse-common/utils/decorators";
|
||||
|
||||
export const wizardComposerEdtiorEventPrefix = "wizard-editor";
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
options=(hash popupTitle=b.title icon=b.icon)
|
||||
}}
|
||||
{{else}}
|
||||
<div>{{d.icon}}</div>
|
||||
<div>{{b.icon}}</div>
|
||||
<button
|
||||
class="wizard-btn {{b.className}}"
|
||||
{{action b.action b}}
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
import { observes } from "discourse-common/utils/decorators";
|
||||
import Category from "discourse/models/category";
|
||||
import Component from "@ember/component";
|
||||
import Category from "discourse/models/category";
|
||||
import { observes } from "discourse-common/utils/decorators";
|
||||
|
||||
export default Component.extend({
|
||||
categories: [],
|
||||
|
||||
didInsertElement() {
|
||||
this._super(...arguments);
|
||||
const property = this.field.property || "id";
|
||||
const value = this.field.value;
|
||||
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
import Component from "@ember/component";
|
||||
import { loadOneboxes } from "discourse/lib/load-oneboxes";
|
||||
import { schedule } from "@ember/runloop";
|
||||
import discourseDebounce from "discourse-common/lib/debounce";
|
||||
import $ from "jquery";
|
||||
import { resolveAllShortUrls } from "pretty-text/upload-short-url";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { loadOneboxes } from "discourse/lib/load-oneboxes";
|
||||
import discourseDebounce from "discourse-common/lib/debounce";
|
||||
import { on } from "discourse-common/utils/decorators";
|
||||
|
||||
export default Component.extend({
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import Component from "@ember/component";
|
||||
import EmberObject, { action } from "@ember/object";
|
||||
import {
|
||||
default as computed,
|
||||
observes,
|
||||
} from "discourse-common/utils/decorators";
|
||||
import Component from "@ember/component";
|
||||
import EmberObject, { action } from "@ember/object";
|
||||
|
||||
export default Component.extend({
|
||||
showPreview: false,
|
||||
|
|
|
@ -4,6 +4,7 @@ export default Component.extend({
|
|||
topics: [],
|
||||
|
||||
didInsertElement() {
|
||||
this._super(...arguments);
|
||||
const value = this.field.value;
|
||||
|
||||
if (value) {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import UppyUpload from "discourse/lib/uppy/uppy-upload";
|
||||
import Component from "@ember/component";
|
||||
import { action } from "@ember/object";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { service } from "@ember/service";
|
||||
import UppyUpload from "discourse/lib/uppy/uppy-upload";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "discourse-i18n";
|
||||
import { action } from "@ember/object";
|
||||
|
||||
export default class CustomWizardFieldUpload extends Component {
|
||||
@service siteSettings;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import Component from "@ember/component";
|
||||
import { dasherize } from "@ember/string";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { cook } from "discourse/lib/text";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
|
||||
export default Component.extend({
|
||||
classNameBindings: [
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import ComboBox from "select-kit/components/combo-box";
|
||||
import { computed } from "@ember/object";
|
||||
import { makeArray } from "discourse-common/lib/helpers";
|
||||
import ComboBox from "select-kit/components/combo-box";
|
||||
|
||||
export default ComboBox.extend({
|
||||
content: computed("groups.[]", "field.content.[]", function () {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import CustomWizard from "../models/custom-wizard";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { getOwner } from "@ember/application";
|
||||
import Component from "@ember/component";
|
||||
import { dasherize } from "@ember/string";
|
||||
import getURL from "discourse-common/lib/get-url";
|
||||
import cookie from "discourse/lib/cookie";
|
||||
import { getOwner } from "@ember/application";
|
||||
import getURL from "discourse-common/lib/get-url";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import CustomWizard from "../models/custom-wizard";
|
||||
|
||||
export default Component.extend({
|
||||
classNameBindings: [":wizard-no-access", "reasonClass"],
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import Component from "@ember/component";
|
||||
import { bind } from "@ember/runloop";
|
||||
import $ from "jquery";
|
||||
import { observes } from "discourse-common/utils/decorators";
|
||||
|
||||
export default Component.extend({
|
||||
|
@ -7,10 +8,12 @@ export default Component.extend({
|
|||
showTopics: true,
|
||||
|
||||
didInsertElement() {
|
||||
this._super(...arguments);
|
||||
$(document).on("click", bind(this, this.documentClick));
|
||||
},
|
||||
|
||||
willDestroyElement() {
|
||||
this._super(...arguments);
|
||||
$(document).off("click", bind(this, this.documentClick));
|
||||
},
|
||||
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
import discourseComputed, { observes } from "discourse-common/utils/decorators";
|
||||
import Component from "@ember/component";
|
||||
import getUrl from "discourse-common/lib/get-url";
|
||||
import { htmlSafe } from "@ember/template";
|
||||
import { alias, not, or } from "@ember/object/computed";
|
||||
import { schedule } from "@ember/runloop";
|
||||
import { htmlSafe } from "@ember/template";
|
||||
import $ from "jquery";
|
||||
import { cook } from "discourse/lib/text";
|
||||
import getUrl from "discourse-common/lib/get-url";
|
||||
import discourseLater from "discourse-common/lib/later";
|
||||
import discourseComputed, { observes } from "discourse-common/utils/decorators";
|
||||
import CustomWizard, {
|
||||
updateCachedWizard,
|
||||
} from "discourse/plugins/discourse-custom-wizard/discourse/models/custom-wizard";
|
||||
import { alias, not, or } from "@ember/object/computed";
|
||||
import discourseLater from "discourse-common/lib/later";
|
||||
import { wizardComposerEdtiorEventPrefix } from "./custom-wizard-composer-editor";
|
||||
|
||||
const uploadStartedEventKeys = ["upload-started"];
|
||||
|
@ -181,7 +182,7 @@ export default Component.extend({
|
|||
},
|
||||
|
||||
showMessage(message) {
|
||||
this.sendAction(message);
|
||||
this.showMessage(message);
|
||||
},
|
||||
|
||||
stylingDropdownChanged(id, value) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import TagChooser from "select-kit/components/tag-chooser";
|
||||
import { makeArray } from "discourse-common/lib/helpers";
|
||||
import TagChooser from "select-kit/components/tag-chooser";
|
||||
|
||||
export default TagChooser.extend({
|
||||
_transformJson(context, json) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import computed from "discourse-common/utils/decorators";
|
||||
import { isLTR, isRTL, siteDir } from "discourse/lib/text-direction";
|
||||
import I18n from "I18n";
|
||||
import TextField from "discourse/components/text-field";
|
||||
import { isLTR, isRTL, siteDir } from "discourse/lib/text-direction";
|
||||
import computed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
|
||||
export default TextField.extend({
|
||||
attributeBindings: [
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import MultiSelectComponent from "select-kit/components/multi-select";
|
||||
import { isEmpty } from "@ember/utils";
|
||||
import { searchForTerm } from "discourse/lib/search";
|
||||
import { makeArray } from "discourse-common/lib/helpers";
|
||||
import MultiSelectComponent from "select-kit/components/multi-select";
|
||||
|
||||
export default MultiSelectComponent.extend({
|
||||
classNames: ["topic-selector", "wizard-topic-selector"],
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import WizardFieldValidator from "discourse/plugins/discourse-custom-wizard/discourse/components/validator";
|
||||
import { deepMerge } from "discourse-common/lib/object";
|
||||
import discourseComputed, { observes } from "discourse-common/utils/decorators";
|
||||
import { cancel, later } from "@ember/runloop";
|
||||
import { A } from "@ember/array";
|
||||
import EmberObject, { computed } from "@ember/object";
|
||||
import { and, equal, notEmpty } from "@ember/object/computed";
|
||||
import { categoryBadgeHTML } from "discourse/helpers/category-link";
|
||||
import { cancel, later } from "@ember/runloop";
|
||||
import { dasherize } from "@ember/string";
|
||||
import { categoryBadgeHTML } from "discourse/helpers/category-link";
|
||||
import { deepMerge } from "discourse-common/lib/object";
|
||||
import discourseComputed, { observes } from "discourse-common/utils/decorators";
|
||||
import WizardFieldValidator from "discourse/plugins/discourse-custom-wizard/discourse/components/validator";
|
||||
|
||||
export default WizardFieldValidator.extend({
|
||||
classNames: ["similar-topics-validator"],
|
||||
|
|
|
@ -28,10 +28,12 @@ export default Component.extend({
|
|||
},
|
||||
|
||||
didInsertElement() {
|
||||
this._super(...arguments);
|
||||
this.appEvents.on("custom-wizard:validate", this, this.checkIsValid);
|
||||
},
|
||||
|
||||
willDestroyElement() {
|
||||
this._super(...arguments);
|
||||
this.appEvents.off("custom-wizard:validate", this, this.checkIsValid);
|
||||
},
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { default as discourseComputed } from "discourse-common/utils/decorators";
|
||||
import { empty, equal, or } from "@ember/object/computed";
|
||||
import { notificationLevels, selectKitContent } from "../lib/wizard";
|
||||
import { computed } from "@ember/object";
|
||||
import UndoChanges from "../mixins/undo-changes";
|
||||
import Component from "@ember/component";
|
||||
import { computed } from "@ember/object";
|
||||
import { empty, equal, or } from "@ember/object/computed";
|
||||
import { default as discourseComputed } from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import { notificationLevels, selectKitContent } from "../lib/wizard";
|
||||
import UndoChanges from "../mixins/undo-changes";
|
||||
|
||||
export default Component.extend(UndoChanges, {
|
||||
componentType: "action",
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { default as discourseComputed } from "discourse-common/utils/decorators";
|
||||
import { equal, or } from "@ember/object/computed";
|
||||
import { computed } from "@ember/object";
|
||||
import { selectKitContent } from "../lib/wizard";
|
||||
import UndoChanges from "../mixins/undo-changes";
|
||||
import Component from "@ember/component";
|
||||
import { computed } from "@ember/object";
|
||||
import { equal, or } from "@ember/object/computed";
|
||||
import { default as discourseComputed } from "discourse-common/utils/decorators";
|
||||
import { selectKitContent } from "../lib/wizard";
|
||||
import wizardSchema from "../lib/wizard-schema";
|
||||
import UndoChanges from "../mixins/undo-changes";
|
||||
|
||||
export default Component.extend(UndoChanges, {
|
||||
componentType: "field",
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import { A } from "@ember/array";
|
||||
import Component from "@ember/component";
|
||||
import EmberObject from "@ember/object";
|
||||
import { notEmpty } from "@ember/object/computed";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { generateName } from "../lib/wizard";
|
||||
import {
|
||||
setWizardDefaults,
|
||||
default as wizardSchema,
|
||||
setWizardDefaults,
|
||||
} from "../lib/wizard-schema";
|
||||
import { notEmpty } from "@ember/object/computed";
|
||||
import EmberObject from "@ember/object";
|
||||
import Component from "@ember/component";
|
||||
import { A } from "@ember/array";
|
||||
|
||||
export default Component.extend({
|
||||
classNameBindings: [":wizard-links", "itemType"],
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import Component from "@ember/component";
|
||||
import { gt } from "@ember/object/computed";
|
||||
import { computed } from "@ember/object";
|
||||
import { defaultConnector } from "../lib/wizard-mapper";
|
||||
import { gt } from "@ember/object/computed";
|
||||
import { later } from "@ember/runloop";
|
||||
import I18n from "I18n";
|
||||
import { defaultConnector } from "../lib/wizard-mapper";
|
||||
|
||||
export default Component.extend({
|
||||
classNameBindings: [
|
||||
|
@ -19,6 +19,7 @@ export default Component.extend({
|
|||
}),
|
||||
|
||||
didReceiveAttrs() {
|
||||
this._super();
|
||||
if (!this.connector) {
|
||||
later(() => {
|
||||
this.set(
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
import { A } from "@ember/array";
|
||||
import Component from "@ember/component";
|
||||
import { computed, set } from "@ember/object";
|
||||
import { alias, equal, not, or } from "@ember/object/computed";
|
||||
import { observes } from "discourse-common/utils/decorators";
|
||||
import {
|
||||
connectorContent,
|
||||
defaultConnector,
|
||||
|
@ -7,9 +10,6 @@ import {
|
|||
inputTypesContent,
|
||||
newPair,
|
||||
} from "../lib/wizard-mapper";
|
||||
import Component from "@ember/component";
|
||||
import { observes } from "discourse-common/utils/decorators";
|
||||
import { A } from "@ember/array";
|
||||
|
||||
export default Component.extend({
|
||||
classNameBindings: [":mapper-input", "inputType"],
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { connectorContent } from "../lib/wizard-mapper";
|
||||
import { alias, gt } from "@ember/object/computed";
|
||||
import { computed } from "@ember/object";
|
||||
import Component from "@ember/component";
|
||||
import { computed } from "@ember/object";
|
||||
import { alias, gt } from "@ember/object/computed";
|
||||
import { connectorContent } from "../lib/wizard-mapper";
|
||||
|
||||
export default Component.extend({
|
||||
classNameBindings: [":mapper-pair", "hasConnector::no-connector"],
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import Component from "@ember/component";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
|
||||
export default Component.extend({
|
||||
tagName: "a",
|
||||
|
|
|
@ -1,21 +1,22 @@
|
|||
import { alias, gt, or } from "@ember/object/computed";
|
||||
import { getOwner } from "@ember/application";
|
||||
import Component from "@ember/component";
|
||||
import { computed } from "@ember/object";
|
||||
import { alias, gt, or } from "@ember/object/computed";
|
||||
import { bind, later } from "@ember/runloop";
|
||||
import { service } from "@ember/service";
|
||||
import $ from "jquery";
|
||||
import {
|
||||
default as discourseComputed,
|
||||
observes,
|
||||
} from "discourse-common/utils/decorators";
|
||||
import { getOwner } from "@ember/application";
|
||||
import { defaultSelectionType, selectionTypes } from "../lib/wizard-mapper";
|
||||
import I18n from "I18n";
|
||||
import {
|
||||
generateName,
|
||||
sentenceCase,
|
||||
snakeCase,
|
||||
userProperties,
|
||||
} from "../lib/wizard";
|
||||
import Component from "@ember/component";
|
||||
import { bind, later } from "@ember/runloop";
|
||||
import I18n from "I18n";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { defaultSelectionType, selectionTypes } from "../lib/wizard-mapper";
|
||||
|
||||
const customFieldActionMap = {
|
||||
topic: ["create_topic", "send_message"],
|
||||
|
@ -134,9 +135,7 @@ export default Component.extend({
|
|||
listEnabled: computed("options.listSelection", "inputType", function () {
|
||||
return this.optionEnabled("listSelection");
|
||||
}),
|
||||
valueEnabled: computed("connector", function () {
|
||||
return this.connector === "is";
|
||||
}),
|
||||
valueEnabled: computed.equal("connector", "is"),
|
||||
|
||||
@discourseComputed(
|
||||
"site.groups",
|
||||
|
@ -179,6 +178,7 @@ export default Component.extend({
|
|||
showTypes: false,
|
||||
|
||||
didInsertElement() {
|
||||
this._super(...arguments);
|
||||
if (
|
||||
!this.activeType ||
|
||||
(this.activeType && !this[`${this.activeType}Enabled`])
|
||||
|
@ -190,6 +190,7 @@ export default Component.extend({
|
|||
},
|
||||
|
||||
willDestroyElement() {
|
||||
this._super(...arguments);
|
||||
$(document).off("click", bind(this, this.documentClick));
|
||||
},
|
||||
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
import { newInput, selectionTypes } from "../lib/wizard-mapper";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { later } from "@ember/runloop";
|
||||
import Component from "@ember/component";
|
||||
import { A } from "@ember/array";
|
||||
import Component from "@ember/component";
|
||||
import { later } from "@ember/runloop";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { newInput, selectionTypes } from "../lib/wizard-mapper";
|
||||
|
||||
export default Component.extend({
|
||||
classNames: "wizard-mapper",
|
||||
|
||||
didReceiveAttrs() {
|
||||
this._super();
|
||||
if (this.inputs && this.inputs.constructor !== Array) {
|
||||
later(() => this.set("inputs", null));
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { default as discourseComputed } from "discourse-common/utils/decorators";
|
||||
import { not, notEmpty } from "@ember/object/computed";
|
||||
import Component from "@ember/component";
|
||||
import { not, notEmpty } from "@ember/object/computed";
|
||||
import { default as discourseComputed } from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
|
||||
const icons = {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import Component from "@ember/component";
|
||||
import EmberObject from "@ember/object";
|
||||
import { cloneJSON } from "discourse-common/lib/object";
|
||||
import Category from "discourse/models/category";
|
||||
import { cloneJSON } from "discourse-common/lib/object";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { inject as service } from "@ember/service";
|
||||
import { action, computed } from "@ember/object";
|
||||
import Component from "@glimmer/component";
|
||||
import { tracked } from "@glimmer/tracking";
|
||||
import { action, computed } from "@ember/object";
|
||||
import { service } from "@ember/service";
|
||||
import I18n from "I18n";
|
||||
|
||||
export default class WizardSubscriptionBadge extends Component {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import Component from "@glimmer/component";
|
||||
import { computed } from "@ember/object";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { service } from "@ember/service";
|
||||
|
||||
export default class WizardSubscriptionContainer extends Component {
|
||||
@service subscription;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import SingleSelectComponent from "select-kit/components/single-select";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { filterValues } from "discourse/plugins/discourse-custom-wizard/discourse/lib/wizard-schema";
|
||||
import { service } from "@ember/service";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import SingleSelectComponent from "select-kit/components/single-select";
|
||||
import { filterValues } from "discourse/plugins/discourse-custom-wizard/discourse/lib/wizard-schema";
|
||||
|
||||
const nameKey = function (feature, attribute, value) {
|
||||
if (feature === "action") {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import SingleSelectHeaderComponent from "select-kit/components/select-kit/single-select-header";
|
||||
import { computed } from "@ember/object";
|
||||
import { reads } from "@ember/object/computed";
|
||||
import SingleSelectHeaderComponent from "select-kit/components/select-kit/single-select-header";
|
||||
|
||||
export default SingleSelectHeaderComponent.extend({
|
||||
classNames: ["combo-box-header", "wizard-subscription-selector-header"],
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import SelectKitRowComponent from "select-kit/components/select-kit/select-kit-row";
|
||||
import { default as discourseComputed } from "discourse-common/utils/decorators";
|
||||
import SelectKitRowComponent from "select-kit/components/select-kit/select-kit-row";
|
||||
|
||||
export default SelectKitRowComponent.extend({
|
||||
classNameBindings: ["isDisabled:disabled"],
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { action } from "@ember/object";
|
||||
import { inject as service } from "@ember/service";
|
||||
import Component from "@glimmer/component";
|
||||
import { tracked } from "@glimmer/tracking";
|
||||
import { action } from "@ember/object";
|
||||
import { service } from "@ember/service";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { notEmpty } from "@ember/object/computed";
|
||||
import { userProperties } from "../lib/wizard";
|
||||
import { scheduleOnce } from "@ember/runloop";
|
||||
import Component from "@ember/component";
|
||||
import { notEmpty } from "@ember/object/computed";
|
||||
import { scheduleOnce } from "@ember/runloop";
|
||||
import $ from "jquery";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import { userProperties } from "../lib/wizard";
|
||||
|
||||
const excludedUserProperties = ["profile_background", "card_background"];
|
||||
|
||||
|
@ -19,12 +20,14 @@ export default Component.extend({
|
|||
this._super(...arguments);
|
||||
|
||||
if (!this.barEnabled) {
|
||||
scheduleOnce("afterRender", () => {
|
||||
$(this.element).find(".d-editor-button-bar").addClass("hidden");
|
||||
});
|
||||
scheduleOnce("afterRender", this, this._hideButtonBar);
|
||||
}
|
||||
},
|
||||
|
||||
_hideButtonBar() {
|
||||
$(this.element).find(".d-editor-button-bar").addClass("hidden");
|
||||
},
|
||||
|
||||
@discourseComputed("forcePreview")
|
||||
previewLabel(forcePreview) {
|
||||
return I18n.t("admin.wizard.editor.preview", {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import UserChooserComponent from "select-kit/components/user-chooser";
|
||||
import I18n from "I18n";
|
||||
import UserChooserComponent from "select-kit/components/user-chooser";
|
||||
|
||||
export const WIZARD_USER = "wizard-user";
|
||||
|
||||
|
|
|
@ -4,21 +4,21 @@
|
|||
<div class="display-row">
|
||||
<div class="field">{{i18n "admin.wizard.user.redirect.label"}}</div>
|
||||
<div class="value">
|
||||
{{#if model.redirect_to_wizard}}
|
||||
{{#if @model.redirect_to_wizard}}
|
||||
<LinkTo
|
||||
@route="adminWizardsWizardShow"
|
||||
@model={{dasherize model.redirect_to_wizard}}
|
||||
@model={{dasherize @model.redirect_to_wizard}}
|
||||
>
|
||||
{{model.redirect_to_wizard}}
|
||||
{{@model.redirect_to_wizard}}
|
||||
</LinkTo>
|
||||
{{else}}
|
||||
—
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="controls">
|
||||
{{#if model.redirect_to_wizard}}
|
||||
{{#if @model.redirect_to_wizard}}
|
||||
<DButton
|
||||
@action={{fn model.clearWizardRedirect model}}
|
||||
@action={{fn @model.clearWizardRedirect @model}}
|
||||
@label="admin.wizard.user.redirect.remove_label"
|
||||
@title="admin.wizard.user.redirect.remove_title"
|
||||
/>
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
</label>
|
||||
<div class="controls">
|
||||
{{combo-box
|
||||
value=wizardListVal
|
||||
content=wizardList
|
||||
value=this.wizardListVal
|
||||
content=this.wizardList
|
||||
onChange=(action "changeWizard")
|
||||
options=(hash none="admin.wizard.select")
|
||||
}}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import CustomWizardAdmin from "../../models/custom-wizard-admin";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import CustomWizardAdmin from "../../models/custom-wizard-admin";
|
||||
|
||||
export default {
|
||||
setupComponent(attrs, component) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{{#each site.complete_custom_wizard as |wizard|}}
|
||||
{{#each @site.complete_custom_wizard as |wizard|}}
|
||||
<div class="row">
|
||||
<div class="alert alert-info alert-wizard">
|
||||
<a href={{wizard.url}}>{{i18n
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import Controller from "@ember/controller";
|
||||
import { and, equal, not } from "@ember/object/computed";
|
||||
import { service } from "@ember/service";
|
||||
import { underscore } from "@ember/string";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import CustomWizardApi from "../models/custom-wizard-api";
|
||||
import { default as discourseComputed } from "discourse-common/utils/decorators";
|
||||
import { and, equal, not } from "@ember/object/computed";
|
||||
import { selectKitContent } from "../lib/wizard";
|
||||
import { underscore } from "@ember/string";
|
||||
import Controller from "@ember/controller";
|
||||
import I18n from "I18n";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { selectKitContent } from "../lib/wizard";
|
||||
import CustomWizardApi from "../models/custom-wizard-api";
|
||||
|
||||
export default Controller.extend({
|
||||
router: service(),
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { notEmpty } from "@ember/object/computed";
|
||||
import CustomWizardLogs from "../models/custom-wizard-logs";
|
||||
import Controller from "@ember/controller";
|
||||
import { notEmpty } from "@ember/object/computed";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import CustomWizardLogs from "../models/custom-wizard-logs";
|
||||
|
||||
export default Controller.extend({
|
||||
refreshing: false,
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
import Controller from "@ember/controller";
|
||||
import { observes } from "discourse-common/utils/decorators";
|
||||
import { empty } from "@ember/object/computed";
|
||||
import CustomWizardManager from "../models/custom-wizard-manager";
|
||||
import { A } from "@ember/array";
|
||||
import I18n from "I18n";
|
||||
import Controller from "@ember/controller";
|
||||
import { empty } from "@ember/object/computed";
|
||||
import { underscore } from "@ember/string";
|
||||
import $ from "jquery";
|
||||
import { observes } from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import CustomWizardManager from "../models/custom-wizard-manager";
|
||||
|
||||
export default Controller.extend({
|
||||
messageUrl:
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import Controller from "@ember/controller";
|
||||
import { empty } from "@ember/object/computed";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { service } from "@ember/service";
|
||||
import { fmt } from "discourse/lib/computed";
|
||||
import { inject as service } from "@ember/service";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import AdminWizardsColumnsModal from "../components/modal/admin-wizards-columns";
|
||||
import CustomWizardAdmin from "../models/custom-wizard-admin";
|
||||
import { formatModel } from "../lib/wizard-submission";
|
||||
import CustomWizardAdmin from "../models/custom-wizard-admin";
|
||||
|
||||
export default Controller.extend({
|
||||
modal: service(),
|
||||
|
|
|
@ -1,18 +1,19 @@
|
|||
import Controller from "@ember/controller";
|
||||
import { action } from "@ember/object";
|
||||
import { notEmpty } from "@ember/object/computed";
|
||||
import { later, scheduleOnce } from "@ember/runloop";
|
||||
import { service } from "@ember/service";
|
||||
import { dasherize } from "@ember/string";
|
||||
import $ from "jquery";
|
||||
import copyText from "discourse/lib/copy-text";
|
||||
import {
|
||||
default as discourseComputed,
|
||||
observes,
|
||||
} from "discourse-common/utils/decorators";
|
||||
import { notEmpty } from "@ember/object/computed";
|
||||
import { inject as service } from "@ember/service";
|
||||
import NextSessionScheduledModal from "../components/modal/next-session-scheduled";
|
||||
import { generateId, wizardFieldList } from "../lib/wizard";
|
||||
import { dasherize } from "@ember/string";
|
||||
import { later, scheduleOnce } from "@ember/runloop";
|
||||
import Controller from "@ember/controller";
|
||||
import copyText from "discourse/lib/copy-text";
|
||||
import I18n from "I18n";
|
||||
import { filterValues } from "discourse/plugins/discourse-custom-wizard/discourse/lib/wizard-schema";
|
||||
import { action } from "@ember/object";
|
||||
import NextSessionScheduledModal from "../components/modal/next-session-scheduled";
|
||||
import { generateId, wizardFieldList } from "../lib/wizard";
|
||||
|
||||
export default Controller.extend({
|
||||
modal: service(),
|
||||
|
@ -28,7 +29,11 @@ export default Controller.extend({
|
|||
this.set("currentField", fields && fields.length ? fields[0] : null);
|
||||
}
|
||||
|
||||
scheduleOnce("afterRender", () => $("body").addClass("admin-wizard"));
|
||||
scheduleOnce("afterRender", this, this._addBodyClass);
|
||||
},
|
||||
|
||||
_addBodyClass() {
|
||||
$("body").addClass("admin-wizard");
|
||||
},
|
||||
|
||||
@observes("wizard.name")
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import Controller from "@ember/controller";
|
||||
import { default as discourseComputed } from "discourse-common/utils/decorators";
|
||||
import { equal } from "@ember/object/computed";
|
||||
import { default as discourseComputed } from "discourse-common/utils/decorators";
|
||||
|
||||
export default Controller.extend({
|
||||
creating: equal("wizardId", "create"),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import Controller from "@ember/controller";
|
||||
import { or } from "@ember/object/computed";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { service } from "@ember/service";
|
||||
|
||||
export default Controller.extend({
|
||||
subscription: service(),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import Controller from "@ember/controller";
|
||||
import { service } from "@ember/service";
|
||||
import getUrl from "discourse-common/lib/get-url";
|
||||
import { inject as service } from "@ember/service";
|
||||
|
||||
export default Controller.extend({
|
||||
router: service(),
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import I18n from "I18n";
|
||||
import Handlebars from "handlebars";
|
||||
import I18n from "I18n";
|
||||
|
||||
export default function wizardCharCounter(body, maxLength) {
|
||||
let bodyLength = body ? body.length : 0;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import DiscourseURL from "discourse/lib/url";
|
||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||
import getUrl from "discourse-common/lib/get-url";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||
import DiscourseURL from "discourse/lib/url";
|
||||
import getUrl from "discourse-common/lib/get-url";
|
||||
import CustomWizardTextareaEditor from "../components/custom-wizard-textarea-editor";
|
||||
|
||||
export default {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import DiscourseURL from "discourse/lib/url";
|
||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||
import { dasherize } from "@ember/string";
|
||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||
import DiscourseURL from "discourse/lib/url";
|
||||
|
||||
export default {
|
||||
name: "custom-wizard-redirect",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { A } from "@ember/array";
|
||||
import EmberObject from "@ember/object";
|
||||
import { camelCase, listProperties } from "../lib/wizard";
|
||||
import wizardSchema from "../lib/wizard-schema";
|
||||
import EmberObject from "@ember/object";
|
||||
import { A } from "@ember/array";
|
||||
|
||||
function present(val) {
|
||||
if (val === null || val === undefined) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import EmberObject from "@ember/object";
|
||||
import { A } from "@ember/array";
|
||||
import EmberObject from "@ember/object";
|
||||
import I18n from "I18n";
|
||||
|
||||
// Inputs
|
||||
|
|
|
@ -23,7 +23,6 @@ const wizard = {
|
|||
required: ["id"],
|
||||
dependent: {
|
||||
after_time: "after_time_scheduled",
|
||||
after_time: "after_time_groups",
|
||||
},
|
||||
objectArrays: {
|
||||
step: {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import EmberObject from "@ember/object";
|
||||
import wizardSchema from "./wizard-schema";
|
||||
import I18n from "I18n";
|
||||
import wizardSchema from "./wizard-schema";
|
||||
|
||||
function selectKitContent(content) {
|
||||
return content.map((i) => ({ id: i, name: i }));
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import Mixin from "@ember/object/mixin";
|
||||
import { getOwner } from "@ember/application";
|
||||
import { readOnly } from "@ember/object/computed";
|
||||
import Mixin from "@ember/object/mixin";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
|
||||
const PRODUCT_PAGE = "https://custom-wizard.pavilion.tech/pricing";
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { listProperties } from "../lib/wizard";
|
||||
import { default as wizardSchema } from "../lib/wizard-schema";
|
||||
import { get, set } from "@ember/object";
|
||||
import Mixin from "@ember/object/mixin";
|
||||
import { deepEqual } from "discourse-common/lib/object";
|
||||
import { listProperties } from "../lib/wizard";
|
||||
import { default as wizardSchema } from "../lib/wizard-schema";
|
||||
|
||||
const observedCache = [];
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import EmberObject from "@ember/object";
|
||||
import { buildProperties, mapped, present } from "../lib/wizard-json";
|
||||
import { listProperties, snakeCase } from "../lib/wizard";
|
||||
import wizardSchema from "../lib/wizard-schema";
|
||||
import { Promise } from "rsvp";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { listProperties, snakeCase } from "../lib/wizard";
|
||||
import { buildProperties, mapped, present } from "../lib/wizard-json";
|
||||
import wizardSchema from "../lib/wizard-schema";
|
||||
|
||||
const GUEST_GROUP_ID = -1;
|
||||
|
||||
|
@ -132,7 +132,7 @@ const CustomWizardAdmin = EmberObject.extend({
|
|||
if (property === "api_body") {
|
||||
try {
|
||||
value = JSON.parse(value);
|
||||
} catch (e) {
|
||||
} catch {
|
||||
result.error = {
|
||||
type: "invalid",
|
||||
params: { type, property },
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
import { A } from "@ember/array";
|
||||
import EmberObject from "@ember/object";
|
||||
import { dasherize } from "@ember/string";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { default as discourseComputed } from "discourse-common/utils/decorators";
|
||||
import EmberObject from "@ember/object";
|
||||
import { A } from "@ember/array";
|
||||
|
||||
const CustomWizardApi = EmberObject.extend({
|
||||
@discourseComputed("name")
|
||||
redirectUri(name) {
|
||||
let nameParam = name.toString().dasherize();
|
||||
let nameParam = dasherize(name);
|
||||
const baseUrl =
|
||||
location.protocol +
|
||||
"//" +
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { ajax } from "discourse/lib/ajax";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import EmberObject from "@ember/object";
|
||||
import { isEmpty } from "@ember/utils";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
|
||||
const CustomWizardCustomField = EmberObject.extend({
|
||||
isNew: isEmpty("id"),
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import EmberObject from "@ember/object";
|
||||
import ValidState from "discourse/plugins/discourse-custom-wizard/discourse/mixins/valid-state";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { translationOrText } from "discourse/plugins/discourse-custom-wizard/discourse/lib/wizard";
|
||||
import ValidState from "discourse/plugins/discourse-custom-wizard/discourse/mixins/valid-state";
|
||||
|
||||
const StandardFieldValidation = [
|
||||
"text",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import EmberObject from "@ember/object";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import EmberObject from "@ember/object";
|
||||
|
||||
const CustomWizardLogs = EmberObject.extend();
|
||||
const logItemTypes = {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import EmberObject from "@ember/object";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import EmberObject from "@ember/object";
|
||||
import getURL from "discourse-common/lib/get-url";
|
||||
|
||||
const CustomWizardManager = EmberObject.extend();
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import EmberObject from "@ember/object";
|
||||
import ValidState from "discourse/plugins/discourse-custom-wizard/discourse/mixins/valid-state";
|
||||
import { later } from "@ember/runloop";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { later } from "@ember/runloop";
|
||||
import { translationOrText } from "discourse/plugins/discourse-custom-wizard/discourse/lib/wizard";
|
||||
import ValidState from "discourse/plugins/discourse-custom-wizard/discourse/mixins/valid-state";
|
||||
|
||||
export default EmberObject.extend(ValidState, {
|
||||
id: null,
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import EmberObject from "@ember/object";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import DiscourseURL from "discourse/lib/url";
|
||||
import getUrl from "discourse-common/lib/get-url";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import CustomWizardField from "./custom-wizard-field";
|
||||
import CustomWizardStep from "./custom-wizard-step";
|
||||
import DiscourseURL from "discourse/lib/url";
|
||||
|
||||
const CustomWizard = EmberObject.extend({
|
||||
@discourseComputed("steps.length")
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import CustomWizardApi from "../models/custom-wizard-api";
|
||||
import { service } from "@ember/service";
|
||||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import { inject as service } from "@ember/service";
|
||||
import CustomWizardApi from "../models/custom-wizard-api";
|
||||
|
||||
export default DiscourseRoute.extend({
|
||||
router: service(),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { service } from "@ember/service";
|
||||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import CustomWizardApi from "../models/custom-wizard-api";
|
||||
import { inject as service } from "@ember/service";
|
||||
|
||||
export default DiscourseRoute.extend({
|
||||
router: service(),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { A } from "@ember/array";
|
||||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import CustomWizardCustomField from "../models/custom-wizard-custom-field";
|
||||
import { A } from "@ember/array";
|
||||
|
||||
export default DiscourseRoute.extend({
|
||||
model() {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import CustomWizardLogs from "../models/custom-wizard-logs";
|
||||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import { A } from "@ember/array";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { service } from "@ember/service";
|
||||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import CustomWizardLogs from "../models/custom-wizard-logs";
|
||||
|
||||
export default DiscourseRoute.extend({
|
||||
router: service(),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import { service } from "@ember/service";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { inject as service } from "@ember/service";
|
||||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
|
||||
export default DiscourseRoute.extend({
|
||||
router: service(),
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import CustomWizardAdmin from "../models/custom-wizard-admin";
|
||||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import CustomWizardAdmin from "../models/custom-wizard-admin";
|
||||
|
||||
export default DiscourseRoute.extend({
|
||||
model() {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { A } from "@ember/array";
|
||||
import CustomWizardAdmin from "../models/custom-wizard-admin";
|
||||
import { service } from "@ember/service";
|
||||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import { formatModel } from "../lib/wizard-submission";
|
||||
import { inject as service } from "@ember/service";
|
||||
import CustomWizardAdmin from "../models/custom-wizard-admin";
|
||||
|
||||
export default DiscourseRoute.extend({
|
||||
router: service(),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import { service } from "@ember/service";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { inject as service } from "@ember/service";
|
||||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
|
||||
export default DiscourseRoute.extend({
|
||||
router: service(),
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import CustomWizardAdmin from "../models/custom-wizard-admin";
|
||||
import { service } from "@ember/service";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import I18n from "I18n";
|
||||
import { inject as service } from "@ember/service";
|
||||
import CustomWizardAdmin from "../models/custom-wizard-admin";
|
||||
|
||||
export default DiscourseRoute.extend({
|
||||
router: service(),
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import { buildFieldTypes, buildFieldValidations } from "../lib/wizard-schema";
|
||||
import EmberObject, { set } from "@ember/object";
|
||||
import { A } from "@ember/array";
|
||||
import EmberObject, { set } from "@ember/object";
|
||||
import { service } from "@ember/service";
|
||||
import { all } from "rsvp";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { inject as service } from "@ember/service";
|
||||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import { buildFieldTypes, buildFieldValidations } from "../lib/wizard-schema";
|
||||
|
||||
export default DiscourseRoute.extend({
|
||||
router: service(),
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { service } from "@ember/service";
|
||||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import { inject as service } from "@ember/service";
|
||||
|
||||
export default DiscourseRoute.extend({
|
||||
router: service(),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { getCachedWizard } from "../models/custom-wizard";
|
||||
import Route from "@ember/routing/route";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { service } from "@ember/service";
|
||||
import { getCachedWizard } from "../models/custom-wizard";
|
||||
|
||||
export default Route.extend({
|
||||
router: service(),
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { action } from "@ember/object";
|
||||
import Route from "@ember/routing/route";
|
||||
import { service } from "@ember/service";
|
||||
import { scrollTop } from "discourse/mixins/scroll-top";
|
||||
import I18n from "I18n";
|
||||
import { getCachedWizard } from "../models/custom-wizard";
|
||||
import Route from "@ember/routing/route";
|
||||
import { scrollTop } from "discourse/mixins/scroll-top";
|
||||
import { action } from "@ember/object";
|
||||
import { inject as service } from "@ember/service";
|
||||
|
||||
export default Route.extend({
|
||||
router: service(),
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { findCustomWizard, updateCachedWizard } from "../models/custom-wizard";
|
||||
import I18n from "I18n";
|
||||
import { service } from "@ember/service";
|
||||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import { inject as service } from "@ember/service";
|
||||
import I18n from "I18n";
|
||||
import { findCustomWizard, updateCachedWizard } from "../models/custom-wizard";
|
||||
|
||||
export default DiscourseRoute.extend({
|
||||
dialog: service(),
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import Service from "@ember/service";
|
||||
import { tracked } from "@glimmer/tracking";
|
||||
import Service from "@ember/service";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
|
||||
|
|
3
eslint.config.mjs
Normale Datei
3
eslint.config.mjs
Normale Datei
|
@ -0,0 +1,3 @@
|
|||
import DiscourseRecommended from "@discourse/lint-configs/eslint";
|
||||
|
||||
export default [...DiscourseRecommended];
|
5363
package-lock.json
generiert
5363
package-lock.json
generiert
Datei-Diff unterdrückt, da er zu groß ist
Diff laden
18
package.json
18
package.json
|
@ -1,11 +1,15 @@
|
|||
{
|
||||
"name": "discourse-custom-wizard",
|
||||
"version": "1.0.0",
|
||||
"repository": "git@github.com:paviliondev/discourse-custom-wizard.git",
|
||||
"author": "Pavilion",
|
||||
"license": "GPL V2",
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"eslint-config-discourse": "^3.4.0",
|
||||
"semver": "^7.3.5"
|
||||
"@discourse/lint-configs": "2.2.1",
|
||||
"ember-template-lint": "6.0.0",
|
||||
"eslint": "9.14.0",
|
||||
"prettier": "2.8.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 18",
|
||||
"npm": "please-use-pnpm",
|
||||
"yarn": "please-use-pnpm",
|
||||
"pnpm": ">= 9"
|
||||
}
|
||||
}
|
||||
|
|
4007
pnpm-lock.yaml
Normale Datei
4007
pnpm-lock.yaml
Normale Datei
Datei-Diff unterdrückt, da er zu groß ist
Diff laden
|
@ -1,11 +1,11 @@
|
|||
import { click, fillIn, visit } from "@ember/test-helpers";
|
||||
import { test } from "qunit";
|
||||
import {
|
||||
acceptance,
|
||||
query,
|
||||
queryAll,
|
||||
visible,
|
||||
} from "discourse/tests/helpers/qunit-helpers";
|
||||
import { test } from "qunit";
|
||||
import { click, fillIn, visit } from "@ember/test-helpers";
|
||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||
import {
|
||||
getCustomFields,
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { click, visit } from "@ember/test-helpers";
|
||||
import { test } from "qunit";
|
||||
import {
|
||||
acceptance,
|
||||
query,
|
||||
queryAll,
|
||||
} from "discourse/tests/helpers/qunit-helpers";
|
||||
import { test } from "qunit";
|
||||
import { click, visit } from "@ember/test-helpers";
|
||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||
import {
|
||||
getSuppliers,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { acceptance, query } from "discourse/tests/helpers/qunit-helpers";
|
||||
import { test } from "qunit";
|
||||
import { click, find, findAll, visit } from "@ember/test-helpers";
|
||||
import { test } from "qunit";
|
||||
import { acceptance, query } from "discourse/tests/helpers/qunit-helpers";
|
||||
import {
|
||||
getSuppliers,
|
||||
getUnsubscribedAdminWizards,
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { click, visit } from "@ember/test-helpers";
|
||||
import { test } from "qunit";
|
||||
import {
|
||||
acceptance,
|
||||
query,
|
||||
queryAll,
|
||||
} from "discourse/tests/helpers/qunit-helpers";
|
||||
import { test } from "qunit";
|
||||
import { click, visit } from "@ember/test-helpers";
|
||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||
import {
|
||||
getAnotherWizardSubmission,
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { click, currentURL, fillIn, visit } from "@ember/test-helpers";
|
||||
import { test } from "qunit";
|
||||
import {
|
||||
acceptance,
|
||||
query,
|
||||
queryAll,
|
||||
} from "discourse/tests/helpers/qunit-helpers";
|
||||
import { test } from "qunit";
|
||||
import { click, currentURL, fillIn, visit } from "@ember/test-helpers";
|
||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||
import {
|
||||
getBusinessAdminWizard,
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import { click, currentURL, fillIn, findAll, visit } from "@ember/test-helpers";
|
||||
import $ from "jquery";
|
||||
import { test } from "qunit";
|
||||
import {
|
||||
acceptance,
|
||||
exists,
|
||||
|
@ -5,8 +8,6 @@ import {
|
|||
queryAll,
|
||||
visible,
|
||||
} from "discourse/tests/helpers/qunit-helpers";
|
||||
import { test } from "qunit";
|
||||
import { click, currentURL, fillIn, findAll, visit } from "@ember/test-helpers";
|
||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||
import {
|
||||
getAdminTestingWizard,
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import { click, currentURL, fillIn, visit } from "@ember/test-helpers";
|
||||
import $ from "jquery";
|
||||
import { test } from "qunit";
|
||||
import {
|
||||
acceptance,
|
||||
exists,
|
||||
|
@ -5,8 +8,6 @@ import {
|
|||
queryAll,
|
||||
visible,
|
||||
} from "discourse/tests/helpers/qunit-helpers";
|
||||
import { test } from "qunit";
|
||||
import { click, currentURL, fillIn, visit } from "@ember/test-helpers";
|
||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||
import {
|
||||
getAdminTestingWizard,
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import { click, currentURL, fillIn, visit } from "@ember/test-helpers";
|
||||
import $ from "jquery";
|
||||
import { test } from "qunit";
|
||||
import {
|
||||
acceptance,
|
||||
exists,
|
||||
|
@ -5,8 +8,6 @@ import {
|
|||
queryAll,
|
||||
visible,
|
||||
} from "discourse/tests/helpers/qunit-helpers";
|
||||
import { test } from "qunit";
|
||||
import { click, currentURL, fillIn, visit } from "@ember/test-helpers";
|
||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||
import {
|
||||
getAdminTestingWizard,
|
||||
|
|
Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen
Laden …
In neuem Issue referenzieren