@dejwcake/craftable 0.1.9 → 2.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.
Files changed (126) hide show
  1. package/README.md +117 -3
  2. package/dist/buildMatchPatternFn-BV4I8r8j.js +63 -0
  3. package/dist/buildMatchPatternFn-T5KjFTBQ.cjs +1 -0
  4. package/dist/craftable.css +2 -0
  5. package/dist/cs-B5QMxFrl.js +682 -0
  6. package/dist/cs-MAoetkhe.cjs +1 -0
  7. package/dist/de-BlQ2ZKmc.js +526 -0
  8. package/dist/de-BoVLAn6U.cjs +1 -0
  9. package/dist/en-US-BLvEnhs4.js +443 -0
  10. package/dist/en-US-Dz8vkDZ_.cjs +1 -0
  11. package/dist/en-US-X9gX759i.cjs +1 -0
  12. package/dist/es-DBHDeXHI.cjs +1 -0
  13. package/dist/es-YEqfkBY2.js +437 -0
  14. package/dist/fr-B7MHC2AN.js +407 -0
  15. package/dist/fr-DLs3QoNB.cjs +1 -0
  16. package/dist/hu-BKZPI9jH.cjs +1 -0
  17. package/dist/hu-reoJgNxD.js +425 -0
  18. package/dist/index.cjs +1 -0
  19. package/dist/index.mjs +3866 -0
  20. package/dist/isSameWeek-CC6GX_zp.js +40 -0
  21. package/dist/isSameWeek-Mctj6Tdj.cjs +1 -0
  22. package/dist/pl-B5A0Rjp7.js +628 -0
  23. package/dist/pl-BMyrOO-Q.cjs +1 -0
  24. package/dist/sk-B7JF2MoV.cjs +1 -0
  25. package/dist/sk-Btro3W4S.js +602 -0
  26. package/package.json +68 -40
  27. package/scripts/publish-components.js +118 -0
  28. package/scss/_images.scss +1 -1
  29. package/scss/_variables.scss +13 -6
  30. package/scss/app.scss +4 -4
  31. package/scss/overrides/_alerts.scss +0 -2
  32. package/scss/overrides/_badges.scss +1 -17
  33. package/scss/overrides/_buttons.scss +64 -7
  34. package/scss/overrides/_cards.scss +4 -51
  35. package/scss/overrides/_checkboxes.scss +54 -59
  36. package/scss/overrides/_forms.scss +270 -176
  37. package/scss/overrides/_index.scss +18 -18
  38. package/scss/overrides/_keyframes.scss +6 -4
  39. package/scss/overrides/_layout.scss +24 -30
  40. package/scss/overrides/_media-wysiwyg.scss +9 -111
  41. package/scss/overrides/_modal.scss +0 -18
  42. package/scss/overrides/_multiselect.scss +63 -7
  43. package/scss/overrides/_nav.scss +55 -33
  44. package/scss/overrides/_notifications.scss +6 -1
  45. package/scss/overrides/_pagination.scss +3 -3
  46. package/scss/overrides/_sidebar.scss +84 -0
  47. package/scss/overrides/_tables.scss +52 -37
  48. package/scss/overrides/_text.scss +1 -3
  49. package/scss/overrides/_wysiwyg.scss +151 -48
  50. package/scss/styles/_auth.scss +32 -37
  51. package/scss/styles/_custom.scss +44 -1
  52. package/scss/styles/_index.scss +4 -4
  53. package/scss/styles/_legacy.scss +5 -81
  54. package/scss/styles/_others.scss +232 -337
  55. package/scss/vendor/_index.scss +5 -4
  56. package/src/auth/ActivationError.vue +23 -0
  57. package/src/auth/ActivationForm.vue +69 -0
  58. package/src/auth/ForgotPasswordForm.vue +74 -0
  59. package/src/auth/LoginForm.vue +107 -0
  60. package/src/auth/ResetPasswordForm.vue +122 -0
  61. package/src/components/ConfirmModal.vue +65 -0
  62. package/src/components/UserDetailTooltip.vue +88 -0
  63. package/src/components/form/CkeditorEditor.vue +205 -0
  64. package/src/components/form/FormCheckbox.vue +29 -0
  65. package/src/components/form/FormDatePicker.vue +52 -0
  66. package/src/components/form/FormEmail.vue +17 -0
  67. package/src/components/form/FormInput.vue +31 -0
  68. package/src/components/form/FormLocalizedInput.vue +47 -0
  69. package/src/components/form/FormLocalizedWysiwyg.vue +55 -0
  70. package/src/components/form/FormLocalizedWysiwygSimple.vue +55 -0
  71. package/src/components/form/FormMultiSelect.vue +36 -0
  72. package/src/components/form/FormPasswordConfirm.vue +49 -0
  73. package/src/components/form/FormSelect.vue +35 -0
  74. package/src/components/form/FormSubmit.vue +13 -0
  75. package/src/components/form/FormTextarea.vue +31 -0
  76. package/src/components/form/FormWysiwyg.vue +31 -0
  77. package/src/components/form/FormWysiwygSimple.vue +31 -0
  78. package/src/components/form/LocalizationBar.vue +90 -0
  79. package/src/components/form/MediaUpload.vue +317 -0
  80. package/src/components/form/TiptapEditor.vue +238 -0
  81. package/src/components/listing/BulkCheckboxHeader.vue +18 -0
  82. package/src/components/listing/BulkCheckboxRow.vue +21 -0
  83. package/src/components/listing/BulkOperationsBar.vue +41 -0
  84. package/src/components/listing/DeleteButton.vue +46 -0
  85. package/src/components/listing/EditButton.vue +17 -0
  86. package/src/components/listing/EmptyState.vue +25 -0
  87. package/src/components/listing/ListingHeader.vue +24 -0
  88. package/src/components/listing/Pagination.vue +158 -0
  89. package/src/components/listing/PerPage.vue +15 -0
  90. package/src/components/listing/PublishedAtColumn.vue +226 -0
  91. package/src/components/listing/Search.vue +81 -0
  92. package/src/components/listing/Sortable.vue +28 -0
  93. package/src/components/listing/ToggleSwitch.vue +47 -0
  94. package/src/composables/useAdmin.js +39 -0
  95. package/src/composables/useBaseAuth.js +81 -0
  96. package/src/composables/useBaseForm.js +265 -0
  97. package/src/composables/useBaseListing.js +316 -0
  98. package/src/composables/useResponsiveColumns.js +62 -0
  99. package/src/index.js +62 -0
  100. package/src/translation/TranslationListing.vue +230 -0
  101. package/src/translation/modals/TranslationEditModal.vue +86 -0
  102. package/src/translation/modals/TranslationExportModal.vue +74 -0
  103. package/src/translation/modals/TranslationImportModal.vue +255 -0
  104. package/src/ui/index.js +99 -0
  105. package/src/utils/ckeditorHelpers.js +36 -0
  106. package/src/utils/dateFnsLocale.js +24 -0
  107. package/src/utils/dateFormatters.js +30 -0
  108. package/src/utils/mediaProps.js +14 -0
  109. package/src/utils/notify.js +22 -0
  110. package/dist/admin/Admin.js +0 -42
  111. package/dist/auth/Form.js +0 -15
  112. package/dist/base-components/Form/BaseForm.js +0 -392
  113. package/dist/base-components/Form/BaseUpload.js +0 -188
  114. package/dist/base-components/Form/bootstrap.js +0 -21
  115. package/dist/base-components/Listing/BaseListing.js +0 -454
  116. package/dist/base-components/Listing/components/Pagination.js +0 -105
  117. package/dist/base-components/Listing/components/Sortable.js +0 -48
  118. package/dist/base-components/Listing/components/UserDetailTooltip.js +0 -55
  119. package/dist/index.js +0 -70
  120. package/dist/overrides/trumbowyg.edit-embed-template.js +0 -72
  121. package/dist/overrides/trumbowyg.reupload.js +0 -146
  122. package/dist/overrides/trumbowyg.template.js +0 -67
  123. package/dist/translation/Form.js +0 -15
  124. package/dist/translation/Listing.js +0 -283
  125. package/dist/ui/index.js +0 -33
  126. package/scss/overrides/_switches.scss +0 -25
package/README.md CHANGED
@@ -1,10 +1,124 @@
1
- # craftable-frontend
1
+ # Craftable frontend
2
2
  This is a frontend dependency of [Craftable](https://github.com/BRACKETS-by-TRIAD/craftable). Craftable is a Laravel-based open-source toolkit for building administration interfaces.
3
3
 
4
4
  ![Craftable administration area example](https://www.getcraftable.com/docs/5.0/images/posts-crud.png)
5
5
 
6
- Find out more here: https://www.getcraftable.com/
6
+ This package is part of [Craftable](https://github.com/dejwCake/craftable) (`dejwCake/craftable`), an administration starter kit for Laravel 12, forked from [Craftable](https://github.com/BRACKETS-by-TRIAD/craftable) (`brackets/craftable`).
7
+
8
+ ## Documentation
9
+ You can find the full documentation at https://www.getcraftable.com/
7
10
 
8
11
  ## Issues
9
12
  Where do I report issues?
10
- If something is not working as expected, please open an issue in the main repository https://github.com/BRACKETS-by-TRIAD/craftable.
13
+ If something is not working as expected, please open an issue in the main repository https://github.com/dejwCake/craftable.
14
+
15
+ ## Commands
16
+
17
+ All commands run inside Docker containers from the package directory.
18
+
19
+ ### Install dependencies
20
+ ```shell
21
+ docker compose run -it --rm node npm install
22
+ ```
23
+
24
+ ### Build the package
25
+ ```shell
26
+ docker compose run -it --rm node npm run build
27
+ ```
28
+
29
+ ### Run ESLint
30
+ ```shell
31
+ docker compose run -it --rm node npm run lint
32
+ ```
33
+
34
+ ### Run ESLint with auto-fix
35
+ ```shell
36
+ docker compose run -it --rm node npm run lint:fix
37
+ ```
38
+
39
+ ### Run Stylelint on SCSS
40
+ ```shell
41
+ docker compose run -it --rm node npm run lint:style
42
+ ```
43
+
44
+ ### Run Stylelint with auto-fix
45
+ ```shell
46
+ docker compose run -it --rm node npm run lint:style:fix
47
+ ```
48
+
49
+ ### Run tests
50
+ ```shell
51
+ docker compose run -it --rm node npm test
52
+ ```
53
+
54
+ ### Run tests in watch mode
55
+ ```shell
56
+ docker compose run -it --rm node npm run test:watch
57
+ ```
58
+
59
+ ### Run tests with coverage
60
+ ```shell
61
+ docker compose run -it --rm node npm run test:coverage
62
+ ```
63
+
64
+ ### Check Prettier formatting
65
+ ```shell
66
+ docker compose run -it --rm node npm run format:check
67
+ ```
68
+
69
+ ### Fix Prettier formatting
70
+ ```shell
71
+ docker compose run -it --rm node npm run format
72
+ ```
73
+
74
+ ## Publishing to npm
75
+
76
+ Follow these steps to publish a new version of the package to npm:
77
+
78
+ ```shell
79
+ docker compose run -it --rm node bash
80
+ ```
81
+
82
+ 1. **Prerequisites**
83
+ - Ensure you have an npm account and are added as a collaborator/owner of the package.
84
+ - Log in from your terminal:
85
+ ```shell
86
+ npm login
87
+ ```
88
+
89
+ 2. **Check and bump the version**
90
+ - Inspect the current version in `package.json`.
91
+ - Bump it according to [semver](https://semver.org/) using one of:
92
+ ```shell
93
+ npm version patch
94
+ npm version minor
95
+ npm version major
96
+ ```
97
+
98
+ 3. **Install**
99
+ - Install dependencies:
100
+ ```shell
101
+ npm install
102
+ ```
103
+
104
+ 4**Build**
105
+ - Build the package:
106
+ ```shell
107
+ npm run build
108
+ ```
109
+
110
+ 5**Dry-run the publish**
111
+ - Verify what would be published without actually publishing:
112
+ ```shell
113
+ npm publish --dry-run
114
+ ```
115
+
116
+ 6**Publish the package**
117
+ - When everything looks correct, publish to npm:
118
+ ```shell
119
+ npm publish
120
+ ```
121
+ - For scoped packages you want public:
122
+ ```shell
123
+ npm publish --access public
124
+ ```
@@ -0,0 +1,63 @@
1
+ //#region node_modules/date-fns/locale/_lib/buildFormatLongFn.js
2
+ function e(e) {
3
+ return (t = {}) => {
4
+ let n = t.width ? String(t.width) : e.defaultWidth;
5
+ return e.formats[n] || e.formats[e.defaultWidth];
6
+ };
7
+ }
8
+ //#endregion
9
+ //#region node_modules/date-fns/locale/_lib/buildLocalizeFn.js
10
+ function t(e) {
11
+ return (t, n) => {
12
+ let r = n?.context ? String(n.context) : "standalone", i;
13
+ if (r === "formatting" && e.formattingValues) {
14
+ let t = e.defaultFormattingWidth || e.defaultWidth, r = n?.width ? String(n.width) : t;
15
+ i = e.formattingValues[r] || e.formattingValues[t];
16
+ } else {
17
+ let t = e.defaultWidth, r = n?.width ? String(n.width) : e.defaultWidth;
18
+ i = e.values[r] || e.values[t];
19
+ }
20
+ let a = e.argumentCallback ? e.argumentCallback(t) : t;
21
+ return i[a];
22
+ };
23
+ }
24
+ //#endregion
25
+ //#region node_modules/date-fns/locale/_lib/buildMatchFn.js
26
+ function n(e) {
27
+ return (t, n = {}) => {
28
+ let a = n.width, o = a && e.matchPatterns[a] || e.matchPatterns[e.defaultMatchWidth], s = t.match(o);
29
+ if (!s) return null;
30
+ let c = s[0], l = a && e.parsePatterns[a] || e.parsePatterns[e.defaultParseWidth], u = Array.isArray(l) ? i(l, (e) => e.test(c)) : r(l, (e) => e.test(c)), d;
31
+ d = e.valueCallback ? e.valueCallback(u) : u, d = n.valueCallback ? n.valueCallback(d) : d;
32
+ let f = t.slice(c.length);
33
+ return {
34
+ value: d,
35
+ rest: f
36
+ };
37
+ };
38
+ }
39
+ function r(e, t) {
40
+ for (let n in e) if (Object.prototype.hasOwnProperty.call(e, n) && t(e[n])) return n;
41
+ }
42
+ function i(e, t) {
43
+ for (let n = 0; n < e.length; n++) if (t(e[n])) return n;
44
+ }
45
+ //#endregion
46
+ //#region node_modules/date-fns/locale/_lib/buildMatchPatternFn.js
47
+ function a(e) {
48
+ return (t, n = {}) => {
49
+ let r = t.match(e.matchPattern);
50
+ if (!r) return null;
51
+ let i = r[0], a = t.match(e.parsePattern);
52
+ if (!a) return null;
53
+ let o = e.valueCallback ? e.valueCallback(a[0]) : a[0];
54
+ o = n.valueCallback ? n.valueCallback(o) : o;
55
+ let s = t.slice(i.length);
56
+ return {
57
+ value: o,
58
+ rest: s
59
+ };
60
+ };
61
+ }
62
+ //#endregion
63
+ export { e as i, n, t as r, a as t };
@@ -0,0 +1 @@
1
+ function e(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}function t(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}function n(e){return(t,n={})=>{let a=n.width,o=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;let c=s[0],l=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(l)?i(l,e=>e.test(c)):r(l,e=>e.test(c)),d;d=e.valueCallback?e.valueCallback(u):u,d=n.valueCallback?n.valueCallback(d):d;let f=t.slice(c.length);return{value:d,rest:f}}}function r(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function i(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function a(e){return(t,n={})=>{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
@@ -0,0 +1,2 @@
1
+ .datepicker-input[data-v-2e6d6ada]{flex:1 1 0;min-width:0}.localized-editor[data-v-608701dd],.localized-editor[data-v-bf19587d]{min-width:0}.locale-selector[data-v-1c9f060d]{vertical-align:middle;width:75px;display:inline-block}.forgot-link[data-v-8d4257dc],.forgot-link[data-v-8d4257dc]:hover{text-decoration:none}
2
+ /*$vite$:1*/