Loading .eslintrc.jsondeleted 100644 → 0 +0 −18 Original line number Diff line number Diff line { "env": { "browser": true, "es2020": true }, "parser": "@typescript-eslint/parser", "plugins": ["@typescript-eslint"], "extends": [ "eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:prettier/recommended" ], "parserOptions": { "ecmaVersion": 11, "sourceType": "module" }, "rules": {} } app/Models/PersonModel.php +9 −4 Original line number Diff line number Diff line Loading @@ -146,7 +146,10 @@ class PersonModel extends Model ->orderBy('`full_name`', 'ASC') ->findAll(), static function (array $result, $person): array { $result[$person->id] = $person->full_name; $result[] = [ 'value' => $person->id, 'label' => $person->full_name, ]; return $result; }, [], Loading Loading @@ -174,9 +177,11 @@ class PersonModel extends Model if (! ($options = cache($cacheName))) { foreach ($personsTaxonomy as $group_key => $group) { foreach ($group['roles'] as $role_key => $role) { $options[ "{$group_key},{$role_key}" ] = "{$group['label']} › {$role['label']}"; $options[] = [ 'value' => "{$group_key}, {$role_key}", 'label' => "{$group['label']} › {$role['label']}", ]; } } Loading app/Resources/js/modules/Select.ts +21 −18 Original line number Diff line number Diff line Loading @@ -17,32 +17,35 @@ const Select = (): void => { noChoicesText: select.dataset.noChoicesText, noResultsText: select.dataset.noResultsText, classNames: { containerOuter: "choices", activeState: "is-active", addChoice: ["choices__item--selectable", "add-choice"], button: "choices__button", containerInner: "choices__inner", containerOuter: "choices", description: "choices__description", disabledState: "is-disabled", flippedState: "is-flipped", focusState: "is-focused", group: "choices__group", groupHeading: "choices__heading", highlightedState: "is-highlighted", input: "choices__input", inputCloned: "choices__input--cloned", item: "choices__item", itemChoice: "choices__item--choice", itemDisabled: "choices__item--disabled", itemSelectable: "choices__item--selectable", list: "choices__list", listDropdown: "choices__list--dropdown", listItems: "choices__list--multiple", listSingle: "choices__list--single", listDropdown: "choices__list--dropdown", item: "choices__item", itemSelectable: "choices__item--selectable", itemDisabled: "choices__item--disabled", itemChoice: "choices__item--choice", placeholder: "choices__placeholder", group: "choices__group", groupHeading: "choices__heading", button: "choices__button", activeState: "is-active", focusState: "is-focused", openState: "is-open", disabledState: "is-disabled", highlightedState: "is-highlighted", selectedState: "is-selected", flippedState: "is-flipped", loadingState: "is-loading", noResults: "has-no-results", noChoices: "has-no-choices", noResults: "has-no-results", notice: "choices__notice", openState: "is-open", placeholder: "choices__placeholder", selectedState: "is-selected", }, }); } Loading app/Resources/js/modules/SelectMulti.ts +21 −18 Original line number Diff line number Diff line Loading @@ -18,32 +18,35 @@ const SelectMulti = (): void => { noResultsText: multiSelect.dataset.noResultsText, removeItemButton: true, classNames: { containerOuter: "choices", activeState: "is-active", addChoice: ["choices__item--selectable", "add-choice"], button: "choices__button", containerInner: "choices__inner", containerOuter: "choices", description: "choices__description", disabledState: "is-disabled", flippedState: "is-flipped", focusState: "is-focused", group: "choices__group", groupHeading: "choices__heading", highlightedState: "is-highlighted", input: "choices__input", inputCloned: "choices__input--cloned", item: "choices__item", itemChoice: "choices__item--choice", itemDisabled: "choices__item--disabled", itemSelectable: "choices__item--selectable", list: "choices__list", listDropdown: "choices__list--dropdown", listItems: "choices__list--multiple", listSingle: "choices__list--single", listDropdown: "choices__list--dropdown", item: "choices__item", itemSelectable: "choices__item--selectable", itemDisabled: "choices__item--disabled", itemChoice: "choices__item--choice", placeholder: "choices__placeholder", group: "choices__group", groupHeading: "choices__heading", button: "choices__button", activeState: "is-active", focusState: "is-focused", openState: "is-open", disabledState: "is-disabled", highlightedState: "is-highlighted", selectedState: "is-selected", flippedState: "is-flipped", loadingState: "is-loading", noResults: "has-no-results", noChoices: "has-no-choices", noResults: "has-no-results", notice: "choices__notice", openState: "is-open", placeholder: "choices__placeholder", selectedState: "is-selected", }, }); } Loading app/Resources/styles/choices.css +6 −0 Original line number Diff line number Diff line Loading @@ -250,6 +250,8 @@ } .choices__list--dropdown .choices__item { @apply break-normal; position: relative; padding: 10px; font-size: 14px; Loading Loading @@ -352,6 +354,10 @@ .choices__placeholder { opacity: 0.5; } .choices__description { @apply text-xs block text-skin-muted break-normal; } } /* ===== End of Choices ====== */ Loading
.eslintrc.jsondeleted 100644 → 0 +0 −18 Original line number Diff line number Diff line { "env": { "browser": true, "es2020": true }, "parser": "@typescript-eslint/parser", "plugins": ["@typescript-eslint"], "extends": [ "eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:prettier/recommended" ], "parserOptions": { "ecmaVersion": 11, "sourceType": "module" }, "rules": {} }
app/Models/PersonModel.php +9 −4 Original line number Diff line number Diff line Loading @@ -146,7 +146,10 @@ class PersonModel extends Model ->orderBy('`full_name`', 'ASC') ->findAll(), static function (array $result, $person): array { $result[$person->id] = $person->full_name; $result[] = [ 'value' => $person->id, 'label' => $person->full_name, ]; return $result; }, [], Loading Loading @@ -174,9 +177,11 @@ class PersonModel extends Model if (! ($options = cache($cacheName))) { foreach ($personsTaxonomy as $group_key => $group) { foreach ($group['roles'] as $role_key => $role) { $options[ "{$group_key},{$role_key}" ] = "{$group['label']} › {$role['label']}"; $options[] = [ 'value' => "{$group_key}, {$role_key}", 'label' => "{$group['label']} › {$role['label']}", ]; } } Loading
app/Resources/js/modules/Select.ts +21 −18 Original line number Diff line number Diff line Loading @@ -17,32 +17,35 @@ const Select = (): void => { noChoicesText: select.dataset.noChoicesText, noResultsText: select.dataset.noResultsText, classNames: { containerOuter: "choices", activeState: "is-active", addChoice: ["choices__item--selectable", "add-choice"], button: "choices__button", containerInner: "choices__inner", containerOuter: "choices", description: "choices__description", disabledState: "is-disabled", flippedState: "is-flipped", focusState: "is-focused", group: "choices__group", groupHeading: "choices__heading", highlightedState: "is-highlighted", input: "choices__input", inputCloned: "choices__input--cloned", item: "choices__item", itemChoice: "choices__item--choice", itemDisabled: "choices__item--disabled", itemSelectable: "choices__item--selectable", list: "choices__list", listDropdown: "choices__list--dropdown", listItems: "choices__list--multiple", listSingle: "choices__list--single", listDropdown: "choices__list--dropdown", item: "choices__item", itemSelectable: "choices__item--selectable", itemDisabled: "choices__item--disabled", itemChoice: "choices__item--choice", placeholder: "choices__placeholder", group: "choices__group", groupHeading: "choices__heading", button: "choices__button", activeState: "is-active", focusState: "is-focused", openState: "is-open", disabledState: "is-disabled", highlightedState: "is-highlighted", selectedState: "is-selected", flippedState: "is-flipped", loadingState: "is-loading", noResults: "has-no-results", noChoices: "has-no-choices", noResults: "has-no-results", notice: "choices__notice", openState: "is-open", placeholder: "choices__placeholder", selectedState: "is-selected", }, }); } Loading
app/Resources/js/modules/SelectMulti.ts +21 −18 Original line number Diff line number Diff line Loading @@ -18,32 +18,35 @@ const SelectMulti = (): void => { noResultsText: multiSelect.dataset.noResultsText, removeItemButton: true, classNames: { containerOuter: "choices", activeState: "is-active", addChoice: ["choices__item--selectable", "add-choice"], button: "choices__button", containerInner: "choices__inner", containerOuter: "choices", description: "choices__description", disabledState: "is-disabled", flippedState: "is-flipped", focusState: "is-focused", group: "choices__group", groupHeading: "choices__heading", highlightedState: "is-highlighted", input: "choices__input", inputCloned: "choices__input--cloned", item: "choices__item", itemChoice: "choices__item--choice", itemDisabled: "choices__item--disabled", itemSelectable: "choices__item--selectable", list: "choices__list", listDropdown: "choices__list--dropdown", listItems: "choices__list--multiple", listSingle: "choices__list--single", listDropdown: "choices__list--dropdown", item: "choices__item", itemSelectable: "choices__item--selectable", itemDisabled: "choices__item--disabled", itemChoice: "choices__item--choice", placeholder: "choices__placeholder", group: "choices__group", groupHeading: "choices__heading", button: "choices__button", activeState: "is-active", focusState: "is-focused", openState: "is-open", disabledState: "is-disabled", highlightedState: "is-highlighted", selectedState: "is-selected", flippedState: "is-flipped", loadingState: "is-loading", noResults: "has-no-results", noChoices: "has-no-choices", noResults: "has-no-results", notice: "choices__notice", openState: "is-open", placeholder: "choices__placeholder", selectedState: "is-selected", }, }); } Loading
app/Resources/styles/choices.css +6 −0 Original line number Diff line number Diff line Loading @@ -250,6 +250,8 @@ } .choices__list--dropdown .choices__item { @apply break-normal; position: relative; padding: 10px; font-size: 14px; Loading Loading @@ -352,6 +354,10 @@ .choices__placeholder { opacity: 0.5; } .choices__description { @apply text-xs block text-skin-muted break-normal; } } /* ===== End of Choices ====== */